#uptime #pid #ps #application-uptime

process_uptime

Quick and simple way of fetching an application's uptime by pid

5 releases

0.1.4 Dec 20, 2021
0.1.3 Apr 14, 2021
0.1.2 Dec 15, 2020
0.1.1 Dec 15, 2020
0.1.0 Dec 15, 2020

#5 in #ps

Download history 6/week @ 2024-03-28 9/week @ 2024-04-04 9/week @ 2024-04-11 3/week @ 2024-04-18 2/week @ 2024-04-25 4/week @ 2024-05-16 40/week @ 2024-05-23 9/week @ 2024-05-30

91 downloads per month

MIT/Apache

7KB
95 lines

Description

Library fetching process uptime via ps -o etimes -p <PID> --no-headers

If ps is restricted (as is the case on some devices), library fallbacks to fetching process uptime from /proc/{pid}/stat starttime column

Dependencies

~175KB