Killing processes on UNIX systems may result in semaphores or shared memory being left behind instead of being cleaned up automatically. To eliminate unneeded semaphores, you should periodically run the UNIX ipcs command to check the status of semaphores and shared memory.
The ipcs -a command lists the ID numbers, owners, and create times of semaphores and shared memory segments. When all Sybase IQ instances are started by the same user (as Sybase recommends), you can search the OWNER column for that user name. Identify shared memory segments and semaphores that are not being used.
After verifying with the owner that these shared memory segments and semaphores are not in use, run the UNIX ipcrm command to remove them. Use the -m parameter to specify the memory segment ID and the -s command to specify the semaphore ID number, in the following format:
ipcrm -m mid1 -m mid2 ... -s sid1 -s sid2 ...
For example:
% ipcrm -m 40965 -s 5130 -s36682