-
Improvement
-
Resolution: Cannot Reproduce
-
Major
-
None
First off I am not sure if this is the right place for this BR, coz it is related to Daemon.java in Akuma.
But I don't know the relationship of Jenkins with Java.net projects, so I am raising the BR here.
In Daemon.java The following code
/** * Gets the current executable name. */ public static String getCurrentExecutable() { int pid = LIBC.getpid(); String name = "/proc/" + pid + "/exe"; if(new File(name).exists()) return name; // cross-platform fallback return System.getProperty("java.home")+"/bin/java"; }
set's the executalbe name to /proc/pid/exe on Unix/Linux, while technically this is not wrong,
it sets the "ucmd" name of the jenkins process to "exe" rather than the "java" executable.
This creates problems with commands that depend on output of "/bin/ps -e" as the ucmd is "exe" and not "java".
We use SNMP for process monitoring and the "proc" in snmpd.conf uses "/bin/ps -e" which reports jenkins "ucmd"
as "exe" instead of "java".
Can the Daemon.java code be made more intelligent, to expand /proc/pid/exe to the actual executable it is pointing to.
- is duplicated by
-
JENKINS-9850 Daemon.java set's the process' name as "exe" on Unix
- Closed