Unix::S...io_stats(3)
β¨ Unix::S...io_stats(3) β¨
okay bestie, so this is a page from the User Contributed Perl Documentation, and it's giving "container for libstatgrab network I/O statistics" energy π . Pull up a chair, grab a boba, and let's get into it π§π
πΈ NAME πΈ
Unix::Statgrab::sg_network_io_stats β literally the container for libstatgrab network I/O statistics, no cap π¦
π DESCRIPTION π
So Unix::Statgrab::sg_network_io_stats is a Perl package name, and what it does is give you accessors to the bundled libstatgrab sg_network_io_stats thingy. You can find the whole libstatgrab doc situation over at <http://www.i-scream.org/libstatgrab/docs/sg_get_network_io_stats.3.html> and it's all about network I/O statistics π‘β¨
π METHODS π
nentries
Returns the number of entries in the container. That's it, that's the vibe π’
systime
Returns the seconds since Epoch (0:00:00 on January, 1st 1970) of the time measure the network I/O statistics. yes bestie, the classic 1970 moment π°οΈ
as_list
Deprecated alias of fetchall_hash β οΈ like, it still works but it's giving "old" β use fetchall_hash instead fr fr
fetchall_hash
Returns all records from the sg_network_io_stats container (docs at <http://www.i-scream.org/libstatgrab/docs/sg_get_network_io_stats.3.html>) as a list of hashes, where each datum name is the key and the datum is the value ποΈβ¨
fetchall_array
Returns all records from the sg_network_io_stats container (again, <http://www.i-scream.org/libstatgrab/docs/sg_get_network_io_stats.3.html>) as a list of arrays, and the values come in this order:
(interface_name tx rx ipackets opackets ierrors oerrors collisions systime)
in that order, and without a leading headline. no header, just vibes π
fetchall_table
Returns all records from the sg_network_io_stats container (<http://www.i-scream.org/libstatgrab/docs/sg_get_network_io_stats.3.html>) as a list of arrays with the values in this order:
(interface_name tx rx ipackets opackets ierrors oerrors collisions systime)
in that order, but this time including the leading headline. so it's the same as above but with a header row popping off on top π
fetchrow_arrayref($row = 0)
Returns one row as an array containing values as above. default row is 0, main character of the array π«Ά
fetchall_arrayref
Returns all records from the sg_network_io_stats container (<http://www.i-scream.org/libstatgrab/docs/sg_get_network_io_stats.3.html>) as an array of arrays, and nope, no header π
fetchrow_hashref($row = 0)
Returns one row as a hash containing { interface_name => $self.interface_name($row), tx => ... } π
fetchall_hashref
Returns all records from the sg_network_io_stats container (<http://www.i-scream.org/libstatgrab/docs/sg_get_network_io_stats.3.html>) as an array of hashes π
colnames
Returns the list of column names: (interface_name tx rx ipackets opackets ierrors oerrors collisions systime) π·οΈ
interface_name
The name known to the operating system. (e.g. on linux it might be eth0, on AIX en0 and on FreeBSD fxp0) π iykyk
tx
The number of bytes transmitted π€
rx
The number of bytes received π₯
ipackets
The number of packets received π¦
opackets
The number of packets transmitted π
ierrors
The number of receive errors π
oerrors
The number of transmit errors π
collisions
The number of collisions π₯
get_network_io_stats_diff
Provides the difference between the last measurement and the recent one. it's giving "what changed bestie" π
$recent->get_network_io_stats_diff($last);
π AUTHOR π
Jens Rehsack, <rehsack AT cpan.org> β icon, legend, the moment π
πΈ COPYRIGHT AND LICENSE πΈ
Copyright (C) 2012-2018 by Jens Rehsack
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. π«Ά legally free, slay
okay and that's the whole page, periodt π
this little masterpiece dropped as perl v5.42.0 on 2025-07-25, so yeah β go forth and read your network I/O stats, bestie π¦β¨π
π¦ where this page comes from
- fedora 43: perl-Unix-Statgrab 0.112-27.fc43 Β· (LGPL-2.1-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl))
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms