Tina!

Registered
Jun 9, 2006
1
0
151
Hello Guys,

My data center have used the below mentioned command:

ipcs -s | grep nobody | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

I am not sure about of its use. However, I have tried to run this command and responded with the output

Resource(s) deleted

Can anyone tell me regarding this command and use of the command 'ipcs' ?

Thanks,
-Tina.
 

TSDave

Registered
PartnerNOC
Nov 14, 2003
1
0
151
That entire line is meant to remove semaphores; Let's call them 'things' that sit resident in your RAM often when you don't want them to; This command deletes all of the ones apache creates (the grep nobody).
 

webignition

Well-Known Member
Jan 22, 2005
1,876
2
166
TSDave said:
That entire line is meant to remove semaphores; Let's call them 'things' that sit resident in your RAM often when you don't want them to; This command deletes all of the ones apache creates (the grep nobody).
So this is a method for freeing up RAM that is used by unnecessary 'things'? Sounds almost too good to be true!

The command is definitely safe to run?
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
webignition said:
So this is a method for freeing up RAM that is used by unnecessary 'things'? Sounds almost too good to be true!

The command is definitely safe to run?
I wouldn't run it unless Apache was shut down at the time. Running it while Apache is running may cause Apache to get substantially confused.
 

nidhin_nl

Member
Jun 19, 2006
23
0
151
brianoz said:
I wouldn't run it unless Apache was shut down at the time. Running it while Apache is running may cause Apache to get substantially confused.
So is it secure to run the commands in server ?
 

RandyO

Well-Known Member
Jun 17, 2003
173
0
166
on a sidenote, I would NEVER run a command that you do not understand the ramifications of. For example, some admins run the rm -rf * from a specific folder without the absolute path (rm -rf /home/USER/Public_html/FOLDER) instead they traverse to the folder with a cd and then do the rm -rf *. You may not always catch this in the history file