On my development box, under /proc/[pid]/ there is a file called comm containing the name of the executable for that process. I use this to validate the process to which I am sending a signal. On our live server it does not exist. Both machines are running Ubuntu 12.04.3 LTS (albeit the live server is virtualised). On the live machine the executable exists in cmdline but of course with command line arguments which have to be parsed out. Why does one instance have comm and not the other?
Ubuntu: /proc/pid/comm file missing
linux;ubuntu;proc
It's possible that your virtual machine's kernel is either too old or not configured to provide the /proc/PID/comm file.According to the proc(5) man page, you may be able to use the second field in /proc/[pid]/stat. It is described as:The filename of the executable, in parentheses.  This is visible whether or not the executable is swapped out.The name of the command may be truncated if it is longer than 16 characters.