linux - Capture top command to file -


i want capture output of top file there problem, output same. example, code below grabs %cpu returned top command. problem everytime execute code shows same %cpu usage, why?

top -n 1 | awk '/^%cpu\(s\)/ {print $2}' 


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -