3 # (zcat /var/log/syslog.*.gz;cat /var/log/syslog.1 /var/log/syslog) \
4 # | grep 'pulsecounter: store:' > store.log
5 # then "awk -f store.awk store.log"
7 # Jan 1 11:49:00 pccross pulsecounter: store: "2,156"
28 if ($1 ~ /Jan/) yr = 2016; else yr = 2015;
30 tstr = sprintf ("%04d %02d %02d %02d %02d %02d", yr, m[$1], $2, t[1], t[2], t[3]);
32 tsstr = strftime("%Y-%m-%d %H:%M:%S", mktime(tstr), 1)
33 match($7, /"([12]),([0-9]+)"/, v)
34 print "insert into " table[v[1]] " values ('" tsstr "', " v[2] ");"