Use PHP-CLI to publish server stats via json

Written in

by

If you need great server monitoring, use copper egg. It inexpensive, easy to install and very very good.

If you happen to use PHP with Linux, a lot of usesful information can be extracted from the /proc filesystem. Enough to provide basic monitoring. The attached script dumps and processes the output from proc every minute as json.

Make sure to protect the directory you're outputing this into to.

Download livestats.php code

Tags

One response to “Use PHP-CLI to publish server stats via json”

  1. peter Avatar
    peter

    This is ridiculously bad it shouldnt be allowed online.. 

Verified by MonsterInsights