Sponsored Content
Operating Systems Linux Red Hat How do i find free space in my unix? Post 302388761 by govindts on Thursday 21st of January 2010 11:36:12 AM
Old 01-21-2010
You are the Man!!!

---------- Post updated at 12:36 PM ---------- Previous update was at 11:42 AM ----------

Your script looks good for linux. I have sun OS server. It is not working correctly for SUN OS machine. The AWK script should behave same way in all unix machine. But somehow not...

Code:
xmydll002*/export/home/oracle
>uname
SunOS

xmydll002*/export/home/oracle
>df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d0         103G    27G    76G    26%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                    38G   1.1M    38G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
                       103G    27G    76G    26%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                       103G    27G    76G    26%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   2.0G   2.6M   2.0G     1%    /tmp
swap                    38G    48K    38G     1%    /var/run
swap                    38G     0K    38G     0%    /dev/vx/dmp
swap                    38G     0K    38G     0%    /dev/vx/rdmp
/dev/vx/dsk/xyd900/vol003
                        60G    52G   7.6G    88%    /data01
/dev/vx/dsk/xyd900/vol004
                        60G    53G   6.7G    89%    /data02
/dev/vx/dsk/xyd900/vol014
                        60G    53G   6.2G    90%    /data12
/dev/vx/dsk/xyd900/vol011
                        60G    53G   6.5G    90%    /data09
/dev/vx/dsk/xyd900/vol009

xmydll002*/export/home/oracle

xmydll002*/export/home/oracle
>df -h | grep vol0 | awk 'NF == 5 {T+=$3} END {print "Total: " T ".  90% of that is " T*.9}'
Total: .  90% of that is 0

xmydll002*/export/home/oracle
>


Last edited by DukeNuke2; 01-21-2010 at 12:53 PM..
 

9 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Does unix ever misreport free space?

Hi all, Does unix ever misreport free space? We're having a problem running a utility, and the error message looks for all the world like the utility has no free space for its work files: HOST ERROR(D10681C). No space left on device. But the device itself shows ample free space. ... (3 Replies)
Discussion started by: JustKen
3 Replies

2. Solaris

command to find free disk space on solaris

In linux df is the command to find free space what is the equivalent command in the Solaris (2 Replies)
Discussion started by: harishankar
2 Replies

3. Shell Programming and Scripting

display free space on a unix server

I need to display the amount space avalible on a unix server in an html webpage, which will automatically update every hour. I am able to do so using a javascript in a windows based server. How would i go about doing this in a unix server. Any help, suggestions, anything would be great. thanks. (3 Replies)
Discussion started by: davwel
3 Replies

4. UNIX for Dummies Questions & Answers

How to find the free space & usage of the particular directory in Hp-Unix?

How to find the free space & usage of the particular directory in Hp-Unix? I want to see the usage in % (2 Replies)
Discussion started by: bobprabhu
2 Replies

5. Shell Programming and Scripting

find the free space of a particular directory

Hi Guys, I want to find the free space of a particular directory,, Regards, Magesh (3 Replies)
Discussion started by: mac4rfree
3 Replies

6. UNIX for Dummies Questions & Answers

free space, used space in ftp

Is possible to see how much available space there is on a ftp server and how much is used through ftp ? how ? free space: used space: thanks (1 Reply)
Discussion started by: aneuryzma
1 Replies

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

8. Solaris

No space left on device but free space and inodes are available...

hi guys, me again ;) i recently opened a thread about physical to zone migration. My zone is mounted over a "bigger" LUN (500GB) and step is now to move the old files, from the physical server, to my zone. We are talking about 22mio of files. i used rsync to do that and every time at... (8 Replies)
Discussion started by: beta17
8 Replies

9. 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
devnm(1M)                                                 System Administration Commands                                                 devnm(1M)

NAME
devnm - device name SYNOPSIS
/usr/sbin/devnm name [name...] DESCRIPTION
The devnm command identifies the special file associated with the mounted file system where the argument name resides. One or more name can be specified. EXAMPLES
Example 1: Using the devnm Command Assuming that /usr is mounted on /dev/dsk/c0t3d0s6, the following command : /usr/sbin/devnm /usr produces: /dev/dsk/c0t3d0s6 /usr FILES
/dev/dsk/* /etc/mnttab ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
mnttab(4), attributes(5) SunOS 5.10 14 Sep 1992 devnm(1M)
All times are GMT -4. The time now is 09:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy