ps and top report different CPU utilization

Today, I was checking named on one of the servers, and spotted something surprising — top was reporting 100% CPU utilization, while ps was reporting only 0.5%. Checking the documentation, it seems that there are following differences:

  • ps reports utilization of the entire lifetime of a process (this is not ideal, but rather an indicator of just that)
  • top reports utilization between the last screen refresh

It is logical actually, but not so self-evident until you have a process that has been executing fine for a long time, but suddenly started misbehaving.

By the way, which of those two your monitoring tool is taking into account?

Comments are closed.