# HG changeset patch # User Pascal Bellard # Date 1447315208 -3600 # Node ID 9f014dbbbcf8aa80ccbbb19a4ea99a1250656a56 # Parent 71dcdeb589d10431b4c843bb628580149cffdb0a index.cgi: add process start time (again) diff -r 71dcdeb589d1 -r 9f014dbbbcf8 index.cgi --- a/index.cgi Wed Nov 11 21:00:29 2015 +0100 +++ b/index.cgi Thu Nov 12 09:00:08 2015 +0100 @@ -468,10 +468,9 @@ [ "$(GET kill)" ] && kill $(GET kill) 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) + curnice=$(awk '{ print int($19) }' /proc/$curpid/stat) + bootttime=$(awk '{print int($22/100)}' /proc/$curpid/stat) + uptime=$(awk '{print int($1)}' /proc/uptime) now=$(date +%s) starttime=$(date -d @$(($now - ($uptime - $bootttime)))) cat <