VMware Cloud Community
mrstevejobs
Contributor
Contributor

Get process ID by part of its process name

I have a process which can change of name depending on the version of the application which runs that process.

For example:

myProcess64.exe

myProcess65.exe

Is there a way using Sigar to get the process Id by specifing something like `myProcess%` ?


Right now I'm using this:

ProcessFinder find = new ProcessFinder(this.sigar);

long[] pids = find.find("Exe.Name.ct=" + this.processName);

Tags (4)
Reply
0 Kudos
0 Replies