Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

log cpu usage of process linux

# log a processed cpu usage every second
while [ 1 ]
do
    #change 25029 to your process id to monitor
    top -b -n 2 -d 0.2 -p 25029 | tail -1 | awk '{print $9}'
    sleep 1
done
Comment

PREVIOUS NEXT
Code Example
Shell :: view available pips 
Shell :: add ssh key linux 
Shell :: create new ssh key for github 
Shell :: download kubectl for windows 
Shell :: Bluetooth problem Linux 
Shell :: how to create alias in linux 
Shell :: print in shell script 
Shell :: Using git reset to Undo a Merge 
Shell :: bash loading bar spinner in bash shell script 
Shell :: kubernetes pod stuck in terminating 
Shell :: git push existing code to new repository 
Shell :: boostrap install angular 
Shell :: Could not find com.facebook.yoga:proguard-annotations:1.14.1. 
Shell :: install neovim 
Shell :: zsh: permission denied: ./manage.py for django projects 
Shell :: angular full installation guide 
Shell :: linux source command vs dot 
Shell :: how to convert dos to unix in shell 
Shell :: Creating tar.gz 
Shell :: install rstudio ubuntu 20.04 
Shell :: git switch 
Shell :: mkdir multiple directories windows 
Shell :: git remove tag from remote 
Shell :: how to compile 64 bit nasm 
Shell :: delete file on git 
Shell :: linux command line search file by size 
Shell :: openssl verify cert 
Shell :: create new repository on the command line 
Shell :: how to log into a remote linux server 
Shell :: fastlane match update certificate 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =