The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DBD::Sys::Plugin::Unix::Logins - provides a table containing logged on users

SYNOPSIS

  $logins = $dbh->selectall_hashref("select * from logins", "time");

ISA

  DBD::Sys::Plugin::Unix::Logins;
  ISA DBD::Sys::Table

DESCRIPTION

This module provides the table logins filled with the data from the utmp database utmp(5).

COLUMNS

username

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.

id

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.

line

For user process records this will be the name of the terminalor line that the user is connected on.

pid

The process ID of the process that created this record.

type

The type of the record. See Sys::Utmp::Utent for details.

host

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.

timestamp

The time in epoch seconds which the record was created.

METHODS

get_table_name

Returns 'logins'.

get_col_names

Returns the column names of the table as named in "Columns"

get_attributes

Return the attributes supported by this module:

filename

Allows to specify an alternate filename to use. It's unused per default and will use _PATH_UTMP.

    $dbh->{sys_logins_filename} = q(/var/log/wtmp); # last logings

get_primary_key

Returns 'timestamp' - you must be very quick to login twice per second

collect_data

Retrieves the data from the utmp database and put it into fetchable rows.

PREREQUISITES

The module Sys::Utmp is required to provide data for the table.

AUTHOR

    Jens Rehsack
    CPAN ID: REHSACK
    rehsack@cpan.org
    http://www.rehsack.de/

COPYRIGHT

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.

SUPPORT

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.