Unix::S...io_stats(3)

πŸ“¦ version 0.112, in fedora 43

✨ 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 (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