#3 Bugfix cpu usage graph same on all nodes

open
nobody
None
5
2007-03-11
2007-03-11
Roger Tsang
No

This fixes a bug where openssi-webview processes the init node's /proc/stat for other nodes' cpu usage but should stat each node's local /proc procfs for cpu usage.

--- update_node.sh 2004-11-11 14:11:00.000000000 +0000
+++ update_node.sh 2007-03-11 21:54:28.000000000 +0000
@@ -215,7 +215,7 @@
LOADS=`onnode ${NODE} uptime | sed 's/^.*: \(.*\), \(.*\), \(.*\)$/\1:\2:\3/'`

# CPU
- CPU=(`onnode ${NODE} awk '/cpu / {print $2":"$3":"$4":"$5}' < /proc/stat`)
+ CPU=(`onnode ${NODE} cat /proc/stat | awk '/cpu / {print $2":"$3":"$4":"$5}'`)

# Memory
MEM=`onnode ${NODE} free -b | grep Mem: | sed 's/Mem:[ ]*//' | sed 's/ */:/g'`

Discussion