Search This Blog

Thursday, May 27, 2010

How to manually clean up shared memory / semaphors

This procedure may be useful for something like Oracle database, SAP or Peoplesoft when application was shutdown but shared memory hasn't been clened up for some reason.

Get the list of all semaphors for a user:
# ipcs | grep [username]

Remove (clean up) semaphor:
# ipcrm -s [semaphor id]

You can also use the command below to generate a script:
# ipcs | grep [username] | awk '{printf("ipcrm -s %s\n", $2);}'

No comments: