亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? graph.php

?? linux下流量查看軟件,可以查看到每臺機子的具體流量
?? PHP
?? 第 1 頁 / 共 2 頁
字號:
<?require("include.php");// Returns x location of any given timestampfunction ts2x($ts)	{	global $timestamp, $width, $interval;	return(($ts-$timestamp)*(($width-XOFFSET) / $interval) + XOFFSET);	}// If we have multiple IP's in a result set we need to total the average of each IP's samplesfunction AverageAndAccumulate()	{	global $Count, $total, $icmp, $udp, $tcp, $ftp, $http, $p2p, $YMax;	global $a_total, $a_icmp, $a_udp, $a_tcp, $a_ftp, $a_http, $a_p2p;		foreach ($Count as $key => $number)    	{	    $total[$key] /= $number;    	$icmp[$key] /= $number;    	$udp[$key] /= $number;    	$tcp[$key] /= $number;    	$ftp[$key] /= $number;    	$http[$key] /= $number;    	$p2p[$key] /= $number;    	}	foreach ($Count as $key => $number) 		{		$a_total[$key] += $total[$key];		$a_icmp[$key] += $icmp[$key];		$a_udp[$key] += $udp[$key];		$a_tcp[$key] += $tcp[$key];		$a_ftp[$key] += $ftp[$key];		$a_http[$key] += $http[$key];		$a_p2p[$key] += $p2p[$key];		if ($a_total[$key] > $YMax)			$YMax = $a_total[$key];		}		unset($GLOBALS['total'], $GLOBALS['icmp'], $GLOBALS['udp'], $GLOBALS['tcp'], $GLOBALS['ftp'], $GLOBALS['http'], $GLOBALS['p2p'], $GLOBALS['Count']);	$total = array();	$icmp = array();	$udp = array();	$tcp = array();	$ftp = array();	$http = array();	$p2p = array();	$Count = array();	} $db = ConnectDb();// Get parametersif (isset($_GET['width']))    $width = $_GET['width'];else	$width = DFLT_WIDTH;if (isset($_GET['height']))    $height = $_GET['height'];else	$height = DFLT_HEIGHT;if (isset($_GET['interval']))    $interval = $_GET['interval'];else	$interval = DFLT_INTERVAL;if (isset($_GET['ip']))    $ip = $_GET['ip'];else	exit(1);if (isset($_GET['sensor_name']))	$sensor_name = $_GET['sensor_name'];else	exit(1);if (isset($_GET['timestamp']))    $timestamp = $_GET['timestamp'];else	$timestamp = time() - $interval + (0.05*$interval);if (isset($_GET['table']))    $table = $_GET['table'];else	$table = "bd_rx_log";if (isset($_GET['yscale']))    $yscale = $_GET['yscale'];$total = array();$icmp = array();$udp = array();$tcp = array();$ftp = array();$http = array();$p2p = array();$Count = array();// Accumulator$a_total = array();$a_icmp = array();$a_udp = array();$a_tcp = array();$a_ftp = array();$a_http = array();$a_p2p = array();$sql = "select *, extract(epoch from timestamp) as ts from sensors, $table where sensors.sensor_id = ".$table.".sensor_id and ip <<= '$ip' and sensor_name = '$sensor_name' and timestamp > $timestamp::abstime and timestamp < ".($timestamp+$interval)."::abstime order by ip;";//echo $sql."<br>"; exit(1);$result = pg_query($sql);// The SQL statement pulls the data out of the database ordered by IP address, that way we can average each// datapoint for each IP address to provide smoothing and then toss the smoothed value into the accumulator// to provide accurate total traffic rate.while ($row = pg_fetch_array($result))	{	if ($row['ip'] != $last_ip)		{		AverageAndAccumulate();		$last_ip = $row['ip'];		}	$x = ($row['ts']-$timestamp)*(($width-XOFFSET)/$interval)+XOFFSET;	$xint = (int) $x;	//echo "xint: ".$xint."<br>";	$Count[$xint]++;                                                                                                                             	if ($row['total']/$row['sample_duration'] > $SentPeak)		$SentPeak = $row['total']/$row['sample_duration'];	$TotalSent += $row['total'];	$total[$xint] += $row['total']/$row['sample_duration'];	$icmp[$xint] += $row['icmp']/$row['sample_duration'];	$udp[$xint] += $row['udp']/$row['sample_duration'];	$tcp[$xint] += $row['tcp']/$row['sample_duration'];	$ftp[$xint] += $row['ftp']/$row['sample_duration'];	$http[$xint] += $row['http']/$row['sample_duration'];	$p2p[$xint] += $row['p2p']/$row['sample_duration'];                                                                                                                             	}// One more time for the last IPAverageAndAccumulate();// Pull the data out of Accumulator$total = $a_total;$icmp = $a_icmp;$udp = $a_udp;$tcp = $a_tcp;$ftp = $a_ftp;$http = $a_http;$p2p = $a_p2p;$YMax += $YMax*0.05;    // Add an extra 5%// if a y scale was specified override YMaxif (isset($yscale))    $YMax = $yscale/8;// Plot the dataheader("Content-type: image/png");$im = imagecreate($width, $height);$white = imagecolorallocate($im, 255, 255, 255);$yellow = ImageColorAllocate($im, 255, 255, 0);$purple = ImageColorAllocate($im, 255, 0, 255);$green  = ImageColorAllocate($im, 0, 255, 0);$blue   = ImageColorAllocate($im, 0, 0, 255);$lblue  = ImageColorAllocate($im, 128, 128, 255);$brown  = ImageColorAllocate($im, 128, 0, 0);$red    = ImageColorAllocate($im, 255, 0, 0);$black  = ImageColorAllocate($im, 0, 0, 0);for($Counter=XOFFSET+1; $Counter < $width; $Counter++)	{	if (isset($total[$Counter]))		{		// Convert the bytes/sec to y coords        $total[$Counter] = ($total[$Counter]*($height-YOFFSET))/$YMax;		$tcp[$Counter] = ($tcp[$Counter]*($height-YOFFSET))/$YMax;        $ftp[$Counter] = ($ftp[$Counter]*($height-YOFFSET))/$YMax;		$http[$Counter] = ($http[$Counter]*($height-YOFFSET))/$YMax;		$p2p[$Counter] = ($p2p[$Counter]*($height-YOFFSET))/$YMax;        $udp[$Counter] = ($udp[$Counter]*($height-YOFFSET))/$YMax;		$icmp[$Counter] = ($icmp[$Counter]*($height-YOFFSET))/$YMax;		// Stack 'em up!		// Total is stacked from the bottom		// Icmp is on the bottom too		// Udp is stacked on top of icmp		$udp[$Counter] += $icmp[$Counter];		// TCP and p2p are stacked on top of Udp		$tcp[$Counter] += $udp[$Counter];		$p2p[$Counter] += $udp[$Counter]; 		// Http is stacked on top of p2p		$http[$Counter] += $p2p[$Counter];		// Ftp is stacked on top of http        $ftp[$Counter] += $http[$Counter];		// Plot them!		//echo "$Counter:".$Counter." (h-y)-t:".($height-YOFFSET) - $total[$Counter]." h-YO-1:".$height-YOFFSET-1;        ImageLine($im, $Counter, ($height-YOFFSET) - $total[$Counter], $Counter, $height-YOFFSET-1, $yellow);        ImageLine($im, $Counter, ($height-YOFFSET) - $icmp[$Counter], $Counter, $height-YOFFSET-1, $red);        ImageLine($im, $Counter, ($height-YOFFSET) - $udp[$Counter], $Counter, ($height-YOFFSET) - $icmp[$Counter] - 1, $brown);        ImageLine($im, $Counter, ($height-YOFFSET) - $tcp[$Counter], $Counter, ($height-YOFFSET) - $udp[$Counter] - 1, $green);        ImageLine($im, $Counter, ($height-YOFFSET) - $p2p[$Counter], $Counter, ($height-YOFFSET) - $udp[$Counter] - 1, $purple);        ImageLine($im, $Counter, ($height-YOFFSET) - $http[$Counter], $Counter, ($height-YOFFSET) - $p2p[$Counter] - 1, $blue);        ImageLine($im, $Counter, ($height-YOFFSET) - $ftp[$Counter], $Counter, ($height-YOFFSET) - $http[$Counter] - 1, $lblue);		}//	else//		echo $Counter." not set<br>";	}                                                                                                                             // Margin Textif ($SentPeak < 1024/8)	$txtPeakSendRate = sprintf("Peak Send Rate: %.1f KBits/sec", $SentPeak*8);else if ($SentPeak < (1024*1024)/8)    $txtPeakSendRate = sprintf("Peak Send Rate: %.1f MBits/sec", ($SentPeak*8.0)/1024.0);else 	$txtPeakSendRate = sprintf("Peak Send Rate: %.1f GBits/sec", ($SentPeak*8.0)/(1024.0*1024.0));                                                                                                                             

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区高清视频在线观看| 亚洲国产一区视频| 亚洲欧洲日韩一区二区三区| 一区二区三区高清在线| 久草热8精品视频在线观看| 色综合久久久久久久| 欧美mv和日韩mv的网站| 亚洲一级在线观看| 成人app在线| 精品国产网站在线观看| 午夜精品福利一区二区三区蜜桃| 国产九九视频一区二区三区| 欧美狂野另类xxxxoooo| 亚洲欧美成人一区二区三区| 国产精品99久久久久久久vr| 欧美一区二区三区在| 一区二区三区中文在线观看| 国产a视频精品免费观看| 日韩一级片网站| 三级不卡在线观看| 欧美视频一区二区| 亚洲精品免费在线| 99久久婷婷国产综合精品电影 | 久久精品久久久精品美女| 91美女蜜桃在线| 中文字幕视频一区二区三区久| 国产精品99久久久| 国产视频一区二区在线| 精品一区二区三区在线播放| 91麻豆精品国产综合久久久久久| 亚洲二区在线视频| 欧美午夜精品理论片a级按摩| 亚洲日本韩国一区| 97精品国产露脸对白| 亚洲视频网在线直播| 99国产一区二区三精品乱码| 国产精品国产精品国产专区不片| 国产成人aaa| 国产精品二区一区二区aⅴ污介绍| 床上的激情91.| 亚洲欧美另类综合偷拍| 在线一区二区观看| 偷拍一区二区三区四区| 欧美一二三四区在线| 成人激情校园春色| 国产精品的网站| 色狠狠av一区二区三区| 亚洲成人在线免费| 日韩精品一区二区三区四区视频| 经典一区二区三区| 国产亚洲综合av| 91在线国产福利| 亚洲成人免费在线| 2019国产精品| k8久久久一区二区三区| 亚洲一级在线观看| 欧美成人精品3d动漫h| 国产成人超碰人人澡人人澡| 中文字幕一区视频| 欧美日本国产视频| 国产精品一区二区果冻传媒| 亚洲天堂2016| 日韩一级二级三级精品视频| 国产精品一区二区久激情瑜伽| 自拍偷在线精品自拍偷无码专区| 欧美高清你懂得| 国产mv日韩mv欧美| 日韩在线一区二区| 中文字幕中文字幕一区| 欧美情侣在线播放| 国产激情一区二区三区四区| 亚洲综合av网| 26uuu精品一区二区在线观看| 99精品桃花视频在线观看| 日本欧美大码aⅴ在线播放| 国产日韩欧美一区二区三区乱码| 欧美性色aⅴ视频一区日韩精品| 蜜臀久久久久久久| 亚洲欧美一区二区三区极速播放| 日韩免费看的电影| 欧美在线观看你懂的| 国产成人无遮挡在线视频| 亚洲一区二区偷拍精品| 亚洲国产另类av| 久久久久久影视| 欧美精品v日韩精品v韩国精品v| 国产盗摄精品一区二区三区在线| 香蕉乱码成人久久天堂爱免费| 国产精品美女久久久久av爽李琼| 欧美一区二区三区性视频| 欧美自拍丝袜亚洲| 不卡影院免费观看| 国产成人在线视频网站| 免费一级片91| 亚洲成人自拍偷拍| 亚洲欧美另类综合偷拍| 国产精品三级视频| 久久综合给合久久狠狠狠97色69| 欧美日本在线看| 欧洲另类一二三四区| 91丨九色porny丨蝌蚪| 粉嫩高潮美女一区二区三区 | 久久中文娱乐网| 91精品福利在线一区二区三区| 欧美在线免费观看视频| 91在线视频播放地址| 国产69精品久久久久毛片| 国产露脸91国语对白| 国产永久精品大片wwwapp| 日韩精品每日更新| 日韩黄色免费网站| 奇米888四色在线精品| 爽爽淫人综合网网站| 婷婷久久综合九色国产成人| 午夜精品久久久久久久| 五月天亚洲婷婷| 日韩电影在线免费观看| 蜜桃视频一区二区三区在线观看| 亚洲国产另类精品专区| 视频一区二区三区入口| 日韩电影免费在线看| 日本aⅴ免费视频一区二区三区| 日韩专区中文字幕一区二区| 丝袜脚交一区二区| 蜜臀av一区二区三区| 久草精品在线观看| 国产suv精品一区二区三区| 国产不卡一区视频| 99久久精品情趣| 色av一区二区| 欧美精品日韩精品| 精品国产电影一区二区| 国产午夜精品一区二区三区嫩草| 亚洲男人天堂一区| 亚洲国产wwwccc36天堂| 日韩综合小视频| 国产一区二区三区四区五区入口| 国产成人精品免费一区二区| 91在线视频在线| 欧美一级午夜免费电影| 国产夜色精品一区二区av| 亚洲美女一区二区三区| 午夜精品成人在线视频| 久久99精品久久久久久| 成人高清视频免费观看| 欧美亚洲国产怡红院影院| 精品日韩欧美一区二区| 国产精品久久久久一区二区三区| 亚洲欧美色图小说| 日韩av在线发布| 大胆亚洲人体视频| 欧美日产国产精品| 国产精品视频一二三区| 午夜精品福利一区二区三区蜜桃| 国产精品456露脸| 欧美视频在线一区| 国产亚洲综合色| 日韩激情av在线| 91蜜桃在线观看| 久久综合九色综合欧美98 | 在线观看欧美日本| 日韩免费视频一区| 亚洲精选免费视频| 麻豆精品视频在线观看视频| 91免费精品国自产拍在线不卡| 日韩欧美一区二区在线视频| 亚洲视频在线观看一区| 久久99国产精品久久99果冻传媒| 日本丶国产丶欧美色综合| 亚洲精品一区二区三区蜜桃下载| 亚洲欧洲综合另类| 成人中文字幕在线| 欧美一区二区三区在线视频| 亚洲欧美激情在线| 国产传媒欧美日韩成人| 欧美大片一区二区| 亚洲高清视频的网址| 91视频在线看| 欧美国产日韩a欧美在线观看 | av电影天堂一区二区在线| 精品免费99久久| 午夜视频在线观看一区| aa级大片欧美| 国产欧美一区二区精品性色| 美女视频免费一区| 欧美精品一卡两卡| 亚洲大片免费看| 欧美精品tushy高清| 亚洲愉拍自拍另类高清精品| 色婷婷综合久久| 亚洲精品视频在线| 色综合久久久久久久久| 亚洲女性喷水在线观看一区| 99精品久久免费看蜜臀剧情介绍| 欧美极品美女视频| 国产一区二区按摩在线观看| 国产精品久久久久精k8| 精品一二线国产| 26uuuu精品一区二区| 国内外精品视频|