1<?php 2/* Observium Network Management and Monitoring System 3 * 4 * @package observium 5 * @subpackage poller 6 * @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited 7 * 8 */ 9 10global $graphs; 11 12//$count = dbFetchCell('SELECT COUNT(*) FROM `counters` WHERE `device_id` = ? AND `counter_deleted` = ?;', array($device['device_id'], '0')); 13//print_cli_data("Counters Count", $count); 14 15if (dbExist('counters', '`device_id` = ? AND `counter_deleted` = ?', [$device['device_id'], '0']) > 0) 16{ 17 18 poll_cache_oids($device, 'counter', $oid_cache); 19 20 global $table_rows; 21 $table_rows = array(); 22 23 global $multi_update_db; 24 $multi_update_db = array(); 25 26 poll_counter($device, $oid_cache); 27 28 if (count($multi_update_db)) 29 { 30 print_debug("MultiUpdate counter DB."); 31 // Multiupdate required all UNIQUE keys! 32 dbUpdateMulti($multi_update_db, 'counters'); 33 } 34 35 $headers = array('%WDescr%n', '%WClass%n', '%WMIB::Oid.Index%n', '%WValue%n', '%WRate%n', '%WStatus%n', '%WLast Changed%n', '%WOrigin%n'); 36 print_cli_table($table_rows, $headers); 37 38} 39 40// EOF 41