
Linux
Linux
王万林 Ben
CAD/IT,熟悉芯片设计流程,操作系统,存储。欢迎交流,技术支持请加微信 wanlinxiong。https://icinfra.cn
展开
-
在CentOS 7.9上未找到man手册,怎么解决?
可以查看系统的文件结构。我执行查看却发现手册不存在!查看man不同section层级情况。编者在学习系统目录结构时,文章说到。原创 2022-11-27 19:35:51 · 415 阅读 · 0 评论 -
eth0与enp0s0,为什么采用不同的网卡命名方式?
旧的网卡命名方式,其网卡名字重启容易变动,无法预测。而新的做成了无状态的,基于fireware/bios/物理硬件插槽位置来确定网卡名字,具有预测性与确定性。可定制自己需要的网卡命名方式。原创 2022-11-24 09:56:44 · 933 阅读 · 0 评论 -
pve的各种源替换并去除弹窗
【代码】pve的各种源替换并去除弹窗。原创 2022-11-06 09:31:21 · 2039 阅读 · 3 评论 -
patchelf修改rpath
修改eog的rpath步骤:直接使用patchelf --set-rpath只是修改成了runpath,不是rpath:使用patchelf --set-rpath时需要加上--force-rpath才是设置rpath:原创 2022-10-31 21:12:43 · 1695 阅读 · 2 评论 -
重装系统后,ssh失败,提示host key
将该机器在FreeIPA的DNS记录刷新一下。重装系统后,ssh失败,提示。原创 2022-10-18 07:49:18 · 516 阅读 · 0 评论 -
如何将进程脱离于shell运行?
在shell中运行的进程,当shell退出时这些进程会收到SIGHUP信号。如何让进程免于因shell退出产生的SIGHUP信号影响呢?这样command执行会对SIGHUP免疫,当terminal断开也不会影响到command的执行。然后在screen里执行命令。即使terminal断开,screen会话还在。与这个类似的,还有其它terminal multiplexer,如tmux。将进程放在后台运行,然后使用disown命令。2. 执行命令加上setsid。4. 在screen里执行命令。原创 2022-10-17 22:35:58 · 971 阅读 · 0 评论 -
单行ssh后的命令,需要交互输入怎么办?
单行ssh命令中,执行的命令又要交互输入,该怎么办?经查看ssh手册,可以加上-t选项,如下所示,原创 2022-10-17 22:08:51 · 434 阅读 · 0 评论 -
云虚拟机top命令的%st解读
steal time表示该gust需要、但未被host满足的资源。它会发生在当需要的资源分配给其它gust。所以从上图,可以看出aws ec2主机超分配的情况很严重。在aws ec2的CentOS 7.9上执行top,显示。%st 高达76.5%,这是意味着什么?...原创 2022-08-06 14:52:29 · 1250 阅读 · 0 评论 -
Xfce4 panel is broken, how to restore it to the default panel without exiting the current desktop?
Problem: Xfce4 panel is broken.if you selected 'One empyt panel', then your desktop will look like below,minimize the terminal, and it is gone nowhere,So, how to restore xfce4-panel to default?1. bakcup your xfce4 configcp -r ~/.原创 2022-05-15 10:36:31 · 555 阅读 · 0 评论 -
Linux - 因执行机光模块故障导致LSF job的idle_factor为0
Linux - 因执行机光模块故障导致LSF job的idle_factor为0问题描述某台执行机hostA上的任务,任务无进展,对应的log无内容。问题查看登陆上去,使用top -u $USER -> H查看用户的进程大多是S状态,一两个是D状态,占用的CPU都是0;使用top - H - 1查看所有CPU情况,发现多数CPU都是0%,有4个是100%,都是IO wait。查看网卡数据$ watch "cat /proc/net/dev| column -t"可以看到网卡的er原创 2021-09-01 22:29:03 · 282 阅读 · 0 评论 -
Ubuntu sshd设置
Ubuntu sshd设置新装Ubuntu无法ssh安装sshd并启动$ sudo apt update$ sudo apt install openssh-server$ sudo systemctl start sshdroot无法ssh连接Ubuntu修改/etc/ssh/sshd_config文件,允许root连接#PermitRootLogin prohibit-password修改为PermitRootLogin yes参考资料https://ubuntu.com/原创 2022-01-20 21:34:50 · 1164 阅读 · 0 评论 -
Linux性能分析60s
Linux性能分析60suptime 查看平均负载dmesg -T | tail 查看kernel errorsvmstat 1 随着时间的总体情况mpstat -P ALL 1 处理器平衡pidstat 1 进程使用情况iostat -xz 1 磁盘I/Ofree -m 内存使用情况sar -n DEV 1 网络I/Osar -n TCP,ETCP 1 查看TCP情况top 看总体情况参考资料https://www.brendangregg.com/blog/2015-12-03/原创 2022-01-15 11:37:12 · 257 阅读 · 0 评论 -
CentOS 7.9升级内核并设置默认启动
当前系统[root@localhost ~]# uname -aLinux localhost.localdomain 3.10.0-1160.59.1.el7.x86_64 #1 SMP Wed Feb 23 16:47:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux将系统更新到最新yum -y update添加ELRepo仓库rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.or原创 2022-03-05 09:03:55 · 2009 阅读 · 0 评论 -
CPU - 指令流水线相关知识
CPU - 指令流水线相关知识什么是指令流水线?图片来自维基百科。如图所示,指令流水线有4个stage,分别是Fetch、Decode、Execute与Write-back。设计指令流水线,使得在同一个时刻,每个Stage都能执行不同流水线的一个Stage,大大增加了执行指令的throughput。什么是Bubble(NOP, no operation)instruction?Bubble instruction是一条空指令,意在使得下一条流水线慢再慢一个Stage。如图所示,那么Bubble原创 2021-09-01 21:28:50 · 839 阅读 · 0 评论 -
Turbovnc使用LDAP认证
在已加入LDAP域的机器,启动VNC默认使用VNC密码,也可以启用LDAP认证。参考https://help.realvnc.com/hc/en-us/articles/360002250097-Setting-up-System-Authentication原创 2022-02-17 22:52:54 · 3828 阅读 · 0 评论 -
bpftrace用户空间地址解析
root@VM-20-5-ubuntu:~/bpftrace-developing# bpftrace -e 'uprobe:/bin/bash:readline { printf("PS1: %s\n", str(*uaddr("ps1_prompt"))); }'Attaching 1 probe...PS1: root@VM-20-5-ubuntu:~/bpftrace-developing# bpftrace --include linux/sched.h -e 'uprobe:/bin.原创 2022-02-07 15:56:32 · 730 阅读 · 0 评论 -
Setting up TurboVNC on CentOS 7.9
参考资料https://turbovnc.org/Documentation/Compatibility30原创 2022-02-16 07:59:10 · 974 阅读 · 0 评论 -
One VNC session per user
refer to:How to restrict per user vnc sessions count ? - Red Hat Customer Portal原创 2022-02-17 23:08:57 · 261 阅读 · 0 评论 -
系统 - sleep, hibernate与hybrid-sleep的区别
系统 - sleep, hibernate与hybrid-sleep的区别背景相信大家在使用CentOS 7.9或其他系统时,有遇到过sleep, hibernate与hybrid-sleep,它们看起来都是将电脑置于睡眠状态,但它们有什么区别呢?解释sleep是能从睡眠中快速启动的,往往是秒级的;hibernate主要是设计给笔记本使用的,是能从冬眠中起来,但是花费的时间就比sleep要长了。优点是这样能节省更多的电;hybrid-sleep是前面两者的结合。它既能快速启动,也能在断电恢复供电原创 2021-08-21 11:10:46 · 1225 阅读 · 0 评论 -
ubuntu安装bpftool
命令apt install linux-oem-5.6-tools-common资料https://manpages.ubuntu.com/manpages/focal/man8/bpftool-map.8.html原创 2022-01-29 14:05:45 · 2963 阅读 · 0 评论 -
CentOS 8.5.111与历史版本的下载、CentOS YUM配置
由于CentOS变更为CentOS Stream,在官网mirror就找不到CentOS了。它们被移到了Index of /https://vault.centos.org/地址下。原创 2022-05-26 21:37:51 · 622 阅读 · 0 评论 -
使用bpf_printk,会将字符串输出到文件/sys/kernel/debug/tracing/trace_pipe
使用bpf_printk,会将字符串输出到文件/sys/kernel/debug/tracing/trace_pipe/sys/kernel/debug/tracing/trace_pipe原创 2022-01-29 14:52:05 · 2233 阅读 · 0 评论 -
collect2: fatal error: ld terminated with signal 9 [Killed]
collect2: ld terminated with signal 9 [Killed]Q. What is this kind of build error representative of? collect2: ld terminated with signal 9 [Killed]A. There is not enough virtual memory for the linker (ld). This type of error is most typically exper原创 2022-03-06 21:43:42 · 1339 阅读 · 1 评论 -
bpftrace使用sizeof()查看task_struct的大小
bpftrace使用sizeof()查看task_struct的大小root@VM-20-5-ubuntu:~# /usr/local/bin/bpftrace --include /usr/src/linux-headers-5.4.0-90/include/linux/sched.h -e 'BEGIN { printf("%d\n", sizeof(struct task_struct)); }'Attaching 1 probe...9216原创 2022-02-07 21:41:30 · 1127 阅读 · 0 评论 -
bcc-tools trace提示chdir(/lib/modules/5.4.182-1.el7.elrepo.x86_64/build): No such file or directory
bcc-tools的trace提示chdir(/lib/modules/5.4.182-1.el7.elrepo.x86_64/build): No such file or directory[root@localhost ~]# /usr/share/bcc/tools/trace -I 'net/sock.h' 'udpv6_sendmsg(struct sock *sk) (sk->sk_dport == 13568)'modprobe: FATAL: Module kheaders原创 2022-03-05 22:54:45 · 827 阅读 · 0 评论 -
PXE + Kickstart 操作系统自动安装
PXE + Kickstart 操作系统自动安装流程图片来源实验项目说明Vmware Workstation虚拟机平台Linux镜像CentOS 7.9DHCP给虚拟机分配IP地址TFTP存放PXE启动的相关文件HTTP提供挂载后的CentOS 7.9 ISO文件夹kickstart文件定义操作系统安装详情本次实验将DHCP,TFTP,HTTP三个服务安装在同一台服务器上。环境准备在vmware workstation中编辑虚拟原创 2021-11-27 19:40:36 · 1015 阅读 · 0 评论 -
bcc-tools使用
问题一报错$ /usr/share/bcc/tools/opensnoopIn file included from /virtual/main.c:2:In file included from include/uapi/linux/ptrace.h:142:In file included from ./arch/x86/include/asm/ptrace.h:5:./arch/x86/include/asm/segment.h:254:2: error: expected '(' aft原创 2022-01-15 12:28:39 · 1070 阅读 · 0 评论