[OpenAFS] afsdf new release
Heinz-Ado Arnolds
arnolds@MPA-Garching.MPG.DE
Wed, 10 May 2017 16:37:51 +0200
This is a cryptographically signed message in MIME format.
--------------ms070103020504060602060200
Content-Type: multipart/mixed;
boundary="------------0A3E19E2311EFE55612ECBBD"
Content-Language: en-US
This is a multi-part message in MIME format.
--------------0A3E19E2311EFE55612ECBBD
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Dear Steve,
thanks a lot for your tool. Small problem: if a server currently has no p=
artitions, you'll get a division by zero when calculating $pct. You'll fi=
nd a simple patch enclosed. (Formatting is done to keep the patch small. =
There should be an additional indentation to all lines inside the new if{=
} clause for sure.)
New output:
lnx-14 a 9 1 8 10.67%
b 9 0 9 1.20%
c 9 4 5 40.88%
d 9 4 5 47.01%
Subtotal 39 9 29 24.95%
lnx-16 -
lnx-17 -
lnx-18 a 9 0 9 0.85%
Kind regards,
Ado Arnolds
On 09.05.2017 19:23, Steve Simmons wrote:
> =E2=80=8BAbout 10 years back I posted a 'afsdf' command to openafs-info=
=2E Many improvements were made based on suggestions here, but I never go=
t round to re-posting it. In general, the command does a df-ish disk usag=
e report across an entire cell, with various permutations on roll-ups, di=
splay compaction, and so forth. Used in my favorite two modes:
>=20
> $ afsdf -t
> Server Ptn SizeMB Used Avail. Pct F=
ull
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D
> afsprs01.afs.storage a 2,096,124 1,669,362 426,761 79.=
64%
> afsprs01.afs.storage b 2,096,124 1,638,733 457,390 78.=
18%
> afsprs01.afs.storage c 2,096,124 1,686,377 409,746 80.=
45%
> afsprs01.afs.storage d 2,096,124 1,703,729 392,394 81.=
28%
> afsprs01.afs.storage e 2,096,124 1,670,024 426,099 79.=
67%
> afsprs01.afs.storage f 2,096,124 1,716,652 379,471 81.=
90%
> afsprs02.afs.storage a 2,096,124 1,701,536 394,587 81.=
18%
> afsprs02.afs.storage b 2,096,124 1,711,506 384,617 81.=
65%
> . . .
> afsprs10.afs.storage e 2,096,124 1,385,650 710,473 66.=
11%
> afsprs10.afs.storage f 2,096,124 1,355,564 740,559 64.=
67%
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D
> Grand Total 125,767,440 97,068,722 28,698,717 77.=
18%
>=20
> $ afsdf -T -s -u GB
> Server Ptn SizeGB Used Avail. Pct Full
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D =3D=3D=3D=3D=3D=3D=3D =3D=
=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D
> afsprs01 a 2,046 1,630 416 79.64%
> b 2,046 1,600 446 78.18%
> c 2,046 1,646 400 80.45%
> d 2,046 1,663 383 81.28%
> e 2,046 1,630 416 79.67%
> f 2,046 1,676 370 81.90%
> Subtotal 12,281 9,848 2,433 80.19%
>=20
> afsprs02 a 2,046 1,661 385 81.18%
> b 2,046 1,671 375 81.65%
> . . .
> afsprs10 a 2,046 1,373 673 67.11%
> b 2,046 1,355 691 66.24%
> c 2,046 1,345 701 65.71%
> d 2,046 1,377 669 67.29%
> e 2,046 1,353 693 66.11%
> f 2,046 1,323 723 64.67%
> Subtotal 12,281 8,129 4,152 66.19%
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D =3D=3D=3D=3D=3D=3D=3D =3D=
=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D
> Grand Total 122,819 94,793 28,026 77.18%
>=20
>=20
> afsdf -h prints a quick help message, afsdf --usage shows you all the s=
witches.
>=20
> Enjoy,
>=20
> Steve
>=20
--------------0A3E19E2311EFE55612ECBBD
Content-Type: text/x-patch;
name="afsdf.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="afsdf.patch"
--- afsdf.orig 2017-05-10 16:10:01.000000001 +0200
+++ afsdf 2017-05-10 16:29:31.000000001 +0200
@@ -471,7 +471,7 @@
print "\n" if ( $subtotal_done );
}
open( FSDATA, "vos partinfo -server $server $cellflag -noauth |" );
- @fsdata =3D ( <FSDATA> );
+ if ( @fsdata =3D ( <FSDATA> ) ) {
foreach $line ( @fsdata ) {
# All calculation is done in the native server units, KB.
# We scale them as requested when printing.
@@ -508,6 +508,9 @@
$pct, mk_flag( $pct ) );
$subtotal_done =3D 1;
}
+ } else {
+ printf "%-${srv_width}.${srv_width}s -\n", $servname;
+ }
}
if ( 0 =3D=3D $gtot_size ) {
$pct =3D 0;
--------------0A3E19E2311EFE55612ECBBD--
--------------ms070103020504060602060200
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC
D9kwggTVMIIDvaADAgECAghQTsb1PRG0ZDANBgkqhkiG9w0BAQsFADBxMQswCQYDVQQGEwJE
RTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRy
dXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNMTQw
NzIyMTIwODI2WhcNMTkwNzA5MjM1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