• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP strip_domainname函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: graph_haproxy_requests_report

function graph_haproxy_requests_report(&$rrdtool_graph)
{
    global $context, $cpu_num_color, $cpu_user_color, $hostname, $load_one_color, $num_nodes_color, $proc_run_color, $mem_swapped_color, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $title = 'HAProxy Requests';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['vertical-label'] = 'Requests';
    $rrdtool_graph['extras'] = '--rigid';
    if (file_exists("{$rrd_dir}/lb_total_current_sess.rrd")) {
        $series = "DEF:'haproxy_current_sessions'='{$rrd_dir}/lb_total_current_sess.rrd':'sum':AVERAGE ";
        $series .= "DEF:'haproxy_req_per_s'='{$rrd_dir}/lb_total_req_per_s.rrd':'sum':AVERAGE ";
        $series .= "LINE2:'haproxy_req_per_s'#{$cpu_num_color}:'Requests/sec' ";
        $series .= "LINE2:'haproxy_current_sessions'#{$proc_run_color}:'Sessions' ";
    } else {
        # If there are no Passenger metrics put something so that the report doesn't barf
        $series = "DEF:'cpu_num'='{$rrd_dir}/cpu_num.rrd':'sum':AVERAGE ";
        $series .= "LINE2:'cpu_num'#{$mem_swapped_color}:'HAProxy metrics not collected' ";
    }
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:rikh42,项目名称:cookbooks,代码行数:29,代码来源:haproxy_requests_report.php


示例2: graph_varnish_report

function graph_varnish_report(&$rrdtool_graph)
{
    global $conf, $context, $range, $rrd_dir, $size;
    $title = 'Varnish Report';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = strip_domainname($GLOBALS['hostname']) . " {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['vertical-label'] = 'req_per_sec';
    $rrdtool_graph['extras'] = '--rigid';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    if ($conf['graphreport_stats']) {
        $rrdtool_graph['height'] += $size == 'medium' ? 16 : 0;
        $rmspace = '\\g';
    } else {
        $rmspace = '';
    }
    if ($context != "host") {
        /* If we are not in a host context, then we need to calculate the average */
        $rrdtool_graph['series'] = "DEF:'num_nodes'='{$rrd_dir}/varnish_200.rrd':'num':AVERAGE " . "DEF:'varnish_200'='{$rrd_dir}/varnish_200.rrd':'sum':AVERAGE " . "CDEF:'cvarnish_200'=varnish_200,num_nodes,/ " . "DEF:'varnish_300'='{$rrd_dir}/varnish_300.rrd':'sum':AVERAGE " . "CDEF:'cvarnish_300'=varnish_300,num_nodes,/ " . "DEF:'varnish_400'='{$rrd_dir}/varnish_400.rrd':'sum':AVERAGE " . "CDEF:'cvarnish_400'=varnish_400,num_nodes,/ " . "DEF:'varnish_500'='{$rrd_dir}/varnish_500.rrd':'sum':AVERAGE " . "CDEF:'cvarnish_500'=varnish_500,num_nodes,/ " . "DEF:'varnish_other'='{$rrd_dir}/varnish_other.rrd':'sum':AVERAGE " . "AREA:'varnish_200'#{$conf['cpu_user_color']}:'200' " . "STACK:'varnish_300'#{$conf['cpu_nice_color']}:'300' " . "STACK:'varnish_400'#{$conf['cpu_system_color']}:'400' " . "STACK:'varnish_500'#{$conf['cpu_wio_color']}:'500' " . "STACK:'varnish_other'#{$conf['cpu_idle_color']}:'other' " . "LINE2:'varnish_unique_users'#{$conf['mem_swapped_color']}:'Unique IPs' ";
    } else {
        $rrdtool_graph['series'] = "DEF:'varnish_200'='{$rrd_dir}/varnish_200.rrd':'sum':AVERAGE " . "DEF:'varnish_300'='{$rrd_dir}/varnish_300.rrd':'sum':AVERAGE " . "DEF:'varnish_400'='{$rrd_dir}/varnish_400.rrd':'sum':AVERAGE " . "DEF:'varnish_500'='{$rrd_dir}/varnish_500.rrd':'sum':AVERAGE " . "AREA:'varnish_200'#{$conf['cpu_user_color']}:'200' " . "STACK:'varnish_300'#{$conf['cpu_nice_color']}:'300' " . "STACK:'varnish_400'#{$conf['cpu_system_color']}:'400' " . "STACK:'varnish_500'#{$conf['cpu_wio_color']}:'500' ";
    }
    #################################################################################
    # If there are no Apache metrics put something so that the report doesn't barf
    # I am using the CPU number metric since that one should always be there.
    #################################################################################
    if (!file_exists("{$rrd_dir}/varnish_200.rrd")) {
        $rrdtool_graph['series'] = "DEF:'cpu_num'='{$rrd_dir}/cpu_num.rrd':'sum':AVERAGE " . "LINE2:'cpu_num'#{$conf['mem_swapped_color']}:'Varnish metrics not collected' ";
    }
    return $rrdtool_graph;
}
开发者ID:fjpqzm,项目名称:ganglia-web,代码行数:34,代码来源:varnish_report.php


示例3: graph_procstat_mem_report

function graph_procstat_mem_report(&$rrdtool_graph)
{
    global $context, $hostname, $graph_var, $range, $rrd_dir, $size, $strip_domainname;
    $rainbow = array('008000', '0000FF', 'FF0000', 'FFEA00', '9900CC', '00FF00', '00FFFF', 'FF00FF', '808000', '008080', '808080', '000000');
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Process Memory Usage';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['vertical-label'] = 'Bytes';
    $rrdtool_graph['extras'] = '--rigid --base 1024';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $series = '';
    foreach (explode(',', $graph_var) as $k => $proc) {
        $color = $rainbow[$k % count($rainbow)];
        $series .= "DEF:'{$proc}'='{$rrd_dir}/procstat_{$proc}_mem.rrd':'sum':AVERAGE " . "CDEF:'{$proc}_bytes'={$proc},1024,* " . "LINE2:'{$proc}_bytes'#{$color}:'{$proc}' ";
    }
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:kuanbiao,项目名称:gmond_python_modules,代码行数:25,代码来源:procstat_mem_report.php


示例4: graph_passenger_memory_stats_report

function graph_passenger_memory_stats_report(&$rrdtool_graph)
{
    global $context, $cpu_num_color, $cpu_user_color, $hostname, $load_one_color, $num_nodes_color, $proc_run_color, $mem_swapped_color, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $title = 'Passenger Memory Stats';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['vertical-label'] = 'MB';
    $rrdtool_graph['extras'] = '--base 1024 --rigid';
    if (file_exists("{$rrd_dir}/passenger_avg_memory.rrd")) {
        $series = "DEF:'passenger_avg_memory'='{$rrd_dir}/passenger_avg_memory.rrd':'sum':AVERAGE " . "DEF:'passenger_total_memory'='{$rrd_dir}/passenger_total_memory.rrd':'sum':AVERAGE ";
        $series .= "LINE2:'passenger_avg_memory'#{$proc_run_color}:'AVG Memory per Passenger' ";
        $series .= "LINE2:'passenger_total_memory'#{$cpu_num_color}:'Total Memory' ";
    } else {
        # If there are no Passenger metrics put something so that the report doesn't barf
        $series = "DEF:'cpu_num'='{$rrd_dir}/cpu_num.rrd':'sum':AVERAGE ";
        $series .= "LINE2:'cpu_num'#{$mem_swapped_color}:'Passenger metrics not collected' ";
    }
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:rikh42,项目名称:cookbooks,代码行数:28,代码来源:passenger_memory_stats_report.php


示例5: graph_sample_report

function graph_sample_report(&$rrdtool_graph)
{
    /*
     * this is just the cpu_report (from revision r920) as an example, but
     * with extra comments
     */
    // pull in a number of global variables, many set in conf.php (such as colors)
    // but other from elsewhere, such as get_context.php
    global $conf, $context, $range, $rrd_dir, $size;
    if ($conf['strip_domainname']) {
        $hostname = strip_domainname($GLOBALS['hostname']);
    } else {
        $hostname = $GLOBALS['hostname'];
    }
    //
    // You *MUST* set at least the 'title', 'vertical-label', and 'series'
    // variables otherwise, the graph *will not work*.
    //
    $title = 'Sample';
    if ($context != 'host') {
        //  This will be turned into: "Clustername $TITLE last $timerange",
        //  so keep it short
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['vertical-label'] = 'Sample Percent';
    // Fudge to account for number of lines in the chart legend
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $rrdtool_graph['upper-limit'] = '100';
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['extras'] = '--rigid';
    /*
     * Here we actually build the chart series.  This is moderately complicated
     * to show off what you can do.  For a simpler example, look at
     * network_report.php
     */
    if ($context != "host") {
        /*
         * If we are not in a host context, then we need to calculate
         * the average
         */
        $series = "'DEF:num_nodes={$rrd_dir}/cpu_user.rrd:num:AVERAGE' " . "'DEF:cpu_user={$rrd_dir}/cpu_user.rrd:sum:AVERAGE' " . "'CDEF:ccpu_user=cpu_user,num_nodes,/' " . "'DEF:cpu_nice={$rrd_dir}/cpu_nice.rrd:sum:AVERAGE' " . "'CDEF:ccpu_nice=cpu_nice,num_nodes,/' " . "'DEF:cpu_system={$rrd_dir}/cpu_system.rrd:sum:AVERAGE' " . "'CDEF:ccpu_system=cpu_system,num_nodes,/' " . "'DEF:cpu_idle={$rrd_dir}/cpu_idle.rrd:sum:AVERAGE' " . "'CDEF:ccpu_idle=cpu_idle,num_nodes,/' " . "'AREA:ccpu_user#{$conf['cpu_user_color']}:User CPU' " . "'STACK:ccpu_nice#{$conf['cpu_nice_color']}:Nice CPU' " . "'STACK:ccpu_system#{$conf['cpu_system_color']}:System CPU' ";
        if (file_exists("{$rrd_dir}/cpu_wio.rrd")) {
            $series .= "'DEF:cpu_wio={$rrd_dir}/cpu_wio.rrd:sum:AVERAGE' " . "'CDEF:ccpu_wio=cpu_wio,num_nodes,/' " . "'STACK:ccpu_wio#{$conf['cpu_wio_color']}:WAIT CPU' ";
        }
        $series .= "'STACK:ccpu_idle#{$conf['cpu_idle_color']}:Idle CPU' ";
    } else {
        // Context is not "host"
        $series = "'DEF:cpu_user={$rrd_dir}/cpu_user.rrd:sum:AVERAGE' " . "'DEF:cpu_nice={$rrd_dir}/cpu_nice.rrd:sum:AVERAGE' " . "'DEF:cpu_system={$rrd_dir}/cpu_system.rrd:sum:AVERAGE' " . "'DEF:cpu_idle={$rrd_dir}/cpu_idle.rrd:sum:AVERAGE' " . "'AREA:cpu_user#{$conf['cpu_user_color']}:User CPU' " . "'STACK:cpu_nice#{$conf['cpu_nice_color']}:Nice CPU' " . "'STACK:cpu_system#{$conf['cpu_system_color']}:System CPU' ";
        if (file_exists("{$rrd_dir}/cpu_wio.rrd")) {
            $series .= "'DEF:cpu_wio={$rrd_dir}/cpu_wio.rrd:sum:AVERAGE' ";
            $series .= "'STACK:cpu_wio#{$conf['cpu_wio_color']}:WAIT CPU' ";
        }
        $series .= "'STACK:cpu_idle#{$conf['cpu_idle_color']}:Idle CPU' ";
    }
    // We have everything now, so add it to the array, and go on our way.
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:fjpqzm,项目名称:ganglia-web,代码行数:60,代码来源:sample_report.php


示例6: graph_gpu_core_speed_report

function graph_gpu_core_speed_report(&$rrdtool_graph)
{
    global $context, $hostname, $mem_cached_color, $mem_used_color, $mem_swapped_color, $cpu_num_color, $range, $rrd_dir, $size, $strip_domainname;
    if (!file_exists("{$rrd_dir}/gpu_num.rrd")) {
        return;
    }
    if (!file_exists("{$rrd_dir}/gpu0_core_speed.rrd")) {
        return;
    }
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'GPU Core Speed';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['vertical-label'] = 'MHz';
    $rrdtool_graph['extras'] = '--rigid --base 1024';
    $color = array($mem_cached_color, $mem_used_color, $mem_swapped_color, $cpu_num_color);
    $gpu_count = exec("find {$rrd_dir}/gpu?_core_speed.rrd | wc -l");
    $series = '';
    foreach (range(0, $gpu_count - 1) as $i) {
        $series .= "DEF:'gpu{$i}'='{$rrd_dir}/gpu{$i}_core_speed.rrd':'sum':AVERAGE ";
    }
    foreach (range(0, $gpu_count - 1) as $i) {
        $series .= "LINE2:'gpu{$i}'#{$color[$i]}:'gpu{$i}' ";
    }
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:npinto,项目名称:gmond_python_modules,代码行数:34,代码来源:gpu_core_speed_report.php


示例7: graph_nginx_status_report

function graph_nginx_status_report(&$rrdtool_graph)
{
    global $context, $cpu_num_color, $cpu_user_color, $hostname, $load_one_color, $num_nodes_color, $proc_run_color, $mem_swapped_color, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $rrdtool_graph['height'] += $size == 'medium' ? 14 : 0;
    $title = 'Nginx Connections';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['vertical-label'] = 'Connections';
    $rrdtool_graph['extras'] = '--rigid';
    if (file_exists("{$rrd_dir}/nginx_active_connections.rrd")) {
        $series = "DEF:'nginx_active_connections'='{$rrd_dir}/nginx_active_connections.rrd':'sum':AVERAGE ";
        $series .= "DEF:'nginx_reading'='{$rrd_dir}/nginx_reading.rrd':'sum':AVERAGE ";
        $series .= "DEF:'nginx_writing'='{$rrd_dir}/nginx_writing.rrd':'sum':AVERAGE ";
        $series .= "DEF:'nginx_waiting'='{$rrd_dir}/nginx_waiting.rrd':'sum':AVERAGE ";
        $series .= "LINE2:'nginx_active_connections'#{$cpu_num_color}:'Active Connections' ";
        $series .= "LINE2:'nginx_reading'#{$proc_run_color}:'Reading Connections' ";
        $series .= "LINE2:'nginx_writing'#33FF11:'Writing Connections' ";
        $series .= "LINE2:'nginx_waiting'#{$load_one_color}:'Waiting Connections' ";
    } else {
        # If there are no Nginx metrics put something so that the report doesn't barf
        $series = "DEF:'cpu_num'='{$rrd_dir}/cpu_num.rrd':'sum':AVERAGE ";
        $series .= "LINE2:'cpu_num'#{$mem_swapped_color}:'Nginx metrics not collected' ";
    }
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:rikh42,项目名称:cookbooks,代码行数:33,代码来源:nginx_status_report.php


示例8: graph_network_report

function graph_network_report(&$rrdtool_graph)
{
    global $context, $hostname, $mem_cached_color, $mem_used_color, $cpu_num_color, $range, $rrd_dir, $size, $strip_domainname, $graphreport_stats;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Network';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    if ($graphreport_stats) {
        $rrdtool_graph['height'] += $size == 'medium' ? 52 : 0;
        $rmspace = '\\g';
    } else {
        $rmspace = '';
    }
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} Network last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['vertical-label'] = 'Bytes/sec';
    $rrdtool_graph['extras'] = '--base 1024';
    $rrdtool_graph['extras'] .= $graphreport_stats == true ? ' --font LEGEND:7' : '';
    if ($size == 'small') {
        $eol1 = '\\l';
        $space1 = ' ';
        $space2 = '      ';
    } else {
        if ($size == 'medium' || $size == 'default') {
            $eol1 = '';
            $space1 = ' ';
            $space2 = '';
        } else {
            if ($size == 'large') {
                $eol1 = '';
                $space1 = '                ';
                $space2 = '                ';
            }
        }
    }
    $series = "DEF:'bytes_in'='{$rrd_dir}/bytes_in.rrd':'sum':AVERAGE " . "DEF:'bytes_out'='{$rrd_dir}/bytes_out.rrd':'sum':AVERAGE " . "LINE2:'bytes_in'#{$mem_cached_color}:'In{$rmspace}' ";
    if ($graphreport_stats) {
        $series .= "CDEF:bytesin_pos=bytes_in,0,INF,LIMIT " . "VDEF:bytesin_last=bytesin_pos,LAST " . "VDEF:bytesin_min=bytesin_pos,MINIMUM " . "VDEF:bytesin_avg=bytesin_pos,AVERAGE " . "VDEF:bytesin_max=bytesin_pos,MAXIMUM " . "GPRINT:'bytesin_last':' {$space1}Now\\:%6.1lf%s' " . "GPRINT:'bytesin_min':'{$space1}Min\\:%6.1lf%s{$eol1}' " . "GPRINT:'bytesin_avg':'{$space2}Avg\\:%6.1lf%s' " . "GPRINT:'bytesin_max':'{$space1}Max\\:%6.1lf%s\\l' ";
    }
    $series .= "LINE2:'bytes_out'#{$mem_used_color}:'Out{$rmspace}' ";
    if ($graphreport_stats) {
        $series .= "CDEF:bytesout_pos=bytes_out,0,INF,LIMIT " . "VDEF:bytesout_last=bytesout_pos,LAST " . "VDEF:bytesout_min=bytesout_pos,MINIMUM " . "VDEF:bytesout_avg=bytesout_pos,AVERAGE " . "VDEF:bytesout_max=bytesout_pos,MAXIMUM " . "GPRINT:'bytesout_last':'{$space1}Now\\:%6.1lf%s' " . "GPRINT:'bytesout_min':'{$space1}Min\\:%6.1lf%s{$eol1}' " . "GPRINT:'bytesout_avg':'{$space2}Avg\\:%6.1lf%s' " . "GPRINT:'bytesout_max':'{$space1}Max\\:%6.1lf%s\\l' ";
    }
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:app-genesis,项目名称:ganglia,代码行数:51,代码来源:network_report.php


示例9: graph_apache_response_time_report

function graph_apache_response_time_report( &$rrdtool_graph ) {

    global $context,
           $cpu_num_color,
           $cpu_user_color,
           $hostname,
           $load_one_color,
           $num_nodes_color,
           $proc_run_color,
           $mem_swapped_color,
           $range,
           $rrd_dir,
           $size,
           $strip_domainname;

    if ($strip_domainname) {
       $hostname = strip_domainname($hostname);
    }

    $rrdtool_graph['height'] += ($size == 'medium') ? 28 : 0;
    $title = 'Apache Resp Times';
    if ($context != 'host') {
       $rrdtool_graph['title'] = $title;
    } else {
       $rrdtool_graph['title'] = "$hostname $title last $range";
    }
    $rrdtool_graph['lower-limit']    = '0';
    $rrdtool_graph['vertical-label'] = 'seconds';
    $rrdtool_graph['extras']         = '--rigid';


    if ( file_exists("$rrd_dir/apache_90th_dur.rrd")) {

      $series = "DEF:'apache_90th_dur'='${rrd_dir}/apache_90th_dur.rrd':'sum':AVERAGE ";
      $series .="DEF:'apache_avg_dur'='${rrd_dir}/apache_avg_dur.rrd':'sum':AVERAGE ";

      $series .="LINE2:'apache_90th_dur'#$cpu_num_color:'90th duration' ";
      $series .="LINE2:'apache_avg_dur'#$proc_run_color:'AVG duration' ";

    } else {
       # If there are no Apache metrics put something so that the report doesn't barf
       $series  = "DEF:'cpu_num'='${rrd_dir}/cpu_num.rrd':'sum':AVERAGE ";
       $series .= "LINE2:'cpu_num'#$mem_swapped_color:'Apache metrics not collected' ";
    }

    $rrdtool_graph['series'] = $series;

    return $rrdtool_graph;

}
开发者ID:ravibhure,项目名称:cookbooks-1,代码行数:50,代码来源:apache_response_time_report.php


示例10: graph_gpu_power_violation_report

function graph_gpu_power_violation_report(&$rrdtool_graph)
{
    global $context, $hostname, $mem_shared_color, $mem_cached_color, $mem_buffered_color, $mem_swapped_color, $mem_used_color, $cpu_num_color, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $dIndex = $rrdtool_graph["arguments"]["dindex"];
    $title = 'GPU' . $dIndex . ' Power Violation';
    $rrdtool_graph['title'] = $title;
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['vertical-label'] = '% Violation';
    $rrdtool_graph['extras'] = '--rigid --base 1024';
    $series = "DEF:'gpu_power_violation'='{$rrd_dir}/gpu" . $dIndex . "_power_violation_report.rrd':'sum':AVERAGE " . "LINE2:'gpu_power_violation'#555555:'GPU" . $dIndex . "  Power Violation' " . "CDEF:nice_pos=gpu_power_violation,0,INF,LIMIT " . "VDEF:nice_last=nice_pos,LAST " . "VDEF:nice_min=nice_pos,MINIMUM " . "VDEF:nice_avg=nice_pos,AVERAGE " . "VDEF:nice_max=nice_pos,MAXIMUM " . "GPRINT:'nice_last':' Now\\:%5.0lf' " . "GPRINT:'nice_min':' Min\\:%5.0lf\\l' " . "GPRINT:'nice_avg':' Avg\\:%5.0lf ' " . "GPRINT:'nice_max':' Max\\:%5.0lf\\l' ";
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:kuanbiao,项目名称:gmond_python_modules,代码行数:16,代码来源:gpu_power_violation_report.php


示例11: graph_mysql_temporary_objects_report

function graph_mysql_temporary_objects_report(&$rrdtool_graph)
{
    global $context, $hostname, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Mysql Temporary Objects';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['extras'] = '--rigid';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $series = "DEF:'tables'='{$rrd_dir}/mysql_created_tmp_tables.rrd':'sum':AVERAGE " . "DEF:'disk_tables'='{$rrd_dir}/mysql_created_tmp_disk_tables.rrd':'sum':AVERAGE " . "DEF:'files'='{$rrd_dir}/mysql_created_tmp_files.rrd':'sum':AVERAGE " . "AREA:'tables'#FFAB00:'Temp Tables' " . "LINE:'tables'#837C04:'' " . "LINE:'disk_tables'#F51D30:'Temp Disk Tables' " . "LINE:'files'#157419:'Temp Files' ";
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:kuanbiao,项目名称:gmond_python_modules,代码行数:19,代码来源:mysql_temporary_objects_report.php


示例12: graph_mysql_qcache_report

function graph_mysql_qcache_report(&$rrdtool_graph)
{
    global $context, $hostname, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Mysql Query Cache';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['extras'] = '--rigid';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $series = "DEF:'hits'='{$rrd_dir}/mysql_qcache_hits.rrd':'sum':AVERAGE " . "DEF:'inserts'='{$rrd_dir}/mysql_qcache_inserts.rrd':'sum':AVERAGE " . "DEF:'not_cached'='{$rrd_dir}/mysql_qcache_not_cached.rrd':'sum':AVERAGE " . "DEF:'lowmem_prunes'='{$rrd_dir}/mysql_qcache_lowmem_prunes.rrd':'sum':AVERAGE " . "AREA:'hits'#EAAF00:'Hits' " . "STACK:'inserts'#157419:'Inserts' " . "STACK:'not_cached'#00A0C1:'Not Cached' " . "STACK:'lowmem_prunes'#FF0000:'Low-Memory Prunes' ";
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:caozhenqiang,项目名称:gmond_python_modules,代码行数:19,代码来源:mysql_qcache_report.php


示例13: graph_mysql_query_report

function graph_mysql_query_report(&$rrdtool_graph)
{
    global $context, $hostname, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Mysql Query Report';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['extras'] = '--rigid';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $series = "DEF:'questions'='{$rrd_dir}/mysql_questions.rrd':'sum':AVERAGE " . "DEF:'qc_hits'='{$rrd_dir}/mysql_qcache_hits.rrd':'sum':AVERAGE " . "DEF:'select'='{$rrd_dir}/mysql_com_select.rrd':'sum':AVERAGE " . "DEF:'insert'='{$rrd_dir}/mysql_com_insert.rrd':'sum':AVERAGE " . "DEF:'update'='{$rrd_dir}/mysql_com_update.rrd':'sum':AVERAGE " . "DEF:'replace'='{$rrd_dir}/mysql_com_replace.rrd':'sum':AVERAGE " . "DEF:'delete'='{$rrd_dir}/mysql_com_delete.rrd':'sum':AVERAGE " . "AREA:'questions'#CCCCCC:'Questions' " . "AREA:'select'#0000FF:'Select' " . "STACK:'delete'#FF0000:'Delete' " . "STACK:'insert'#00FFFF:'Insert' " . "STACK:'update'#FF00FF:'Update' " . "STACK:'replace'#2175D9:'Replace' " . "STACK:'qc_hits'#00FF00:'QC Hits' " . "LINE:'questions'#00000033:'' ";
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:caozhenqiang,项目名称:gmond_python_modules,代码行数:19,代码来源:mysql_query_report.php


示例14: graph_mysql_innodb_io_report

function graph_mysql_innodb_io_report(&$rrdtool_graph)
{
    global $context, $hostname, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Mysql InnoDB I/O';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['extras'] = '--rigid';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $series = "DEF:'file_reads'='{$rrd_dir}/mysql_innodb_data_reads.rrd':'sum':AVERAGE " . "DEF:'file_writes'='{$rrd_dir}/mysql_innodb_data_writes.rrd':'sum':AVERAGE " . "DEF:'file_syncs'='{$rrd_dir}/mysql_innodb_data_fsyncs.rrd':'sum':AVERAGE " . "DEF:'log_writes'='{$rrd_dir}/mysql_innodb_log_writes.rrd':'sum':AVERAGE " . "LINE2:'file_reads'#ED7600:'File Reads' " . "LINE2:'file_writes'#157419:'File Writes' " . "LINE2:'file_syncs'#4444FF:'File Syncs' " . "LINE2:'log_writes'#DA4725:'Log Writes' ";
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:kuanbiao,项目名称:gmond_python_modules,代码行数:19,代码来源:mysql_innodb_io_report.php


示例15: graph_mysql_innodb_bp_activity_report

function graph_mysql_innodb_bp_activity_report(&$rrdtool_graph)
{
    global $context, $hostname, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Mysql InnoDB Buffer Pool Activity';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['extras'] = '--rigid';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $series = "DEF:'created'='{$rrd_dir}/mysql_innodb_pages_created.rrd':'sum':AVERAGE " . "DEF:'read'='{$rrd_dir}/mysql_innodb_pages_read.rrd':'sum':AVERAGE " . "DEF:'written'='{$rrd_dir}/mysql_innodb_pages_written.rrd':'sum':AVERAGE " . "AREA:'created'#FFAB00:'Pages Created' " . "STACK:'read'#D8ACE0:'Pages Read' " . "STACK:'written'#7CB3F1:'Pages Written' " . "LINE:'0'#5291D3:'':STACK ";
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:kuanbiao,项目名称:gmond_python_modules,代码行数:19,代码来源:mysql_innodb_bp_activity_report.php


示例16: graph_mysql_connections_report

function graph_mysql_connections_report(&$rrdtool_graph)
{
    global $context, $hostname, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Mysql Connections';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['extras'] = '--rigid';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $series = "DEF:'max_used_connections'='{$rrd_dir}/mysql_max_used_connections.rrd':'sum':AVERAGE " . "DEF:'max_connections'='{$rrd_dir}/mysql_max_connections.rrd':'sum':AVERAGE " . "DEF:'aborted_clients'='{$rrd_dir}/mysql_aborted_clients.rrd':'sum':AVERAGE " . "DEF:'aborted_connects'='{$rrd_dir}/mysql_aborted_connects.rrd':'sum':AVERAGE " . "DEF:'threads_connected'='{$rrd_dir}/mysql_threads_connected.rrd':'sum':AVERAGE " . "DEF:'connections'='{$rrd_dir}/mysql_connections.rrd':'sum':AVERAGE " . "AREA:'max_connections'#C0C0C0:'Max Connections' " . "LINE:'max_connections'#00000033:'' " . "AREA:'max_used_connections'#FFD660:'Max Used Connections' " . "LINE:'max_used_connections'#00000033:'' " . "LINE2:'aborted_clients'#FF3932:'Aborted Clients' " . "LINE2:'aborted_connects'#00FF00:'Aborted Connects' " . "LINE2:'threads_connected'#FF7D00:'Threads Connected' " . "LINE2:'connections'#4444FF:'New Connections' ";
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:caozhenqiang,项目名称:gmond_python_modules,代码行数:19,代码来源:mysql_connections_report.php


示例17: graph_nginx_accepts_ratio_report

function graph_nginx_accepts_ratio_report(&$rrdtool_graph)
{
    global $context, $hostname, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Nginx Accepts Ratio';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['extras'] = '--rigid';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $series = "DEF:'accepts'='{$rrd_dir}/nginx_accepts.rrd':'sum':AVERAGE " . "DEF:'handled'='{$rrd_dir}/nginx_handled.rrd':'sum':AVERAGE " . "DEF:'requests'='{$rrd_dir}/nginx_requests.rrd':'sum':AVERAGE " . "CDEF:'handled_ratio'='accepts,handled,/' " . "CDEF:'requests_ratio'='requests,accepts,/' " . "LINE2:'handled_ratio'#850707:'Accepted / Handled' " . "LINE2:'requests_ratio'#D1642E:'Requests / Accepted' ";
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:kuanbiao,项目名称:gmond_python_modules,代码行数:19,代码来源:nginx_accepts_ratio_report.php


示例18: graph_mysql_traffic_report

function graph_mysql_traffic_report(&$rrdtool_graph)
{
    global $context, $hostname, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Mysql Network Traffic';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['vertical-label'] = 'Bytes';
    $rrdtool_graph['extras'] = '--rigid --base 1024';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $series = "DEF:'sent'='{$rrd_dir}/mysql_bytes_sent.rrd':'sum':AVERAGE " . "DEF:'received'='{$rrd_dir}/mysql_bytes_received.rrd':'sum':AVERAGE " . "AREA:'sent'#980000:'Sent' " . "AREA:'received'#000098:'Received' " . "LINE1:'0'#00000066:'' ";
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:kuanbiao,项目名称:gmond_python_modules,代码行数:19,代码来源:mysql_traffic_report.php


示例19: graph_mysql_select_types_report

function graph_mysql_select_types_report(&$rrdtool_graph)
{
    global $context, $hostname, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Mysql Select Types';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['extras'] = '--rigid';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $series = "DEF:'full_join'='{$rrd_dir}/mysql_select_full_join.rrd':'sum':AVERAGE " . "DEF:'full_range'='{$rrd_dir}/mysql_select_full_range_join.rrd':'sum':AVERAGE " . "DEF:'range'='{$rrd_dir}/mysql_select_range.rrd':'sum':AVERAGE " . "DEF:'range_check'='{$rrd_dir}/mysql_select_range_check.rrd':'sum':AVERAGE " . "DEF:'scan'='{$rrd_dir}/mysql_select_scan.rrd':'sum':AVERAGE " . "AREA:'full_join'#FF0000:'Full Join' " . "STACK:'full_range'#FF7D00:'Full Range' " . "STACK:'range'#FFF200:'Range' " . "STACK:'range_check'#00CF00:'Range Check' " . "STACK:'scan'#7CB3F1:'Scan' ";
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:kuanbiao,项目名称:gmond_python_modules,代码行数:19,代码来源:mysql_select_types_report.php


示例20: graph_mysql_table_locks_report

function graph_mysql_table_locks_report(&$rrdtool_graph)
{
    global $context, $hostname, $range, $rrd_dir, $size, $strip_domainname;
    if ($strip_domainname) {
        $hostname = strip_domainname($hostname);
    }
    $title = 'Mysql Table Locks';
    if ($context != 'host') {
        $rrdtool_graph['title'] = $title;
    } else {
        $rrdtool_graph['title'] = "{$hostname} {$title} last {$range}";
    }
    $rrdtool_graph['lower-limit'] = '0';
    $rrdtool_graph['extras'] = '--rigid';
    $rrdtool_graph['height'] += $size == 'medium' ? 28 : 0;
    $series = "DEF:'locks_immediate'='{$rrd_dir}/mysql_table_locks_immediate.rrd':'sum':AVERAGE " . "DEF:'locks_waited'='{$rrd_dir}/mysql_table_locks_waited.rrd':'sum':AVERAGE " . "DEF:'slow_queries'='{$rrd_dir}/mysql_slow_queries.rrd':'sum':AVERAGE " . "AREA:'locks_immediate'#D2D8F9:'Locks Immediate' " . "STACK:'locks_waited'#FF3932:'Locks Waited' " . "STACK:'slow_queries'#35962B:'Slow Queries' " . "LINE:'locks_immediate'#002A8F66:'' ";
    $rrdtool_graph['series'] = $series;
    return $rrdtool_graph;
}
开发者ID:kuanbiao,项目名称:gmond_python_modules,代码行数:19,代码来源:mysql_table_locks_report.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP strip_empty_chars函数代码示例发布时间:2022-05-23
下一篇:
PHP strip_decode函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap