From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,fd9d99729afc2312 X-Google-Attributes: gidfee84,public From: Keith Moodie Subject: Re: Disk Space 4.0d Date: 1999/09/29 Message-ID: <37F14FFB.41C6@dnr.qld.gov.au>#1/1 X-Deja-AN: 530500213 Content-Transfer-Encoding: 7bit References: <37f51547.84822970@news.dal.ca> Organization: Queensland Centre for Climate Applications Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 Hi, You may like to try the script below it gives output like > free Wed Sep 29 09:29:10 EST 1999 Filesystem GB Free Used% / 177 79 51% rz18a /v1 2.603 1.190 50% rz16h /v2 33.918 3.684 90% viper1 /usr 7.566 0.914 88% usr0 /dev/fd 0 0 100% fd #!/bin/sh # # free display disk space in GB and free space # echo "" date df -ikn | nawk ' /tmp_mnt/ { next} /\/proc/ { next} { if ( substr($0,1,4) == "File") {print "Filesystem GB Free Used%"} else { fsys = $1; tot = $2/1024; used = $3/1024; free = $4/1024; if ( tot > 1024 ) { # > 1 GB print like " 1.123" tot = sprintf( "%7.3f", tot / 1024.0); used = sprintf( "%7.3f", used / 1024.0); free = sprintf( "%7.3f", free / 1024.0); } else { # < 1 GB print like " 123" tot = sprintf( "%7d", tot); used = sprintf( "%7d", used); free = sprintf( "%7d", free); } cap = $5; iusd = $6; ifre = $7; icap = $8; mnt = $9; imsg = "" if ( match ( icap, "[5-9][0-9]") > 0) imsg = "Inodes " icap; f_sys = fsys; gsub( "/dev/", "", f_sys); gsub( "usr0#", "", f_sys); #pretty up the names of ADVFS domains gsub( "viper1#", "", f_sys); gsub( "viper2#", "", f_sys); gsub( "viper3#", "", f_sys); gsub( "viper4#", "", f_sys); gsub( "elite#", "", f_sys); #printf ( "%-12s %6.3f %6d %6s %s\n", mnt, tot, free, cap, imsg); printf ( "%-12s %s %s %6s %15s %10s\n", mnt, tot, free, cap, imsg, f_sys); } } END{ print "" } ' # End of script HxMan wrote: > > We are starting to run low on disk space on our 2100 server.... We do > have a RAID pedistal with 2.1 gig drives....... I would like to know > if there is any way to find out what file systems expands what > disks.... Also the command df -k > Filesystem 1024-blocks Used Available Capacity Mounted on > /dev/re1c 12192746 9401811 1571660 86% /data > > So to figure out megabytes I divide by 1024????? > > So what does the above translate to...... > > Thanks -- Keith Moodie moodiek@dnr.qld.gov.au