当前位置: 首页>>代码示例>>PHP>>正文


PHP get_port_rrdfilename函数代码示例

本文整理汇总了PHP中get_port_rrdfilename函数的典型用法代码示例。如果您正苦于以下问题:PHP get_port_rrdfilename函数的具体用法?PHP get_port_rrdfilename怎么用?PHP get_port_rrdfilename使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_port_rrdfilename函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_port_rrdfilename

<?php

$scale_min = 0;
include_once $config['html_dir'] . '/includes/graphs/common.inc.php';
$rrd = get_port_rrdfilename($device, $port, 'fdbcount');
if (is_file($rrd)) {
    $rrd_filename = $rrd;
}
$ds = 'value';
$colour_area = 'EEEEEE';
$colour_line = '36393D';
$colour_area_max = 'FFEE99';
$unit_text = 'MACs';
$unit_integer = TRUE;
$line_text = 'Count';
include_once $config['html_dir'] . '/includes/graphs/generic_simplex.inc.php';
// EOF
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:17,代码来源:fdb_count.inc.php

示例2: foreach

<?php

// Generate a list of ports and then call the multi_bits grapher to generate from the list
$i = 0;
foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ? AND `pagpGroupIfIndex` = ?", array($port['device_id'], $port['ifIndex'])) as $int) {
    $rrdfile = get_port_rrdfilename($device, $int);
    if (is_file($rrdfile)) {
        $rrd_list[$i]['filename'] = $rrdfile;
        $rrd_list[$i]['descr'] = $int['ifDescr'];
        $i++;
    }
}
$units = 'bps';
$total_units = 'B';
$colours_in = 'greens';
$multiplier = "8";
$colours_out = 'blues';
$nototal = 1;
$ds_in = "INOCTETS";
$ds_out = "OUTOCTETS";
include "includes/graphs/generic_multi_bits_separated.inc.php";
开发者ID:RomanBogachev,项目名称:observium,代码行数:21,代码来源:pagp_bits.inc.php

示例3: foreach

    $ignore = 0;
    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_rrdfilename($port, $port);
    if (!$ignore && $i < 1100 && is_file($rrd_filename)) {
        $rrd_filenames[] = $rrd_filename;
        $rrd_list[$i]['filename'] = $rrd_filename;
        #    $rrd_list[$i]['descr'] = $port['device_id'] . " " . $port['ifDescr'];
        $rrd_list[$i]['descr'] = "dev" . $port['device_id'] . "if" . $port['ifIndex'];
        $rrd_list[$i]['rra_in'] = $rra_in;
        $rrd_list[$i]['rra_out'] = $rra_out;
        $i++;
    }
    unset($ignore);
}
$units = 'bps';
$total_units = 'B';
$colours_in = 'greens';
$multiplier = "8";
开发者ID:RomanBogachev,项目名称:observium,代码行数:31,代码来源:bits.inc.php

示例4: foreach

<?php

/**
 * Observium
 *
 *   This file is part of Observium.
 *
 * @package    observium
 * @subpackage graphs
 * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
 *
 */
// Generate a list of ports and then call the multi_bits grapher to generate from the list
$i = 0;
foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ? AND `pagpGroupIfIndex` = ?", array($port['device_id'], $port['ifIndex'])) as $int) {
    $rrdfile = get_port_rrdfilename($int, NULL, TRUE);
    if (is_file($rrdfile)) {
        $rrd_list[$i]['filename'] = $rrdfile;
        $rrd_list[$i]['descr'] = $int['ifDescr'];
        $i++;
    }
}
$units = 'bps';
$total_units = 'B';
$colours_in = 'greens';
$multiplier = "8";
$colours_out = 'blues';
$nototal = 1;
$ds_in = "INOCTETS";
$ds_out = "OUTOCTETS";
include $config['html_dir'] . "/includes/graphs/generic_multi_bits_separated.inc.php";
开发者ID:Natolumin,项目名称:observium,代码行数:31,代码来源:pagp_bits.inc.php

示例5: get_port_rrdfilename

<?php

$rrd_filename = get_port_rrdfilename($device, $port, "adsl");
$rrd_list[0]['filename'] = $rrd_filename;
$rrd_list[0]['descr'] = "Downstream";
$rrd_list[0]['ds'] = "AturCurrSnrMgn";
$rrd_list[1]['filename'] = $rrd_filename;
$rrd_list[1]['descr'] = "Upstream";
$rrd_list[1]['ds'] = "AtucCurrSnrMgn";
$unit_text = "dB";
$units = '';
$total_units = '';
$colours = 'mixed';
$scale_min = "0";
$nototal = 1;
if ($rrd_list) {
    include "includes/graphs/generic_multi_line.inc.php";
}
开发者ID:RomanBogachev,项目名称:observium,代码行数:18,代码来源:adsl_snr.inc.php

示例6: formatRates

 }
 $port['state']['ifInOctets_perc'] = $port['stats']['ifInBits_perc'];
 $port['state']['ifOutOctets_perc'] = $port['stats']['ifOutBits_perc'];
 $port['alert_array']['ifInOctets_perc'] = $port['stats']['ifInBits_perc'];
 $port['alert_array']['ifOutOctets_perc'] = $port['stats']['ifOutBits_perc'];
 $port['alert_array']['rx_ave_pktsize'] = $port['state']['ifInOctets_delta'] / ($port['state']['ifInUcastPkts_delta'] + $port['state']['ifInNUcastPkts_delta']);
 $port['alert_array']['tx_ave_pktsize'] = $port['state']['ifOutOctets_delta'] / ($port['state']['ifOutUcastPkts_delta'] + $port['state']['ifOutNUcastPkts_delta']);
 echo 'bps(' . formatRates($port['stats']['ifInBits_rate']) . '/' . formatRates($port['stats']['ifOutBits_rate']) . ')';
 echo 'bytes(' . formatStorage($port['stats']['ifInOctets_diff']) . '/' . formatStorage($port['stats']['ifOutOctets_diff']) . ')';
 echo 'pkts(' . format_si($port['stats']['ifInUcastPkts_rate']) . 'pps/' . format_si($port['stats']['ifOutUcastPkts_rate']) . 'pps)';
 // Store aggregate in/out state
 $port['state']['ifOctets_rate'] = $port['stats']['ifOutOctets_rate'] + $port['stats']['ifInOctets_rate'];
 $port['state']['ifUcastPkts_rate'] = $port['stats']['ifOutUcastPkts_rate'] + $port['stats']['ifInUcastPkts_rate'];
 $port['state']['ifErrors_rate'] = $port['stats']['ifOutErrors_rate'] + $port['stats']['ifInErrors_rate'];
 // Update RRDs
 $rrdfile = get_port_rrdfilename($port);
 rrdtool_create($device, $rrdfile, "\\\n      DS:INOCTETS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:OUTOCTETS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:INERRORS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:OUTERRORS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:INUCASTPKTS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:OUTUCASTPKTS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:INNUCASTPKTS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:OUTNUCASTPKTS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:INDISCARDS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:OUTDISCARDS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:INUNKNOWNPROTOS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:INBROADCASTPKTS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:OUTBROADCASTPKTS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:INMULTICASTPKTS:DERIVE:600:0:" . $config['max_port_speed'] . " \\\n      DS:OUTMULTICASTPKTS:DERIVE:600:0:" . $config['max_port_speed']);
 $this_port['rrd_update'] = array($this_port['ifInOctets'], $this_port['ifOutOctets'], $this_port['ifInErrors'], $this_port['ifOutErrors'], $this_port['ifInUcastPkts'], $this_port['ifOutUcastPkts'], $this_port['ifInNUcastPkts'], $this_port['ifOutNUcastPkts'], $this_port['ifInDiscards'], $this_port['ifOutDiscards'], $this_port['ifInUnknownProtos'], $this_port['ifInBroadcastPkts'], $this_port['ifOutBroadcastPkts'], $this_port['ifInMulticastPkts'], $this_port['ifOutMulticastPkts']);
 rrdtool_update($device, $rrdfile, $this_port['rrd_update']);
 // End Update IF-MIB
 // Update PAgP
 if ($this_port['pagpOperationMode'] || $port['pagpOperationMode']) {
     $log_event = array();
     foreach ($pagp_oids as $oid) {
         // Loop the OIDs
         if ($this_port[$oid] != $port[$oid]) {
             // If data has changed, build a query
             $port['update'][$oid] = $this_port[$oid];
             $log_event[] = "[{$oid}] " . $port[$oid] . " -> " . $this_port[$oid];
         }
     }
开发者ID:skive,项目名称:observium,代码行数:31,代码来源:ports.inc.php

示例7: get_port_rrdfilename

<?php

/**
 * Observium
 *
 *   This file is part of Observium.
 *
 * @package    observium
 * @subpackage graphs
 * @copyright  (C) 2006-2014 Adam Armstrong
 *
 */
$rrd_filename = get_port_rrdfilename($port, "adsl", TRUE);
$rrd_list[0]['filename'] = $rrd_filename;
$rrd_list[0]['descr'] = "Downstream";
$rrd_list[0]['ds'] = "AturCurrAtn";
$rrd_list[1]['filename'] = $rrd_filename;
$rrd_list[1]['descr'] = "Upstream";
$rrd_list[1]['ds'] = "AtucCurrAtn";
$unit_text = "dB";
$units = '';
$total_units = '';
$colours = 'mixed';
$scale_min = "0";
$nototal = 1;
if ($rrd_list) {
    include "includes/graphs/generic_multi_line.inc.php";
}
开发者ID:skive,项目名称:observium,代码行数:28,代码来源:adsl_attenuation.inc.php

示例8: rrdtool_create

    $rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/fdb_count.rrd";
    if (!is_file($rrd_file)) {
        rrdtool_create($rrd_file, "DS:value:GAUGE:600:0:U ");
    }
    rrdtool_update($rrd_file, "N:" . $fdb_count);
    $graphs['fdb_count'] = TRUE;
}
$fdbcount_module = 'enable_ports_fdbcount';
if ($attribs[$fdbcount_module] || $config[$fdbcount_module] && !isset($attribs[$fdbcount_module])) {
    foreach ($fdb_portcount as $port => $count) {
        $port_info = $port_table[$port];
        if (!$port_info) {
            echo "No entry in port table for {$port}\n";
            continue;
        }
        $rrd_file = get_port_rrdfilename($device, $port_info, "fdbcount");
        if (!is_file($rrd_file)) {
            rrdtool_create($rrd_file, "DS:value:GAUGE:600:0:U ");
        }
        rrdtool_update($rrd_file, "N:" . $count);
        $graphs['port_fdb_count'] = TRUE;
    }
}
// Loop the existing list and delete anything remaining
foreach ($fdbs_db as $vlan => $fdb_macs) {
    foreach ($fdb_macs as $mac => $data) {
        echo str_pad($vlan, 8) . " | " . str_pad($mac, 12) . " | " . str_pad($data['port_id'], 25) . " | " . str_pad($data['fdb_status'], 16);
        echo "-\n";
        dbDelete('vlans_fdb', '`device_id` = ? AND `vlan_id` = ? AND `mac_address` = ?', array($device['device_id'], $vlan, $mac));
    }
}
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:fdb-table.inc.php

示例9: array

<?php

/**
 * Observium
 *
 *   This file is part of Observium.
 *
 * @package    observium
 * @subpackage graphs
 * @copyright  (C) 2006-2014 Adam Armstrong
 *
 */
// Cycle through dot3stats OIDs and build list of RRAs to pass to multi simplex grapher
$oids = array('dot3StatsAlignmentErrors', 'dot3StatsFCSErrors', 'dot3StatsSingleCollisionFrames', 'dot3StatsMultipleCollisionFrames', 'dot3StatsSQETestErrors', 'dot3StatsDeferredTransmissions', 'dot3StatsLateCollisions', 'dot3StatsExcessiveCollisions', 'dot3StatsInternalMacTransmitErrors', 'dot3StatsCarrierSenseErrors', 'dot3StatsFrameTooLongs', 'dot3StatsInternalMacReceiveErrors', 'dot3StatsSymbolErrors');
$i = 0;
$rrd_filename = get_port_rrdfilename($port, "dot3", TRUE);
if (is_file($rrd_filename)) {
    foreach ($oids as $oid) {
        $oid = str_replace("dot3Stats", "", $oid);
        $oid_ds = truncate($oid, 19, '');
        $rrd_list[$i]['filename'] = $rrd_filename;
        $rrd_list[$i]['descr'] = $oid;
        $rrd_list[$i]['ds'] = $oid_ds;
        $i++;
    }
}
#} else { echo("file missing: $file");  }
$colours = "mixed";
$nototal = 1;
$unit_text = "Errors/sec";
$simple_rrd = 1;
开发者ID:skive,项目名称:observium,代码行数:31,代码来源:etherlike.inc.php

示例10: get_port_rrdfilename

if (1) {
    #  $rrd_list[1]['filename'] = get_port_rrdfilename($device, $port);
    #  $rrd_list[1]['descr'] = $int['ifDescr'];
    #  $rrd_list[1]['ds_in'] = "INNUCASTPKTS";
    #  $rrd_list[1]['ds_out'] = "OUTNUCASTPKTS";
    #  $rrd_list[1]['descr']   = "NonUnicast";
    #  $rrd_list[1]['colour_area_in'] = "BB77BB";
    #  $rrd_list[1]['colour_area_out'] = "FFDD88";
    $rrd_list[2]['filename'] = get_port_rrdfilename($device, $port);
    $rrd_list[2]['descr'] = $int['ifDescr'];
    $rrd_list[2]['ds_in'] = "INBROADCASTPKTS";
    $rrd_list[2]['ds_out'] = "OUTBROADCASTPKTS";
    $rrd_list[2]['descr'] = "Broadcast";
    $rrd_list[2]['colour_area_in'] = "905090";
    $rrd_list[2]['colour_area_out'] = "CCA514";
    $rrd_list[4]['filename'] = get_port_rrdfilename($device, $port);
    $rrd_list[4]['descr'] = $int['ifDescr'];
    $rrd_list[4]['ds_in'] = "INMULTICASTPKTS";
    $rrd_list[4]['ds_out'] = "OUTMULTICASTPKTS";
    $rrd_list[4]['descr'] = "Multicast";
    $rrd_list[4]['colour_area_in'] = "DC91DC";
    $rrd_list[4]['colour_area_out'] = "FFE940";
    $units = '';
    $units_descr = 'Packets/sec';
    $colours_in = 'purples';
    $multiplier = "1";
    $colours_out = 'oranges';
    $args['nototal'] = 1;
    $print_total = 0;
    $nototal = 1;
    include "includes/graphs/generic_multi_separated.inc.php";
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:nupkts.inc.php

示例11: delete_port

function delete_port($int_id, $delete_rrd = TRUE)
{
    global $config;
    $port = dbFetchRow("SELECT * FROM `ports`\n                      LEFT JOIN `devices` USING (`device_id`)\n                      WHERE `port_id` = ?", array($int_id));
    $ret = "> Deleted interface from " . $port['hostname'] . ": id={$int_id} (" . $port['ifDescr'] . ")\n";
    // Remove entities from common tables
    $deleted_entities = array();
    foreach ($config['entity_tables'] as $table) {
        $where = '`entity_type` = ?' . generate_query_values($int_id, 'entity_id');
        $table_status = dbDelete($table, $where, array('port'));
        if ($table_status) {
            $deleted_entities['port'] = 1;
        }
    }
    if (count($deleted_entities)) {
        $ret .= ' * Deleted common entity entries linked to port.' . PHP_EOL;
    }
    // FIXME, move to definitions
    $port_tables = array('eigrp_ports', 'ipv4_addresses', 'ipv6_addresses', 'ip_mac', 'juniAtmVp', 'mac_accounting', 'ospf_nbrs', 'ospf_ports', 'ports_adsl', 'ports_cbqos', 'ports_vlans', 'pseudowires', 'vlans_fdb', 'neighbours', 'ports');
    foreach ($port_tables as $table) {
        $table_status = dbDelete($table, "`port_id` = ?", array($int_id));
        if ($table_status) {
            $deleted_tables[] = $table;
        }
    }
    $table_status = dbDelete('ports_stack', "`port_id_high` = ?  OR `port_id_low` = ?", array($int_id, $int_id));
    if ($table_status) {
        $deleted_tables[] = 'ports_stack';
    }
    $table_status = dbDelete('entity_permissions', "`entity_type` = 'port' AND `entity_id` = ?", array($int_id));
    if ($table_status) {
        $deleted_tables[] = 'entity_permissions';
    }
    $table_status = dbDelete('alert_table', "`entity_type` = 'port' AND `entity_id` = ?", array($int_id));
    if ($table_status) {
        $deleted_tables[] = 'alert_table';
    }
    $table_status = dbDelete('group_table', "`entity_type` = 'port' AND `entity_id` = ?", array($int_id));
    if ($table_status) {
        $deleted_tables[] = 'group_table';
    }
    $ret .= ' * Deleted interface entries from tables: ' . implode(', ', $deleted_tables) . PHP_EOL;
    if ($delete_rrd) {
        $rrd_types = array('adsl', 'dot3', 'fdbcount', 'poe', NULL);
        foreach ($rrd_types as $type) {
            $rrdfile = get_port_rrdfilename($port, $type, TRUE);
            if (is_file($rrdfile)) {
                unlink($rrdfile);
                $deleted_rrds[] = $rrdfile;
            }
        }
        $ret .= ' * Deleted interface RRD files: ' . implode(', ', $deleted_rrds) . PHP_EOL;
    }
    return $ret;
}
开发者ID:Natolumin,项目名称:observium,代码行数:55,代码来源:functions.inc.php

示例12: generate_port_row


//.........这里部分代码省略.........
                        $string .= '&nbsp;' . overlib_link('', '<span class="label label-success">IPv6</span>', implode("<br />", $int_links_v6[$int_link]), NULL);
                    }
                    if ($int_links_v4[$int_link]) {
                        $string .= '&nbsp;' . overlib_link('', '<span class="label label-info">IPv4</span>', implode("<br />", $int_links_v4[$int_link]), NULL);
                    }
                    $br = "<br />";
                }
                // Output content of unknown links array (where ports don't exist in our database, or they weren't matched)
                foreach ($int_links_unknown as $int_link) {
                    // FIXME -- Expose platform and version here.
                    $string .= '<a data-alt="Directly connected" class="oicon-plug-connect"></a> ';
                    $string .= '<b><i>' . short_ifname($int_link['remote_port']) . '</i></b> on ';
                    $string .= '<i><b>' . generate_tooltip_link(NULL, $int_link['remote_hostname'], '<div class="small" style="max-width: 500px;"><b>' . $int_link['remote_platform'] . '</b><br />' . $int_link['remote_version'] . '</div>') . '</b></i>';
                    $string .= '<br />';
                }
            }
            if (!isset($cache['ports_option']['pseudowires']) || in_array($port['port_id'], $cache['ports_option']['pseudowires'])) {
                foreach (dbFetchRows("SELECT * FROM `pseudowires` WHERE `port_id` = ?", array($port['port_id'])) as $pseudowire) {
                    //`port_id`,`peer_device_id`,`peer_ldp_id`,`pwID`,`pwIndex`
                    #    $pw_peer_dev = dbFetchRow("SELECT * FROM `devices` WHERE `device_id` = ?", array($pseudowire['peer_device_id']));
                    $pw_peer_int = dbFetchRow("SELECT * FROM `ports` AS I, `pseudowires` AS P WHERE I.`device_id` = ? AND P.`pwID` = ? AND P.`port_id` = I.`port_id`", array($pseudowire['peer_device_id'], $pseudowire['pwID']));
                    #    $pw_peer_int = get_port_by_id_cache($pseudowire['peer_device_id']);
                    $pw_peer_dev = device_by_id_cache($pseudowire['peer_device_id']);
                    if (is_array($pw_peer_int)) {
                        humanize_port($pw_peer_int);
                        $string .= $br . '<i class="oicon-arrow-switch"></i> <strong>' . generate_port_link($pw_peer_int, $pw_peer_int['port_label_short']) . ' on ' . generate_device_link($pw_peer_dev, short_hostname($pw_peer_dev['hostname'])) . '</strong>';
                    } else {
                        $string .= $br . '<i class="oicon-arrow-switch"></i> <strong> VC ' . $pseudowire['pwID'] . ' on ' . $pseudowire['peer_addr'] . '</strong>';
                    }
                    $string .= ' <span class="label">' . $pseudowire['pwPsnType'] . '</span>';
                    $string .= ' <span class="label">' . $pseudowire['pwType'] . '</span>';
                    $br = "<br />";
                }
            }
            if (!isset($cache['ports_option']['ports_pagp']) || in_array($port['ifIndex'], $cache['ports_option']['ports_pagp'])) {
                foreach (dbFetchRows("SELECT * FROM `ports` WHERE `pagpGroupIfIndex` = ? AND `device_id` = ?", array($port['ifIndex'], $device['device_id'])) as $member) {
                    humanize_port($member);
                    $pagp[$device['device_id']][$port['ifIndex']][$member['ifIndex']] = TRUE;
                    $string .= $br . '<i class="oicon-arrow-join"></i> <strong>' . generate_port_link($member) . ' [PAgP]</strong>';
                    $br = "<br />";
                }
            }
            if ($port['pagpGroupIfIndex'] && $port['pagpGroupIfIndex'] != $port['ifIndex']) {
                $pagp[$device['device_id']][$port['pagpGroupIfIndex']][$port['ifIndex']] = TRUE;
                $parent = dbFetchRow("SELECT * FROM `ports` WHERE `ifIndex` = ? and `device_id` = ?", array($port['pagpGroupIfIndex'], $device['device_id']));
                humanize_port($parent);
                $string .= $br . '<i class="oicon-arrow-split"></i> <strong>' . generate_port_link($parent) . ' [PAgP]</strong>';
                $br = "<br />";
            }
            if (!isset($cache['ports_option']['ports_stack_low']) || in_array($port['ifIndex'], $cache['ports_option']['ports_stack_low'])) {
                foreach (dbFetchRows("SELECT * FROM `ports_stack` WHERE `port_id_low` = ? and `device_id` = ?", array($port['ifIndex'], $device['device_id'])) as $higher_if) {
                    if ($higher_if['port_id_high']) {
                        if ($pagp[$device['device_id']][$higher_if['port_id_high']][$port['ifIndex']]) {
                            continue;
                        }
                        // Skip if same PAgP port
                        $this_port = get_port_by_index_cache($device['device_id'], $higher_if['port_id_high']);
                        if (is_array($this_port)) {
                            $string .= $br . '<i class="oicon-arrow-split"></i> <strong>' . generate_port_link($this_port) . '</strong>';
                            $br = "<br />";
                        }
                    }
                }
            }
            if (!isset($cache['ports_option']['ports_stack_high']) || in_array($port['ifIndex'], $cache['ports_option']['ports_stack_high'])) {
                foreach (dbFetchRows("SELECT * FROM `ports_stack` WHERE `port_id_high` = ? and `device_id` = ?", array($port['ifIndex'], $device['device_id'])) as $lower_if) {
                    if ($lower_if['port_id_low']) {
                        if ($pagp[$device['device_id']][$port['ifIndex']][$lower_if['port_id_low']]) {
                            continue;
                        }
                        // Skip if same PAgP ports
                        $this_port = get_port_by_index_cache($device['device_id'], $lower_if['port_id_low']);
                        if (is_array($this_port)) {
                            $string .= $br . '<i class="oicon-arrow-join"></i> <strong>' . generate_port_link($this_port) . '</strong>';
                            $br = "<br />";
                        }
                    }
                }
            }
            unset($int_links, $int_links_v6, $int_links_v4, $int_links_phys, $br);
            $string .= '</td></tr>';
        }
    }
    // End Detailed View
    // If we're showing graphs, generate the graph and print the img tags
    if ($vars['graph'] == "etherlike") {
        $graph_file = get_port_rrdfilename($port, "dot3", TRUE);
    } else {
        $graph_file = get_port_rrdfilename($port, NULL, TRUE);
    }
    if ($vars['graph'] && is_file($graph_file)) {
        $string .= '<tr><td colspan="' . $table_cols . '">';
        $graph_array['to'] = $config['time']['now'];
        $graph_array['id'] = $port['port_id'];
        $graph_array['type'] = 'port_' . $vars['graph'];
        $string .= generate_graph_row($graph_array);
        $string .= '</td></tr>';
    }
    return $string;
}
开发者ID:Natolumin,项目名称:observium,代码行数:101,代码来源:port.inc.php

示例13: get_port_rrdfilename

# adslAtucPerfLofs.1 = 0
# adslAtucPerfLoss.1 = 0
# adslAtucPerfLols.1 = 0
# adslAtucPerfLprs.1 = 0
# adslAtucPerfESs.1 = 0
# adslAtucPerfInits.1 = 1
# adslAtucPerfValidIntervals.1 = 0
# adslAtucPerfInvalidIntervals.1 = 0
# adslAturPerfLoss.1 = 0 seconds
# adslAturPerfESs.1 = 0 seconds
# adslAturPerfValidIntervals.1 = 0
# adslAturPerfInvalidIntervals.1 = 0
if (isset($port_stats[$port['ifIndex']]['adslLineCoding'])) {
    // Check to make sure Port data is cached.
    $this_port =& $port_stats[$port['ifIndex']];
    $rrdfile = get_port_rrdfilename($port, "adsl");
    $rrd_create = " DS:AtucCurrSnrMgn:GAUGE:600:0:635";
    $rrd_create .= " DS:AtucCurrAtn:GAUGE:600:0:635";
    $rrd_create .= " DS:AtucCurrOutputPwr:GAUGE:600:0:635";
    $rrd_create .= " DS:AtucCurrAttainableR:GAUGE:600:0:U";
    $rrd_create .= " DS:AtucChanCurrTxRate:GAUGE:600:0:U";
    $rrd_create .= " DS:AturCurrSnrMgn:GAUGE:600:0:635";
    $rrd_create .= " DS:AturCurrAtn:GAUGE:600:0:635";
    $rrd_create .= " DS:AturCurrOutputPwr:GAUGE:600:0:635";
    $rrd_create .= " DS:AturCurrAttainableR:GAUGE:600:0:U";
    $rrd_create .= " DS:AturChanCurrTxRate:GAUGE:600:0:U";
    $rrd_create .= " DS:AtucPerfLofs:COUNTER:600:U:100000000000";
    $rrd_create .= " DS:AtucPerfLoss:COUNTER:600:U:100000000000";
    $rrd_create .= " DS:AtucPerfLprs:COUNTER:600:U:100000000000";
    $rrd_create .= " DS:AtucPerfESs:COUNTER:600:U:100000000000";
    $rrd_create .= " DS:AtucPerfInits:COUNTER:600:U:100000000000";
开发者ID:skive,项目名称:observium,代码行数:31,代码来源:port-adsl.inc.php

示例14: get_port_rrdfilename

<?php

/**
 * Observium
 *
 *   This file is part of Observium.
 *
 * @package    observium
 * @subpackage graphs
 * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
 *
 */
$scale_min = 0;
include_once $config['html_dir'] . '/includes/graphs/common.inc.php';
$rrd = get_port_rrdfilename($port, 'fdbcount', TRUE);
if (is_file($rrd)) {
    $rrd_filename = $rrd;
}
$ds = 'value';
$colour_area = 'EEEEEE';
$colour_line = '36393D';
$colour_area_max = 'FFEE99';
$unit_text = 'MACs';
$unit_integer = TRUE;
$line_text = 'Count';
include_once $config['html_dir'] . '/includes/graphs/generic_simplex.inc.php';
// EOF
开发者ID:Natolumin,项目名称:observium,代码行数:27,代码来源:fdb_count.inc.php

示例15: get_port_by_index_cache

        if ($lower_if['port_id_low']) {
            if ($pagp[$device['device_id']][$port['ifIndex']][$lower_if['port_id_low']]) {
                continue;
            }
            // Skip if same PAgP ports
            $this_port = get_port_by_index_cache($device['device_id'], $lower_if['port_id_low']);
            if (is_array($this_port)) {
                echo $br . '<i class="oicon-arrow-join"></i> <strong>' . generate_port_link($this_port) . "</strong>";
                $br = "<br />";
            }
        }
    }
}
unset($int_links, $int_links_v6, $int_links_v4, $int_links_phys, $br);
echo "</td></tr>";
// If we're showing graphs, generate the graph and print the img tags
if ($graph_type == "etherlike") {
    $graph_file = get_port_rrdfilename($device, $port, "dot3");
} else {
    $graph_file = get_port_rrdfilename($device, $port);
}
if ($graph_type && is_file($graph_file)) {
    $type = $graph_type;
    echo "<tr><td colspan=9>";
    $graph_array['to'] = $config['time']['now'];
    $graph_array['id'] = $port['port_id'];
    $graph_array['type'] = $graph_type;
    print_graph_row($graph_array);
    echo "</td></tr>";
}
// EOF
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:print-interface.inc.php


注:本文中的get_port_rrdfilename函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。