This section explains how to specify a query statement that identifies the process you wish to monitor.

You specify a query statement that identifies the process you wish to monitor. You specify queries using Process Table Query Language (PTQL), a simple query language for finding processes based based on their attributes.

PTQL queries take this form: Class.Attribute.operator=value

where:

  • Class - is the name of the Sigar class minus the Proc prefix.

  • Attribute - is an attribute of the given Class, index into an array or key in a Map class.

  • Operator - is one of the following (for String values):

    • eq - Equal to value.

    • ne - Not equal to value.

    • ew - Ends with value.

    • sw - Starts with value.

    • ct - Contains value (substring).

    • re - Regular expression value matches.

Delimit queries with a comma.

For example, this query statement finds a JBoss instance by looking for a process whose name is "org.jboss.Main":

State.Name.eq=java,Args.*.eq=org.jboss.Main

this query statement finds the OpenSSH daemon by looking for sshd PID file.

Pid.PidFile.eq=/var/run/sshd.pid