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 innovative2001, Jun 10, 2006.

  1. innovative2001

    innovative2001 Active Member

    Joined:
    Jun 5, 2006
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I am not expert in perl, I have found one command

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

    any idea what it will do?
     
  2. ffeingol

    ffeingol Well-Known Member
    PartnerNOC

    Joined:
    Nov 9, 2001
    Messages:
    215
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    DataCenter Provider
    Code:
    # ipcs -s | grep nobody | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'
    
    the ipcs -s part lists the semaphore arrays. grep nobody looks for the ones owned by nobody (apache prob.). the per code loops thorugh that list and prints the 1st item in the list (which is the semaphore id.

    Frank
     
Loading...

Share This Page