That's a number of jiffies, which is an internal kernel variable incremented every 1/HZ seconds. As shown by Maxiko, you can get the current jiffies
value from /proc/timer_list
. You can generally get HZ
from /boot/config.<kernel-version>
, so you should be able to post-process that data with something like:
#! /usr/bin/perl
use Time::HiRes qw(gettimeofday);
use POSIX;
my $kernel = (uname())[2];
open CONFIG, "<", "/boot/config-$kernel" or
die "Can't find kernel config file: $!";
my $hz;
while (<CONFIG>) {
if (/^CONFIG_HZ=(\d+)/) {
$hz = $1;
last;
}
}
close CONFIG;
die "Can't determine HZ" unless $hz;
open TIMERS, "<", "/proc/timer_list" or
die "Can't open /proc/timer_list: $!";
my $jiffies;
while (<TIMERS>) {
if (/^jiffies: (\d+)/) {
$jiffies = $1;
last;
}
}
close TIMERS;
die "Can't determine jiffies" unless $jiffies;
my ($seconds, $microseconds) = gettimeofday;
$seconds += $microseconds / 1e6;
while (<>) {
s{(?<=last_seen: )\d+|\d+(?=,|$)}{
my $t = $seconds + ($& - $jiffies) / $hz;
$& . strftime(" [%F %T", localtime($t)) .
sprintf(".%03d]", ($t * 1000 + 0.5) % 1000);
}ge;
print;
}
Which on your sample and on my system (so with a different jiffies as on yours) gives:
src=127.0.0.1 ttl: 128 last_seen: 4298627364 [2016-08-16 17:21:00.882] oldest_pkt: 3 4298623492 [2016-08-16 17:20:45.394], 4298625777 [2016-08-16 17:20:54.534], 4298627364 [2016-08-16 17:21:00.882]