VMware Cloud Community
jrallen9
Enthusiast
Enthusiast

SigarException when using ProcExe on some PIDs

I've been coding up a Java class which uses the Sigar.getProcList() and Sigar.getProcExe() to get the exe name and arguments of running processes on a system.

I've noticed that in the process of iterating through the pids array returned by getProcList I will get SigarExceptions.

One such exception was on pid 3292 which is assigned to a instance of the chrome.exe browser. Another time it was pid 4 which is a System process and another time it was the smss process.

Is there any explanation to these exceptions and what might cause some processes to return an exception while others do not? Is this a concurrency issue?

Thanks for the help.
0 Kudos
1 Reply
dougm_hyperic
VMware Employee
VMware Employee

Hey Justin,

I see the issue with the System process (pid 4), but haven't seen any problems with others. Which version of windows are you running?

Are you able to see the name=... for every process other than pid 4 with this command:
java -jar sigar.jar pfile State.Name.re=.*
0 Kudos