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.

/tmp says 100%, du says different?

Discussion in 'General Discussion' started by myusername, Oct 16, 2004.

  1. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Anyone know if there is some sort of cache on the /tmp quota that anyone is aware of?

    I have WHM showing 100% full for /tmp where


    Code:
    cd /tmp
    du -sh * 
    shows only:

    Code:
    root@mybox [/tmp]# du -sh *
    
    16K     lost+found
    0       mysql.sock
    4.0K    nobody-session-0.536175091591762
    0       sess_14ea8906d6d1e102d993cff641f9013a
    0       sess_1eb4dc7e3876974c0c99853ed96747ca
    8.0K    spamd-15241-init
    20K     spamd-15521-init
    Any ideas why it still says full and how to get it to reflect an accurate % full?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    What does df give you?
     
  3. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi Chirpy,

    Thanks for the suggestion Chirpy. I had to reboot it as a quick fix while I look for a solution. That cleared it up for the time being.

    df currently lists the same thing that WHM does:

    /dev/sda7 1035660 40732 942320 5% /tmp

    Which leads me to believe before this incident it would have read

    /dev/sda7 1035660 40732 942320 100% /tmp

    My guess is there is a way to refresh the actual disk usage cache but I do not know what that command might be. There is a checkbox in tweak settings related to this but it did not solve the issue.
     
  4. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Well it is full again and here are the results requested:

    This is the output before removing the files in /tmp:
    Code:
    root@someserver [~]# df
    
    /dev/sda7              1035660    983052         0 100% /tmp
    
    ======
    root@someserver [/]# du -sh *
    
    928M    tmp
    output after the files have been removed:

    Code:
    root@someserver [~]# df
    
    Filesystem           1K-blocks      Used Available Use% Mounted on
    
    /dev/sda7              1035660     35616    947436   4% /tmp
    
    =======
    root@someserver [/]# du -sh *
    
    3.7M    tmp
    Yet WHM still lists 100% and user sessions are void, and no temp files can be used, for example, uploading images via scripts until this cache gets cleared, which so far gets done by reboots. ;(
     
    #4 myusername, Oct 16, 2004
    Last edited: Oct 16, 2004
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The thing missing is what is filling up your /tmp partition that you have to keep clearing down? If you can fix that issue, other problems will probably go away?
     
  6. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Exactly what I was thinking. Next time also do an `ls -latr /tmp` to see what all is in there to know what to start looking at.
     
  7. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    You guys think like me, fix the root of the problem. Problem is I did not program this server nor want to reverse engineer what has been done, and potentially break a highly customized cPanel server.

    The developer will be back tomorrow, and we can get through the issue undoubtedly.

    Still curious as to why removing the very large files that appear in /tmp do not immediately affect what WHM displays, (until reboot to get an accurate reading) and for that matter what web based users can do.

    I can understand a web-based service check being cached and "displayed" to user or admin for performance issues, but when the "actual" content in /tmp is basically zero, preventing users from performing operations that require /tmp access is new to me.

    Seems like they should be allowed /tmp access if the actual quota is near 1-5% regardless of the cached, web-based display quota of 100% says.

    Thanks again.
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    What you see as the seeming caching effect is actually chkservd not having run again after you cleared up after the problem. If it is chkservd, then you could restart it for an automatic refresh of the status page using:

    /etc/init.d/chkservd restart

    Then reload your WHM status page.

    However, running out of space in your /tmp partition can cause significant problems and knock-on effects for the rest of the servers operating system and applications. It's not unknown for your server to hang, logins don't work, data corruption and a myriad of other problems, should any partition that is used runs out of space, and the /tmp partition can be doubly as important.

    If it does happen again, I would suggest you do as dgbaker suggested and post the output from the ls command on this thread where people can help you understand what may be causing the initial problem.
     
  9. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Also note that in Tweak Settings that if you have the following unchecked, you can get very delayed information.

    Disable Disk Quota display caching (whm will cache disk usage which may result in the display of disk quotas being up to 15 minutes behind the actual disk usage. Disabling this may result in a large performace degradation.)
     
  10. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I will do that the next time it happens.

    As for the "Disable Disk Quota display caching" I tried that the first time for giggles, and it did not affect anything in WHM so far as displaying *current* accurate usage for /tmp. I will see if restarting the service check daemon does anything.

    Thanks all.
     
Loading...

Share This Page