]>
Commit | Line | Data |
---|---|---|
4d9b2a21 AM |
1 | diff -ruBbd cacti-0.8.6g/scripts/ss_host_cpu.php cacti-0.8.6g-patched/scripts/ss_host_cpu.php |
2 | --- cacti-0.8.6g/scripts/ss_host_cpu.php 2005-09-08 19:56:25.000000000 -0400 | |
3 | +++ cacti-0.8.6g-patched/scripts/ss_host_cpu.php 2005-09-18 10:50:45.000000000 -0400 | |
4 | @@ -76,7 +76,7 @@ | |
5 | } | |
6 | ||
7 | function ss_host_cpu_get_cpu_usage($hostname, $snmp_community, $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmpv3_auth_protocol, $snmpv3_priv_passphrase, $snmpv3_priv_protocol, $snmp_port, $snmp_timeout) { | |
8 | - $arr = ss_host_cpu_reindex(cacti_snmp_walk($hostname, $snmp_community, ".1.3.6.1.2.1.25.3.3.1", $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmpv3_auth_protocol, $snmpv3_priv_passphrase, $snmpv3_priv_protocol, $snmp_port, $snmp_timeout, SNMP_POLLER)); | |
9 | + $arr = ss_host_cpu_reindex(cacti_snmp_walk($hostname, $snmp_community, ".1.3.6.1.2.1.25.3.3.1", $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmp_port, $snmp_timeout, SNMP_POLLER)); | |
10 | $return_arr = array(); | |
11 | ||
12 | $j = 0; | |
13 | @@ -92,7 +92,7 @@ | |
14 | } | |
15 | ||
16 | function ss_host_cpu_get_indexes($hostname, $snmp_community, $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmpv3_auth_protocol, $snmpv3_priv_passphrase, $snmpv3_priv_protocol, $snmp_port, $snmp_timeout) { | |
17 | - $arr = ss_host_cpu_reindex(cacti_snmp_walk($hostname, $snmp_community, ".1.3.6.1.2.1.25.3.3.1", $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmpv3_auth_protocol, $snmpv3_priv_passphrase, $snmpv3_priv_protocol, $snmp_port, $snmp_timeout, SNMP_POLLER)); | |
18 | + $arr = ss_host_cpu_reindex(cacti_snmp_walk($hostname, $snmp_community, ".1.3.6.1.2.1.25.3.3.1", $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmp_port, $snmp_timeout, SNMP_POLLER)); | |
19 | $return_arr = array(); | |
20 | ||
21 | $j = 0; | |
22 | diff -ruBbd cacti-0.8.6g/scripts/ss_host_disk.php cacti-0.8.6g-patched/scripts/ss_host_disk.php | |
23 | --- cacti-0.8.6g/scripts/ss_host_disk.php 2005-09-08 19:56:25.000000000 -0400 | |
24 | +++ cacti-0.8.6g-patched/scripts/ss_host_disk.php 2005-09-18 10:50:45.000000000 -0400 | |
25 | @@ -47,7 +47,7 @@ | |
26 | ); | |
27 | ||
28 | if ($cmd == "index") { | |
29 | - $return_arr = ss_host_disk_reindex(cacti_snmp_walk($hostname, $snmp_community, $oids["index"], $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmpv3_auth_protocol, $snmpv3_priv_passphrase, $snmpv3_priv_protocol, $snmp_port, $snmp_timeout, SNMP_POLLER)); | |
30 | + $return_arr = ss_host_disk_reindex(cacti_snmp_walk($hostname, $snmp_community, $oids["index"], $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmp_port, $snmp_timeout, SNMP_POLLER)); | |
31 | ||
32 | for ($i=0;($i<sizeof($return_arr));$i++) { | |
33 | print $return_arr[$i] . "\n"; | |
34 | @@ -55,8 +55,8 @@ | |
35 | }elseif ($cmd == "query") { | |
36 | $arg = $arg1; | |
37 | ||
38 | - $arr_index = ss_host_disk_reindex(cacti_snmp_walk($hostname, $snmp_community, $oids["index"], $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmpv3_auth_protocol, $snmpv3_priv_passphrase, $snmpv3_priv_protocol, $snmp_port, $snmp_timeout, SNMP_POLLER)); | |
39 | - $arr = ss_host_disk_reindex(cacti_snmp_walk($hostname, $snmp_community, $oids[$arg], $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmpv3_auth_protocol, $snmpv3_priv_passphrase, $snmpv3_priv_protocol, $snmp_port, $snmp_timeout, SNMP_POLLER)); | |
40 | + $arr_index = ss_host_disk_reindex(cacti_snmp_walk($hostname, $snmp_community, $oids["index"], $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmp_port, $snmp_timeout, SNMP_POLLER)); | |
41 | + $arr = ss_host_disk_reindex(cacti_snmp_walk($hostname, $snmp_community, $oids[$arg], $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmp_port, $snmp_timeout, SNMP_POLLER)); | |
42 | ||
43 | for ($i=0;($i<sizeof($arr_index));$i++) { | |
44 | print $arr_index[$i] . "!" . $arr[$i] . "\n"; | |
45 | @@ -69,9 +69,9 @@ | |
46 | /* get hrStorageAllocationUnits from the snmp cache since it is faster */ | |
47 | $sau = eregi_replace("[^0-9]", "", db_fetch_cell("select field_value from host_snmp_cache where host_id=$host_id and field_name='hrStorageAllocationUnits' and snmp_index='$index'")); | |
48 | ||
49 | - return cacti_snmp_get($hostname, $snmp_community, $oids[$arg] . ".$index", $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmpv3_auth_protocol, $snmpv3_priv_passphrase, $snmpv3_priv_protocol, $snmp_port, $snmp_timeout, SNMP_POLLER) * $sau; | |
50 | + return cacti_snmp_get($hostname, $snmp_community, $oids[$arg] . ".$index", $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmp_port, $snmp_timeout, SNMP_POLLER) * $sau; | |
51 | }else{ | |
52 | - return cacti_snmp_get($hostname, $snmp_community, $oids[$arg] . ".$index", $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmpv3_auth_protocol, $snmpv3_priv_passphrase, $snmpv3_priv_protocol, $snmp_port, $snmp_timeout, SNMP_POLLER); | |
53 | + return cacti_snmp_get($hostname, $snmp_community, $oids[$arg] . ".$index", $snmp_version, $snmpv3_auth_username, $snmpv3_auth_password, $snmp_port, $snmp_timeout, SNMP_POLLER); | |
54 | } | |
55 | } | |
56 | } |