1c0b746e5SOllivier Robert# program to produce intewrnal time/frequence statistics from clockstats files 2c0b746e5SOllivier Robert# 3c0b746e5SOllivier Robert# usage: awk -f itf.awk clockstats 4c0b746e5SOllivier Robert# 5c0b746e5SOllivier Robert# format of input record 6c0b746e5SOllivier Robert# 49227 67.846 127.127.10.1 93:240:00:00:51.816 ITF 7c0b746e5SOllivier Robert# COCO 0 +2.0579E-07 -3.1037E-08 -7.7723E-11 +6.5455E-10 500.00 4.962819 8c0b746e5SOllivier Robert# 9c0b746e5SOllivier Robert# format of output record (time values in nanoseconds) 10c0b746e5SOllivier Robert# MJD sec time freq 11c0b746e5SOllivier Robert# 49227 67.846 +2.0579E-07 -7.7723E-11 12c0b746e5SOllivier Robert# 13c0b746e5SOllivier Robert# select ITF records with valid format 14c0b746e5SOllivier Robert{ 15c0b746e5SOllivier Robert if (NF >= 10 && $5 == "ITF") { 16c0b746e5SOllivier Robert printf "%5s %9.3f %7.1f %10.3e\n", $1, $2, $8 * 1e9, $10 17c0b746e5SOllivier Robert } 18c0b746e5SOllivier Robert} 19c0b746e5SOllivier Robert 20