Sponsored Content
Top Forums Shell Programming and Scripting Filesystems using more than 75% capacity Post 302509621 by Perderabo on Thursday 31st of March 2011 09:43:40 AM
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 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. AIX

FS capacity

can anyone tell me how to reduce Fs capacity by using echo zero. (3 Replies)
Discussion started by: nkchand
3 Replies
efdaemon(1M)						  System Administration Commands					      efdaemon(1M)

NAME
efdaemon - embedded FCode interpreter daemon SYNOPSIS
/usr/lib/efcode/sparcv9/efdaemon [-d] DESCRIPTION
efdaemon, the embedded FCode interpreter daemon, invokes the embedded FCode interpreter when the daemon receives an interpretation request. A new session of the interpreter is started for each unique request by invoking the script /usr/lib/efcode/efcode. efdaemon is used on selected platforms as part of the processing of some dynamic reconfiguration events. OPTIONS
The following option is supported: -d Set debug output. Log debug messages as LOG_DEBUG level messages by using syslog(). See syslog(3C). FILES
/dev/fcode FCode interpreter pseudo device, which is a portal for receipt of FCode interpretation requests /usr/lib/efcode/efcode Shell script that invokes the embedded FCode interpreter /usr/lib/efcode/interpreter Embedded FCode interpreter /usr/lib/efcode/sparcv9/interpreter Embedded FCode interpreter ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWefcx, SUNWefcux, SUNWe- | | |fcr, SUNWefclx | +-----------------------------+-----------------------------+ SEE ALSO
svcs(1), prtconf(1M), svcadm(1M), syslog(3C), attributes(5), smf(5) NOTES
The efdaemon service is managed by the service management facility, smf(5), under the service identifier: svc:/platform/sun4u/efdaemon:default Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser- vice's status can be queried using the svcs(1) command. SunOS 5.10 10 Aug 2004 efdaemon(1M)
All times are GMT -4. The time now is 08:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy