Unix::S...ap_stats(3)

πŸ“¦ version 0.112, in fedora 43

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