* Copyright (c) 2004-2006 Jonathan Watt * All rights reserved. * * originally based on m0n0wall (http://m0n0.ch/wall) * Copyright (c) 2003-2004 Manuel Kasper . * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ ##|+PRIV ##|*IDENT=page-diagnostics-cpuutilization ##|*NAME=Diagnostics: CPU Utilization ##|*DESCR=Allow access to the 'Diagnostics: CPU Utilization' page. ##|*MATCH=graph_cpu.php* ##|*MATCH=stats.php* ##|-PRIV require_once("guiconfig.inc"); header("Last-Modified: " . gmdate("D, j M Y H:i:s") . " GMT"); header("Expires: " . gmdate("D, j M Y H:i:s", time()) . " GMT"); header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 header("Content-type: image/svg+xml"); /********* Other conf *******/ $nb_plot = 120; // maximum number of data points to plot in the graph $fetch_link = "stats.php?stats=cpu"; //SVG attributes $attribs['axis']='fill="black" stroke="black"'; $attribs['cpu']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="7"'; $attribs['graph_cpu']='fill="none" stroke="#FF0000" stroke-opacity="0.8"'; $attribs['legend']='fill="black" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"'; $attribs['grid_txt']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="6"'; $attribs['grid']='stroke="gray" stroke-opacity="0.5"'; $attribs['error']='fill="blue" font-family="Arial" font-size="4"'; $attribs['collect_initial']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"'; $height=100; // SVG internal height : do not modify $width=200; // SVG internal width : do not modify /********* Graph DATA **************/ print('' . "\n");?> /> /> points=" "/> /> /> text-anchor="end">75% text-anchor="end">50% text-anchor="end">25% > text-anchor="middle"> text-anchor="middle">...