The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

IPCS command

Discussion in 'General Discussion' started by Tina!, Jun 9, 2006.

  1. Tina!

    Tina! Registered

    Joined:
    Jun 9, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  2. TSDave

    TSDave Registered
    PartnerNOC

    Joined:
    Nov 14, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    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).
     
  3. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    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?
     
  4. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    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.
     
  5. nidhin_nl

    nidhin_nl Member

    Joined:
    Jun 19, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    So is it secure to run the commands in server ?
     
  6. RandyO

    RandyO Well-Known Member

    Joined:
    Jun 17, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    16
    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
     
Loading...

Share This Page