您的位置:首页 > 运维架构 > Linux

Linux常用命令笔记---故障排除

2013-03-15 12:27 381 查看
监控日志命令:tail -f / tailf

查看磁盘空间:df,du

分析系统性能或硬件资源负载:cptime,top,System Monitor

分析内存:free,swapon -s,vmstat

分析硬盘性能:sar,isstat
图形界面排除:

1)配置文件:/etc/X11/xorg.conf,家目录文件(.xinitrc,xsession,Xclients),在运行级别为3下删除配置文件,重新启动

2)xfs服务要启动,日志文件:/var/log/Xorg.log;用户家目录已满,磁盘配额

3)不要在运行级别为5中修复这个问题,应该在3下修复

网络故障排除:

[root@szm repodata]# sysctl -p

net.ipv4.ip_forward = 0

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

net.bridge.bridge-nf-call-ip6tables = 0

net.bridge.bridge-nf-call-iptables = 0

net.bridge.bridge-nf-call-arptables = 0

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 4294967295

kernel.shmall = 268435456

系统引导故障排除:
1)BIOS
2)GRUB---initrd-*.img
3)挂载根,init
4)/etc/inittab,然后/etc/rc.d/rc.sysinit系统初始化脚本
5)加载用户自定义启动服务脚本/etc/rc.local

单用户模式:GRUB中加入Single内核参数

/etc/fstab文件配置错误导致无法加载/boot目录:
1)blkid -i boot查看boot文件系统的卷标;
2)查看卷标:grep -i boot /etc/fstab
3)mount -o remount,rw
4)修改文件,重启

救援模式:linux rescure

1)chroot /mnt/sysimage
2)rpm -ivh --force --root /mnt/sysimage util-linux*强制安装util-linux软件(mount)包到/mnt/sysimage目录内
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Linux常用命令