Tag Info

New answers tagged


You probably want to use the C function clock_gettime(CLOCK_MONOTONIC_RAW), which isn't presented by any utility (that I know of). I see an answer that gives a python example on how to access it, which might be easier than compiling a C program to do the same.


Adapting the relevant part of this answer. As long as your uptime is less than a year, you can use the following command: TZ=UTC date -d@$(cut -d\ -f1 /proc/uptime) +'%j %T' | awk '{print $1-1"d",$2}' I extract the first field of the uptime file, since at least on my Linux, there is a second field containing the total idle time. I treat that as the ...

Top 50 recent answers are included