resource-monitor
v1.0.11
Published
simple resource monitoring app
Downloads
4
Readme
Resource Monitor
A simple cli tool to monitor resources, primarily on unix systems.
Contents
Quick Start
Install it with:
npm i -g resource-monitor
Then start it:
resource-monitor
This will log to console default "ps -aux"
and "top -n 1 -b"
commands every 10 seconds.
Change Logging Interval
You can change interval with +interval-sec [number]
e.g.:
resource-monitor +interval-sec 30
This will result in logging once every 30 seconds. You can also specify interval in minutes:
resource-monitor +interval-min 5
Log to File
To log to file:
resource-monitor 1>monitor.out 2>monitor.err
Custom Commands
To specify your own commands to run, use +cmd
command line argument:
resource-monitor +cmd ps:-ef top:-n:1:-b
This will run ps -ef
and top -n 1 -b
every 10 seconds.
Set Timezone
To set timezone use +tz
command line argument. This will result in time being printed in your timezone:
resource-monitor +tz Asia/Calcutta
You can see the list of possible values here.
No Permissions
If you don't have permissions to install global npm modules, you can instead install it locally with:
npm i resource-monitor
And then start with node node_modules/.bin/resource-monitor
.