Unix::S...er_stats(3)
β¨ Unix::Statgrab::sg_user_stats β it's giving login-data container β¨
okay so bestie, we're in the Unix::S...er_stats(3) page π
that's User Contributed Perl Documentation energy, fr fr. This is a Perl manpage and it's about user login stats, and yes I'm gonna walk you through every single bit of it. no skipping. periodt.
πΈ NAME πΈ
Unix::Statgrab::sg_user_stats β a container for the libstatgrab user-login collection. that's the whole name, that's the whole vibe. π«Ά
π¦ DESCRIPTION π¦
so Unix::Statgrab::sg_user_stats is a Perl package name, and what it does is give you accessors to the bundled libstatgrab sg_user_stats stats. (heads up: the docs call it "disk I/O statistics" in there, which is lowkey a copy-paste moment, but I'm telling you exactly what the page says, no cap.)
the reference for it lives at http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html π
π METHODS π
π nentries
Returns the number of entries in the container. that's it. short queen behavior. π
π systime
Returns the seconds since Epoch β and by Epoch we mean 0:00:00 on January, 1st 1970 β of the time measure the disk I/O statistics. β°
π as_list
Deprecated alias of fetchall_hash. > β οΈ deprecated, bestie! it still exists but it's giving legacy, so use fetchall_hash instead. π
π fetchall_hash
Returns all records from the sg_user_stats container (http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html) as a list of hashes. each hash has the datum name as key and the datum as value. cute, organized, we love to see it. π
π fetchall_array
Returns all records from the sg_user_stats container (http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html) as a list of arrays containing the values in following order:
(login_name record_id record_id_size device hostname pid login_time systime)
in that order, without leading headline. no header, just vibes. β¨
π fetchall_table
Returns all records from the sg_user_stats container (http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html) as a list of arrays containing the values in following order:
(login_name record_id record_id_size device hostname pid login_time systime)
in that order, including leading headline this time. same order, but now with a header row, main character energy. π
π fetchrow_arrayref($row = 0)
Returns one row as array containing values as above. default $row is 0, so it hands you the first row unless you say otherwise. π
π fetchall_arrayref
Returns all records from the sg_user_stats container (http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html) as array of arrays, without header. π¦
π fetchrow_hashref($row = 0)
Returns one row as hash containing { disk_name => $self.disk_name($row), read_bytes => ...}.
(yes, I'm quoting it character for character, that's literally what the page says. default $row is 0.) π
π fetchall_hashref
Returns all records from the sg_user_stats container (http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html) as array of hashes. all of them. the whole roster. π
π colnames
Returns list of column names:
(login_name record_id record_id_size device hostname pid login_time systime)
here's your cheat sheet, bestie β
π login_name
The username which was used to log in. π«Ά
π record_id
Record identifier of host database containing login information. πΎ
π device
Device name (e.g. pts/0) of the tty assigned to the login session. π₯οΈ
π hostname
(remote) Hostname from where the user is logged on, e.g. infoterm7.some.kind.of.domain.local, localhost, 10.42.17.4 or :0.0 (in case it's a local logon via new xterm). π
π pid
Process identifier of the process which made the entry to the logged on users database. π
π login_time
Timestamp (time in seconds since epoch) when the user logged on. β±οΈ
π AUTHOR π
Jens Rehsack, <rehsack AT cpan.org>. shoutout to the author, we stan. π
π 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.
so basically: free software, LGPL, version 2.1 or later, your call. read it, respect it, slay. π
and that's the whole page, no notes π
this was perl v5.42.0, dated 2025-07-25, and it's the Unix::S...er_stats(3) page β ily, go read your login stats bestie πΈβ¨π¦
π¦ 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