Knowledgebase

Portal Home > Knowledgebase > Articles Database > Drive Space Warning on server


Drive Space Warning on server




Posted by boxer, 10-21-2009, 07:30 AM
Hello, I just got this email today, don't know how to remove unused space in that drive or what to do exacly, please help in advice. Thanks

Posted by inspiron, 10-21-2009, 08:33 AM
Try to check the size of the error logs and access_logs on the server and try to empty it. # cd /usr/local/apache/logs # ls -sh error_logs # ls -sh access_logs check here if the size is in the gb for error_logs and access_logs then try to empty them. # echo > error_logs # echo > access_logs

Posted by Hosting24, 10-21-2009, 08:52 AM
Are you familiar with df command? It's really useful when you need to check which directories use most of space

Posted by barry[CoffeeSprout], 10-21-2009, 09:37 AM
from a shell execute: sudo du -h -s /* This will tell you the size of each folder, you can then go deeper as needed to find where the space is going. For example on one of my machines this yields: 7.7M /bin 12M /boot 28K /dev 55M /etc 821M /home 261M /lib 18M /lib64 16K /lost+found 16K /Maildir 4.0K /media 4.0K /misc 4.0K /mnt 4.0K /net 29M /opt 2.1G /proc 34M /root 33M /sbin 20K /selinux 4.0K /srv 0 /sys 72K /tmp 1.5G /usr 202M /var You can probably sort these if you want, like so: sudo du -h -m -s /* | sort --numeric This will list the directories in the order of size (mb), with the biggest folder at the bottom. You can also tail this to only get a top 10 of sorts: sudo du -h -m -s /* | sort --numeric | tail 18 /lib64 29 /opt 33 /sbin 34 /root 55 /etc 202 /var 261 /lib 821 /home 1493 /usr 2058 /proc You can ignore /proc Folders to watch are /home (usually where the user files and sites are stored), /var (contains logs), /tmp (contains temporary files) /root is basically root's home folder

Posted by boxer, 10-21-2009, 11:06 PM
and now after echo the logs and error log Thats what usefull Thanks Inspiron, And Hosting 24 here the resualt for hd -f It's look That Inspiron helps was really good... Bvs[NL], here is my resualt

Posted by inversehost, 11-15-2009, 12:24 PM
A simple way to clean apache log download Freeware client WinSCP go to derectotry /usr/local/apache/logs and delete manually

Posted by PCS-Chris, 11-15-2009, 01:46 PM
It's much better to clear logs. Delete them and you might end up causing yourself problems if they are not automatically created, or created with the wrong permissions. The best thing to do is implement log rotation, so your logs are compressed, stored and then emptied. Based on the message you recieved I'll assume this is a cPanel server. In which case cPanel can rotate logs for you automatically, just look for the option in WHM when logged in as root

Posted by inversehost, 11-15-2009, 03:06 PM
Hv faced this log issue when I used suphp. it consumes very large ammount of space.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Automation Script (Views: 594)


Language:

Contact us