"CPU/Memory/MySQL Usage" WHM section has no stats

fasdush

Member
Oct 29, 2005
13
0
151
We running a few cPanel-based hosts, and for two of them "CPU/Memory/MySQL Usage " (which is very handy) at WHM are empty. It lists set of users (mysql, mailnull, set of usernames that used by suexec to start php fcgi process), but both "%CPU" and "%MEM" fields are zeroes.

I found that those two servers had not sysstat package installed (which contains sar and iostat commands) while it was installed on others. I thought maybe cpanel uses sar/iostat to collect stats. But after I installed it and restarted cpanel service, nothing changes.

Please advice.

(Also english is not my native, I`m from Russia, so If my language is broken -- sorry.)
 

fasdush

Member
Oct 29, 2005
13
0
151
I figured it out. It has nothing to do with sysstat.

Stats are being generated by dcpumon utility (see "sudo crontab -u root -l") and seems that it uses ps, top and mysql to gather stats. Some of our tech changed the PATH variable at root crontab, so dcpumon was unable to find mysql/ps/top. After setting PATH="/bin:/sbin:/usr/bin:/usr/sbin" it works again.
 

webstyler

Well-Known Member
Nov 20, 2003
450
0
166
I have the same problem with 1 server
"CPU/Memory/MySQL Usage" WHM section has no stats

Other server, with same Cpanel release is ok

I have try to restart crond but nothing change

Current usage is Ok

Any solution ?

Tx
 

Kevinfrom

Well-Known Member
Jan 18, 2008
47
1
56
You can manually run dcpumon to generate the CPU usage stats.

/usr/local/cpanel/bin/dcpumon

And make sure the dcpumon cronjob exists in crontab to run every 5 minutes.