User::Utmp

Description

User::Utmp is a Perl access to utmp- and utmpx-style databases. SYNOPSIS use User::Utmp qw(:constants :utmpx); @utmp = getutx(); or, using utmp: use User::Utmp qw(:constants :utmp); @utmp = getut(); UNIX systems record information about current and past logins in a user accounting database. This database is realized by two files: File utmpx contains a record of all users currently logged onto the system, while file wtmpx contains a record of all logins and logouts. Some systems (such as HP-UX and AIX) also maintain a third file containing failed login attempts. The information in these files is used by commands such as who(1), last(1), write(1), or login(1). The exact location of these files in the file system varies between operating systems, but they are typically stored in directories like /var/adm, /var/run, or /var/log. The Single UNIX Specification specifies an API for reading from and writing to these files. The utmpx file format and functions were derived from the older utmp file format and functions. For compatibility reasons, many systems still support the utmp functions and maintain utmp database files. It is recommended, however, to use the utmpx functions instead of the obsolete utmp functions. The User::Utmp module provides functions for reading and writing utmpx and utmp files by providing a Perl interface to the system functions. Utmpx and utmp records are represented in Perl by hash references. The hash keys are the names of the elements of the utmpx structure. For details consult utmpx(4) (utmpx(5) on some systems). The hash values are (mostly) the same as in C. As an example, here is a typical record as it may be returned by the getutxent(), getutxid(), getutxline() or the corresponding utmp functions: {ut_tv => {tv_sec => 1141256698, tv_usec => 0}, ut_line => "ttyp0", ut_time => 1141256698, ut_id => "p0", ut_host => ":0.0", ut_exit => {e_termination => 0, e_exit => 2}, ut_pid => 4577, ut_user => "mxp", ut_type => USER_PROCESS,} The array returned by the getutx() and getut() functions is composed of hash references like this..

Userutmp - Ut - Utmp - Functions - Utmpx - Perl - File - Libraries - Programming

Published By:Michael Piotrowski

License Type:Freeware

Date Added:25 October, 2010

Version:1.8

Price:Free

Downloads:858

Size:11.3 KB

Platform: Linux

What people say
- required fields
     
Related Downloads

Sys::Utmp::Utent is a Perl module to represent a single utmp entry.

DateSep 13, 2010

AuthorJonathan Stowe

Size9.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Libptytty is a small library that offers pseudo-TTY management in an OS-independent way. It was created out of frustration over the many differences of PTY/TTY handling in different operating systems for use inside "rxvt-unicode".

DateAug 17, 2010

AuthorEmanuele Giaquinta & Marc A. Lehmann

Size204.8 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

radutmped is a utility that can remove utmp entries from radutmp files of several RADIUS servers. The project directly manipulates the radutmp file and does not use radzap or any other programs.

DateOct 31, 2010

AuthorPredrag Malicevic

Size6.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Utilities

h264bitstream project provides a complete set of functions to read and write video streams conforming to the ITU H264 (MPEG4-AVC) video standard.

DateOct 17, 2010

AuthorAlex Izvorski

Size35.8 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Multimedia

ASNMTAP::Asnmtap::Plugins::Mail is a Perl module that provides Mail functions used by ASNMTAP-based plugins.

DateAug 1, 2010

AuthorAlex Peeters

Size1.6 MB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming