From 55783753ae8f2d857a7225b7a93c1d47039e5a90 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Mon, 16 Apr 2018 10:30:15 +0200 Subject: OpenShift monitoring --- scripts/lastsync.pl | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 scripts/lastsync.pl (limited to 'scripts/lastsync.pl') diff --git a/scripts/lastsync.pl b/scripts/lastsync.pl new file mode 100755 index 0000000..37bef03 --- /dev/null +++ b/scripts/lastsync.pl @@ -0,0 +1,7 @@ +#!/usr/bin/perl +use Date::Manip; + +$date = `grep "Sync completed" /var/log/emerge.log | tail -n1 | cut -c-10`; +$date = &DateCalc("Jan 1, 1970 00:00:00 GMT",$date); +$date = UnixDate("$date","%A %H:%M"); +print "$date"; -- cgit v1.2.3