资源描述
神州数码系统集成服务有限企业
密级:
第 1 篇(共 1 篇)
Linux系统维护例行操作
指导手册
外包交付中心
方案名称:
编写:
编写日期:
审核日期:
同意日期:
修订状况
章节编号
章节名称
修订内容简述
修订日期
修订前版本号
修改人
目录:
1 系统架构 3
1.1 招商信诺Linux系统架构图 3
1.2 服务器概要信息 3
1.3 数据库信息 3
2 主机系统监控和防止性检查操作措施 3
2.1 操作频率 3
2.2 检查硬盘灯、电源灯等状态 4
2.3 查看网卡状态及重启 4
2.4 查看硬盘数以及分区状态 4
2.5 查看系统重要进程运行状况 5
2.6 查看活动进程 5
2.7 查看操作系统空间状况 9
2.8 检查操作系统日志 10
2.8.1 系统登录日志:last 10
2.8.2 查看系统启动日志:dmesg 10
2.8.3 查看/var/log/messages 系统日志 10
2.8.4 查看其他日志 10
2.9 查看操作系统性能 10
2.9.1 查看系统实时运行状态 10
2.9.2 查看系统负载状况 12
2.9.3 查看近来1,5,15分钟平均系统负载:uptime 12
2.9.4 查看目前登陆系统旳顾客 12
2.9.5 查看物理内存和Swap空间使用率:free 13
3 例行作业操作措施 13
3.1 操作频率 13
3.2 操作系统备份 13
3.3 过期系统日志清除 13
4 操作系统手工停止、启动、重启操作环节 13
4.1 关闭操作系统 13
4.2 重启操作系统 13
4.3 启动操作系统 14
5 操作系统常见需求处理措施、常见问题处理措施 14
5.1 系统加固: 14
5.2 忘掉root密码 14
5.3 配置网卡 16
5.4 配置防火墙 16
6 操作系统应急恢复措施 16
1 系统架构
1.1 Linux系统架构图
XX系统服务器备机
XX系统服务器主机
光纤互换机
磁盘阵列
PS:此图只是示例,请根据实际项目系统架构状况重新绘制
1.2 服务器概要信息
服务器名
IP地址
操作系统
重要应用
1.3 数据库信息
数据库所在服务器名
IP地址
数据库版本
端口
Oracle顾客名
SID
注:如下各检查项,假如有监控软件能实现检查项旳监控报警,就不用手工检查。否则需要手工检查。
2 主机系统监控和防止性检查操作措施
2.1 操作频率
每工作日检查1次。
2.2 检查硬盘灯、电源灯等状态
硬盘灯、电源灯正常为绿灯,假如出现黄灯或红灯阐明有问题。假如电源报警灯亮可以先检查电源与否插好。假如都已插好则是电源损坏。需要告知硬件代维方更换硬件。
2.3 查看网卡状态及重启
重启网络服务:
#service network restart
查看网络状态:
#ifconfig
pmc2:~ #ifconfig
eth0 Link encap:EthernetHWaddr 00:1F:29:09:69:4A
inet addr:10.1.180.73 Bcast:10.1.180.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets: errors:0 dropped:0 overruns:0 frame:0
TX packets: errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes: (622252.3 Mb) TX bytes:08 (12297712.3 Mb)
Interrupt:185 Memory:f8000000-f8012100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6385721 errors:0 dropped:0 overruns:0 frame:0
TX packets:6385721 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes: (383.5 Mb) TX bytes: (383.5 Mb)
2.4 查看硬盘数以及分区状态
#fdisk –l
pmc2:/var/log #fdisk -l
Disk /dev/cciss/c0d0: 146.7 GB, 0 bytes
255 heads, 63 sectors/track, 17844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 1 262 2104483+ 82 Linux swap / Solaris
/dev/cciss/c0d0p2 * 263 17844 83 Linux
2.5 查看系统重要进程运行状况
#ps–ef |grep backup
2.6 查看活动进程
#ps –aux
监听某个进程lsof–p 进程号
pmc2:~ # ps -aux
Warning: bad ps syntax, perhaps a bogus '-'? See
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 780 304 ? S 2023 0:49 init [5]
root 2 0.0 0.0 0 0 ? S 2023 0:01 [migration/0]
root 3 0.0 0.0 0 0 ? SN 2023 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S 2023 0:00 [migration/1]
root 5 0.0 0.0 0 0 ? SN 2023 0:00 [ksoftirqd/1]
root 6 0.0 0.0 0 0 ? S 2023 0:00 [migration/2]
root 7 0.0 0.0 0 0 ? SN 2023 0:00 [ksoftirqd/2]
root 8 0.0 0.0 0 0 ? S 2023 0:00 [migration/3]
root 9 0.0 0.0 0 0 ? SN 2023 0:00 [ksoftirqd/3]
root 10 0.0 0.0 0 0 ? S 2023 0:01 [migration/4]
root 11 0.0 0.0 0 0 ? SN 2023 0:00 [ksoftirqd/4]
root 12 0.0 0.0 0 0 ? S 2023 0:00 [migration/5]
root 13 0.0 0.0 0 0 ? SN 2023 0:00 [ksoftirqd/5]
root 14 0.0 0.0 0 0 ? S 2023 0:00 [migration/6]
root 15 0.0 0.0 0 0 ? SN 2023 0:00 [ksoftirqd/6]
root 16 0.0 0.0 0 0 ? S 2023 0:01 [migration/7]
root 17 0.0 0.0 0 0 ? SN 2023 0:00 [ksoftirqd/7]
root 18 0.0 0.0 0 0 ? S< 2023 0:00 [events/0]
root 19 0.0 0.0 0 0 ? S< 2023 0:00 [events/1]
root 20 0.0 0.0 0 0 ? S< 2023 0:00 [events/2]
root 21 0.0 0.0 0 0 ? S< 2023 0:00 [events/3]
root 22 0.0 0.0 0 0 ? S< 2023 0:00 [events/4]
root 23 0.0 0.0 0 0 ? S< 2023 0:00 [events/5]
root 24 0.0 0.0 0 0 ? S< 2023 0:00 [events/6]
root 25 0.0 0.0 0 0 ? S< 2023 0:00 [events/7]
root 26 0.0 0.0 0 0 ? S< 2023 0:00 [khelper]
root 27 0.0 0.0 0 0 ? S< 2023 0:00 [kthread]
root 37 0.0 0.0 0 0 ? S< 2023 0:00 [kblockd/0]
root 38 0.0 0.0 0 0 ? S< 2023 0:08 [kblockd/1]
root 39 0.0 0.0 0 0 ? S< 2023 0:08 [kblockd/2]
root 40 0.0 0.0 0 0 ? S< 2023 0:00 [kblockd/3]
root 41 0.0 0.0 0 0 ? S< 2023 0:00 [kblockd/4]
root 42 0.0 0.0 0 0 ? S< 2023 0:00 [kblockd/5]
root 43 0.0 0.0 0 0 ? S< 2023 0:06 [kblockd/6]
root 44 0.0 0.0 0 0 ? S< 2023 0:00 [kblockd/7]
root 45 0.0 0.0 0 0 ? S< 2023 0:00 [kacpid]
root 244 0.0 0.0 0 0 ? S 2023 99:04 [kswapd0]
root 245 0.0 0.0 0 0 ? S< 2023 0:00 [aio/0]
root 246 0.0 0.0 0 0 ? S< 2023 0:00 [aio/1]
root 247 0.0 0.0 0 0 ? S< 2023 0:00 [aio/2]
root 248 0.0 0.0 0 0 ? S< 2023 0:00 [aio/3]
root 249 0.0 0.0 0 0 ? S< 2023 0:00 [aio/4]
root 250 0.0 0.0 0 0 ? S< 2023 0:00 [aio/5]
root 251 0.0 0.0 0 0 ? S< 2023 0:00 [aio/6]
root 252 0.0 0.0 0 0 ? S< 2023 0:00 [aio/7]
root 478 0.0 0.0 0 0 ? S< 2023 0:00 [cqueue/0]
root 479 0.0 0.0 0 0 ? S< 2023 0:00 [cqueue/1]
root 480 0.0 0.0 0 0 ? S< 2023 0:00 [cqueue/2]
root 481 0.0 0.0 0 0 ? S< 2023 0:00 [cqueue/3]
root 482 0.0 0.0 0 0 ? S< 2023 0:00 [cqueue/4]
root 483 0.0 0.0 0 0 ? S< 2023 0:00 [cqueue/5]
root 484 0.0 0.0 0 0 ? S< 2023 0:00 [cqueue/6]
root 485 0.0 0.0 0 0 ? S< 2023 0:00 [cqueue/7]
root 486 0.0 0.0 0 0 ? S< 2023 0:00 [kseriod]
root 518 0.0 0.0 0 0 ? S< 2023 0:00 [kpsmoused]
root 1007 0.0 0.0 0 0 ? S< 2023 0:00 [ata/0]
root 1008 0.0 0.0 0 0 ? S< 2023 0:00 [ata/1]
root 1009 0.0 0.0 0 0 ? S< 2023 0:00 [ata/2]
root 1010 0.0 0.0 0 0 ? S< 2023 0:00 [ata/3]
root 1011 0.0 0.0 0 0 ? S< 2023 0:00 [ata/4]
root 1012 0.0 0.0 0 0 ? S< 2023 0:00 [ata/5]
root 1013 0.0 0.0 0 0 ? S< 2023 0:00 [ata/6]
root 1014 0.0 0.0 0 0 ? S< 2023 0:00 [ata/7]
root 1015 0.0 0.0 0 0 ? S< 2023 0:00 [ata_aux]
root 1071 0.0 0.0 0 0 ? S< 2023 0:00 [reiserfs/0]
root 1072 0.0 0.0 0 0 ? S< 2023 1:56 [reiserfs/1]
root 1073 0.0 0.0 0 0 ? S< 2023 1:55 [reiserfs/2]
root 1074 0.0 0.0 0 0 ? S< 2023 0:00 [reiserfs/3]
root 1075 0.0 0.0 0 0 ? S< 2023 0:00 [reiserfs/4]
root 1076 0.0 0.0 0 0 ? S< 2023 0:22 [reiserfs/5]
root 1077 0.0 0.0 0 0 ? S< 2023 1:25 [reiserfs/6]
root 1078 0.0 0.0 0 0 ? S< 2023 0:00 [reiserfs/7]
root 1140 0.0 0.0 7128 700 ? S<s 2023 0:00 /sbin/udevd --daemon
root 1812 0.0 0.0 0 0 ? S< 2023 0:00 [khubd]
root 1824 0.0 0.0 0 0 ? S 2023 0:00 [shpchpd_event]
root 2865 0.0 0.0 10516 736 ? Ss 2023 0:00 /sbin/resmgrd
root 2896 0.0 0.0 8296 876 ? Ss 2023 2:27 /sbin/syslog-ng
root 2899 0.0 0.0 2640 404 ? Ss 2023 0:08 /usr/sbin/irqbalance
root 2902 0.0 0.0 2884 668 ? Ss 2023 2:34 /sbin/klogd -c 1 -x -x
root 2907 0.0 0.0 2620 520 ? Ss 2023 0:00 /sbin/acpid
100 2941 0.0 0.0 13164 1140 ? Ss 2023 0:33 /usr/bin/dbus-daemon --system
root 3039 0.0 0.0 13400 3484 ? Ss 2023 0:06 /usr/sbin/hald --daemon=yes --retain-privileges
root 3418 0.0 0.0 6012 736 ? S 2023 0:00 hald-addon-acpi
root 3536 0.0 0.0 12023 632 ? S<sl 2023 0:00 /sbin/auditd -n
root 3538 0.0 0.0 0 0 ? S< 2023 0:00 [kauditd]
nobody 3542 0.0 0.0 4844 672 ? Ss 2023 0:00 /sbin/portmap
daemon 3593 0.0 0.0 12984 1044 ? Ss 2023 0:00 /usr/sbin/slpd
root 3709 0.0 0.0 122964 1104 ? Ssl 2023 2:16 /usr/sbin/nscd
lp 3879 0.0 0.0 24284 4120 ? Ss 2023 0:00 /usr/sbin/cupsd
root 3893 0.0 0.0 0 0 ? S< 2023 0:00 [nfsd4]
root 3894 0.0 0.0 0 0 ? S 2023 0:00 [nfsd]
root 3895 0.0 0.0 0 0 ? S 2023 0:00 [nfsd]
root 3896 0.0 0.0 0 0 ? S 2023 0:00 [nfsd]
root 3897 0.0 0.0 0 0 ? S 2023 0:00 [nfsd]
root 3899 0.0 0.0 0 0 ? S 2023 0:00 [lockd]
root 3900 0.0 0.0 0 0 ? S< 2023 162:34 [rpciod/0]
root 3901 0.0 0.0 0 0 ? S< 2023 0:00 [rpciod/1]
root 3902 0.0 0.0 0 0 ? S< 2023 0:00 [rpciod/2]
root 3903 0.0 0.0 0 0 ? S< 2023 0:00 [rpciod/3]
root 3904 0.0 0.0 0 0 ? S< 2023 0:00 [rpciod/4]
root 3905 0.0 0.0 0 0 ? S< 2023 0:00 [rpciod/5]
root 3906 0.0 0.0 0 0 ? S< 2023 0:00 [rpciod/6]
root 3907 0.0 0.0 0 0 ? S< 2023 0:00 [rpciod/7]
root 3925 0.0 0.0 5928 624 ? Ss 2023 0:00 /usr/sbin/rpc.mountd
root 3964 0.0 0.0 27056 1464 ? Ss 2023 0:11 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
root 3978 0.0 0.0 20288 2023 ? S 2023 0:06 /usr/sbin/powersaved -d -f /var/run/acpid.socket -v 3
root 4059 0.0 0.0 21324 2172 ? Ss 2023 0:02 /usr/lib/postfix/master
root 4090 0.0 0.0 7100 572 ? Ss 2023 0:01 /usr/sbin/cron
postfix 4095 0.0 0.0 21328 2160 ? S 2023 0:11 qmgr -l -t fifo -u
root 4393 0.0 0.0 3060 704 tty1 Ss+ 2023 0:00 /sbin/mingetty --noclear tty1
root 4395 0.0 0.0 3060 692 tty3 Ss+ 2023 0:00 /sbin/mingetty tty3
root 4396 0.0 0.0 3060 708 tty4 Ss+ 2023 0:00 /sbin/mingetty tty4
root 4397 0.0 0.0 3064 688 tty5 Ss+ 2023 0:00 /sbin/mingetty tty5
root 4398 0.0 0.0 3064 692 tty6 Ss+ 2023 0:00 /sbin/mingetty tty6
oracle 4631 0.0 0.1 63048 10244 ? Ssl 2023 2:53 /opt/oracle/product/10.2/db_1/bin/tnslsnr LISTENER -inherit
root 30031 0.0 0.0 28648 1568 ? Ss 2023 0:00 login -- root
root 24551 0.0 0.0 9720 2292 tty2 Ss+ 2023 0:00 -bash
root 23901 0.0 0.0 50880 6652 ? S 2023 0:08 /opt/gnome/sbin/gdm
root 23914 0.0 0.0 60268 2820 ? S 2023 0:00 /opt/gnome/sbin/gdm
root 23917 0.0 0.1 44876 8312 tty7 Ss+ 2023 118:31 /usr/X11R6/bin/X :0 -audit 0 -br -auth /var/lib/gdm/:0.Xauth vt7
gdm 23936 0.0 0.2 94228 18812 ? Ss 2023 0:00 /opt/gnome/lib64/gdm/gdmgreeter
root 24077 0.0 0.0 8700 444 ? Ss 2023 0:00 /usr/bin/gpg-agent --sh --daemon
root 24082 0.0 0.0 10268 900 ? Ss 2023 0:00 dbus-daemon --fork --print-pid 8 --print-address 6 --session
root 17791 0.0 0.0 10268 892 ? Ss 2023 0:00 dbus-daemon --fork --print-pid 8 --print-address 6 --session
oracle 28198 0.0 0.1 61984 9096 ? Ssl 2023 0:24 /opt/oracle/product/10.2/db_1/bin/tnslsnr LISTENER -inherit
oracle 28205 0.0 0.2 2563316 19812 ? Ss 2023 0:01 ora_pmon_orcl
oracle 28207 0.0 0.1 2562144 16180 ? Ss 2023 1:33 ora_psp0_orcl
oracle 28209 0.0 10.8 2562140 887704 ? Ss 2023 0:10 ora_mman_orcl
oracle 28211 0.0 22.9 2595952 1879296 ? Ss 2023 6:00 ora_dbw0_orcl
oracle 28213 0.0 0.5 2577696 48272 ? Ss 2023 8:24 ora_lgwr_orcl
oracle 28215 0.0 1.2 2563684 102704 ? Ss 2023 12:35 ora_ckpt_orcl
oracle 28217 0.0 16.7 2564780 1369832 ? Ss 2023 9:24 ora_smon_orcl
oracle 28219 0.0 3.2 2563724 267828 ? Ss 2023 0:00 ora_reco_orcl
oracle 28221 0.0 8.5 2563796 698012 ? Ss 2023 3:10 ora_cjq0_orcl
oracle 28223 0.0 31.7 3347456 2593104 ? Ss 2023 13:57 ora_mmon_orcl
oracle 28225 0.0 2.0 2562140 164608 ? Ss 2023 0:04 ora_mmnl_orcl
oracle 28227 0.0 0.2 2562988 16464 ? Ss 2023 0:00 ora_d000_orcl
oracle 28233 0.0 0.1 2563316 15680 ? Ss 2023 0:00 ora_s000_orcl
oracle 28237 0.0 0.4 2577696 33280 ? Ss 2023 0:46 ora_arc0_orcl
oracle 28239 0.0 0.4 2577696 33140 ? Ss 2023 0:45 ora_arc1_orcl
oracle 28243 0.0 0.2 2562140 17564 ? Ss 2023 0:00 ora_qmnc_orcl
oracle 28247 0.0 16.9 2564804 1389684 ? Ss 2023 0:27 ora_q000_orcl
oracle 28249 0.0 0.2 2562136 16768 ? Ss 2023 0:05 ora_q001_orcl
oracle 25297 0.0 0.3 2562848 31136 ? Ss Sep03 0:00 oracleorcl (LOCAL=NO)
oracle 25299 0.0 0.2 2562272 19720 ? Ss Sep03 0:00 oracleorcl (LOCAL=NO)
oracle 25301 0.0 0.2 2562268 19648 ? Ss Sep03 0:00 oracleorcl (L
展开阅读全文