![]() ![]() The file contains various metrics about the system since boot: ~]# cat /proc/stat ![]() CPU activity can also be extracted from the /proc/stat file. # where the input file has the columns ` ` ![]() usage-plot.gp top.dat top.png: #!/usr/bin/env gnuplot -persist -c ![]() While true do top -p $PID -bMn 1 | egrep '^+' | awk -v now=$(date +%s) '' > top.dat done unix time - memory with m/g suffix - CPU load in % Run this script (perhaps via nohup) to capture the data: #!/bin/sh If you want to monitor the memory and CPU usage of a particular Linux process for a few minutes, perhaps during a performance test, you can capture the data with top and plot them with gnuplot. Keep reading to learn how. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |