Article 53AQA [SOLVED] different measurements between (h)top and ps aux

[SOLVED] different measurements between (h)top and ps aux

by
vincix
from LinuxQuestions.org on (#53AQA)
Hi,

I'm having trouble understanding how ps aux and htop take measurements, or rather ps aux, because in this case I trust htop. I've running a container with a cpu limit of 0,2 (so 20%) and then started a loop process which runs over and over.
htop shows me constantly:
Code:26576 root 20 0 90108 11620 5356 S 20.6 0.3 2:25.98 python3Wheras ps aux shows:
Code:USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 26576 16.4 0.2 90108 11620 pts/0 Ssl+ 17:42 2:28 python3(of course I've run ps aux over and over just to make sure)
I don't understand where the difference lies.

It seems though that measurement of ps aux increases slightly by 0.1 every 30 seconds, maybe?
Is there some kind of delay? I don't really get it and I find it very misleading.

Now it's reached 16.8 :)latest?d=yIl2AUoC8zA latest?i=PkI6ZNzD27M:fOvSo42X6ic:F7zBnMy latest?i=PkI6ZNzD27M:fOvSo42X6ic:V_sGLiP latest?d=qj6IDK7rITs latest?i=PkI6ZNzD27M:fOvSo42X6ic:gIN9vFwPkI6ZNzD27M
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments