diff --git a/database-update.sql b/database-update.sql
index 9578c94b1f..25988b9e0c 100644
--- a/database-update.sql
+++ b/database-update.sql
@@ -69,3 +69,5 @@ ALTER TABLE `entPhysical` ADD `entPhysicalHardwareRev` VARCHAR( 16 ) NULL AFTER
ALTER TABLE `devices` ADD `last_discovered` timestamp NULL DEFAULT NULL AFTER `last_polled`;
ALTER TABLE `devices` CHANGE `lastchange` `uptime` BIGINT NULL DEFAULT NULL;
ALTER TABLE `storage` ADD `hrStorageType` VARCHAR( 32 ) NULL DEFAULT NULL AFTER `hrStorageIndex`
+ALTER TABLE `devices` MODIFY `type` varchar(8) DEFAULT "unknown";
+
\ No newline at end of file
diff --git a/html/pages/ipv4.php b/html/pages/ipv4.php
index b7f3071554..c6cc45e142 100644
--- a/html/pages/ipv4.php
+++ b/html/pages/ipv4.php
@@ -1,7 +1,7 @@
-
-
+
+
@@ -46,8 +46,8 @@
-
-
+
+
@@ -90,11 +90,11 @@ while($interface = mysql_fetch_array($query)) {
if( interfacepermitted($interface['interface_id']) )
{
- echo("
- | " . generatedevicelink($interface) . " |
- " . generateiflink($interface, makeshortif(fixifname($interface['ifDescr']))) . " $error_img |
- " . $interface['ipv4_address'] . "/".$length." |
- " . $interface['ifAlias'] . " |
+ echo('
+ | ' . generatedevicelink($interface) . ' |
+ ' . generateiflink($interface, makeshortif(fixifname($interface['ifDescr']))) . ' ' . $error_img . ' |
+ ' . $interface['ipv4_address'] . '/'.$length.' |
+ ' . $interface['ifAlias'] . " |
\n");
$row++;
diff --git a/html/pages/logon.inc b/html/pages/logon.inc
index 6fdc1ca746..18ad238917 100644
--- a/html/pages/logon.inc
+++ b/html/pages/logon.inc
@@ -1,59 +1,60 @@
-
-
-
-
-
-
-
-
-
-
-
-  |
-
- |
-
-
-
-
-
-
-
-
-
-
-");
-
-if($config['login_message']) {
- echo("".$config['login_message']."
");
-}
-
-?>
+
+
+
+
+
+
+
+
+
+
+
+  |
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+'.$config['login_message'].'');
+}
+?>
+
\ No newline at end of file
diff --git a/html/pages/temperatures.php b/html/pages/temperatures.php
index d38fd3e65f..e98d8d99e6 100644
--- a/html/pages/temperatures.php
+++ b/html/pages/temperatures.php
@@ -35,15 +35,22 @@ while($temp = mysql_fetch_array($query)) {
$temp_perc = $temp['temp_current'] / $temp['temp_limit'] * 100;
$temp_colour = percent_colour($temp_perc);
- $temp_minigraph = "
";
+ $temp_day = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$day&to=$now&width=300&height=100";
+ $temp_week = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$week&to=$now&width=300&height=100";
+ $temp_month = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$month&to=$now&width=300&height=100";
+ $temp_year = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$year&to=$now&width=300&height=100";
+
+ $temp_minigraph = "
".$temp['hostname']." - ".$temp['temp_descr'];
+ $temp_minigraph .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\" >";
echo("
| " . generatedevicelink($temp) . " |
$temp_popup |
$temp_minigraph |
- " . $temp['temp_current'] . " |
- " . $temp['temp_limit'] . " |
+ " . $temp['temp_current'] . " °C |
+ " . $temp['temp_limit'] . " °C |
" . $temp['temp_notes'] . " |
\n");
diff --git a/includes/discovery/bgp-peers.php b/includes/discovery/bgp-peers.php
index e5527becef..dcb38c164e 100755
--- a/includes/discovery/bgp-peers.php
+++ b/includes/discovery/bgp-peers.php
@@ -24,7 +24,7 @@
$peerlist[] = $device['device_id'] ." $peer_ip";
- $astext = trim(str_replace("\"", "", shell_exec("/usr/bin/dig +short AS$peer_as.asn.cymru.com TXT | cut -d '|' -f 5 | sed s/\\\"//g")));
+ $astext = get_astext($peer_pas);
# echo(str_pad($peer_ip, 40) . " AS$peer_as ");
@@ -81,7 +81,7 @@
$peerlist[] = $device['device_id'] ." $peer_ip";
- $astext = trim(str_replace("\"", "", shell_exec("/usr/bin/dig +short AS$peer_as.asn.cymru.com TXT | cut -d '|' -f 5 | sed s/\\\"//g")));
+ $astext = get_astext($peer_as);
#echo("$peer_ip AS$peer_as ");
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `bgpPeers` WHERE `device_id` = '".$device['device_id']."' AND bgpPeerIdentifier = '$peer_ip'"),0) < '1') {
diff --git a/includes/discovery/storage.php b/includes/discovery/storage.php
index d5ed4c272b..8432310f64 100755
--- a/includes/discovery/storage.php
+++ b/includes/discovery/storage.php
@@ -11,7 +11,7 @@
if($data) {
$data = trim($data);
list($oid,$hrStorageIndex) = explode(" ", $data);
- $temp = shell_exec($config['snmpget'] . " -m HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " hrStorageDescr.$oid hrStorageAllocationUnits.$oid hrStorageSize.$oid hrStorageType.$oid");
+ $temp = shell_exec($config['snmpget'] . " -m HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES -O sqv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " hrStorageDescr.$oid hrStorageAllocationUnits.$oid hrStorageSize.$oid hrStorageType.$oid");
$temp = trim($temp);
list($descr, $units, $size, $fstype) = explode("\n", $temp);
list($units) = explode(" ", $units);
diff --git a/includes/functions.php b/includes/functions.php
index 74be7f934c..64beb20512 100755
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -696,6 +696,10 @@ function discover_process_ipv6($ifIndex,$ipv6_address,$ipv6_prefixlen,$ipv6_orig
$ipv6_network = trim(shell_exec($config['sipcalc']." $ipv6_address/$ipv6_prefixlen | grep Subnet | cut -f 2 -d '-'"));
$ipv6_compressed = trim(shell_exec($config['sipcalc']." $ipv6_address/$ipv6_prefixlen | grep Compressed | cut -f 2 -d '-'"));
+
+ $ipv6_type = trim(shell_exec($config['sipcalc']." $ipv6_address/$ipv6_prefixlen | grep \"Address type\" | cut -f 2- -d '-'"));
+
+ if ($ipv6_type == "Link-Local Unicast Addresses") return; # ignore link-locals (coming from IPV6-MIB)
if (mysql_result(mysql_query("SELECT count(*) FROM `interfaces`
WHERE device_id = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'"), 0) != '0' && $ipv6_prefixlen > '0' && $ipv6_prefixlen < '129' && $ipv6_compressed != '::1') {
@@ -746,4 +750,11 @@ function duration($seconds, $max_periods = 6)
return implode(' ', $duration);
}
+function get_astext($asn)
+{
+ $result = dns_get_record("AS$asn.asn.cymru.com",DNS_TXT);
+ $txt = explode('|',$result[0]['txt']);
+ return trim(str_replace('"', '', $txt[4]));
+}
+
?>
diff --git a/includes/polling/device-unix.inc.php b/includes/polling/device-unix.inc.php
index 7ed1eba86a..96d7096c71 100755
--- a/includes/polling/device-unix.inc.php
+++ b/includes/polling/device-unix.inc.php
@@ -24,7 +24,9 @@
} elseif ($device['os'] == "linux") {
list(,,$version) = explode (" ", $sysDescr);
if(strstr($sysDescr, "386")|| strstr($sysDescr, "486")||strstr($sysDescr, "586")||strstr($sysDescr, "686")) { $hardware = "Generic x86"; }
- if(strstr($sysDescr, "x86_64")) { $hardware = "Generic x86 64-bit"; }
+ else if(strstr($sysDescr, "x86_64")) { $hardware = "Generic x86 64-bit"; }
+ else if(strstr($sysDescr, "sparc32")) { $hardware = "Generic SPARC 32-bit"; }
+ else if(strstr($sysDescr, "sparc64")) { $hardware = "Generic SPARC 64-bit"; }
$cmd = $config['snmpget'] . " -m UCD-SNMP-MIB -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port']. " .1.3.6.1.4.1.2021.7890.1.3.1.1.6.100.105.115.116.114.111";
$features = trim(`$cmd`);
$features = str_replace("No Such Object available on this agent at this OID", "", $features);