Unix::S...fs_stats(3)
β¨ Unix::S...fs_stats(3) β¨
okay bestie, pull up a chair π«Ά this is a User Contributed Perl Documentation page, and it's literally just the whole rundown on Unix::S...fs_stats(3). no cap, it's giving "container energy". let's go π
πΈ NAME πΈ
Unix::Statgrab::sg_fs_stats β a container for libstatgrab filesystem statistics. it's the lil box where all your fs numbers live π¦β¨
π¦ DESCRIPTION π¦
Unix::Statgrab::sg_fs_stats is a Perl package name that hands you accessors to the bundled libstatgrab sg_fs_stats filesystem statistics π
the docs for that live over at http://www.i-scream.org/libstatgrab/docs/sg_get_fs_stats.3.html β iykyk, go peek if you want the deep lore π
π METHODS π
nentries
returns the number of entries in the container. that's it, that's the whole vibe. count 'em π’
systime
returns the seconds since Epoch β which is 0:00:00 on January, 1st 1970, for the record β of the time measure the filesystem statistics. so it's the timestamp of when the stats were taken β°
as_list
Deprecated alias of fetchall_hash β οΈ like, it still exists, but it's the old way. use fetchall_hash, bestie.
fetchall_hash
returns all records from the sg_fs_stats container as a list of hash, where each datum name is the key and the datum is the value ποΈ (link: http://www.i-scream.org/libstatgrab/docs/sg_get_fs_stats.3.html)
fetchall_array
returns all records from the sg_fs_stats container as a list of arrays, with the values in this exact order π (link: http://www.i-scream.org/libstatgrab/docs/sg_get_fs_stats.3.html):
(device_name fs_type mnt_point device_type size used free avail
total_inodes used_inodes free_inodes avail_inodes
io_size block_size
total_blocks used_blocks free_blocks avail_blocks
systime)
in that order, without leading headline. no header row, we're going straight in π
fetchall_table
returns all records from the sg_fs_stats container as a list of arrays, same order as above π (link: http://www.i-scream.org/libstatgrab/docs/sg_get_fs_stats.3.html):
(device_name fs_type mnt_point device_type size used free avail
total_inodes used_inodes free_inodes avail_inodes
io_size block_size
total_blocks used_blocks free_blocks avail_blocks
systime)
in that order, including leading headline. so this one DOES come with the header, okay bestie, that's the difference β¨
fetchrow_arrayref($row = 0)
returns one row as an array, containing values as above. defaults to row 0 if you don't pass anything π―
fetchall_arrayref
returns all records from the sg_fs_stats container as an array of arrays, without header π (link: http://www.i-scream.org/libstatgrab/docs/sg_get_fs_stats.3.html)
fetchrow_hashref($row = 0)
returns one row as a hash containing { device_name => $self.device_name($row), fs_type => ... } π defaults to row 0.
fetchall_hashref
returns all records from the sg_fs_stats container as an array of hashes π (link: http://www.i-scream.org/libstatgrab/docs/sg_get_fs_stats.3.html)
colnames
returns the list of column names, and here they are, all of them, in order:
(device_name fs_type mnt_point device_type size used free avail total_inodes used_inodes free_inodes avail_inodes io_size block_size total_blocks used_blocks free_blocks avail_blocks systime)
slay, that's the whole lineup π
and now for the accessors, the main characters themselves π
device_nameβ Name of the device the filesystem statistics belong todevice_canonicalβ Canonical name of the device the filesystem statistics belong tofs_typeβ Filesystem type (as string), e.g.zfsmnt_pointβ Path name of mount point for the file systemdevice_typeβ Bitwise combination ofsg_fs_regular sg_fs_special sg_fs_loopback sg_fs_remote, usually one ofsizeβ Size of filesystem, in bytesusedβ Used bytes of filesystemfreeβ Free bytes in filesystemavailβ Available bytes in filesystem (free - reserved)total_inodesβ Total number of inodes in filesystemused_inodesβ Used number of inodes in filesystemfree_inodesβ Free number of inodes in filesystemavail_inodesβ Available inodes in filesystem (free - reserved)io_sizeβ Optimal size for I/O for this filesystem in bytesblock_sizeβ Size of blocks in bytestotal_blocksβ Total number of blocks in filesystemused_blocksβ Used number of blocks in filesystemfree_blocksβ Free number of blocks in filesystemavail_blocksβ Available blocks in filesystem (free - reserved)
get_fs_stats_diff
gives you the difference between the last measurement and the recent one π₯ so you can see what changed between then and now:
$recent->get_fs_stats_diff($last);
β CONSTANTS β
here's the whole squad of constants, no notes:
sg_fs_unknown sg_fs_regular sg_fs_special sg_fs_loopback sg_fs_remote
sg_fs_local sg_fs_alltypes
π AUTHOR π
Jens Rehsack, <rehsack AT cpan.org> β shoutout to the icon who wrote this π
π 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.
fr fr, that's the actual license text, don't skip it π
and that's the whole page bestie, we ate and left no crumbs π
β¨ this was perl v5.42.0, dated 2025-07-25, and the page is Unix::S...fs_stats(3) β catch you on the next man page π¦π
π¦ 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