![]() |
![]()
| ![]() |
![]()
NAMEBSD::devstat - interface to devstat(3) API SYNOPSISuse BSD::devstat; my $ds = BSD::devstat->new(); printf "Number of devices: %d\n", $ds->numdevs; my $devidx = $ds->numdevs; # this is last device. my $dev = $ds->devices($devidx); printf "%s%d block_size=%d\n", $dev->{device_name}, $dev->{unit_number}, $dev->{block_size}; # Stat in 2 seconds. my $stat = $ds->compute_statistics($devidx, 2.0); printf "BUSY_PCT=%.2f\n", $stat->{BUSY_PCT}; DESCRIPTIONBSD::devstat is interface to devstat(3) API. You can grab device statistics information which is provided by devstat(9) kernel interface via devstat(3) userland interface.
AUTHORJun Kuriyama <kuriyama@FreeBSD.org> SEE ALSOdevstat(3), devstat(9). BUGSCurrently supports only FreeBSD. LICENSEThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|