The tool uses sysstat tools sar and pidstat to:
- log system metrics (cpu, mem, io, net, ctxswitch etc.)
- log cpu/mem/io metrics for specified processes (pids)
- automatically start tracking processes of given naming patterns like 'player' or 'VBox'
- plot all charts for logged data with one command
Sysstat has to be installed and running:
sudo apt-get install sysstat
Now running
sar -u 1 3
Should show some cpu statistics to verify systtat works correctly.
Basic usage pattern is to start the tool before benchmark or test is started and ask for auto monitoring of interesting genymotion processes:
python bin/procmon.py --auto -i 5 --r 120
Will run the tool with 5s interval for 120 rounds, which is 10 minutes. After this time script will stop.
During the execution script will test for new player or vbox processes and once detected will start logging their cpu/mem/io metrics.
Output is generated in a separate directory for each run of the script. Directory is created in a out subfolder and named with the timestamp of starting the script.
Output directory will include:
- os_xxx.log files for general system metrics
- {PID}_xxx.log files for genymotion procesesses
Plots (not implemented yet) can be generated offline.
ProcMon uses octave to plot charts from the logged sar/pidstat outputs:
sudo apt-get install octave
I personally do not pollute server with octave but rather download the results to my laptop and then plot them.