HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/doc/libsys-utmp-perl/examples/pwho
#!/usr/bin/perl -w

use Sys::Utmp ;
use POSIX qw(strftime);
use strict;

my $utmp = Sys::Utmp->new();


while (my $utent = $utmp->getutent()) 
{ 

    if ( $utent->user_process() )
    {
       print $utent->ut_user(),"\t",
             $utent->ut_line(),"\t",
             strftime("%b %d %I:%M",localtime($utent->ut_time())),"\n";
    }
}