NAME
Net::Ifstat - Report Interface Statistics
DESCRIPTION
Ifstat is a little tool to report interface activity, just like iostat/vmstat do for other system statistics.
Ifstat has two modes of operation. Batch mode and interactive mode. In batch mode you have to give the delay and count and is suitable for scripts.
In the interactive mode this will keep printing stats on STDOUT endlessly until you terminate with the keyboard interrupt.
SYNOPSIS
use Net::Ifstat;
my $ifstat = Net::Ifstat->new('/usr/local/bin/ifstat');
my $result = $ifstat->exec(); croak $ifstat->errstr unless $result;
$ifstat->exec();
$ifstat->options{ '-b' => 1, '-delay' => 1, '-count' => 5 };
$ifstat->exec()
# All options in OpenBSD ifstt
loopmon => '-l',
allifs => '-a',
hideidelifs => '-z',
helpmsg => '-h',
displayheader => '-n',
ts => '-t',
totalbw => '-T',
ifaceidx => '-A',
fixedcolwidth => '-w',
wraplines => '-W',
linestats => '-S',
bitsstats => '-b',
quietmode => '-q',
verdrivers => '-v',
iflist => '-i iflist separated by comma',
delay => '-delay delaysecs',
count => '-count pktcount'
);
$ifstat->{options} = {'-b' => 1,'-delay' => 0.2};
$ifstat->exec();
METHODS
new('/usr/local/bin/ifstat')
Contructs Net::Ifstat object.It takes a path of ifstat command.
You can omit this argument and this module searches ifstat command within PATH environment variable.
I tested and developed this on OpenBSD 5.2 ifstat.
options( @options )
Specify ifstat command options directly
execute()
Executes ifstat command with specified options.
exec()
An alias of execute()
stdout()
Get ifstat command output to stdout.
stderr()
Get ifstat command output to stderr.
Specify output file name and output options.
Avaiable options are:
- delay
-
The delay between bandwidth updates.
- count
-
The number of updates to show before exiting
-
Set the author.
- comment
-
Set the comment.
AUTHOR
Girish Venkatachalam, <girish at gayatri-hitech.com>
BUGS
Please report any bugs or feature requests to
C<bug-text-cowsay at rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=text-cowsay>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Net::Ifstat
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
L<http://annocpan.org/dist/Net-Ifstat>
CPAN Ratings
L<http://cpanratings.perl.org/d/Net-Ifstat>
RT: CPAN's request tracker
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Ifstat>
Search CPAN
L<http://search.cpan.org/dist/Net-Ifstat>
ACKNOWLEDGEMENTS
The author of Ifstat is Gael Roualland, <gael.roualland@dial.oleane.com>
COPYRIGHT & LICENSE
Copyright 2012 Girish Venkatachalam, all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.