slitaz-forge rev 713

makegraphs: tune cpuinfo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jan 15 08:07:41 2021 +0000 (17 months ago)
parents b48416ef76bb
children 9e7953989d74
files chub/web/lib/makegraphs mirror/info/bin/makegraphs pangolin/makegraphs tank/web/lib/makegraphs
line diff
     1.1 --- a/chub/web/lib/makegraphs	Thu Aug 20 08:44:15 2020 +0000
     1.2 +++ b/chub/web/lib/makegraphs	Fri Jan 15 08:07:41 2021 +0000
     1.3 @@ -38,7 +38,7 @@
     1.4  
     1.5  updatecpugraph() {
     1.6  	period=$1
     1.7 -	info="$(grep '^model name' /proc/cpuinfo | cut -d: -f2 \
     1.8 +	info="$(grep '^model name' /etc/cpuinfo | cut -d: -f2 \
     1.9  		| sed 's/ * / /g' | awk '
    1.10  { s=$0 ; n++ }                    
    1.11  END { if (n > 1) printf " %dx",n; print s }')"
     2.1 --- a/mirror/info/bin/makegraphs	Thu Aug 20 08:44:15 2020 +0000
     2.2 +++ b/mirror/info/bin/makegraphs	Fri Jan 15 08:07:41 2021 +0000
     2.3 @@ -41,7 +41,7 @@
     2.4  updatecpugraph() {
     2.5  	period=$1
     2.6  	info="$(sed '/cpuinfo=/!d;s/.*cpuinfo=\([^ ]*\).*/: \1/;s/_/ /g' /proc/cmdline)"
     2.7 -	[ -n "$info" ] || info="$(grep '^model name' /proc/cpuinfo)"
     2.8 +	[ -n "$info" ] || info="$(grep '^model name' /etc/cpuinfo)"
     2.9  	info="$(echo "$info" | cut -d: -f2 | sed 's/ * / /g' | head -1)"
    2.10  	rrdtool graph "$rrdgraph/cpu-$period.png" --start -1$period \
    2.11  		$rrdgraphargs -l 0 -u 100 -t "cpu usage per $period [$info ]" \
     3.1 --- a/pangolin/makegraphs	Thu Aug 20 08:44:15 2020 +0000
     3.2 +++ b/pangolin/makegraphs	Fri Jan 15 08:07:41 2021 +0000
     3.3 @@ -38,7 +38,7 @@
     3.4  
     3.5  updatecpugraph() {
     3.6  	period=$1
     3.7 -	info="$(grep '^model name' /proc/cpuinfo | cut -d: -f2 \
     3.8 +	info="$(grep '^model name' /etc/cpuinfo | cut -d: -f2 \
     3.9  		| sed 's/ * / /g' | awk '
    3.10  { s=$0 ; n++ }                    
    3.11  END { if (n > 1) printf " %dx",n; print s }')"
     4.1 --- a/tank/web/lib/makegraphs	Thu Aug 20 08:44:15 2020 +0000
     4.2 +++ b/tank/web/lib/makegraphs	Fri Jan 15 08:07:41 2021 +0000
     4.3 @@ -38,7 +38,7 @@
     4.4  
     4.5  updatecpugraph() {
     4.6  	period=$1
     4.7 -	info="$(grep '^model name' /proc/cpuinfo | cut -d: -f2 \
     4.8 +	info="$(grep '^model name' /etc/cpuinfo | cut -d: -f2 \
     4.9  		| sed 's/ * / /g' | awk '
    4.10  { s=$0 ; n++ }                    
    4.11  END { if (n > 1) printf " %dx",n; print s }')"