Unix::S...ap_stats(3)
β¨ NAME β¨
Unix::Statgrab::sg_swap_stats β bestie, it's a container for libstatgrab swap space statistics π (and yeah, the manual name up top is Unix::S...ap_stats(3), user contributed Perl documentation, if you were wondering π«Ά)
πΈ DESCRIPTION πΈ
okay so Unix::Statgrab::sg_swap_stats is literally just a Perl package name, and what it does is hand you accessors to the bundled libstatgrab sg_swap_stats swap space statistics β¨
the docs live over here, no cap:
http://www.i-scream.org/libstatgrab/docs/sg_get_mem_stats.3.html
π METHODS π
nentries
returns the number of entries in the container. that's it, that's the whole vibe π
systime
returns the seconds since Epoch β and yes bestie, Epoch means 0:00:00 on January, 1st 1970 π β of the time the swap space statistics were measured.
as_list
Deprecated alias of fetchall_hash. it's giving legacy, she's retired but still hanging around π
fetchall_hash
returns all records from the sg_swap_stats container as a list of hashes, where each datum name is the key and the datum itself is the value π§
(container docs: http://www.i-scream.org/libstatgrab/docs/sg_get_mem_stats.3.html)
fetchall_array
returns all records from the sg_swap_stats container as a list of arrays, and the values come in this order:
(total free used systime)
in that order, without a leading headline π
(container docs: http://www.i-scream.org/libstatgrab/docs/sg_get_mem_stats.3.html)
fetchall_table
returns all records from the sg_swap_stats container as a list of arrays, values in this order:
(total free used systime)
in that order, including the leading headline β¨
(container docs: http://www.i-scream.org/libstatgrab/docs/sg_get_mem_stats.3.html)
fetchrow_arrayref($row = 0)
returns one row as an array, with the values exactly as above π
fetchall_arrayref
returns all records from the sg_swap_stats container as an array of arrays, no header, no drama π
(container docs: http://www.i-scream.org/libstatgrab/docs/sg_get_mem_stats.3.html)
fetchrow_hashref($row = 0)
returns one row as a hash containing:
{ total => $self.total($row), used => ... }
fetchall_hashref
returns all records from the sg_swap_stats container as an array of hashes π¦
(container docs: http://www.i-scream.org/libstatgrab/docs/sg_get_mem_stats.3.html)
colnames
returns the list of column names: (total free used systime) β¨
total
the total swap space in bytes. the whole bag π
free
the used swap in bytes.
not me typing that, bestie β that is literally what the doc says π the free accessor is documented as the used swap in bytes. i'm not fixing it, i'm not touching it, i'm just telling you fr fr.
used
the free swap in bytes.
and yeah, same energy π the used accessor is documented as the free swap in bytes. iconic behaviour, honestly.
π 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.
and that's the whole page, bestie π«Ά this one's from perl v5.42.0, dated 2025-07-25, filed under Unix::S...ap_stats(3) β slay, go read your swap stats responsibly π
β¨
π¦ 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