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 :: install cockroachdb linux 
Shell :: linx delete 
Shell :: Turn On Nested Virtualization If You’Re Running The Host System In A Windows Box 
Shell :: Instal helm ubuntu linux 
Shell :: github oisintgram 
Shell :: pendrive bootable using terminal 
Shell :: jest stop at first failure 
Shell :: shut down linux keyboard shortcut 
Shell :: how slice for loop filename without extension in batch file 
Shell :: download stardocks sdk from nuget package 
Shell :: initiation git windows 10 
Shell :: loop clear and ls lrt command line linux 
Shell :: installed delphi package says unit not found 
Php :: display wordpress error 
Php :: tinker not colorful 
Php :: echo pre print_r 
Php :: o perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host. 
Php :: if user logged in wordpress 
Php :: : Unable to locate package php7.4-fpm 
Php :: the $request argument is type-hinted with the non-existent class or interface: "AppControllerRequest". 
Php :: php get string size 
Php :: php remove dashes from string 
Php :: laravel symlink command 
Php :: rewrite .php to no extension 
Php :: get all values inside session laravel 
Php :: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) 
Php :: wordpress the loop 
Php :: laravel request all except token 
Php :: php post self 
Php :: ubuntu update php 7.4 to 8 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =