随笔分类 -  Linux 故障排查

摘要:一、Linux 启动与登录问题 1. 超详细系统启动与登陆异常排查点 问题描述 Linux 系统在启动或登录阶段异常,可能表现为无法进入系统、卡在启动界面、或用户无法登录。 原因分析 引导程序 (GRUB) 配置错误。 内核模块缺失或损坏。 文件系统错误。 用户认证 (PAM/SSH) 配置错误。 阅读全文
posted @ 2025-08-23 16:05 LB_运维技术 阅读(121) 评论(0) 推荐(0)
摘要:1、检查系统资源 top htop dmesg | tail2、排查初始化文件 & 测试登录systemctl status sshd time ssh user@host ‘exit’ 3、检查系统日志 sudo tail -f /var/log/secure sudo tail -f /var/ 阅读全文
posted @ 2025-08-21 18:22 LB_运维技术 阅读(45) 评论(0) 推荐(0)
摘要:1、检查当前文件描述符使用情况 # 查看系统全局已用/最大文件描述符 cat /proc/sys/fs/file-nr # 输出示例:1234 0 100000 # 分别表示:已分配FD数 | 未使用FD数 | 系统最大FD数如果已分配FD数接近最大值,说明资源已耗尽。 2、定位泄漏进程 # 统计各 阅读全文
posted @ 2025-08-14 16:07 LB_运维技术 阅读(83) 评论(0) 推荐(0)
摘要:1、 统计系统当前连接总数 netstat -an | wc -l 2、按连接状态统计 netstat -an | awk '{print $6}' | sort | uniq -c 例如:检查ftp netstat -an | grep ':21 ' | awk '{print $6}' | so 阅读全文
posted @ 2025-07-21 21:04 LB_运维技术 阅读(23) 评论(0) 推荐(0)
摘要:# ps -u 用户名 -o pid,ppid,cmd 阅读全文
posted @ 2025-07-04 09:09 LB_运维技术 阅读(6) 评论(0) 推荐(0)
摘要:alias chown='function _safe_chown() { if [[ "$*" == "-R /"* || "$*" == "-R/"* || "$*" == "-R /*" || "$*" == "-R /"* ]]; then echo "⚠️ 拒绝执行危险命令:chown - 阅读全文
posted @ 2025-06-25 19:17 LB_运维技术 阅读(16) 评论(0) 推荐(0)
摘要:1. 硬件层面分析 物理机宕机时,首先检查 硬件故障,因为这类问题往往最难察觉。 (1)查看硬件日志 如果服务器支持 IPMI(如 DELL iDRAC, HP iLO, Lenovo XClarity),可以通过远程管理接口获取故障日志。 在 Linux 上,可以使用 ipmitool: yum 阅读全文
posted @ 2025-02-20 11:00 LB_运维技术 阅读(374) 评论(0) 推荐(0)
摘要:ps -A -ostat,ppid,pid,cmd | grep -e '^[Zz]' ps -eo stat,pid,ppid | grep '^Z' | wc -l 阅读全文
posted @ 2024-12-13 09:06 LB_运维技术 阅读(43) 评论(0) 推荐(0)
摘要:临时解决方案: #service postfix status#service sendmail status#service postfix stop[root@wign ~]# ps -ef|grep sendmail|wc -l3038[root@wign ~]# ps -ef|grep po 阅读全文
posted @ 2024-05-24 10:15 LB_运维技术 阅读(461) 评论(0) 推荐(0)
摘要:事件:记录一次主机重启后导致LVM、vg、pv丢失 原因:例如:/dev/sdb 分区后制作了LVM,又再次进行分区 解决方案: 1、cd /etc/lvm 备份数据: 2、fdisk -l /dev/sdb > back.txt 清空分区: 3、wipefs -a /dev/sdb 4、pvcre 阅读全文
posted @ 2024-01-30 00:06 LB_运维技术 阅读(849) 评论(0) 推荐(1)
摘要:问题1:./openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory 解决方案:cp /usr/local/opens 阅读全文
posted @ 2023-12-28 09:38 LB_运维技术 阅读(286) 评论(0) 推荐(0)
摘要:现象: 解决方案: (1)# journalctl 查看原因 (2)可以看出是内存溢出导致进出救援模式,重启解决 # /sbin/reboot -f (3) 如果出现 mount failed 的现象,就需要进行 umount -l /dev/sdX 或者 umount -f /dev/sdX (4 阅读全文
posted @ 2023-09-29 22:05 LB_运维技术 阅读(311) 评论(0) 推荐(0)
摘要:Failed to register (statd, 1, tcp6/udp): svc_reg() err: RPC: Remote system error - No route to host 解决方案: net.ipv6.conf.all.disable_ipv6=0net.ipv4.con 阅读全文
posted @ 2023-09-12 16:29 LB_运维技术 阅读(307) 评论(0) 推荐(0)
摘要:解决方案: 一、先进入单系统用户状态 1、开机进入grub菜单界面时,快速按键盘e键,进入编辑界面2、在Linux 16的那1行,将ro改为rw init=/sysroot/bin/sh3、ctrl+x 4、chroot /sysroot 二、修改密码 passwd root #或echo "pas 阅读全文
posted @ 2023-09-02 16:20 LB_运维技术 阅读(272) 评论(0) 推荐(0)
摘要:现象: openssh升级后造成 登录 出现-bash: ulimit: open files 解决方案: (1) # vim /etc/pam.d/login ==>session required pam_limits.so (2) # vi /etc/ssh/sshd_config ==>Us 阅读全文
posted @ 2023-08-01 08:45 LB_运维技术 阅读(284) 评论(0) 推荐(0)
摘要:解决方案: (1)设置PasswordAuthentication为yes [root@VM-4-3-centos libin]# vim /etc/ssh/sshd_config 修改后的配置: PasswordAuthentication yes (2)重启sshd服务 [root@VM-4-3 阅读全文
posted @ 2023-06-13 17:49 LB_运维技术 阅读(339) 评论(0) 推荐(0)
摘要:[Redhat7]Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory 报错 解决方案: [root@localhost ~]# modprobe ipmi_wa 阅读全文
posted @ 2023-06-09 11:38 LB_运维技术 阅读(628) 评论(0) 推荐(0)
摘要:问题:Linux kernel: hpet1: lost 18 rtc interrupts 报错 解决方案:在 GRUB_CMDLINE_LINUX_DEFAULT="quiet hpet=disable" 添加hpet=disable # cat /etc/default/grub GRUB_T 阅读全文
posted @ 2023-03-12 00:16 LB_运维技术 阅读(1260) 评论(0) 推荐(0)
摘要:内网yum源案例: 问题现象: 解决方案: 将enable=1 修改为enabled=0 问题即可解决 [root@localhost cloudman]# vi /etc/yum/pluginconf.d/license-manager.conf [main]enabled=0 阅读全文
posted @ 2023-03-11 23:08 LB_运维技术 阅读(659) 评论(0) 推荐(0)
摘要:故障现象 原因分析 安装strace命令进行跟踪 # yum install -y strace 抓取报错日志 # strace -o passwd.log passwd 查看日志,发现/usr/lib64/security 目录中没有pam_passwdqc.so # cat passwd.log 阅读全文
posted @ 2023-02-07 17:20 LB_运维技术 阅读(3812) 评论(0) 推荐(0)