3 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/usr/bin/perl use strict; use warnings; my $buf = "\0"x64; my $path = "/"; if(syscall(99, $path, $buf) == 0) { my ($bsize, $blocks, $bfree, $bavail, $files, $ffree, $namelen) = unpack("x4 L6 x8 L", $buf); print "Blocksize: $bsize; Blocks: $blocks; -->; Size:".$bsize*$blocks."\n"; print "Blocksfree: $bfree; -->; Free: ".$bfree*$bsize."\n"; } else { print "syscall(statfs) error!\n"; }
3 Einträge, 1 Seite |