TIME(second) CLIENT OP OFFSET(KB) BYTES PATHNAME
20,172.22.32.28, W,200,4056099,/export/nfs/file1
####
#!/usr/bin/perl
use warnings;
use strict;
use Time::Local;
my $Uptime=`ps -p 1 -o etime | tail -1`;
my ($sec,$min,$hour,$mday,$mon,$year)=(localtime)[0,1,2,3,4,5];
my $CurSec=timelocal($sec,$min,$hour,$mday,$mon,$year+1900);
sub LastReboot {
my ($Days, $Hours, $Minutes, $Seconds, $UpSeconds);
if ($Uptime =~ /[0-9]+\-/) {
($Days, $Hours, $Minutes, $Seconds) = $Uptime =~ /([0-9]*)\-?([0-9]+):([0-9]+):([0-9]+)/;
} elsif ($Uptime =~ /[0-9]+:[0-9]+:[0-9]+/) {
($Hours, $Minutes, $Seconds) = $Uptime =~ /([0-9]+):([0-9]+):([0-9]+)/;
$Days = 0; } else
{
($Minutes, $Seconds) = $Uptime =~ /([0-9]+):([0-9]+)/;
$Days = 0;
$Hours = 0;}
$UpSeconds=$Days*24*60*60 + $Hours*60*60 + $Minutes*60 + $Seconds;
return $CurSec-$UpSeconds;
}
my $BaseLine = &LastReboot;
print "$BaseLine\n";
print "TIME(seconds),CLIENT,OP,OFFSET(KB),BYTES PATHNAME\n";
while () {
next if ($. == 1);
chomp;
my @output = split;
my $MyTime = localtime($BaseLine + $output[0]/1000000000);
print "$MyTime,$output[1], $output[2], $output[3],$output[4],$output[5]\n";
}
__DATA__
TIME(us) CLIENT OP OFFSET(KB) BYTES PATHNAME
13463659875129 172.22.32.28 W 4952 2934 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463659884704 172.22.32.28 W 4952 3004 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463659927187 172.22.32.28 W 4952 3144 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463659899744 172.22.32.28 W 4952 3074 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463659937424 172.22.32.28 W 4952 3214 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463659999853 172.22.32.28 W 4952 3500 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463660033528 172.22.32.28 W 4952 3570 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463660043638 172.22.32.28 W 4952 3640 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463659951798 172.22.32.28 W 4952 3291 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463659977355 172.22.32.28 W 4952 3361 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463659990535 172.22.32.28 W 4952 3430 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463660245464 172.22.112.136 W 5104 12471 /export/energy/energy_dev/stg/rw/sessions/backup/.nfs7C9F/../ds-259
7025835046513461/10.in
13463660202519 172.22.32.28 W 4952 4126 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463660234779 172.22.32.28 W 4956 100 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463660160523 172.22.32.28 W 4952 3918 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463660249629 172.22.32.28 W 4956 170 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
13463660267596 172.22.32.28 W 4956 249 /export/energy/energy_dev/stg/rw/log/GRIDLOGS/FrontOfficeSessionExt
ractCash.log
####
TIME(us) CLIENT OP OFFSET(KB) BYTES PATHNAME
13463659875129 172.22.32.28 W 4952 2934 /export/nfs/file1
tractCash.log
13463659884704 172.22.32.28 W 4952 3004 /export/nfs/file2
13463659927187 172.22.32.28 W 4952 3144 /export/nfs/file1