#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 8/week @ 2024-02-23 22/week @ 2024-03-01 16/week @ 2024-03-08 4/week @ 2024-03-15 7/week @ 2024-03-29 14/week @ 2024-04-05 3/week @ 2024-04-12 5/week @ 2024-04-19 5/week @ 2024-05-17 44/week @ 2024-05-24 4/week @ 2024-05-31

53 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