1、测试网站是否正常
发现网站提示无法找到,第一反应就是域名解析有问题,随后验证解析是正常的。
2、登陆服务器检查服务
登陆服务器执行netstat -tnlp发现80端口没有被监听,apache没起来
启动apache,在执行netstat -tnlp发现80端口仍然没有被监听,看错误日志
4、查看共享内存段、消息队列以及信号量
ipcs -s | grep httpuser
0x00000000 131072 httpuser 600 1
0x00000000 40239106 httpuser 600 1
0x00000000 40304643 httpuser 600 1
0x00000000 45678596 httpuser 600 1
0x00000000 49807365 httpuser 600 1
0x00000000 52428806 httpuser 600 1
0x00000000 53379079 httpuser 600 1
0x00000000 53608456 httpuser 600 1
0x00000000 54198281 httpuser 600 1
0x00000000 54788106 httpuser 600 1
0x00000000 55345163 httpuser 600 1
0x00000000 55509004 httpuser 600 1
0x00000000 56033293 httpuser 600 1
0x00000000 56885262 httpuser 600 1
0x00000000 57737231 httpuser 600 1
0x00000000 58589200 httpuser 600 1
0x00000000 59506705 httpuser 600 1
0x00000000 60489746 httpuser 600 1
0x00000000 61472787 httpuser 600 1
0x00000000 62324756 httpuser 600 1
0x00000000 63176725 httpuser 600 1
0x00000000 64028694 httpuser 600 1
0x00000000 64913431 httpuser 600 1
0x00000000 65765400 httpuser 600 1
0x00000000 66650137 httpuser 600 1
0x00000000 67567642 httpuser 600 1
0x00000000 68419611 httpuser 600 1
0x00000000 69304348 httpuser 600 1
0x00000000 70156317 httpuser 600 1
0x00000000 71073822 httpuser 600 1
0x00000000 72024095 httpuser 600 1
0x00000000 72876064 httpuser 600 1
0x00000000 73826337 httpuser 600 1
0x00000000 74612770 httpuser 600 1
0x00000000 75497507 httpuser 600 1
0x00000000 77234213 httpuser 600 1
0x00000000 77725734 httpuser 600 1
0x00000000 78118951 httpuser 600 1
0x00000000 79036456 httpuser 600 1
0x00000000 79659049 httpuser 600 1
0x00000000 80085034 httpuser 600 1
0x00000000 81264683 httpuser 600 1
0x00000000 81362988 httpuser 600 1
0x00000000 82083885 httpuser 600 1
0x00000000 82575406 httpuser 600 1
0x00000000 82903087 httpuser 600 1
0x00000000 83787824 httpuser 600 1
0x00000000 84738097 httpuser 600 1
0x00000000 85622834 httpuser 600 1
0x00000000 86442035 httpuser 600 1
0x00000000 87654452 httpuser 600 1
0x00000000 87883829 httpuser 600 1
0x00000000 87916598 httpuser 600 1
0x00000000 88735799 httpuser 600 1
0x00000000 89423928 httpuser 600 1
0x00000000 90275897 httpuser 600 1
0x00000000 91160634 httpuser 600 1
0x00000000 91750459 httpuser 600 1
0x00000000 92110908 httpuser 600 1
0x00000000 92405821 httpuser 600 1
0x00000000 92471358 httpuser 600 1
0x00000000 92700735 httpuser 600 1
0x00000000 93028416 httpuser 600 1
0x00000000 93880385 httpuser 600 1
0x00000000 94830658 httpuser 600 1
0x00000000 95813699 httpuser 600 1
0x00000000 96567364 httpuser 600 1
0x00000000 96829509 httpuser 600 1
0x00000000 97681478 httpuser 600 1
0x00000000 97943623 httpuser 600 1
0x00000000 97976392 httpuser 600 1
0x00000000 98009161 httpuser 600 1
0x00000000 98041930 httpuser 600 1
0x00000000 98762827 httpuser 600 1
0x00000000 99057740 httpuser 600 1
0x00000000 99123277 httpuser 600 1
0x00000000 99156046 httpuser 600 1
0x00000000 99221583 httpuser 600 1
0x00000000 99254352 httpuser 600 1
0x00000000 99287121 httpuser 600 1
0x00000000 99352658 httpuser 600 1
0x00000000 100008019 httpuser 600 1
0x00000000 100073556 httpuser 600 1
0x00000000 100991061 httpuser 600 1
0x00000000 101843030 httpuser 600 1
0x00000000 102826071 httpuser 600 1
0x00000000 103645272 httpuser 600 1
0x00000000 103710809 httpuser 600 1
0x00000000 104661082 httpuser 600 1
0x00000000 105021531 httpuser 600 1
0x00000000 105054300 httpuser 600 1
0x00000000 105644125 httpuser 600 1
0x00000000 106561630 httpuser 600 1
0x00000000 106659935 httpuser 600 1
0x00000000 106823776 httpuser 600 1
0x00000000 107053153 httpuser 600 1
0x00000000 107446370 httpuser 600 1
0x00000000 107806819 httpuser 600 1
0x00000000 108232804 httpuser 600 1
0x00000000 108265573 httpuser 600 1
0x00000000 108298342 httpuser 600 1
0x00000000 108986471 httpuser 600 1
0x00000000 109379688 httpuser 600 1
0x00000000 109445225 httpuser 600 1
0x00000000 109936746 httpuser 600 1
0x00000000 110887019 httpuser 600 1
0x00000000 111411308 httpuser 600 1
0x00000000 112033901 httpuser 600 1
0x00000000 112787566 httpuser 600 1
0x00000000 113737839 httpuser 600 1
0x00000000 114589808 httpuser 600 1
0x00000000 114851953 httpuser 600 1
0x00000000 114983027 httpuser 600 1
0x00000000 115605620 httpuser 600 1
0x00000000 116490357 httpuser 600 1
0x00000000 117342326 httpuser 600 1
0x00000000 118325367 httpuser 600 1
0x00000000 118423672 httpuser 600 1
0x00000000 119046265 httpuser 600 1
0x00000000 119931002 httpuser 600 1
0x00000000 120782971 httpuser 600 1
0x00000000 121733244 httpuser 600 1
0x00000000 122650749 httpuser 600 1
0x00000000 123437182 httpuser 600 1
0x00000000 124289151 httpuser 600 1
5、删除这些信号量
for sem in `ipcs -s | grep httpuser | cut -d" " -f2`;do ipcrm -s $sem;done
6、查看当前信号量
ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x740283f9 884736 root 600 4 0
0x740283ce 1540097 root 600 4 0
0x00000000 127369218 root 600 524288 42 dest
0x740283cd 1507331 root 600 4 0
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 23101441 daemon 600 1
0x00000000 114884722 daemon 600 1
------ Message Queues --------
key msqid owner perms used-bytes messages
7、叫醒apache
成功启动apache,网站恢复正常。
小结:
ipcs可用来显示当前Linux系统中的共享内存段、信号量、消息队列等的使用情况。
用法:
ipcs -a 可直接使用ipcs,默认调用-a选项,显示当前系统中共享内存段、信号量集、消息队列的使用情况;
ipcs -m 显示共享内存段的使用情况;
ipcs -s 显示信号量集的使用情况;
ipcs -q 显示消息队列的使用情况;
ipcrm可用来删除对应的共享内存段、信号量、消息队列;
用法:
ipcrm -s semid 删除对应的信号量集
ipcrm -m shmid 删除对应的共享内存段
ipcrm -q msqid 删除对应的消息队列