DBD::Sys::Plugin::Unix::Logins - provides a table containing logged on users
$logins = $dbh->selectall_hashref("select * from logins", "time");
DBD::Sys::Plugin::Unix::Logins; ISA DBD::Sys::Table
This module provides the table logins filled with the data from the utmp database utmp(5).
utmp(5)
Username if this is a record for a user process. Some systems may return other information depending on the record type. If no user was set this entry is skipped.
The identifier for this record - it might be the inittab tag or some other system dependent value. If the system lacks support for this field, it's a counted number.
For user process records this will be the name of the terminalor line that the user is connected on.
The process ID of the process that created this record.
The type of the record. See Sys::Utmp::Utent for details.
On systems which support this the method will return the hostname of the host for which the process that created the record was started - for example for a telnet login.
The time in epoch seconds which the record was created.
Returns 'logins'.
Returns the column names of the table as named in "Columns"
Return the attributes supported by this module:
Allows to specify an alternate filename to use. It's unused per default and will use _PATH_UTMP.
_PATH_UTMP
$dbh->{sys_logins_filename} = q(/var/log/wtmp); # last logings
Returns 'timestamp' - you must be very quick to login twice per second
Retrieves the data from the utmp database and put it into fetchable rows.
The module Sys::Utmp is required to provide data for the table.
Sys::Utmp
Jens Rehsack CPAN ID: REHSACK rehsack@cpan.org http://www.rehsack.de/
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
Free support can be requested via regular CPAN bug-tracking system. There is no guaranteed reaction time or solution time, but it's always tried to give accept or reject a reported ticket within a week. It depends on business load. That doesn't mean that ticket via rt aren't handles as soon as possible, that means that soon depends on how much I have to do.
Business and commercial support should be acquired from the authors via preferred freelancer agencies.
To install DBD::Sys, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBD::Sys
CPAN shell
perl -MCPAN -e shell install DBD::Sys
For more information on module installation, please visit the detailed CPAN module installation guide.