File: itf.awk

package info (click to toggle)
ntp 1%3A4.2.8p15%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 32,776 kB
  • sloc: ansic: 242,968; sh: 6,859; makefile: 3,419; perl: 2,765; yacc: 1,524; python: 1,486; ruby: 817; awk: 417; sed: 47; asm: 37
file content (19 lines) | stat: -rwxr-xr-x 546 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# program to produce intewrnal time/frequence statistics from clockstats files
#
# usage: awk -f itf.awk clockstats
#
# format of input record
# 49227 67.846 127.127.10.1 93:240:00:00:51.816 ITF
# COCO 0 +2.0579E-07 -3.1037E-08 -7.7723E-11 +6.5455E-10 500.00 4.962819
#
# format of output record (time values in nanoseconds)
#  MJD      sec      time        freq
# 49227   67.846  +2.0579E-07  -7.7723E-11
#
# select ITF records with valid format
{
	if (NF >= 10 && $5 == "ITF") {
		printf "%5s %9.3f %7.1f %10.3e\n", $1, $2, $8 * 1e9, $10
	}
}