The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CPU-Load is high

Discussion in 'General Discussion' started by Thorsten H., Jul 13, 2016.

  1. Thorsten H.

    Thorsten H. Active Member

    Joined:
    Jul 13, 2016
    Messages:
    30
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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
     
  3. Thorsten H.

    Thorsten H. Active Member

    Joined:
    Jul 13, 2016
    Messages:
    30
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Germany
    cPanel Access Level:
    Root Administrator
    root@server [~]# 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.
     
  4. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    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.
     
  5. Thorsten H.

    Thorsten H. Active Member

    Joined:
    Jul 13, 2016
    Messages:
    30
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Germany
    cPanel Access Level:
    Root Administrator
    Yeah Haaaa, I got it:

    root@srv [/]# 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
     
  6. Thorsten H.

    Thorsten H. Active Member

    Joined:
    Jul 13, 2016
    Messages:
    30
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Germany
    cPanel Access Level:
    Root Administrator
    The user am I - and it's a shop for selling photos - so, cleaning up is a good idea but ...
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.
     
Loading...

Share This Page