Skip to main content

Disk space usage

Comments

6 comments

  • 24x7server
    Hello, if you have root login access of your server, Login your server through SSH and execute the following command. You will get the all directory disk usages details. cd / du -sch *
    0
  • JaredR.
    The disk usage does not sound abnormal, though as 24x7server mentioned, you can use the du command to get more detailed information. In general, you can plan on at least 2 GB used by the operating system (RHEL or CentOS), and at least 2 GB more used by cPanel, before you start adding any accounts. The operating system by itself can use up much more space than that, depending on what you install. Most of the usage in /bin and /usr will be from a combination of the operating system and cPanel.
    0
  • jasonman
    I find that the folder usr usage 8.0GB and a file tmpDSK use 3.5GB as follow: root@whm [/usr]# du -sch * 134M bin 4.0K etc 4.0K games 32M include 292M lib 209M lib64 23M libexec 3.1G local 84K man 43M sbin 534M share 240M src 0 tmp 3.5G tmpDSK 8.0G total What is the tmpDSK file? Is it the system file of cPanel or WHM? Thanks!
    0
  • JaredR.
    tmpDSK is a file that is mounted as the /tmp and /var/tmp directories. It is created and mounted by /usr/local/cpanel/scripts/securetmp. As its name implies, it is normally used for files that are temporary in nature. If its usage is very large, the usual reason is applications or scripts that are not cleaning up after themselves (i.e. not deleting session or cache files after they are no longer needed).
    0
  • jasonman
    Thank very much for your reply, Jared! Then how could I reduce the usage of this file? Could I delete this file if no any problem of the website? Thanks!
    0
  • JaredR.
    Do not delete tmpDSK, /tmp or /var/tmp. You can delete files inside the /tmp or /var/tmp directories only if you are absolutely sure that you do not need them. If you are not sure if your sites need the files, you need to either consult the documentation or ask the developer of the scripts that are used on your sites. However, remember that deleting anything from /tmp or /var/tmp is a workaround, and it does not fix the real problem. The real problem, the real question that needs to be answered, is "Why are my sites' scripts leaving behind temporary files that are no longer needed?" For help with that, you need to consult the documentation or developers of the site scripts. You should not need to routinely delete anything in /tmp or /var/tmp. If you find yourself needing to, it means there is a problem with at least one script or service that you host, and you really need to address that problem, instead of deleting files from /tmp or /var/tmp. Site scripts should clean up after themselves, and it is not normal or acceptable for them to leave trash behind in /tmp or /var/tmp.
    0

Please sign in to leave a comment.