Unix::S...e_stats(3)
π NAME π
hiii welcome to Unix::S...e_stats(3) (filed under User Contributed Perl Documentation, iykyk) β¨
Unix::Statgrab::sg_network_iface_stats β it's a container for libstatgrab network interface statistics. that's the whole job bestie, it holds the network iface stats π
πΈ DESCRIPTION πΈ
so Unix::Statgrab::sg_network_iface_stats is a Perl package name, and what it does is give you accessors to the bundled libstatgrab sg_network_iface_stats network interface statistics π¦
the libstatgrab docs for it live over at http://www.i-scream.org/libstatgrab/docs/sg_get_network_iface_stats.3.html if you wanna go read the source of truth, no cap π
β¨ METHODS β¨
π nentries
Returns the number of entries in the container. literally just how many things are in there, that's it π«Ά
π systime
Returns the seconds since Epoch (0:00:00 on January, 1st 1970) of the time measure the network interface statistics. yes the epoch, yes 1970, iconic behaviour honestly β
π as_list
Deprecated alias of fetchall_hash. it's giving legacy, it still works but likeβ¦ use the new one π
π fetchall_hash
Returns all records from the sg_network_iface_stats container (docs: http://www.i-scream.org/libstatgrab/docs/sg_get_network_iface_stats.3.html) as a list of hashes, each one containing each datum name as key and the datum as value. key/value besties fr fr π
π fetchall_array
Returns all records from the sg_network_iface_stats container (docs: http://www.i-scream.org/libstatgrab/docs/sg_get_network_iface_stats.3.html) as a list of arrays containing the values in following order:
(interface_name speed factor duplex up systime)
in that order, without leading headline. no header row, straight into the data π
π fetchall_table
Returns all records from the sg_network_iface_stats container (docs: http://www.i-scream.org/libstatgrab/docs/sg_get_network_iface_stats.3.html) as a list of arrays containing the values in following order:
(interface_name speed factor duplex up systime)
in that order, including leading headline. same energy as fetchall_array except this one DOES bring the header, main character energy π
π fetchrow_arrayref($row = 0)
Returns one row as array containing values as above. one row, array ref, default row is 0 π
π fetchall_arrayref
Returns all records from the sg_network_iface_stats container (docs: http://www.i-scream.org/libstatgrab/docs/sg_get_network_iface_stats.3.html) as array of arrays without header. no headline, just vibes πΈ
π fetchrow_hashref($row = 0)
Returns one row as hash containing { disk_name => $self.disk_name($row), read_bytes => ... }. yeah it says disk_name, we're just reporting the lore exactly as it was written, don't come for me π (default row is 0)
π fetchall_hashref
Returns all records from the sg_network_iface_stats container (docs: http://www.i-scream.org/libstatgrab/docs/sg_get_network_iface_stats.3.html) as array of hashes. all of them. every last one π«Ά
π colnames
Returns list of column names: (interface_name speed factor duplex up systime). the header lineup, periodt β¨
π interface_name
The name of the interface known to the operating system. (e.g. on linux it might be eth0) β she's known to the OS, she's famous π
π speed
The speed of the interface, in factor/sec. note it's per factor, not per bit, we'll get to that π¦
π factor
The factor for the speed in bit/sec - e.g. 1'000'000 for megabit/sec. so yeah, this is the multiplier that makes speed make sense β
π duplex
One of
SG_IFACE_DUPLEX_FULL SG_IFACE_DUPLEX_HALF SG_IFACE_DUPLEX_UNKNOWN
pick your fighter, those are the only three options π
π up
True value when the interface is up. if it's true, she's up, that's the whole thing π₯
π AUTHOR π
Jens Rehsack, <rehsack AT cpan.org> π«Ά
π 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.
π shoutout to LGPL 2.1-or-later for keeping it free, we love a permissive queen
okay that's the whole page bestie, go forth and stat those interfaces π this was perl v5.42.0, dated 2025-07-25, and it's giving Unix::S...e_stats(3) energy forever πΈπ
β¨
π¦ 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