Thorsten H.

Active Member
Jul 13, 2016
38
2
8
Germany
cPanel Access Level
Root Administrator
Hi there,
since some days I get a high CPU-load with server crashes, the memory load is normal/low.
When I call htop I see every some minutes that du -ks /home/userdir is called by root. This is the moment, that the CPU-load is high. But I don't find a solution where it is called.

In the crontabs there I can't find an entry and under /var/spool/cron I also can't find anything.

What I have installed in WHM is called Recource Monitor. But there are all user-dirs deactivated. So, can anyone give me a tip where to look?

Regards
Thorsten
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello,

You can run a command like this when this is happening in an attempt to determine the source of the "du" command:

Code:
ps aux|grep du
Also, please let us know if this thread helps:

Troubleshooting high server loads on Linux servers

Note you may want to search for additional cron jobs in the /etc/cron* directories.

Thank you
 

Thorsten H.

Active Member
Jul 13, 2016
38
2
8
Germany
cPanel Access Level
Root Administrator
[email protected] [~]# ps aux | grep du
root 4904 89.7 0.0 4696 1364 ? R 20:40 0:09 du -ks /home/userdir
root 5126 0.0 0.0 103332 888 pts/2 S+ 20:41 0:00 grep du
root 19381 3.1 0.4 141200 38828 pts/1 S+ 20:06 1:05 grep -r -i du -ks ./

Hm, I think that helps not so many, because that is what I know. What I have seen is, that "du -ks /home/userdir' is called in minutes and in one userdir it has to stay longer, because there are 120 GB.
In the other cron.* dirs I have looked but not found any suspicouse.
 

twhiting9275

Well-Known Member
Sep 26, 2002
560
28
178
cPanel Access Level
Root Administrator
Twitter
Clean the user up. 120 gig is far too much for a shared hosting account!
If this 120 gig is all mail, this is going to be (literally) millions of files and take forever to process. You want to avoid that.
Also, if this is taking a long time, it's likely time to upgrade the server. Get a beefier processor, more memory, even a better disk, since this one's likely got quite a bit going on.
 

Thorsten H.

Active Member
Jul 13, 2016
38
2
8
Germany
cPanel Access Level
Root Administrator
Yeah Haaaa, I got it:

[email protected] [/]# grep -r -i 'du -ks' ./
./usr/lib/monitorix/du.pm: $line = `du -ks "$str"`; # in KB

in monitorix.conf:
<graph_enable>
system = y
kern = y
proc = y
hptemp = n
lmsens = n
nvidia = n
disk = n
fs = y
zfs = n
du = y
net = y

Set DU = to "N" --- thats it.

Thanks for your help! And good night :)

Thorsten
 

Thorsten H.

Active Member
Jul 13, 2016
38
2
8
Germany
cPanel Access Level
Root Administrator
Clean the user up. 120 gig is far too much for a shared hosting account!
If this 120 gig is all mail, this is going to be (literally) millions of files and take forever to process. You want to avoid that.
Also, if this is taking a long time, it's likely time to upgrade the server. Get a beefier processor, more memory, even a better disk, since this one's likely got quite a bit going on.
The user am I - and it's a shop for selling photos - so, cleaning up is a good idea but ...