tazpanel rev 549

index.cgi: add process start time (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Nov 12 09:00:08 2015 +0100 (2015-11-12)
parents 71dcdeb589d1
children 6226c660c4b6
files index.cgi
line diff
     1.1 --- a/index.cgi	Wed Nov 11 21:00:29 2015 +0100
     1.2 +++ b/index.cgi	Thu Nov 12 09:00:08 2015 +0100
     1.3 @@ -468,10 +468,9 @@
     1.4  		[ "$(GET kill)" ] && kill $(GET kill)
     1.5  		if [ "$(GET pid)" ] && [ -d /proc/$(GET pid)/ ]; then
     1.6  			curpid=$(GET pid)
     1.7 -			curnice=$(awk '{ print $19 }' /proc/$curpid/stat)
     1.8 -			hz=$(zcat /proc/config.gz | sed '/^CONFIG_HZ=/!d;s/.*=//')
     1.9 -			bootttime=$(awk -vhz=${hz:-100} '{print int($22/100)}' /proc/$curpid/stat)
    1.10 -			uptime=$(awk -vhz=$hz '{print int($1)}' /proc/uptime)
    1.11 +			curnice=$(awk '{ print int($19) }' /proc/$curpid/stat)
    1.12 +			bootttime=$(awk '{print int($22/100)}' /proc/$curpid/stat)
    1.13 +			uptime=$(awk '{print int($1)}' /proc/uptime)
    1.14  			now=$(date +%s)
    1.15  			starttime=$(date -d @$(($now - ($uptime - $bootttime))))
    1.16  			cat <<EOT