Syntax
|
<td>
CBandSpeed<strong><em> kbps</em> <em>rps</em> <em>max_conn</em></strong></p>
<p>
kbps – maximal transfer speed in [kMG]bps or [kMG]B/s<br /> rps – maximal requests per second<br /> max_conn – maximal number of simultaneous connections</td> </tr>
<tr>
<td valign="top">
Example
</td>
<td>
CBandSpeed 1024 10 30</p>
<p>
Specifies maximal speed 1024kbps (1024 * 1024 bits per second), maximal 10 requests per second and with a maximum of 30 open connections
</p>
<p>
<strong>NOTE:</strong> This feature is available from version<strong> 0.9.6.0</strong></td> </tr> </tbody> </table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandRemoteSpeed</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies maximal speed for any remote client
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandRemoteSpeed<strong><em> kbps</em> <em>rps</em> <em>max_conn</em></strong></p>
<p>
kbps – maximal transfer speed in [kMG]bps or [kMG]B/s<br /> rps – maximal requests per second<br /> max_conn – maximal number of simultaneous connections</td> </tr>
<tr>
<td valign="top">
Example
</td>
<td>
CBandRemoteSpeed 20kb/s 3 3</p>
<p>
Specifies maximal speed 20kB/s (20 * 1024 bytes per second), maximal 3 requests per second and 3 open connections for any remote client
</p>
<p>
<strong>NOTE:</strong> This feature is available from version<strong> 0.9.6.1-rc2</strong></td> </tr> </tbody> </table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandClassRemoteSpeed</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies maximal speed for any remote client from some destination class
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandClassRemoteSpeed<strong><em> class_name</em> <em>kbps</em> <em>rps</em></strong></p>
<p>
class_name – name of defined destination class<br /> kbps – maximal transfer speed in kbps or kB/s<br /> rps – maximal requests per second<br /> max_conn – maximal number of simultaneous connections</td> </tr>
<tr>
<td valign="top">
Example
</td>
<td>
CBandClassDst 66.249.64/24<br /> CBandClassDst 66.249.65/24<br /> CBandClassDst 66.249.79/24</p>
<p>
CBandClassRemoteSpeed googlebot_class 20kb/s 2 3
</p>
<p>
-Specifies maximal speed 20kB/s (20 * 1024 bytes per second), maximal 2 requests per second and 3 open connections for any remote client from class googlebot_class
</p>
<p>
<strong>NOTE:</strong> This feature is available from version<strong> 0.9.6.1-rc2</strong></td> </tr> </tbody> </table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandRandomPulse</strong>
</td>
</tr>
<tr>
<td valign="top">
Description
</td>
<td>
Turns On or Off the random pulse generator for data sending<br /> Random pulse generator is a part of the speed-limiting implementation of mod_cband. This directive changes the way a connection’s speed is determined and enforced. The connections’ speeds are measured within some time period and then provided for in that period. When r.p.g. is enabled this period is chosen randomly, providing for a statisticaly saner load distribution. Disabling this causes spikes both in bandwidth and cpu usages
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
Global
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandRandomPulse<strong><em> On/Off</em></strong>
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandLimit</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies bandwidth limit for virtualhost
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandLimit<strong><em> limit</em></strong><br /> limit – bandwidth quota size, available units:<strong> K (kilo), M (mega), G (giga), Ki (kibi), Mi (mebi), Gi (gibi)</strong>
</td>
</tr>
<tr>
<td valign="top">
Example
</td>
<td>
CBandLimit 10M<br /> Specifies 10 * 1000 * 1000 bytes bandwidth quota<br /> CBandLimit 10Mi<br /> Specifies 10 * 1024 * 1024 bytes bandwidth quota<br /> <strong>IMPORTANT NOTE</strong> : the meaning of K, M and G changed with version 0.9.6.0. Check your config
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandClassLimit</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies bandwidth limit for virtualhost’s destination class
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td>
Syntax
</td>
<td>
CBandClassLimit<strong><em> class_name</em> <em>limit</em></strong><br /> class_name – the name of defined class<br /> limit – bandwidth quota size, available units:<strong> K (kilo), M (mega), G (giga), Ki (kibi), Mi (mebi), Gi (gibi)</strong><br /> <strong>IMPORTANT NOTE</strong> : the meaning of K, M and G changed with version 0.9.6.0. Check your config
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td valign="top">
<strong>CBandExceededURL</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies a URL where mod_cband should redirect all requests to a virtualhost when the configured transfer limit is exceeded<br /> <strong>NOTE</strong> : If you don’t specify the exceeded URL location then standard 503 Service Unavailable will be sent
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td>
Syntax
</td>
<td>
CBandExceededURL<strong><em> URL</em></strong>
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td valign="top">
<strong>CBandExceededSpeed</strong>
</td>
</tr>
<tr>
<td valign="top">
Description
</td>
<td>
Specifies maximal speed to which mod_cband slows down a virtualhost when the configured transfer limit is exceeded
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandExceededSpeed<strong><em> kbps</em> <em>rps</em> <em>max_conn</em></strong><br /> kbps – maximal transfer speed in kbps or kB/s<br /> rps – maximal requests per second<br /> max_conn – maximal number of simultaneous connections<br /> <strong>NOTE:</strong> This feature is available from version<strong> 0.9.6.0</strong>
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandScoreboard</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies virtualhost’s scoreboard file
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td>
Syntax
</td>
<td>
BandScoreboard<strong><em> path</em></strong><br /> <strong>NOTE:</strong> The path must be writeable for the apache-user
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandPeriod</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies a period after which a virtualhost’s usages are cleared
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandPeriod<strong><em> period</em></strong><br /> period – available units:<strong> S (seconds), M (minutes), H (hours), D (days), W (weeks)</strong>
</td>
</tr>
<tr>
<td valign="top">
Example
</td>
<td>
CBandPeriod 1W<br /> CBandPeriod 14D<br /> CBandPeriod 60M
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandPeriodSlice</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies the period slice length
</td>
</tr>
<tr>
<td>
Default
</td>
<td>
slice_len = limit
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandPeriodSlice<strong><em> slice_length</em></strong>
</td>
</tr>
<tr>
<td valign="top">
Example
</td>
<td>
CBandLimit 100G<br /> CBandPeriod 4W<br /> CBandPeriodSlice 1W</p>
<p>
A period will be divided into 4 small slices (4W/1W = 4). Each slice has 100G/4=25G bandwidth limit. After 1W slice limit will be 50G, after 2W will be 75G …</td> </tr> </tbody> </table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong></strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Define a new cband user
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
Server config
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
<strong><em> user_name</em></strong> >
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandUserSpeed</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies maximal speed for a cband user
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandUserSpeed<strong><em> kbps</em> <em>rps</em> <em>max_conn</em></strong><br /> kbps – maximal transfer speed in kbps or kB/s<br /> rps – maximal requests per second<br /> max_conn – maximal number of simultaneous connections
</td>
</tr>
<tr>
<td valign="top">
Example
</td>
<td>
CBandUserSpeed 100kb/s 10 5<br /> Specifies maximal speed 100 kB/s (100 * 1024 bytes per second), maximal 10 requests per second and 5 open connections<br /> <strong>NOTE:</strong> This feature is available from version<strong> 0.9.6.0</strong>
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandUserLimit</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies bandwidth limit for a cband user
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandUserLimit<strong><em> limit</em></strong><br /> limit – bandwidth quota size, available units:<strong> K (kilo), M (mega), G (giga), Ki (kibi), Mi (mebi), Gi (gibi)</strong>
</td>
</tr>
<tr>
<td valign="top">
Example
</td>
<td>
CBandUserLimit 10M<br /> Specifies 10 * 1000 * 1000 bytes bandwidth quota<br /> CBandUserLimit 10Mi<br /> Specifies 10 * 1024 * 1024 bytes bandwidth quota<br /> <strong>IMPORTANT NOTE</strong> : the meaning of K, M and G changed with version 0.9.6.0. Check your config
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandUserClassLimit</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies bandwidth limit for a cband user’s destination class
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td>
Syntax
</td>
<td>
CBandUserClassLimit<strong><em> class_name</em> <em>limit</em></strong><br /> class_name – the name of defined class<br /> limit – bandwidth quota size, available units:<strong> K (kilo), M (mega), G (giga), Ki (kibi), Mi (mebi), Gi (gibi)</strong><br /> <strong>IMPORTANT NOTE</strong> : the meaning of K, M and G changed with version 0.9.6.0. Check your config
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td valign="top">
<strong>CBandUserExceededURL</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies a URL where mod_cband should redirect all requests to user’s virtualhost when the configured transfer limit is exceeded<br /> <strong>NOTE</strong> : If you don’t specify the exceeded URL location then standard 503 Service Unavailable will be sent
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td>
Syntax
</td>
<td>
CBandUserExceededURL<strong><em> URL</em></strong>
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandUserExceededSpeed</strong>
</td>
</tr>
<tr>
<td valign="top">
Description
</td>
<td>
Specifies maximal speed to which mod_cband slows down user when the configured transfer limit is exceeded<br /> <strong>NOTE:</strong> CBandUserExceededURL must not be used if you want to only slow down user’s pages with CBandUserExceededSpeed directive
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandUserExceededSpeed<strong><em> kbps</em> <em>rps</em> <em>max_conn</em></strong><br /> kbps – maximal transfer speed in kbps or kB/s<br /> rps – maximal requests per second<br /> max_conn – maximal number of simultaneous connections<br /> <strong>NOTE:</strong> This feature is available from version<strong> 0.9.6.0</strong>
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandUserScoreboard</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies a user’s scoreboard file
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td>
Syntax
</td>
<td>
CBandUserScoreboard<strong><em> path</em></strong><br /> <strong>NOTE:</strong> The path must be writeable for the apache-user
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandUserPeriod</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies a period after which a user’s usages are cleared
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandUserPeriod<strong><em> period</em></strong><br /> period – available units:<strong> S (seconds), M (minutes), H (hours), D (days), W (weeks)</strong>
</td>
</tr>
<tr>
<td valign="top">
Example
</td>
<td>
CBandUserPeriod 1W<br /> CBandUserPeriod 14D<br /> CBandUserPeriod 60M
</td>
</tr>
</table>
<table class="cband_table" border="0" width="100%">
<tr>
<td width="100">
Name
</td>
<td>
<strong>CBandUserPeriodSlice</strong>
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
Specifies a period slice length
</td>
</tr>
<tr>
<td>
Default
</td>
<td>
slice_len = limit
</td>
</tr>
<tr>
<td>
Context
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Syntax
</td>
<td>
CBandUserPeriodSlice<strong><em> slice_length</em></strong>
</td>
</tr>
<tr>
<td valign="top">
Example
</td>
<td>
CBandUserLimit 100G<br /> CBandUserPeriod 4W<br /> CBandUserPeriodSlice 1W<br /> A period will be divided into 4 small slices (4W/1W = 4). Each slice has 100G/4=25G bandwidth limit. After 1W slice limit will be 50G, after 2W will be 75G …
</td>
</tr>
</table>
<h2>
<strong>Status Handler Configuration Example</strong>
</h2>
<p>
<img style="float: right;" class="lazy " src="https://blog.sd.idv.tw/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://codee.pl/images/cband/snapshot6_small.jpg" alt="" />
<noscript>
<img style="float: right;" src="http://codee.pl/images/cband/snapshot6_small.jpg" alt="" />
</noscript> To view actual bandwidth limits, usages, users, scoreboards, add the following lines into the config file:
</p>
<pre><Location /cband-status>
SetHandler cband-status
</Location>
<Location /cband-status-me>
SetHandler cband-status-me
</Location>
Posts
此快raid卡為Lsi 代工
基本上差不多的’效能’
Lsi的raid 在6.1版後 全面進化 核心支援 sata sas 用起來粉快樂
以下裝置系統:
CPU: Dual Core AMD Opteron(tm) Processor 165 (1809.28-MHz K8-class CPU)
Origin = “AuthenticAMD” Id = 0x20f32 Stepping = 2
Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
Features2=0x1
AMD Features=0xe2500800<SYSCALL,NX,MMX+,FFXSR,LM,3DNow!+,3DNow!>
AMD Features2=0x3<LAHF,CMP>
Cores per package: 2
Posts
說明現在公司因為支前專案採用PHP4 APACHE1.3 要轉換到PHP5 APACHE22 其中又不使服務中斷 只好再一台系統上同時安裝兩種
以下只說明 另外安裝的PHP5 APACHE22
Posts
LoadModule evasive20_module modules/mod_evasive20.so
DOSHashTableSize 3097 # 記錄黑名單的尺寸
DOSPageCount 2 # 每個頁面被判斷為dos攻擊的讀取次數
DOSSiteCount 50 # 每個站點被判斷為dos攻擊的讀取部件(object)的個數
DOSPageInterval 1 # 讀取頁面間隔秒
Posts
<?<br />
$excel =new COM(“Excel.Application”)or die(“Unable to instanciate Excel”);<br />
print “Loaded excel,version {$excel->Version}n”;<br />
$excel->Visible =0;<br />
$book=$excel->Workbooks->open(“c://dde.xls”);<br />
$sheet=$book->Worksheets(“Sheet1”);<br />
$a=$excel->DDEInitiate(“Excel”,“c://dde.xls”);<br />
$c =$excel->DDEExecute($a,“A1:D1”);<br />
<span style=“display: none;">(http://www.GetJetso.com - 著數網)</span> $Range=$sheet->Range(“A1:D1”);<br />
$cell=$Range->Cells(1,4);<br />
echo $cell->value;<br />
$excel->DDETerminate($a);<br />
$excel->Workbooks->Close();<br />
unset($excel);<br />
unset($a);<br />
?>
Posts
iPhone SDK Core Web Sites
What is the iPhone SDK?
iPhone SDK Books
iPhone SDK Forums