On linux, I am writing a script in python to process the file /proc/net/xt_recent/PORTSCAN
, which looks lke this:
src=123.45.67.89 ttl: 64 last_seen: 4298265432 oldest_pkt: 1 4298265432
src=132.45.67.89 ttl: 64 last_seen: 4298265432 oldest_pkt: 1 4298265432
src=231.45.67.89 ttl: 64 last_seen: 4298265432 oldest_pkt: 1 4298265432
The last column (ie, 4298265432) is AFAIU time in "jiffy" format.
How can I convert it to something human sensible in python? For example, I would like to know how many seconds have passed since.