Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Bug 1130392 - Sigar cannot detect kernel thread names
Browse files Browse the repository at this point in the history
Sigar does detect the name of kernel threads, it's RHQ that has been filtering
them out.

The fix is simply removing the check for filename existence, and kernel thread
names don't have files anyway.
  • Loading branch information
Elias Ross committed Oct 15, 2014
1 parent c033e22 commit 90dfaa9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.hyperic.sigar.ProcExe;
import org.hyperic.sigar.ProcFd;
import org.hyperic.sigar.ProcMem;
import org.hyperic.sigar.ProcStat;
import org.hyperic.sigar.ProcState;
import org.hyperic.sigar.ProcTime;
import org.hyperic.sigar.Sigar;
Expand Down Expand Up @@ -518,9 +519,7 @@ private String determineName(String[] procArgs, ProcExe procExe, ProcState procS
} else if ((procExe != null) && (procExe.getName() != null)) {
name = procExe.getName();
} else if ((procState != null) && (procState.getName() != null)) {
String stateName = procState.getName();
name = ((stateName.indexOf(File.separatorChar) >= 0) && (new File(stateName).exists())) ? stateName
: UNKNOWN_PROCESS_NAME;
name = procState.getName();
} else {
name = UNKNOWN_PROCESS_NAME;
}
Expand Down

0 comments on commit 90dfaa9

Please sign in to comment.