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

php - Using grpc in Laravel, "Class 'Grpc\ChannelCredentials' not found." -

github - Git errors while pushing -

java - Generating a pre-signed PUT url for Amazon S3 with a maximum content-length -