PTQL (Process Table Query Language)

1363 查看

PTQL (Process Table Query Language)
Hyperic SIGAR provides a mechanism to identify processes called Process Table Query Language. All operating systems assign a unique id (PID) to each running process. However, the PID is a random number that may also change at any point in time when a process is restarted. PTQL uses process attributes that will persist over time to identify a process.

翻译:
PTQL (进程表查询语言)
Hyperic SIGAR 提供一种称作进程表查询语言机制来识别进程. 所有的操作系统都给正在运行的进程赋予一个特有的进程ID, 但是因为进程ID 是个随机数字所以进程重启的时候这个进程ID很可能改变. PTQL 则使用进程属性来长时间识别一个进程.

PTQL Syntax

PTQL Queries must be in the following format:

Class.Attribute.operator=value

Enclose the query in quotes if it contains any spaces. For example:

sigar> ps "Exe.Name.ct=Program Files"

Where:

  1. Class is the name of the Sigar class minus the Proc prefix.
  2. Attribute is an attribute of the given Class, index into an array or key in a Map class.
  3. 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
    operator is one of the following for numeric values:
    eq - Equal to value
    ne - Not Equal to value
    gt - Greater than value
    ge - Greater than or equal value
    lt - Less than value
    le - Less than or equal value

note: Multiple queries must delimited by a comma.

https://support.hyperic.com/display/SIGAR/PTQL