[Swift-commit] r2279 - log-processing/libexec

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sun Oct 5 22:47:05 CDT 2008


Author: benc
Date: 2008-10-05 22:47:04 -0500 (Sun, 05 Oct 2008)
New Revision: 2279

Added:
   log-processing/libexec/sec-to-utc-day
Modified:
   log-processing/libexec/all-logs-active-jobsubmissions-count-graph
Log:
more portable handling of dates - date -r has different meanings in bsd-land and gnu-land

Modified: log-processing/libexec/all-logs-active-jobsubmissions-count-graph
===================================================================
--- log-processing/libexec/all-logs-active-jobsubmissions-count-graph	2008-10-06 02:47:04 UTC (rev 2278)
+++ log-processing/libexec/all-logs-active-jobsubmissions-count-graph	2008-10-06 03:47:04 UTC (rev 2279)
@@ -3,7 +3,7 @@
 find /Users/benc/work/logs/ -type f -name \*.log -exec grep 'DEBUG TaskImpl Task(type=JOB_SUBMISSION, identity=' {} \; | grep 'setting status to Active' | ./iso-to-secs | cut -d ' ' -f 1 | sort -n | ./number-sites-list  > all-logs-active-tasks.data.1.tmp
 
 while read l r ; do
-  echo $(date -r $l +"%Y-%m-%d") $r
+  echo $(./sec-to-utc-day $l) $r
 done < all-logs-active-tasks.data.1.tmp > all-logs-active-tasks.data
 
 gnuplot everylog-active-submissions.plot

Copied: log-processing/libexec/sec-to-utc-day (from rev 2267, log-processing/libexec/sec-to-utc)
===================================================================
--- log-processing/libexec/sec-to-utc-day	                        (rev 0)
+++ log-processing/libexec/sec-to-utc-day	2008-10-06 03:47:04 UTC (rev 2279)
@@ -0,0 +1,8 @@
+#!/usr/bin/perl
+
+($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($ARGV[0]);
+
+# print 2007-06-12
+
+printf("%d-%02d-%02d", $year+1900, $mon+1, $mday);
+




More information about the Swift-commit mailing list