Recently we are facing some issue in which we are running out of semaphores every now and then so for debugging i have used following commands to identify acquired semaphore is related to which process
ipcs -s|grep <username>
Above command will give me semaphores related to my unix id. After that i executed below command to get which process is related to semaphore :
ipcs -s -i <semid>
This will give output as :
semnum value ncount zount pid
0 0 0 0 28438
But the pid(28438) that it is returning is not associated with any running process. So my question is Is there any way to identify semaphore is related to which process (actual executable name) even though process is not running now ?