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 python3
Wheras 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