Thread View: comp.unix.cray
2 messages
2 total messages
Started by Trevor Paquette
Tue, 03 Nov 1992 22:07
amd/df/du for cray?
Author: Trevor Paquette
Date: Tue, 03 Nov 1992 22:07
Date: Tue, 03 Nov 1992 22:07
11 lines
1063 bytes
1063 bytes
The subject says it. Has anyone ported AMD (The Berkely 4.4 Automounter) to the Cray? Also how about a df/du that reports Kbytes free/used and not blocks? Trev -- Name : Trevor Paquette | Landmark/ITA | _\___ Fahrvergnugen Email: tpaquette@ita.lgc.com | Calgary, Alberta, Canada | / \____ Visitor from CyberSpace | (403) 269-4669 | / G60 \ Renegade of Virtual Reality | #include <disclaimer.h> | \-O------O--/
Re: amd/df/du for cray?
Author: Jeff Bauer
Date: Wed, 04 Nov 1992 17:52
Date: Wed, 04 Nov 1992 17:52
81 lines
2645 bytes
2645 bytes
In article <TPAQUETTE.92Nov3160731@gumby.ita.lgc.com> tpaquette@ita.lgc.com (Trevor Paquette) writes:
>
> The subject says it. Has anyone ported AMD (The Berkely 4.4 Automounter)
> to the Cray?
> Also how about a df/du that reports Kbytes free/used and not blocks?
>
> Trev
>--
>Name : Trevor Paquette | Landmark/ITA | _\___ Fahrvergnugen
>Email: tpaquette@ita.lgc.com | Calgary, Alberta, Canada | / \____
>Visitor from CyberSpace | (403) 269-4669 | / G60 \
>Renegade of Virtual Reality | #include <disclaimer.h> | \-O------O--/
Can't help you with the first, but here's a shell script I have that
solves half of the second problem (for "df") :
-- cut here --
#!/bin/sh
echo "Mount Point Mbytes Used Avail Full"
/bin/df -t | awk '
BEGIN {
mbtt = mbat = 0;
nfsline = 0;
}
{
if ($1 ~ /\//) {
lineno = 1;
}
if (nfsline == 1) {
printf("this should be NFS blks avail : %d\n",$1);
mba = $1/1024;
mbat += mba;
lineno = 2;
}
else if (lineno == 1) {
if ($2 ~ /:/) {
mp = $1;
nfsline = 1;
}
else {
mp = $1;
if (length($3) > 3) {
mba = (int(substr($3,index($3,":")+1)))/256;
}
else {
mba = $4/256;
}
mbat += mba;
lineno = 2;
}
}
else if (lineno == 2) {
if ((nfsline == 1) || (NF < 6)) {
ind = index($1, ":");
mbt = (int(substr($1,ind+1,7)))/256;
}
else {
if (NF > 3) {
mbt = $2/256;
}
else {
mbt = (int(substr($1,index($1,":")+1)))/256;
}
}
mbtt += mbt;
lineno = 0;
printf("%-17s %9.3f %9.3f %9.3f %6.3f%%\n",\
mp,mbt,mbt-mba,mba,((mbt-mba)/mbt)*100)
}
if (nfsline == 1) nfsline = 0;
}
END {
printf("-------------------------------------------------------\n");
printf("TOTALS\t\t %9.3f %9.3f %9.3f %6.3f%%\n",\
mbtt,(mbtt-mbat),mbat,((mbtt-mbat)/mbtt)*100);
}'
--
Jeff Bauer jtbauer@acns.fsu.edu
FSU Academic Computing & Network Services (904) 644-2591 x. 131
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads