Different values

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
wapxaxo
Posts: 4
Joined: Sat Feb 16, 2008 6:47 am

Different values

Post by wapxaxo »

Hi,
I have a graph for my CPU & MB temperatures. When i run the script it returns:
CPU:35 MB:38
From cacti log result is different:
CMD: /usr/share/cacti/site/scripts/sensors, output: CPU:44 MB:38

and the result is this:
Image
Only CPU temp is different!

Please help, i check and duoble chek for any errors, but still a reciev different values.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The script runs against localhost or against a remote host?
Reinhard
wapxaxo
Posts: 4
Joined: Sat Feb 16, 2008 6:47 am

Post by wapxaxo »

gandalf wrote:The script runs against localhost or against a remote host?
Reinhard
localhost

This is the script:

Code: Select all

 cat /usr/share/cacti/site/scripts/sensors
#!/bin/bash

t1=`/usr/bin/sensors |grep ^CPU | awk '{print $3}' | cut -c 2-3`
t2=`/usr/bin/sensors |grep ^M/B | awk '{print $3}' | cut -c 2-3`

echo "CPU:$t1 MB:$t2"
When I change the script to:

Code: Select all

#!/bin/bash

t1=`/usr/bin/sensors |grep ^CPU | awk '{print $3}' | cut -c 2-3`
t2=`/usr/bin/sensors |grep ^M/B | awk '{print $3}' | cut -c 2-3`

echo "CPU:35 MB:$t2"
Everything is ok:
CMD: /usr/share/cacti/site/scripts/sensors, output: CPU:35 MB:38
wapxaxo
Posts: 4
Joined: Sat Feb 16, 2008 6:47 am

Post by wapxaxo »

Pls, someone, help ):
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is which version of cacti? Using cmd.php or spine/cactid? Which version, if spine/cactid?
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

My workstations does not support sensors. So please post output of a sensors command. Is execution of sensors restricted to root?
Reinhard
wapxaxo
Posts: 4
Joined: Sat Feb 16, 2008 6:47 am

Post by wapxaxo »

gandalf wrote:This is which version of cacti? Using cmd.php or spine/cactid? Which version, if spine/cactid?
Reinhard
Using cmd.php
Version 0.8.6i
gandalf wrote:My workstations does not support sensors. So please post output of a sensors command. Is execution of sensors restricted to root?
Reinhard
Yes, it was! :)
Now is OK. Thank you!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests