묻고답하기

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<title>mod_cband status</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<style type="text/css">
body         { font-family: sans-serif; font-size: 0.7em; }
table        { font-family: tachoma, helvetica, verdana, sans-serif; border: 1px solid #d0d0d0; }
tr        { font-family: tachoma, helvetica, verdana, sans-serif; border: 1px solid #d0d0d0; }
td        { padding-left: 0.7em; padding-right: 0.7em; }
td.refresh    { background-color: #0de2cb; text-align: right; }
td.speed    { background-color: #ffa1a1; text-align: left; }
td.speedc    { background-color: #ffb1b1; text-align: left; }
td.remote_odd    { background-color: #b4bfff; text-align: left; }
td.remote_even    { background-color: #bfcfff; text-align: left; }
a        { text-decoration: none; color: #606060; }
a:hover    { text-decoration: underline; }
h1, h2        { font-family: tachoma, helvetica, verdana, sans-serif}
.small     { font-size: smaller; }
div.section    { margin-top: 1.5em; margin-bottom: 0.7em; }
div.footer    { margin-top: 2.5em; text-align: center; font-size: smaller; }
</style>
</head>
<body>
<h1 style="text-align: center"><a href="http://cband.linux.pl">mod_cband</a> status page</h1>
<h2 style="text-align: center">Server uptime 0W 0D 05:15:23</h2>
<div class="section"><h2 style="display: inline;">Virtual hosts</h2>
<p style="display: inline;"><a href="/?refresh=15&unit=">[refresh]</a>   <a href="/?refresh=15">[human-readable]</a> <a href="/?refresh=15&unit=G">[GB]</a> <a href="/?refresh=15&unit=M">[MB]</a> <a href="/?refresh=15&unit=K">[KB]</a></p>
</div>
<table cellspacing="0" cellpadding="0">
<tr>
<td>Virtual host name</td>
<td>time to refresh</td>
<td>Total<br>Limit/Slice/Used</td>
<td>Class 0<br>Limit/Slice/Used</td>
<td>Class 1<br>Limit/Slice/Used</td>
<td>Class 2<br>Limit/Slice/Used</td>
<td>kbps<br>Limit/Current</td>
<td>rps<br>Limit/Current</td>
<td>Connections<br>Limit/Current</td>
<td>user</td>
</tr>
<tr>
<td><a href="http://도메인.ivyro.net">도메인.ivyro.net</a>:0:(1234)</td>
<td class="refresh">never</td>
<td style="background-color: yellow">U/U/47.33MiB</td>
<td style="background-color: yellow">U/U/0KiB</td>
<td style="background-color: yellow">U/U/0KiB</td>
<td style="background-color: yellow">U/U/0KiB</td>
<td class="speed">U/2.55</td>
<td class="speed">U/0.13</td>
<td class=remote_odd>U/0</td>
<td>도메인</td>
</tr>
</table>
<div class="section"><br><h2 style="display: inline;">Users</h2>
<p style="display: inline;"><a href="/?refresh=15&unit=">[refresh]</a>   <a href="/?refresh=15">[human-readable]</a> <a href="/?refresh=15&unit=G">[GB]</a> <a href="/?refresh=15&unit=M">[MB]</a> <a href="/?refresh=15&unit=K">[KB]</a></p>
</div>
<table cellspacing="0" cellpadding="0">
<tr>
<td>Username</td>
<td>time to refresh</td>
<td>Total<br>Limit/Slice/Used</td>
<td>Class 0<br>Limit/Slice/Used</td>
<td>Class 1<br>Limit/Slice/Used</td>
<td>Class 2<br>Limit/Slice/Used</td>
<td>kbps<br>Limit/Current</td>
<td>rps<br>Limit/Current</td>
<td>Connections<br>Limit/Current</td>
</tr>
<tr>
<td>도메인</td>
<td class="refresh">0W 0D 02:41:46</td>
<td style="color: black; background-color: #96913F">100MB/100MB/49.63MB</td>
<td style="background-color: yellow">U/U/0KiB</td>
<td style="background-color: yellow">U/U/0KiB</td>
<td style="background-color: yellow">U/U/0KiB</td>
<td class="speed">U/2.55</td>
<td class="speed">U/0.13</td>
<td class=remote_odd>U/0</td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0" style="border: 0; margin: 0; padding: 0"><tr><td valign=top><div class="section"><br><h2 style="display: inline;">Remote clients</h2>
<p style="display: inline;"><a href="/?refresh=15&unit=">[refresh]</a>   <a href="/?refresh=15">[human-readable]</a> <a href="/?refresh=15&unit=G">[GB]</a> <a href="/?refresh=15&unit=M">[MB]</a> <a href="/?refresh=15&unit=K">[KB]</a></p>
</div><table width=500 cellspacing="0" cellpadding="0"><tr><td>Remote IP</td><td>Virtualhost</td><td>Connections<br>Limit/Current</td><td>Last speed/conn [kbps]</td></tr><tr><td class=remote_even>아이피</td><td class=remote_even>도메인.ivyro.net</td><td class=remote_odd>U/0</td>
<td class=remote_even>0</td></tr></table></td><td valign=top></td></tr></table>
<div class="footer"><br>
<p><a href="http://cband.linux.pl">mod_cband 0.9.7.5</a><br>
Copyright 2005 by <a href="mailto: dembol _at_ cband.linux.pl">Lukasz Dembinski</a><br>
All rights reserved.<br>
<br><a href="http://validator.w3.org/check?uri=http%3A%2F%2Fdembol.nasa.pl%2Fcband-status">[HTML 4.0 Strict]</a>
</p></div>
</body>
</html>

 

 

아이비 호스팅 사용중인데요

http://도메인.ivyro.net/mythrottle 를 제공하더군요

 

Throttle-me의 주소를 사용 안하는것 같아요

 

traffic_status.class.php를 수정 해야 할것 같은데 어디를 수정해야할지 알려주세요

 

<?php
/**
 * @class traffic_status
 * @author UPGLE (admin@upgle.com)
 * @version 0.1
 * @brief Display server traffic status by using data in the throttle-me
 */
class traffic_status extends WidgetHandler
{
/**
 * @brief Widget execution
 * Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
 * After generating the result, do not print but return it.
 */
function proc($args)
{
// Set skin vars
$throttle = $args->throttle_src;

// Set allow_url_fopen On
ini_set("allow_url_fopen","1"); 

$file = file($throttle);

$traffic = sprintf("%0.2f",strip_tags($file[43]) / 1024);
$limit = sprintf("%0.1f",strip_tags(eregi_replace("M", "",$file[47])));
$percent = sprintf("%.2f" ,(($traffic/$limit)*100));
$percent_rd = round(($traffic/$limit)*100);

// Set allow_url_fopen Off
ini_set("allow_url_fopen","0");

Context::set('traffic', $traffic);
Context::set('limit', $limit);
Context::set('percent', $percent);
Context::set('percent_rd', $percent_rd);

// Set a path of the template skin (values of skin, colorset settings)
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
Context::set('colorset', $args->colorset);

// Specify a template file
$tpl_file = 'traffic_status';

// Compile a template
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
/* End of file traffic_status.class.php */
/* Location: ./widgets/traffic_status/traffic_status.class.php */

 

태그 연관 글
  1. [2016/08/02] 묻고답하기 검색부분을 가운데로 하고싶은데요 어떻게 하는 건가요? by 94blossom *1