Skip to content

Commit

Permalink
Minor tests in Cisco helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Oct 1, 2024
1 parent 53a3724 commit c6fa455
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Helpers/snmp_9_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
$details = new \StdClass();
$details->manufacturer = 'Cisco Systems';
# the only MIB providing overall RAM is 1.3.6.1.4.1.9.3.6.6.0 which is deprecated
$details->memory_count = intval(my_snmp_get($ip, $credentials, "1.3.6.1.4.1.9.3.6.6.0") / 1024);
$details->storage_count = intval(my_snmp_get($ip, $credentials, "1.3.6.1.4.1.9.2.10.1.0") / 1048576);
$temp = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.9.3.6.6.0");
$details->memory_count = (!empty($temp)) ? intval($temp / 1024) : 0;
$temp = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.9.2.10.1.0");
$details->storage_count = (!empty($temp)) ? intval($temp / 1048576) : 0;
$details->description = my_snmp_get($ip, $credentials, "1.3.6.1.2.1.1.1.0");
$details->os_version = '';
$details->os_group = '';
Expand Down

0 comments on commit c6fa455

Please sign in to comment.