2
votes
5answers
1k views

How to get a process uptime under different OS?

Under Linux I can get a process's uptime in seconds with: echo $(($(cut -d "." -f1 /proc/uptime) - $(($(cut -d " " -f22 /proc/$PID/stat)/100)))) But how can I get it under different OS? ex.: ...