Running out of space


 
Thread Tools Search this Thread
Operating Systems AIX Running out of space
# 8  
Old 03-14-2012
df shows filesystems, not files.

Files in / will be files that aren't contained beneath any other folder shown in df.

You were given the command to show files, earlier: du.

Code:
du -ks * | sort -rn

Flies by too fast for you to read? Stick a less on the end, that's a tool for you to remember.

Code:
du -ks * | sort -rn | less

If your system's du has -x, even better, then you can use that to find files only in / itself:

Code:
du -xks * | sort -rn | less

# 9  
Old 03-14-2012
I will ask a simple question ( or two Smilie ):
Are you root on this aix box?
A you learning aix, and so using smit?
Did you do alot of smit/smitty today?
If so you shoulg think to purge periodically your smit.log file...

Under AIX / is not a big file system:
Code:
n12:/root $ df -k   
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           262144    141620   46%     3232    10% /

You can see it is used at 50% of 200 MB, on that /root uses almost a half...
the trouble with root filesystem id that it hold /dev
Any wrong command like archiving to tape on the wrong or inexistent device will create a file e.g. like /dev/wrongtape that can depending what you did, be huge...
/dev should be less than 2MB... if not there is junk in it...
# 10  
Old 03-14-2012
The / filesystem is usually part of rootvg. You can run this command to see what filesystems are part of rootvg:

Code:
lsvg -l rootvg | egrep -v 'N\/A'

I usually find a culprit in either /var, or if you have Legato Networker installed, /nsr/logs which contains a log that sometimes gets out of control.

Hope this helps.
# 11  
Old 03-14-2012
vbe, Yes I'm root on the box. I did delete the smit transaction log (it really wasn't that large).

in2nix4life, Ok...I want to check my understanding (being a Windows guy it's different under Windows)..when I list out the file systems within the root vg by using the command above (/,/usr,/var,/tmp,/home,/opt,/admin,/var/adm/ras/l) these are the default file systems created during the install. So (in my mind)...any other folders listed are by default in the / file system. Except of course any symbolic links that may point to other file systems.

I'm guessing this is correct as I did find a folder when I did a ls -l from $ that contained a growing number of log files being generated by our ERP system, that when I deleted them I reclaimed over 400mbs of space in /

If someone can confirm that my understanding is not wrong, that would be great!

I really do appreciate the input and patience! It's really frustrating to know what I want to do, but not have the Unix understanding to get there. I'm learning...slowly but surely!

Cheers!
# 12  
Old 03-14-2012
Quote:
Originally Posted by Spellbound
Ok...I want to check my understanding (being a Windows guy it's different under Windows)..when I list out the file systems within the root vg by using the command above (/,/usr,/var,/tmp,/home,/opt,/admin,/var/adm/ras/l) these are the default file systems created during the install.
While running Windows, have you ever thought "I wish I could make c:\whatever be on a different drive, because this stupid application/daemon/user is filling all of C"? That's how UNIX filesystems are attached inside each other. Instead of becoming arbitrary drive letters with files inside, they get put where convenient, with one main partition at the root of it all. The file tree is organized like /opt, /usr, and so forth to make it easier to parcel different kinds of data on different partitions.

If all those extra filesystems weren't mounted, they'd just be perfectly ordinary empty folders.
Quote:
So (in my mind)...any other folders listed are by default in the / file system.
Yes, exactly. Any folders which aren't within any other mountpoints are inside /
# 13  
Old 03-14-2012
Yes, "du" provides LOTS of info. You need to find the jems in it (e.g. the oversized files that are too large, OR the oversized directories that have too many files). You can sort it (as suggested), or select on it (with awk, for example). Building commands to do what YOU want (and not depend on some programmer having thought of your needs ahead of time) is the traditional Unix way.

What does this do for you?

Code:
du -x / | sort -n | tail

If /tmp or /var/tmp is full, sort may fail. If that is an issue, try awk to select on large numbers.

Code:
du -x | awk '{if($1>65536)print $0;}'

# 14  
Old 03-14-2012
Quote:
Originally Posted by Skaperen
[..]If /tmp or /var/tmp is full, sort may fail. If that is an issue, try awk to select on large numbers.
Or use sort -T <new path>
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Running out of /usr space ...

Hi, Can anyone please advise me on how can i increase /usr disk space manually. The partition was created using manual disk spaces as per IT dept. request As i don't have any space available on the said production system. Therefore, i can move the /U01 FS to /U02 file system which will allow... (7 Replies)
Discussion started by: vitalwebsigns
7 Replies

2. Solaris

Running a script in a sub dir with space in it

Hi I am trying to run a script in a sub-directory, that has one space on it: such as: /internaldisk1/Task Logs1, but my entry in cron is not working: 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /internaldisk1/Task\ logs1/./remov_reject.sh > /var/tmp/interd_`date '+%Y%M%d'`.log 2>&1 Please can... (4 Replies)
Discussion started by: fretagi
4 Replies

3. UNIX for Advanced & Expert Users

Need to remove leading space from awk statement space from calculation

I created a awk state to calculate the number of success however when the query runs it has a leading zero. Any ideas on how to remove the leading zero from the calculation? Here is my query: cat myfile.log | grep | awk '{print $2,$3,$7,$11,$15,$19,$23,$27,$31,$35($19/$15*100)}' 02:00:00... (1 Reply)
Discussion started by: bizomb
1 Replies

4. Fedora

Need to incrwase PHYSICAL VOLUME space on hard drive with free space on it

Hi, I run Fedora 17. I created a physical volume of 30GB on a disk with 60GB of space so there is 30GB of free space. On the physical volume, I created my volume group and logical volumes. I assigned all the space in the physical volume to my volume group. I need to add the 30GB of free space... (1 Reply)
Discussion started by: mojoman
1 Replies

5. Solaris

Disk space being used up while running a script

We have a script which when run consumes the space of the disk from where it is being run. we have to kill this script every time to release space. why do this happen ? any work around please we are using solaris 10 P.S. : a part of the code will make some connection to the DB (1 Reply)
Discussion started by: chidori
1 Replies

6. AIX

Alter paging space while the server is running

========================================================================= Hi I should make hd6 as 6144MB and remove paging00 How to do ? root@dbspsdbn1 #lsps -a Page Space Physical Volume Volume Group Size %Used Active Auto Type paging01 hdisk2 ... (1 Reply)
Discussion started by: newtoaixos
1 Replies

7. Shell Programming and Scripting

Running web pages located outside webserver space

I can't find any good, active Apache forums, anyone know? Either way I'll ask once here. Let's say all webpages on the server run from /var/www directory and you would like to store some webpages elsewhere on the filesystem and still the apache webserver can access them like they were located in... (5 Replies)
Discussion started by: stevenswj
5 Replies

8. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

9. HP-UX

Problem running out of space by copying files to identical filesystems

I am trying to copy a filesystem from one server to another using rsync over the WAN. As far as I can tell, the two filesystems are identical but for some reason I cannot copy the last file because I keep running out of space. SERVER 1: mkfs -m <lvol> mkfs -F vxfs -o... (1 Reply)
Discussion started by: keelba
1 Replies

10. UNIX for Advanced & Expert Users

Running out of Space (Root)

Hi, I m working on about 16 Unix Servers, Sometime a file is generated in the root names STA, which causes the root to run out of space within few seconds ,,, and the server crashes..... hlp me out to find why the file is generated , what does it contain 'n' what is the cause ! (0 Replies)
Discussion started by: scorpiyanz
0 Replies
Login or Register to Ask a Question