Unix::S...e_stats(3)

πŸ“¦ version 0.112, in fedora 43

πŸ’– 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 (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