Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

log cpu usage on linux

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
Source by askubuntu.com #
 
PREVIOUS NEXT
Tagged: #log #cpu #usage #linux
ADD COMMENT
Topic
Name
8+7 =