var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
/dev/sda6 (/usr) is 89% full
I have two dedicated servers..
On one of my servers, its 100% full and my 2nd one it's /dev/sda6 (/usr) is 89%.
Can someone tell me what partion on a linux based server this is usually used for, and the steps by ssh I can do to clear it out?
This is what the main Linux partitions are used for:
You shouldn't clear out /usr. If you have a lot of free space on your root partition you could symlink/mount /usr to a new location.
Run a 'df -h' to see the size of your filesystems.
You could start tracing the space you're using under /usr with the following:
Then 'cd' into the next biggest directory and repeat the 'du' command. You may find things like unflushed logs or undelivered email, though they're usually in /var.
du -h --max-depth=1
You could also force the size into megabytes and check for the top 10 biggest directories:
du -hm --max-depth=5 | sort -r -n | head -n 10
Chief of R&D
, WebGroup Media LLC. -
is a fast and flexible web-based platform for business collaboration and automation.
/usr is may be used for user related log data. For example the log files of the webserver is stored in the /usr partition. If there are lot of domains on a server, the /usr partition will be filled up soon. Check the /usr/src for any size taking source files. You can see which directory is taking more space by running the following command from inside the /usr partition.
du -sch *
If this is a cpanel server, check /usr/local/apache/logs and /usr/local/apache/domlogs folder.
Check what is consuming '/usr' space.
cd /usr && du -sch * ; now 'cd' to the next level directory and so on.
also check the if there are any apache logs (access/error/domlogs) that exceeds 2GB file limit. If this limit is exceeded, Apache might crash.
find /usr -size +2000000k
tail -1000 error_log > error_log.bk
tail -1000 error_log.bk > error_log
rm -rf error_log.bk
tail -1000 audit_log > audit_log.bk
tail -1000 audit_log.bk > audit_log
rm -rf audit_log.bk
tail -1000 suexec_log > suexec_log.bk
tail -1000 suexec_log.bk > suexec_log
rm -rf suexec_log.bk
tail -1000 access_log > access_log.bk
tail -1000 access_log.bk > access_log
rm -rf access_log.bk
Repeat this for /usr/local/cpanel/logs
Also crop the domlogs situated at /usr/local/apache/domlogs folder
First find out which directory is using more space in /usr. If you have more free space in any of the other partition you could move that directory to that drive with more space and create a symlink to new location.
You should need to check the size of the error_logs and access_logs on the server
and then try to empty them,
#ls -sh error_logs
#ls -sh access_logs
check here if size in gb for error_logs and access_logs then try to empty them,
#echo > error_logs
#echo > access_logs
If you are running any web statistics software like WebAlizer/Awstats/Urchin, make sure to generate the stats before clearing the access logs.
By phpcoder in forum Employment / Job Offers
Last Post: 06-11-2009, 03:06 PM
By Al Polonski in forum Employment / Job Offers
Last Post: 02-27-2007, 10:07 AM
By Server Intellect in forum Employment / Job Offers
Last Post: 02-15-2007, 02:35 PM
By DiverseFlow in forum Design Offers
Last Post: 01-09-2005, 07:02 AM
By sailor in forum Employment / Job Offers
Last Post: 08-21-2004, 03:58 PM