Sys::Utmp::Utent(3pm) | User Contributed Perl Documentation | Sys::Utmp::Utent(3pm) |
Sys::Utmp::Utent - represent a single utmp entry
use Sys::Utmp; my $utmp = Sys::Utmp->new(); while ( my $utent = $utmp->getutent() ) { if ( $utent->user_process ) { print $utent->ut_user,"\n"; } } $utmp->endutent;
As described in the Sys::Utmp documentation the getutent method returns an object of the type Sys::Utmp::Utent which provides methods for accessing the fields in the utmp record. There are also methods for determining the type of the record.
The access methods relate to the common names for the members of the C struct utent - those provided are the superset from the Gnu implementation and may not be available on all systems: where they are not they will return the empty string.
for convenience Sys::Utmp::Utent provides methods which are lower case versions of the constant names which return true if the record is of that type.
Probably. This module has been tested on Linux, Solaris, FreeBSD ,SCO Openserver and SCO UnixWare and found to work on those platforms. If you have difficulty building the module or it doesnt behave as expected then please contact the author including if appropriate your /usr/include/utmp.h
Jonathan Stowe, <jns@gellyfish.co.uk>
This Software is Copyright Jonathan Stowe 2001-2013
This Software is published as-is with no warranty express or implied.
This is free software and can be distributed under the same terms as Perl itself.
perl. Sys::Utmp
2022-10-19 | perl v5.36.0 |