Often times when a file system fills up you will see one of two things:
- Because you have a well monitored system, you will get an email alert that a threshold has been reached and the file system is filling up
- Users are screaming because their applications are breaking and files aren’t being saved…
Regardless of which is happening to you, first thing to do is figure out WHY the file systems are filling up.
Nine times out of ten you’ll see that users are putting files where they shouldn’t. Storing files or logs in the /home directory, saving stuff to /tmp and not deleting it, these are things you’ll see everyday. Here’s how to figure out what’s going on.
$ df -m -> display the free space, in megabytes, on all file systems
$ who -> always good to see who is on the lpar (if the problem just started, you’ll see a list of possible culprits)
$ last -> see description for “who”
$ du -m | sort -nr | more -> this is my favourite. This will tell you the disk usage in megabytes, sorting it by the largest files. Go to the file system that is receiving errors, or that is full as per “df”, and complete this command. You will see right away what files are taking up the most space. Often times you will be able to pick out things like log files for runaway processes, installation files that have not been deleted, misplaced data files…
I hope these tips help you in the future to determine where your space went when a file system fills up



hi
i appreciate the steps provided but instead of this we can run a script that will archive those logs some where and delete from source location .This will help,by not generating the above scenerio .
regards
Vinil