Unix::S...o_stats(3)

๐Ÿ“ฆ version 0.112, in fedora 43

โœจ NAME โœจ

Unix::Statgrab::sg_disk_io_stats โ€” bestie, it's the container for libstatgrab disk I/O statistics ๐Ÿ’–

Real talk, you found this in the User Contributed Perl Documentation manual, filed under Unix::S...o_stats(3) (yes the title got squished, she's mysterious like that โœจ).


๐ŸŒธ DESCRIPTION ๐ŸŒธ

Unix::Statgrab::sg_disk_io_stats is a Perl package name that hands you accessors to the bundled libstatgrab sg_disk_io_stats <http://www.i-scream.org/libstatgrab/docs/sg_get_disk_io_stats.3.html> disk I/O statistics.

Like. That's it. That's the whole vibe. She's a wrapper and she knows it ๐Ÿ’…


๐Ÿฆ‹ METHODS ๐Ÿฆ‹

nentries

Returns the number of entries in the container. Simple. Iconic. No notes ๐Ÿ‘‘

systime

Returns the seconds since Epoch (0:00:00 on January, 1st 1970) of the time measure the disk I/O statistics. Yes we're counting from 1970, she's vintage ๐ŸŽ€

as_list

Deprecated alias of fetchall_hash. Deprecated!! She's still here but she's on her way out, use the new one bestie ๐Ÿ™ˆ

fetchall_hash

Returns all records from sg_disk_io_stats <http://www.i-scream.org/libstatgrab/docs/sg_get_disk_io_stats.3.html> container as list of hash containing each datum name as key and the datum as value. Very demure, very mindful, keys and values living their best life ๐Ÿ’–

fetchall_array

Returns all records from sg_disk_io_stats <http://www.i-scream.org/libstatgrab/docs/sg_get_disk_io_stats.3.html> container as list of arrays containing the values in following order:

(disk_name read_bytes write_bytes systime)

in that order without leading headline. No header row, just straight into the data, main character energy fr fr ๐Ÿ”ฅ

fetchall_table

Returns all records from sg_disk_io_stats <http://www.i-scream.org/libstatgrab/docs/sg_get_disk_io_stats.3.html> container as list of arrays containing the values in following order:

(disk_name read_bytes write_bytes systime)

in that order including leading headline. Same as above but WITH the header row, because sometimes you want the labels, and that's valid ๐ŸŒˆ

fetchrow_arrayref($row = 0)

Returns one row as array containing values as above. Just one. A lil single row. She's lowkey shy ๐Ÿ“

fetchall_arrayref

Returns all records from sg_disk_io_stats <http://www.i-scream.org/libstatgrab/docs/sg_get_disk_io_stats.3.html> container as array of arrays without header. Array of arrays, no header, we keep it raw โœจ

fetchrow_hashref($row = 0)

Returns one row as hash containing "{ disk_name => $self.disk_name($row), read_bytes => ... }".

fetchall_hashref

Returns all records from sg_disk_io_stats <http://www.i-scream.org/libstatgrab/docs/sg_get_disk_io_stats.3.html> container as array of hashes. All the hashes. The whole hash collection. Obsessed ๐Ÿ’œ

colnames

Returns list of column names: "(disk_name read_bytes write_bytes systime)" โ€” here's your header row, bestie, take it ๐ŸŽ€

disk_name

Name of the disk device of the I/O statistics. Which disk are we even talking about? This tells you ๐Ÿฆ‹

read_bytes

Bytes read from disk. Numbers go up, disk goes brrr ๐Ÿ“ˆ

write_bytes

Bytes written to disk. Also numbers, also going up ๐Ÿ’พ

get_disk_io_stats_diff

Provides the difference between the last measurement and the recent one.

$recent->get_disk_io_stats_diff($last);

Math! Subtraction! The glow-up between two measurements, no cap ๐Ÿงฎโœจ


๐Ÿ‘‘ 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.


Okay so that's the whole page, every last flag and fact preserved, nothing skipped, nothing invented ๐Ÿ’…

Signing off: this was perl v5.42.0, dated 2025-07-25, from the Unix::S...o_stats(3) manual page. Slay, bye bestie ๐Ÿซถโœจ

๐Ÿ“ฆ where this page comes from