linux - CPU usage in top batch mode -


i have problem makes me mad. running top in batch mode following command,

top -b -n 1

the problem can run top in batch mode 100 times cpu usage never changes past original value. memory usage changes expected cpu stays same. if simultaneously run top in different window cpu usage changing top not top in batch mode.

basically cpu stats don't seem change in batch mode , in interactive mode. know why? try yourself, run above command few times , observe cpu usage staying same run top in interactive mode , observe cpu usage changing.

on first iteration, showing average cpu usage since system startup.

(note no longer case newer versions of top).


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -