usage-plot.gp top.dat top. 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 % We kept it for ABI compatibility, but it is always set to zero. # Output: top.dat with lines such as `1539689171 305m 2.0`, i.e. CPU statistics cpu 1 2 3 4 5 6 7 8 9 First field is a schedyield () statistic: of times schedyield () was called Next three are schedule () statistics: This field is a legacy array expiration count field used in the O (1) scheduler.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 |