Skip to content
procstat-json gathers various statistics from /proc filesystem and provides JSON-like output (in real-time).
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
static
templates
tornado
.gitignore
LICENSE
README.md
daemon.py
procstat-json

README.md

procstat-json#

procstat-json gathers various statistics from /proc filesystem and provides JSON-like output (in real-time).

Current implementation includes:

  • CPU /proc/stat
  • Memory /proc/meminfo
  • Network /proc/net/dev

Install

There are a few different ways you can install procstat-json:

  • Download the zipfile and install it.
  • Checkout the source: git clone git://github.com/norus/procstat-json.git and install it yourself.

Getting started

  • Install procstat-json directory anywhere you want
  • Edit procstat-json file and customize port, address etc.
define('address', default='0.0.0.0', type=str, help='Listen on interface')
define('port', default=8080, type=int, help='Listen on port')
define('pidfile', default='/var/run/procstat-json.pid', type=str, help='PID location')
define('logfile', default=os.path.join(cwd, 'procstat-json.log'), type=str, help='Log file')
define('netdev', default='eth0', type=str, help='Device to query')
define('pollint', default=1000, type=int, help='Polling interval')
  • Start the daemon:
    ./procstat-json start
    Staring tornado...

Examples

All examples assume you have procstat-json running on localhost and listening on port 8080!

http://127.0.0.1:8080/stats/1
http://127.0.0.1:8080/stats/2

Google Chart demo
Highcharts demo

You can’t perform that action at this time.