# HG changeset patch # User Pascal Bellard # Date 1447272029 -3600 # Node ID 71dcdeb589d10431b4c843bb628580149cffdb0a # Parent e480cc8cc7eb44ca1171ced8f3c96499ab329a98 index.cgi: add process start time (again) diff -r e480cc8cc7eb -r 71dcdeb589d1 index.cgi --- a/index.cgi Wed Nov 11 19:20:07 2015 +0100 +++ b/index.cgi Wed Nov 11 21:00:29 2015 +0100 @@ -469,6 +469,11 @@ if [ "$(GET pid)" ] && [ -d /proc/$(GET pid)/ ]; then curpid=$(GET pid) curnice=$(awk '{ print $19 }' /proc/$curpid/stat) + hz=$(zcat /proc/config.gz | sed '/^CONFIG_HZ=/!d;s/.*=//') + bootttime=$(awk -vhz=${hz:-100} '{print int($22/100)}' /proc/$curpid/stat) + uptime=$(awk -vhz=$hz '{print int($1)}' /proc/uptime) + now=$(date +%s) + starttime=$(date -d @$(($now - ($uptime - $bootttime)))) cat <
@@ -479,8 +484,8 @@
-

$(_ 'Start time') - $(stat -c %y /proc/$curpid) +

$(_ 'Start time:') + $starttime

$(_ 'Renice')[$curnice]