SpeedFan Script & Templates - [v2.0 - 2009-04-04]

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
DjiB
Posts: 9
Joined: Wed Apr 30, 2008 3:03 am

Post by DjiB »

BSOD2600 wrote:Your problem lays with the sfsnmp addon, so you need to get support from him / his forum. His stuff is buggy.
I already posted to bother him on his forum, still waiting for the solution after the first message.
And I don't have any other idea to get the fanspeed/temp/voltage information.
Everything in the office runs on Windows :/
Last edited by DjiB on Wed May 14, 2008 12:47 pm, edited 1 time in total.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

DjiB wrote:And I don't have any other idea to get the fanspeed/temp/voltage information.
There are many other system info/temp reporting tools, although only a few do snmp. MBM5 works on older system fine and it does SNMP. You can also go the WMI route, which is more expensive with performance.
DjiB
Posts: 9
Joined: Wed Apr 30, 2008 3:03 am

Post by DjiB »

BSOD2600 wrote:
DjiB wrote:And I don't have any other idea to get the fanspeed/temp/voltage information.
There are many other system info/temp reporting tools, although only a few do snmp. MBM5 works on older system fine and it does SNMP. You can also go the WMI route, which is more expensive with performance.
I already knew about MBM, but every motherboad is brand new, only a few could work with MBM :/
Which is why i decided to go with Speedfan, and it finally worked.
I just needed to use an older version of sfsnmp, without the index and it's now working perfectly.
astralusche
Posts: 8
Joined: Fri Jun 06, 2008 3:02 am
Location: Rostock / Germany

Post by astralusche »

hi people

this script doesn´t work on my system. i get the error:

C:/Inetpub/wwwroot/cacti/scripts/ss_speedfan_temp.php ss_speedfan_temp my-ip-adress public 2 161 500

Code: Select all

t0:NaN t1:NaN t2:NaN t3:NaN t4:NaN t5:NaN t6:NaN t7:NaN t8:NaN t9:NaN t10:NaN t11:NaN t12:NaN
in speed fan i see all fans and temperature.

my system are:
win2003 sp2
cacti Version 0.8.7b
snmp works with other graphs
speedfan 4.33
sfsnmp-0.1.0
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) I assume you've configured speedfan and it shows temperatures, etc?

2) Those NaN's means the speedfan snmp addon wasn't installed properly. Reboot windows. If it still doesn't work, then you'll need to get support from the snmp addon author.
astralusche
Posts: 8
Joined: Fri Jun 06, 2008 3:02 am
Location: Rostock / Germany

Post by astralusche »

i fixed the problem. read here by same problems:

http://code.bastart.eu.org/forum/commen ... e=1#Item_0
bbrotherz
Posts: 4
Joined: Thu Jun 26, 2008 10:58 am

Post by bbrotherz »

I have read the link you posted there.

I cannot get a clue how to run speedfan as a service or run it in "console". (Wich one is best for sfsnmp?)

I also get the NaN message every time, even after a reboot and also when using a older version of the sfsnmp.

To be sure, I added my error below:

Code: Select all

PHP Script Server has Started - Parent is cmd
/var/www/cacti/scripts/ss_speedfan_temp.php ss_speedfan_temp 192.168.0.100 public 2 161 500
Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.0

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.1

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.2

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.3

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.4

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.5

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.6

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.7

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.8

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.9

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.10

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.11

Error in packet
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.4.1.16.0.1.12

t0:NaN t1:NaN t2:NaN t3:NaN t4:NaN t5:NaN t6:NaN t7:NaN t8:NaN t9:NaN t10:NaN t11:NaN t12:NaN

So if anyone has a clue, please feel free to help :)

-update-:

Maybe its good to say that I run cacti on a debian box, trying to monitor a Windows machine. Maybe I should run the cacti on the computer itself?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

All the ss_speedfan_*.php scripts are doing is snmpget calls. So looks like the sfsnmp addon isn't properly installed.

To run speedfan as a service, look into using Windows SC tool (i.e. sc create help). Then once thats configured, running and sfsnmp is reinstalled, you can manually snmpget an OID like .1.3.6.1.4.1.16.0.2.0.
BlaZoR
Posts: 8
Joined: Wed Nov 12, 2008 7:36 am
Location: Paderborn, Germany
Contact:

Post by BlaZoR »

Doesn't it work with the newest version of SpeedFan?
I can get .1.3.6.1.4.1.16.0.0.{0-2}. It seems, that there are the count of available data. But the other values are missing.

Code: Select all

ding # snmpwalk -c public -v 2c 192.168.250.23 .1.3.6.1.4.1.16.0.0.0
SNMPv2-SMI::enterprises.16.0.0.0 = INTEGER: 11
ding # snmpwalk -c public -v 2c 192.168.250.23 .1.3.6.1.4.1.16.0.1.0
Error in packet.
Reason: (genError) A general failure occured
Failed object: SNMPv2-SMI::enterprises.16.0.1.0

ding # snmpwalk -c public -v 2c 192.168.250.23 .1.3.6.1.4.1.16.0.2.0
Error in packet.
Reason: (genError) A general failure occured
Failed object: SNMPv2-SMI::enterprises.16.0.2.0

ding # snmpwalk -c public -v 2c 192.168.250.23 .1.3.6.1.4.1.16.0.3.0
Error in packet.
Reason: (genError) A general failure occured
Failed object: SNMPv2-SMI::enterprises.16.0.3.0

ding #
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) sfsnmp doesn't support snmpwalk -- dumb, know. Must use snmpget.

2) Possibly looks like the sfsnmp addon isn't properly installed.
BlaZoR
Posts: 8
Joined: Wed Nov 12, 2008 7:36 am
Location: Paderborn, Germany
Contact:

Post by BlaZoR »

I always used snmpwalk and it worked :o.
And if it's not properly installed, why can I get the count of available data (example above: 11 temperatures)?

Anyway, restarting the SNMP service worked and I can get all the data with snmpwalk.

Now I have another problem.

Code: Select all

11/13/2008 08:37:12 AM - SPINE: Poller[0] Host[3] DS[38] SS[0] SERVER: /var/www/localhost/htdocs/cacti/scripts/ss_speedfan_fan.php ss_speedfan_fan shavenne.home public 1 161 500 , output: U
11/13/2008 08:37:12 AM - SPINE: Poller[0] Host[3] DS[38] SS[0] WARNING: Result from SERVER not valid. Partial Result: f0:1548 f1:1455 f2:0...
11/13/2008 08:37:12 AM - SPINE: Poller[0] Host[3] DS[29] SS[0] SERVER: /var/www/localhost/htdocs/cacti/scripts/ss_speedfan_temp.php ss_speedfan_temp shavenne.home public 1 161 500 , output: U
11/13/2008 08:37:12 AM - SPINE: Poller[0] Host[3] DS[29] SS[0] WARNING: Result from SERVER not valid. Partial Result: t0:4300 t1:3300 t2:2... 
I really don't now what's wrong with the result. Is there any way to get the complete result instead partial?
I tried to run the script manually with

Code: Select all

php var/www/localhost/htdocs/cacti/scripts/ss_speedfan_temp.php ss_speedfan_temp shavenne.home public 1 161 500 ,
but it only gets NaN's.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

BlaZoR wrote:I always used snmpwalk and it worked :o.
And if it's not properly installed, why can I get the count of available data (example above: 11 temperatures)?
Sorry, was thinking about his previous version of sfsnmp which only worked with snmpget. Anyways, I tested speedfan 4.36 with sfsnmp 1.0 and snmpwalk works fine.
BlaZoR wrote: Now I have another problem.

I really don't now what's wrong with the result. Is there any way to get the complete result instead partial?
I tried to run the script manually with

Code: Select all

php var/www/localhost/htdocs/cacti/scripts/ss_speedfan_temp.php ss_speedfan_temp shavenne.home public 1 161 500 ,
but it only gets NaN's.
You need to start the script server first, otherwise it'll throw an error:
C:\Inetpub\wwwroot\cacti>php C:\Inetpub\wwwroot\cacti\scripts\ss_speedfan_temp.php ss_speedfan_temp localhost public 1 161 500
PHP Warning: Missing argument 7 for ss_speedfan_temp() in C:\Inetpub\wwwroot\cacti\scripts\ss_speedfan_temp.php on line 22
t0:0 t1:0 t2:0 t3:0 t4:0 t5:0 t6:0 t7:0 t8:0 t9:0 t10:0 t11:0 t12:0

C:\Inetpub\wwwroot\cacti>php script_server.php
PHP Script Server has Started - Parent is cmd
C:\Inetpub\wwwroot\cacti\scripts\ss_speedfan_temp.php ss_speedfan_temp localhost public 2 161 500
t0:0 t1:0 t2:0 t3:0 t4:0 t5:0 t6:0 t7:0 t8:0 t9:0 t10:0 t11:0 t12:0
BlaZoR
Posts: 8
Joined: Wed Nov 12, 2008 7:36 am
Location: Paderborn, Germany
Contact:

Post by BlaZoR »

Code: Select all

ding cacti # php script_server.php
PHP Script Server has Started - Parent is cmd
/var/www/localhost/htdocs/cacti/scripts/ss_speedfan_temp.php ss_speedfan_temp shavenne.home public 1 161 500
t0:4300 t1:3100 t2:2350 t3:2900 t4:3100 t5:2400 t6:3300 t7:2900 t8:2600 t9:3500 t10:3200 t11:NaN t12:NaN
11/14/2008 09:57:02 AM - PHPSVR: Poller[0] Maximum runtime of 2 seconds exceeded for the Script Server. Exiting.
ding cacti # snmpwalk -c public -v 2c 192.168.250.23 .1.3.6.1.4.1.16.0.1.5
SNMPv2-SMI::enterprises.16.0.1.5 = INTEGER: 2400
ding cacti # snmpwalk -c public -v 2c 192.168.250.23 .1.3.6.1.4.1.16.0.1.12
ding cacti # snmpwalk -c public -v 2c 192.168.250.23 .1.3.6.1.4.1.16.0.1.11
ding cacti # snmpwalk -c public -v 2c 192.168.250.23 .1.3.6.1.4.1.16.0.1.10
SNMPv2-SMI::enterprises.16.0.1.10 = INTEGER: 3200
ding cacti #
Hmm.. :o
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

ah yea, I recall this issue now. Cacti doesn't like scripts returning "NaN" text for a lack of data. Modify each ss_speedfan* script with the following:

change:

Code: Select all

$result = is_numeric($var) ? ($result . $row["key"] . ":" . $var . " ") : ($result . $row["key"] . ":NaN ");
to

Code: Select all

$result = is_numeric($var) ? ($result . $row["key"] . ":" . $var . " ") : ($result . $row["key"] . ":0 ");
BlaZoR
Posts: 8
Joined: Wed Nov 12, 2008 7:36 am
Location: Paderborn, Germany
Contact:

Post by BlaZoR »

It works. Nice. Thank you :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests