linux,Apache& IPCS

时间:2013-12-27 14:48:35

标签: linux semaphore ipcs

昨晚我的apache服务器崩溃了,错误:

(28)No space left on device: AH00023: Couldn't create the ldap-cache mutex
在谷歌搜索错误之后,我发现这与apache信号量管理有关。我已经杀死任何待处理的信号量的apache,现在没关系:

 > ipcs -s
 > ipcrm <semid>

现在......我看到apache启动时信号量已经恢复(apache启动并运行)但是一些其他信号量已经被某些php进程创建(我认为)并且具有奇怪的特权:

 > ipcs -s
key        semid      owner      perms      nsems
0x00000000 0          root       600        1
0x00000000 32769      root       600        1
0x00000000 97517570   nobody     600        1
0x00000000 97550339   nobody     600        1
0x00000000 97583108   nobody     600        1
0x00000000 97615877   nobody     600        1
0x00000000 97648646   nobody     600        1
0x00000000 97746953   vega       0          1
0x00000000 97779722   vega       0          1
0x00000000 97878027   vega       0          1
0x00000000 97910796   vega       0          1
0x00000000 98009101   vega       0          1
0x00000000 98041870   vega       0          1
0x00000000 98140175   vega       0          1
0x00000000 98172944   vega       0          1
0x00000000 98271249   vega       0          1
0x00000000 98304018   vega       0          1
0x00000000 98402323   vega       0          1
0x00000000 98435092   vega       0          1
0x00000000 98533397   vega       0          1
0x00000000 98566166   vega       0          1
0x00000000 98664471   vega       0          1
0x00000000 98697240   vega       0          1
0x00000000 98795545   vega       0          1
0x00000000 98828314   vega       0          1
0x00000000 98926619   vega       0          1
0x00000000 98959388   vega       0          1
0x00000000 99057693   vega       0          1
0x00000000 99090462   vega       0          1
0x00000000 99188767   vega       0          1
0x00000000 99221536   vega       0          1
0x00000000 99319841   vega       0          1
0x00000000 99352610   vega       0          1
0x00000000 99450915   vega       0          1
0x00000000 99483684   vega       0          1
0x00000000 99581989   vega       0          1
0x00000000 99614758   vega       0          1
0x00000000 99713063   vega       0          1
0x00000000 99745832   vega       0          1
0x00000000 99844137   vega       0          1
0x00000000 99876906   vega       0          1
0x00000000 99975211   vega       0          1
0x00000000 100007980  vega       0          1
0x00000000 100106285  vega       0          1
0x00000000 100139054  vega       0          1
0x00000000 100237359  vega       0          1
0x00000000 100270128  vega       0          1
0x00000000 100368433  vega       0          1
0x00000000 100401202  vega       0          1
0x00000000 100499507  vega       0          1
0x00000000 100532276  vega       0          1
0x00000000 100630581  vega       0          1
0x00000000 100663350  vega       0          1

但是当我尝试了解有关某个信号量ID的更多信息时,我收到了此错误

> ipcs -m -i 100663350
ipcs: shmctl failed: Invalid argument

问题是: 如何在不删除信号量的情况下知道哪个进程正在创建信号量? 我可以使用perms = 0杀死所有信号量而不影响系统可靠性吗?

谢谢大家, 斯特凡诺

1 个答案:

答案 0 :(得分:1)

我认为您正在寻找的是

ipcs -s -i 100663350

-m标志用于描述&#34;共享内存段&#34;。 -s标志用于&#34;信号量数组&#34;。 由于您的初始通话是ipcs -s,因此第二列列出了&#34; semid&#34; s,这些是您可以传递给ipcs -s -i <semid>的值。