Unix::S...er_stats(3)

πŸ“¦ version 0.112, in fedora 43

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