| 
									
										
										
										
											2010-02-24 14:11:51 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-25 12:24:34 +00:00
										 |  |  | // HOST-RESOURCES-MIB - Storage Objects
 | 
					
						
							| 
									
										
										
										
											2010-02-24 14:11:51 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-16 01:11:27 +00:00
										 |  |  | if (!is_array($storage_cache['hrstorage'])) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2010-07-22 21:58:49 +00:00
										 |  |  |   $storage_cache['hrstorage'] = snmpwalk_cache_oid($device, "hrStorageEntry", NULL, "HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES"); | 
					
						
							| 
									
										
										
										
											2010-02-27 14:45:22 +00:00
										 |  |  |   if ($debug) { print_r($storage_cache); } | 
					
						
							| 
									
										
										
										
											2010-02-24 14:11:51 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-11 17:08:56 +00:00
										 |  |  | $entry = $storage_cache['hrstorage'][$storage[storage_index]]; | 
					
						
							| 
									
										
										
										
											2010-02-24 14:11:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | $storage['units'] = $entry['hrStorageAllocationUnits']; | 
					
						
							|  |  |  | $storage['used'] = $entry['hrStorageUsed'] * $storage['units']; | 
					
						
							|  |  |  | $storage['size'] = $entry['hrStorageSize'] * $storage['units']; | 
					
						
							|  |  |  | $storage['free'] = $storage['size'] - $storage['used']; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-16 01:11:27 +00:00
										 |  |  | ?>
 |