resource-monitor v1.0.11
Resource Monitor
A simple cli tool to monitor resources, primarily on unix systems.
Contents
Quick Start
Install it with:
npm i -g resource-monitorThen start it:
resource-monitorThis 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 30This will result in logging once every 30 seconds. You can also specify interval in minutes:
resource-monitor +interval-min 5Log to File
To log to file:
resource-monitor 1>monitor.out 2>monitor.errCustom Commands
To specify your own commands to run, use +cmd command line argument:
resource-monitor +cmd ps:-ef top:-n:1:-bThis 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/CalcuttaYou 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-monitorAnd then start with node node_modules/.bin/resource-monitor.