addrwatch
addrwatch copied to clipboard
Addrwatch: output time
Hello, please can you add a parameter for the startup addrwatch program to change the view of output time in human-readable date? Thanks
Text output (stdout) of the addrwatch or addrwatch_stdout is designed to be consumed by other applications. Using unix timestamps instead of human readable time makes it easier to unambiguously parse data values.
For output analysis by human beings I would recommend using addrwatch_syslog output module. When started this module will log all addrwatch entries to system log. Example:
Terminal 1:
$ ./src/addrwatch # Start main addrwatch service in deamon mode
$ ./src/addrwatch_syslog # Start sylog output service
Terminal 2:
$ tail -f /var/log/daemon.log
Feb 23 16:42:15 host addrwatch: 1582468935 eth0 0 08:00:27:b4:fd:00 172.16.0.212 ARP_REQ
Feb 23 16:42:47 host addrwatch: 1582468966 eth0 0 08:00:27:71:69:5f 172.16.0.2 ARP_REP