Performs a query over a set of {@link ProcessInfo#getCommandLine() command line strings}. The query strings are written in the
).In effect, your PIQL will examine a list of running processes whose command lines match a certain set of criteria. PIQL statements are formatted by a series of
PIQL | What is matched |
process|pidfile|match=/etc/product/lock.pid | the process whose pid matches the number found in the lock.pid file |
process|pidfile|match|parent=/etc/product/lock.pid | child processes of the parent process whose pid matches the number found in the lock.pid file |
process|name|match=^/foo.* | all processes whose executables are found under the root "foo" directory |
process|basename|match=^java.* | all processes whose executable file has "java" at the start of it |
process|basename|match=(?i)^java.* | all processes whose executable file has "java" at the start of it (case insensitive, so "JAVA" would also match) |
process|name|match=.*(product|java).* | all processes whose executable paths have either "product" or "java" in them |
process|name|match=^C:.*,process|basename|nomatch=java.exe | all processes whose executables are found on the Windows C: drive but is not a "java.exe" process |
arg|1|match=org\.jboss\.Main | all processes whose command line argument #1 has a value of "org.jboss.Main". This will NOT match a process that does not have a command line argument at the given index. |
arg|*|match=.*daemon.* | all processes whose command lines have any argument with the substring "daemon" in them |
arg|-b|nomatch=127\.0\.0\.1 | all processes whose command lines have any argument named "-b" whose value is not "127.0.0.1" (e.g. "-b 192.168.0.5"). This will NOT match a process that does not have that argument at all. |
arg|-Dbind.address|match=127.0.0.1 | all processes whose command lines have any argument named "bind.address" whose value is "127.0.0.1" (e.g. "-Dbind.address=127.0.0.1"). This will NOT match a process that does not have that argument at all. |
arg|-cp|match=.*org\.abc\.Class.* | all processes whose command lines have any argument named "-cp" whose value contains "org.abc.Class". This will NOT match a process that does not have that argument at all. |
arg|org.jboss.Main|match=.* | all processes whose command lines have any argument named "org.jboss.Main" |
process|basename|match=(?i)Apache.exe,arg|-k|match|parent=runservice | all Apache processes that are running as child processes to the main Apache service. |
process|basename|nomatch|parent=exec | all processes that have a parent whose basename is not exec. This will match all processes that do not have a parent. |
process|basename|match=^(https?d.*|[Aa]pache)$,process|name|nomatch|parent=^(https?d.*|[Aa]pache)$ | all Apache processes that do not have a parent process that is also an Apache process (i.e. this eliminates all of the httpd child processes and only returns the main Apache servers). This will match a process that does not have a parent but has a basename of Apache. |
process|pid|match=1016 | The process whose pid is 1016. |