Filesystems using more than 75% capacity


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Filesystems using more than 75% capacity
# 8  
Old 03-31-2011
@bartus:

tc95air1(root)# cat release file
Solaris 10 5/08 s10s_u5wos_10 SPARC
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 24 March 2008

@michael: it's not giving any output now, initially i thot tha no file system must be using more than 75% tht's y, later i changed the threshold to 60%, then too no results...Smilie

tc95air1(root)# ./script1
tc95air1(root)#
# 9  
Old 03-31-2011
On Solaris df works different when the output is a terminal or a non-terminal
Code:
$ df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c1t1d0s0    10327834 7666292 2558264    75%    /
/devices                   0       0       0     0%    /devices
ctfs                       0       0       0     0%    /system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 1989320    1400 1987920     1%    /etc/svc/volatile
objfs                      0       0       0     0%    /system/object
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
                     10327834 7666292 2558264    75%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                     10327834 7666292 2558264    75%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                         0       0       0     0%    /dev/fd
swap                 1987944      24 1987920     1%    /tmp
swap                 1987960      40 1987920     1%    /var/run
/dev/dsk/c1t1d0s4    20549005 12774692 7568823    63%    /project
/dev/dsk/c1t1d0s3    2053605 1696869  295128    86%    /export/home
$ df -k | cat
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c1t1d0s0    10327834 7666292 2558264    75%    /
/devices                   0       0       0     0%    /devices
ctfs                       0       0       0     0%    /system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 1989320    1400 1987920     1%    /etc/svc/volatile
objfs                      0       0       0     0%    /system/object
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1 10327834 7666292 2558264    75%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1 10327834 7666292 2558264    75%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                         0       0       0     0%    /dev/fd
swap                 1987944      24 1987920     1%    /tmp
swap                 1987960      40 1987920     1%    /var/run
/dev/dsk/c1t1d0s4    20549005 12774692 7568823    63%    /project
/dev/dsk/c1t1d0s3    2053605 1696869  295128    86%    /export/home
$

To a terminal, df split long lines into two lines. But when piped to cat, it allowed long lines to stay intact. So we don't need to worry about split lines inside the awk program. Also, on Solaris awk is an antique version. Use nawk to get a "modern" (well, circa 1985) version of awk.

Try this one:
Code:
$ cat /etc/release
                       Solaris 10 8/07 s10s_u4wos_12b SPARC
           Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                            Assembled 16 August 2007
$ df -h | nawk '{if(int($5)>75) print}'
/dev/dsk/c1t1d0s3      2.0G   1.6G   288M    86%    /export/home
vamain:/vol/vol1/razor_db/workfiles    13T    10T   2.4T    81%    /net/vamain/vol/vol1/razor_db/workfiles
$

# 10  
Old 04-01-2011
Thanx Perderabo....it's workin perfect...SmilieSmilie
# 11  
Old 04-20-2011
some more of it....

Hey Perderabo,

Can u please add a couple of functionalities to ur command...a mail containing the file system name and usage % should be fired to an ID whenever any file system crosses the threshold set by us..i.e 75%..
# 12  
Old 06-14-2011
what about for HPUX..using bdf
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

FS capacity

can anyone tell me how to reduce Fs capacity by using echo zero. (3 Replies)
Discussion started by: nkchand
3 Replies

2. AIX

Directories getting 100% capacity

I am new to using AIX but ive ran into issues with 100% full and then rebooting and having a socket error repeating over and over. My question is, what can I do besides just monitoring to ensure I dont run into these issues? Scripts? anything? Thanks (3 Replies)
Discussion started by: terry.berger
3 Replies

3. AIX

TSM capacity

Dears, The TSM storage that we have is already configured to backup some Application,directories & logs or let's say backup different path from 15 servers, I want to add more Items to be backuped by this storage, how to be confirmed if that possible or not? I mean how do we know the capacity of... (7 Replies)
Discussion started by: arm
7 Replies

4. AIX

how to find out disk capacity

Hi, I would like to know how to find out disk capacity if it is assigned from the storage as a lun. as per below command , I am unable to find out disk capacity. $ bash bash-3.00$ lspv hdisk1 0001579a7fa3c086 None $ lscfg -vl hdisk1 hdisk1 ... (8 Replies)
Discussion started by: manoj.solaris
8 Replies

5. Shell Programming and Scripting

Monitor capacity of directory

Good morning. I have been attempting to find a way to monitor the capacity of a directory so that when it reaches 80% or higher I can send an event. I was able to find a script that does this for the whole drive by I can not seem to figure out how to do this for just a single directory. ... (1 Reply)
Discussion started by: LRoberts
1 Replies

6. Solaris

tools for capacity planning

Hi All, What do you usually use for capacity planning tool on solaris 8 or later? Thanks in advance. (2 Replies)
Discussion started by: itik
2 Replies

7. AIX

capacity planning on aix

Hi All, What do you usually use for capacity planning on AIX? Any idea will do? Thanks in advance, itik (1 Reply)
Discussion started by: itik
1 Replies

8. AIX

How to increase capacity?

Hello everybody, is a very simple question how can I increase the capacity of a disk wich is on a DS4300?, I have done the procedure on the Storage Manager but the space is the same on the AIX (5.3) , what should I do to obtain the new ammount of disk space? (16 Replies)
Discussion started by: GermanSkull
16 Replies

9. UNIX for Dummies Questions & Answers

How to find filesystems crossed 90% capacity

Hi experts, How do i find which are the filesystems which has crossed 90% capacity in solaris box. thanks Shaan:) (4 Replies)
Discussion started by: shaan_dmp
4 Replies

10. Filesystems, Disks and Memory

how to find memory capacity.

Hi, In Sun solaris o/s how can i find the memory space available,Swap space. By giving df command i can get the disc space. I want RAM space & swap space. If anybody assist me.that is great. Thanks (2 Replies)
Discussion started by: Mar1006
2 Replies
Login or Register to Ask a Question