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

java - Static nested class instance -

Python Pandas join aggregated tables -

process - Python What is the difference between a Pool of worker processes and just running multiple Processes? -