getProcName chop processname in Linux
trufae opened this issue · comments
pancake commented
Jeffrey Crowell commented
this is a kernel setting
http://lxr.free-electrons.com/source/include/linux/sched.h#L315
TASK_COMM_LEN is set to 16, this requires a kernel recompilation to change.
you can use /proc/$PID/cmdline, but then you have to do all sorts of funky stuff to parse out the program name (which also isn't guaranteed to be the same as the TASK_COMM