Note that this is not the full boat-load of information top would give you. This will append the Top 10 most CPU hungry processes to a file ps.log every five seconds. So, additionally, run this (or use his answer for this part): while true do (echo "%CPU %MEM ARGS $(date)" & ps -e -o pcpu,pmem,args -sort=pcpu | cut -d" " -f1-5 | tail) > ps.log sleep 5 done You can then import this file into Gnumeric or the OpenOffice spreadsheet to create a nice graph (select 'separated by spaces' on import).Īs Scaine noticed, this won't be enough to diagnose the problem. This will log your cpu load every second and append it to a file uptime.log. This works very well: while true do uptime > uptime.log sleep 1 done
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |