I have a project in which a number of Linux processes are competing to acquire a counting semaphore.
From a python script I want to check at intervals which processes currently have acquired the semaphore and which ones are blocked waiting for it.
Does python provide any tools to obtain such information? If not, would there be any os commands that I could use?