1=head1 NAME
2
3Unix::Statgrab::sg_user_stats - container for libstatgrab user-login collection
4
5=head1 DESCRIPTION
6
7C<Unix::Statgrab::sg_user_stats> is a Perl package name providing
8accessors to bundled libstatgrab L<sg_user_stats|http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html> disk I/O statistics.
9
10=head1 METHODS
11
12=head2 nentries
13
14Returns the number of entries in the container.
15
16=head2 systime
17
18Returns the seconds since Epoch (0:00:00 on January, 1st 1970) of the time measure the disk I/O statistics.
19
20=head2 as_list
21
22B<Deprecated> alias of L</fetchall_hash>
23
24=head2 fetchall_hash
25
26Returns all records from L<sg_user_stats|http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html>
27container as list of hash containing each datum name as key and the datum as value.
28
29=head2 fetchall_array
30
31Returns all records from L<sg_user_stats|http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html>
32container as list of arrays containing the values in following order:
33
34  (login_name record_id record_id_size device hostname pid login_time systime)
35
36in that order without leading headline.
37
38=head2 fetchall_table
39
40Returns all records from L<sg_user_stats|http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html>
41container as list of arrays containing the values in following order:
42
43  (login_name record_id record_id_size device hostname pid login_time systime)
44
45in that order including leading headline.
46
47=head2 fetchrow_arrayref($row = 0)
48
49Returns one row as array containing values as above.
50
51=head2 fetchall_arrayref
52
53Returns all records from L<sg_user_stats|http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html>
54container as array of arrays without header.
55
56=head2 fetchrow_hashref($row = 0)
57
58Returns one row as hash containing C<< { disk_name => $self.disk_name($row), read_bytes => ...} >>.
59
60=head2 fetchall_hashref
61
62Returns all records from L<sg_user_stats|http://www.i-scream.org/libstatgrab/docs/sg_get_user_stats.3.html>
63container as array of hashes.
64
65=head2 colnames
66
67Returns list of column names: C<< (login_name record_id record_id_size device hostname pid login_time systime) >>
68
69=head2 login_name
70
71The username which was used to log in
72
73=head2 record_id
74
75Record identifier of host database containing login information
76
77=head2 device
78
79Device name (e.g. "pts/0") of the tty assigned to the login session
80
81=head2 hostname
82
83(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)
84
85=head2 pid
86
87Process identifier of the process which made the entry to the logged on users database
88
89=head2 login_time
90
91Timestamp (time in seconds since epoch) when the user logged on
92
93=head1 AUTHOR
94
95Jens Rehsack, E<lt>rehsack AT cpan.orgE<gt>
96
97=head1 COPYRIGHT AND LICENSE
98
99Copyright (C) 2012-2018 by Jens Rehsack
100
101This library is free software; you can redistribute it and/or modify it under
102the terms of the GNU Lesser General Public License as published by the Free
103Software Foundation; either version 2.1 of the License, or (at your option) any
104later version.
105
106=cut
107