"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/utility.php" between
cacti-1.2.21.tar.gz and cacti-1.2.22.tar.gz

About: Cacti is a complete network graphing solution designed to harness the power of RRDTool’s data storage and graphing functionality.

utility.php  (cacti-1.2.21):utility.php  (cacti-1.2.22)
skipping to change at line 575 skipping to change at line 575
'snmp_username=VALUES(snmp_username), snmp_password=VALUES(snmp_p assword), snmp_auth_protocol=VALUES(snmp_auth_protocol), ' . 'snmp_username=VALUES(snmp_username), snmp_password=VALUES(snmp_p assword), snmp_auth_protocol=VALUES(snmp_auth_protocol), ' .
'snmp_priv_passphrase=VALUES(snmp_priv_passphrase), snmp_priv_pro tocol=VALUES(snmp_priv_protocol), ' . 'snmp_priv_passphrase=VALUES(snmp_priv_passphrase), snmp_priv_pro tocol=VALUES(snmp_priv_protocol), ' .
'snmp_context=VALUES(snmp_context), snmp_engine_id=VALUES(snmp_en gine_id), snmp_port=VALUES(snmp_port), ' . 'snmp_context=VALUES(snmp_context), snmp_engine_id=VALUES(snmp_en gine_id), snmp_port=VALUES(snmp_port), ' .
'rrd_path=VALUES(rrd_path), rrd_num=VALUES(rrd_num), ' . 'rrd_path=VALUES(rrd_path), rrd_num=VALUES(rrd_num), ' .
'rrd_step=VALUES(rrd_step), rrd_next_step=VALUES(rrd_next_step), arg1=VALUES(arg1), arg2=VALUES(arg2), ' . 'rrd_step=VALUES(rrd_step), rrd_next_step=VALUES(rrd_next_step), arg1=VALUES(arg1), arg2=VALUES(arg2), ' .
'arg3=VALUES(arg3), present=VALUES(present)'; 'arg3=VALUES(arg3), present=VALUES(present)';
/* use a reasonable insert buffer, the default is 1MByte */ /* use a reasonable insert buffer, the default is 1MByte */
$max_packet = 256000; $max_packet = 256000;
/* setup somme defaults */ /* setup some defaults */
$overhead = strlen($sql_prefix) + strlen($sql_suffix); $overhead = strlen($sql_prefix) + strlen($sql_suffix);
$buf_len = 0; $buf_len = 0;
$buf_count = 0; $buf_count = 0;
$buffer = ''; $buffer = '';
if (cacti_sizeof($poller_items)) { if (cacti_sizeof($poller_items)) {
foreach ($poller_items as $record) { foreach ($poller_items as $record) {
/* take care of invalid entries */ /* take care of invalid entries */
if ($record == '') { if ($record == '') {
continue; continue;
skipping to change at line 1114 skipping to change at line 1114
), ),
'innodb_write_io_threads' => array( 'innodb_write_io_threads' => array(
'value' => '16', 'value' => '16',
'measure' => 'ge', 'measure' => 'ge',
'comment' => __('With modern SSD type sto rage, having multiple write io threads is advantageous for applications with hig h io characteristics. Depending on your MariaDB/MySQL versions, this value can go as high as 64. But try to keep the number less than your total SMT threads o n the database server.') 'comment' => __('With modern SSD type sto rage, having multiple write io threads is advantageous for applications with hig h io characteristics. Depending on your MariaDB/MySQL versions, this value can go as high as 64. But try to keep the number less than your total SMT threads o n the database server.')
), ),
'innodb_buffer_pool_instances' => array( 'innodb_buffer_pool_instances' => array(
'value' => '16', 'value' => '16',
'measure' => 'pinst', 'measure' => 'pinst',
'class' => 'warning', 'class' => 'warning',
'comment' => __('%s will divide the innod b_buffer_pool into memory regions to improve performance for versions of MariaDB less than 10.5. The max value is 64. When your innodb_buffer_pool is less tha n 1GB, you should use the pool size divided by 128MB. Continue to use this equa tion upto the max of 64.', $database) 'comment' => __('%s will divide the innod b_buffer_pool into memory regions to improve performance for versions of MariaDB less than 10.5. The max value is 64. When your innodb_buffer_pool is less tha n 1GB, you should use the pool size divided by 128MB. Continue to use this equa tion up to the max of 64.', $database)
), ),
'innodb_io_capacity' => array( 'innodb_io_capacity' => array(
'value' => '5000', 'value' => '5000',
'measure' => 'ge', 'measure' => 'ge',
'class' => 'warning', 'class' => 'warning',
'comment' => __('If you have SSD disks, u se this suggestion. If you have physical hard drives, use 200 * the number of a ctive drives in the array. If using NVMe or PCIe Flash, much larger numbers as high as 100000 can be used.') 'comment' => __('If you have SSD disks, u se this suggestion. If you have physical hard drives, use 200 * the number of a ctive drives in the array. If using NVMe or PCIe Flash, much larger numbers as high as 100000 can be used.')
), ),
'innodb_io_capacity_max' => array( 'innodb_io_capacity_max' => array(
'value' => '10000', 'value' => '10000',
'measure' => 'ge', 'measure' => 'ge',
skipping to change at line 1589 skipping to change at line 1589
$rec_memory_mb = (version_compare(PHP_VERSION, '7.0.0', '<') ? 800 : 400 ); $rec_memory_mb = (version_compare(PHP_VERSION, '7.0.0', '<') ? 800 : 400 );
$rec_execute_m = 1; $rec_execute_m = 1;
$memory_ini = (isset($original_memory_limit) ? $original_memory_limit : ini_get('memory_limit')); $memory_ini = (isset($original_memory_limit) ? $original_memory_limit : ini_get('memory_limit'));
// adjust above appropriately (used in configs) // adjust above appropriately (used in configs)
$rec_execute = $rec_execute_m * 60; $rec_execute = $rec_execute_m * 60;
$rec_memory = utility_get_formatted_bytes($rec_memory_mb, 'M', $rec_m emory_mb, 'M'); $rec_memory = utility_get_formatted_bytes($rec_memory_mb, 'M', $rec_m emory_mb, 'M');
$memory_limit = utility_get_formatted_bytes($memory_ini, 'M', $memory_i ni, 'B'); $memory_limit = utility_get_formatted_bytes($memory_ini, 'M', $memory_i ni, 'B');
$execute_time = ini_get('max_execution_time'); $execute_time = ini_get('max_execution_time');
$ini_values = parse_ini_file(get_cfg_var('cfg_file_path'));
$timezone = ini_get('date.timezone'); $timezone = ini_get('date.timezone');
$recommends = array( $recommends = array(
array( array(
'name' => 'location',
'value' => get_cfg_var('cfg_file_path'),
'current' => get_cfg_var('cfg_file_path'),
'status' => 2,
),
array(
'name' => 'version', 'name' => 'version',
'value' => $rec_version, 'value' => $rec_version,
'current' => PHP_VERSION, 'current' => PHP_VERSION,
'status' => version_compare(PHP_VERSION, $rec_versio n, '>=') ? DB_STATUS_SUCCESS : DB_STATUS_ERROR, 'status' => version_compare(PHP_VERSION, $rec_versio n, '>=') ? DB_STATUS_SUCCESS : DB_STATUS_ERROR,
), ),
array( array(
'name' => 'memory_limit', 'name' => 'memory_limit',
'value' => $rec_memory_mb, 'value' => $rec_memory_mb,
'current' => $memory_ini, 'current' => $memory_ini,
'status' => ($memory_limit <= 0 || $memory_limit >= $rec_memory) ? DB_STATUS_SUCCESS : DB_STATUS_WARNING, 'status' => (($memory_limit <= 0 || $memory_limit >= $rec_memory) ? DB_STATUS_SUCCESS :($memory_limit != $ini_values['memory_limit'] ? DB_STATUS_RESTART : DB_STATUS_WARNING)),
), ),
array( array(
'name' => 'max_execution_time', 'name' => 'max_execution_time',
'value' => $rec_execute, 'value' => $rec_execute,
'current' => $execute_time, 'current' => $execute_time,
'status' => ($execute_time <= 0 || $execute_time >= $rec_execute) ? DB_STATUS_SUCCESS : DB_STATUS_WARNING, 'status' => (($execute_time <= 0 || $execute_time >= $rec_execute) ? DB_STATUS_SUCCESS : ($execute_time != $ini_values['max_executio n_time'] ? DB_STATUS_RESTART : DB_STATUS_WARNING)),
), ),
array( array(
'name' => 'date.timezone', 'name' => 'date.timezone',
'value' => '<timezone>', 'value' => '<timezone>',
'current' => $timezone, 'current' => $timezone,
'status' => ($timezone ? DB_STATUS_SUCCESS : DB_STAT US_ERROR), 'status' => ($timezone ? DB_STATUS_SUCCESS : ($timez one != $ini_values['date.timezone'] ? DB_STATUS_RESTART : DB_STATUS_ERROR)),
), ),
); );
} }
function utility_php_set_recommends_text(&$recs) { function utility_php_set_recommends_text(&$recs) {
if (is_array($recs) && cacti_sizeof($recs)) { if (is_array($recs) && cacti_sizeof($recs)) {
foreach ($recs as $name => $recommends) { foreach ($recs as $name => $recommends) {
if (cacti_sizeof($recommends)) { if (cacti_sizeof($recommends)) {
foreach ($recommends as $index => $recommend) { foreach ($recommends as $index => $recommend) {
if ($recommend['name'] == 'version') { if ($recommend['name'] == 'version') {
$recs[$name][$index]['description '] = __('PHP %s is the mimimum version', $recommend['value']); $recs[$name][$index]['description '] = __('PHP %s is the minimum version', $recommend['value']);
} elseif ($recommend['name'] == 'memory_l imit') { } elseif ($recommend['name'] == 'memory_l imit') {
$recs[$name][$index]['description '] = __('A minimum of %s memory limit', $recommend['value']); $recs[$name][$index]['description '] = __('A minimum of %s memory limit', $recommend['value']);
} elseif ($recommend['name'] == 'max_exec ution_time') { } elseif ($recommend['name'] == 'max_exec ution_time') {
$recs[$name][$index]['description '] = __('A minimum of %s m execution time', $recommend['value']); $recs[$name][$index]['description '] = __('A minimum of %s m execution time', $recommend['value']);
} elseif ($recommend['name'] == 'date.tim ezone') { } elseif ($recommend['name'] == 'date.tim ezone') {
$recs[$name][$index]['description '] = __('A valid timezone that matches MySQL and the system'); $recs[$name][$index]['description '] = __('A valid timezone that matches MySQL and the system');
} }
} }
} }
} }
 End of changes. 8 change blocks. 
6 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)