本文整理汇总了PHP中rrdtool_check_rrd_exists函数的典型用法代码示例。如果您正苦于以下问题:PHP rrdtool_check_rrd_exists函数的具体用法?PHP rrdtool_check_rrd_exists怎么用?PHP rrdtool_check_rrd_exists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rrdtool_check_rrd_exists函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rrd_name
<?php
require 'includes/graphs/common.inc.php';
$colours = 'mixed';
$nototal = $width < 224 ? 1 : 0;
$unit_text = 'Milliseconds';
$rrd_filename = rrd_name($device['hostname'], array('app', 'ntpdserver', $app['app_id']));
$array = array('offset' => array('descr' => 'Offset'), 'jitter' => array('descr' => 'Jitter'), 'noise' => array('descr' => 'Noise'), 'stability' => array('descr' => 'Stability'));
$i = 0;
if (rrdtool_check_rrd_exists($rrd_filename)) {
foreach ($array as $ds => $vars) {
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $vars['descr'];
$rrd_list[$i]['ds'] = $ds;
$rrd_list[$i]['colour'] = $config['graph_colours'][$colours][$i];
$i++;
}
} else {
echo "file missing: {$file}";
}
require 'includes/graphs/generic_multi_line.inc.php';
示例2: rrd_name
<?php
require 'includes/graphs/common.inc.php';
$scale_min = 0;
$ds = 'latency';
$colour_area = 'F6F6F6';
$colour_line = 'B3D0DB';
$colour_area_max = 'FFEE99';
$graph_max = 100;
$unit_text = 'Latency';
$powerdns_rrd = rrd_name($device['hostname'], array('app', 'powerdns', $app['app_id']));
if (rrdtool_check_rrd_exists($powerdns_rrd)) {
$rrd_filename = $powerdns_rrd;
}
require 'includes/graphs/generic_simplex.inc.php';
示例3: rrd_name
<?php
require 'includes/graphs/common.inc.php';
$scale_min = 0;
$ds = 'frequency';
$colour_area = 'F6F6F6';
$colour_line = 'B3D0DB';
$colour_area_max = 'FFEE99';
$graph_max = 100;
$unit_text = 'Frequency';
$ntpclient_rrd = rrd_name($device['hostname'], array('app', 'ntpclient', $app['app_id']));
if (rrdtool_check_rrd_exists($ntpclient_rrd)) {
$rrd_filename = $ntpclient_rrd;
}
require 'includes/graphs/generic_simplex.inc.php';
示例4: rrd_name
<?php
require 'includes/graphs/common.inc.php';
$mysql_rrd = rrd_name($device['hostname'], array('app', 'mysql', $app['app_id']));
if (rrdtool_check_rrd_exists($mysql_rrd)) {
$rrd_filename = $mysql_rrd;
}
$multiplier = 8;
$ds_in = 'BRd';
$ds_out = 'BSt';
require 'includes/graphs/generic_data.inc.php';
示例5:
<?php
if (rrdtool_check_rrd_exists(rrd_name($device['hostname'], 'netstats-ip_forward'))) {
$graph_title = 'IP Forward statistics';
$graph_type = 'device_ip_forward';
include 'includes/print-device-graph.php';
}
示例6: rrd_name
<?php
$nototal = 1;
$ds_in = 'msg_recv';
$ds_out = 'msg_sent';
$graph_titel .= '::messages';
$unit_text = 'Messages/sec';
$colour_line_in = '008800FF';
$colour_line_out = '000088FF';
$colour_area_in = 'CEFFCE66';
$colour_area_out = 'CECEFF66';
$colour_area_in_max = 'CC88CC';
$colour_area_out_max = 'FFEFAA';
$mailscanner_rrd = rrd_name($device['hostname'], array('app', 'mailscannerV2', $app['app_id']));
if (rrdtool_check_rrd_exists($mailscanner_rrd)) {
$rrd_filename = $mailscanner_rrd;
}
require 'includes/graphs/generic_duplex.inc.php';
示例7: ceph_rrd
<?php
$ds_in = 'apply_ms';
$ds_out = 'commit_ms';
$in_text = 'Apply';
$out_text = 'Commit';
$ceph_osd_rrd = ceph_rrd('osd');
if (rrdtool_check_rrd_exists($ceph_osd_rrd)) {
$rrd_filename = $ceph_osd_rrd;
}
$colour_area_in = 'FF3300';
$colour_line_in = 'FF0000';
$colour_area_out = 'FF6633';
$colour_line_out = 'CC3300';
$colour_area_in_max = 'FF6633';
$colour_area_out_max = 'FF9966';
$unit_text = 'Miliseconds';
require 'includes/graphs/generic_duplex.inc.php';
示例8: rrd_name
<?php
$scale_min = 0;
require 'includes/graphs/common.inc.php';
$drbd_rrd = rrd_name($device['hostname'], array('app', 'drbd', $app['app_instance']));
if (rrdtool_check_rrd_exists($drbd_rrd)) {
$rrd_filename = $drbd_rrd;
}
$ds = 'oos';
$colour_area = 'CDEB8B';
$colour_line = '006600';
$colour_area_max = 'FFEE99';
$graph_max = 1;
$multiplier = 8;
$unit_text = 'Bytes';
require 'includes/graphs/generic_simplex.inc.php';
示例9:
<?php
if (rrdtool_check_rrd_exists(rrd_name($device['hostname'], 'ipSystemStats-ipv6'))) {
$graph_title = 'IPv6 IP Packet Statistics';
$graph_type = 'device_ipSystemStats_v6';
include 'includes/print-device-graph.php';
$graph_title = 'IPv6 IP Fragmentation Statistics';
$graph_type = 'device_ipSystemStats_v6_frag';
include 'includes/print-device-graph.php';
}
if (rrdtool_check_rrd_exists(rrd_name($device['hostname'], 'ipSystemStats-ipv4'))) {
$graph_title = 'IPv4 IP Packet Statistics';
$graph_type = 'device_ipSystemStats_v4';
include 'includes/print-device-graph.php';
}
示例10:
$graph_type = 'port_upkts';
echo '<div class="panel-body">';
include 'includes/print-interface-graphs.inc.php';
echo '</div></div>';
echo '<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Interface Non Unicast</h3>
</div>';
$graph_type = 'port_nupkts';
echo '<div class="panel-body">';
include 'includes/print-interface-graphs.inc.php';
echo '</div></div>';
echo '<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Interface Errors</h3>
</div>';
$graph_type = 'port_errors';
echo '<div class="panel-body">';
include 'includes/print-interface-graphs.inc.php';
echo '</div></div>';
if (rrdtool_check_rrd_exists(get_port_rrdfile_path($device['hostname'], $port['port_id'], 'dot3'))) {
echo '<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Ethernet Errors</h3>
</div>';
$graph_type = 'port_etherlike';
echo '<div class="panel-body">';
include 'includes/print-interface-graphs.inc.php';
echo '</div></div>';
}
}
示例11: rrd_name
<?php
$scale_min = 0;
require 'includes/graphs/common.inc.php';
$agent_rrd = rrd_name($device['hostname'], 'agent');
if (rrdtool_check_rrd_exists($agent_rrd)) {
$rrd_filename = $agent_rrd;
}
$ds = 'time';
$colour_area = 'EEEEEE';
$colour_line = '36393D';
$colour_area_max = 'FFEE99';
$graph_max = 1;
$multiplier = 1000;
$multiplier_action = '/';
$unit_text = 'Seconds';
require 'includes/graphs/generic_simplex.inc.php';
示例12: proxmox_rrd_name
<?php
/*
* Copyright (C) 2015 Mark Schouten <mark@tuxis.nl>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2 dated June,
* 1991.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* See http://www.gnu.org/licenses/gpl.txt for the full license
*/
require 'includes/graphs/common.inc.php';
$proxmox_rrd = proxmox_rrd_name($vars['cluster'], $vars['vmid'], $vars['port']);
if (rrdtool_check_rrd_exists($proxmox_rrd)) {
$rrd_filename = $proxmox_rrd;
}
$ds_in = 'INOCTETS';
$ds_out = 'OUTOCTETS';
require 'includes/graphs/generic_data.inc.php';
示例13: rrd_name
<?php
$rrd = rrd_name($device['hostname'], array('app', 'memcached', $app['app_id']));
if (rrdtool_check_rrd_exists($rrd)) {
$rrd_filename = $rrd;
}
示例14: elseif
if ($sort == 'in') {
$sort = 'cipMacHCSwitchedBytes_input_rate';
} elseif ($sort == 'out') {
$sort = 'cipMacHCSwitchedBytes_output_rate';
} else {
$sort = 'bps';
}
}
//end if
$accs = dbFetchRows("SELECT *, (M.cipMacHCSwitchedBytes_input_rate + M.cipMacHCSwitchedBytes_output_rate) AS bps,\n (M.cipMacHCSwitchedPkts_input_rate + M.cipMacHCSwitchedPkts_output_rate) AS pps\n FROM `mac_accounting` AS M, `ports` AS I, `devices` AS D WHERE M.port_id = ?\n AND I.port_id = M.port_id AND D.device_id = I.device_id ORDER BY {$sort} DESC LIMIT 0," . $topn, array($port));
$pluses = '';
$iter = '0';
$rrd_options .= " COMMENT:' In\\: Current Maximum Total Out\\: Current Maximum Total\\\\n'";
foreach ($accs as $acc) {
$this_rrd = rrd_name($acc['hostname'], array('cip', $acc['ifIndex'], $acc['mac']));
if (rrdtool_check_rrd_exists($this_rrd)) {
$mac = formatmac($acc['mac']);
$name = $mac;
$addy = dbFetchRow('SELECT * FROM ipv4_mac where mac_address = ? AND port_id = ?', array($acc['mac'], $acc['port_id']));
if ($addy) {
$name = $addy['ipv4_address'] . ' (' . $mac . ')';
$peer = dbFetchRow('SELECT * FROM ipv4_addresses AS A, ports AS I, devices AS D
WHERE A.ipv4_address = ? AND I.port_id = A.port_id AND D.device_id = I.device_id', array($addy['ipv4_address']));
if ($peer) {
$name = $peer['hostname'] . ' ' . makeshortif($peer['ifDescr']) . ' (' . $mac . ')';
}
if (dbFetchCell("SELECT count(*) FROM bgpPeers WHERE device_id = '" . $acc['device_id'] . "' AND bgpPeerIdentifier = ?", array($addy['ipv4_address']))) {
$peer_info = dbFetchRow('SELECT * FROM bgpPeers WHERE device_id = ? AND bgpPeerIdentifier = ?', array($acc['device_id'], $addy['ipv4_address']));
$name .= ' - AS' . $peer_info['bgpPeerRemoteAs'];
}
if ($peer_info) {
示例15: foreach
if (is_array($config['device_traffic_iftype'])) {
foreach ($config['device_traffic_iftype'] as $iftype) {
if (preg_match($iftype . 'i', $port['ifType'])) {
$ignore = 1;
}
}
}
if (is_array($config['device_traffic_descr'])) {
foreach ($config['device_traffic_descr'] as $ifdescr) {
if (preg_match($ifdescr . 'i', $port['ifDescr']) || preg_match($ifdescr . 'i', $port['ifName']) || preg_match($ifdescr . 'i', $port['portName'])) {
$ignore = 1;
}
}
}
$rrd_filename = get_port_rrdfile_path($device['hostname'], $port['port_id']);
if ($ignore != 1 && rrdtool_check_rrd_exists($rrd_filename)) {
$port = ifLabel($port);
// Fix Labels! ARGH. This needs to be in the bloody database!
$rrd_filenames[] = $rrd_filename;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = shorten_interface_type($port['label']);
$rrd_list[$i]['descr_in'] = $port['label'];
$rrd_list[$i]['descr_out'] = $port['ifAlias'];
$rrd_list[$i]['ds_in'] = $ds_in;
$rrd_list[$i]['ds_out'] = $ds_out;
$i++;
}
unset($ignore);
}
//end foreach
$units = 'b';