Giter VIP home page Giter VIP logo

mackerel-plugin-linux-proc-stats's Introduction

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

mackerel-plugin-linux-proc-stats's People

Contributors

tkuchiki avatar yoheimuta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.