linuxparam / linuxparam
Php script monitor RAM CPU MEMORY and other param linux server
1.0.7
2018-10-25 10:01 UTC
This package is not auto-updated.
Last update: 2024-04-19 18:21:37 UTC
README
Php script monitor RAM CPU MEMORY and other param linux server
Install
composer require linuxparam/linuxparam
And /proc/meminfo
, /proc/loadavg
, /proc/uptime
chmod 0777
Use
<?php include_once './src/monitor.php'; echo '<pre>'; var_dump(Linuxparam\Monitorlinux::uptime()); var_dump(Linuxparam\Monitorlinux::cpu()); var_dump(Linuxparam\Monitorlinux::meminfo()); var_dump(Linuxparam\Monitorlinux::disk()); echo '</pre>'; ?>
string(42) "{"day":0,"hour":12,"minute":48,"second":6}" string(35) "{"1":"1.06","5":"0.87","15":"0.78"}" string(176) "{"total":7845.59,"cached":2347.44,"free":3619.44,"measure":"MB"}" string(183) "{"total":454.50,"free":84.35,"used":370.14,"measure":"GB"}"