mackerel-plugin-linux-proc-stats

command module
v0.0.0-...-597d007 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2016 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

mackerel-plugin-linux-proc-stats

Linux processes metrics plugin for mackerel.io agent.

Synopsis

mackerel-plugin-linux-proc-stats -pid=<pid>|-pidfile=<pidfile>|-process-pattern=<process pattern> [-metric-key-prefix=<metric-key-prefix>] [-tempfile=<tempfile>] [-follow-child-processes] [-include-dead-children=0]
$ ./mackerel-plugin-linux-proc-stats --help
Usage of ./mackerel-plugin-linux-proc-stats:
  -follow-child-processes
        Follow child processes
  -include-dead-children
        Include dead kids in cpu sum (default true)
  -metric-key-prefix string
        Metric key prefix
  -pid string
        PID
  -pidfile string
        PID file
  -process-pattern string
        Match a command against this pattern
  -tempfile string
        Temp file name
  -version
        Version

Requirements

Example of mackerel-agent.conf

[plugin.metrics.linux_proc_stats]
command = "/path/to/mackerel-plugin-linux-proc-stats -pidfile /var/run/nginx.pid -follow-child-processes"
[plugin.metrics.linux_proc_stats]
command = "/path/to/mackerel-plugin-linux-proc-stats -pidfile /var/run/mackerel-agent.pid"
[plugin.metrics.linux_proc_stats]
command = "/path/to/mackerel-plugin-linux-proc-stats -process-pattern 'nginx: master process'"

Example

Running threads.

$ ./mackerel-plugin-linux-proc-stats -pidfile /var/run/mackerel-agent.pid
mackerel-agent_process.memory.vsize     812974080.000000        1458808344
mackerel-agent_process.memory.rss       10448896.000000 1458808344
mackerel-agent_process.num.running      0.000000        1458808344
mackerel-agent_process.num.processes    1.000000        1458808344
mackerel-agent_process.num.threads      26.000000       1458808344
mackerel-agent_process.cpu.usage        0.083986        1458808344

Only master process.

$ ./mackerel-plugin-linux-proc-stats -pidfile /var/run/nginx.pid
nginx_process.cpu.usage 0.000000        1458808477
nginx_process.memory.vsize      107450368.000000        1458808477
nginx_process.memory.rss        3399680.000000  1458808477
nginx_process.num.running       0.000000        1458808477
nginx_process.num.processes     1.000000        1458808477
nginx_process.num.threads       1.000000        1458808477

Master process and worker processes.

$ ./mackerel-plugin-linux-proc-stats -pidfile /var/run/nginx.pid -follow-child-processes
nginx_process.num.running       0.000000        1458808496
nginx_process.num.processes     2.000000        1458808496
nginx_process.num.threads       2.000000        1458808496
nginx_process.cpu.usage 0.000095        1458808496
nginx_process.memory.vsize      215269376.000000        1458808496
nginx_process.memory.rss        7966720.000000  1458808496

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址