Re: Cumulative Bandwidth limits under Windows 2000 WMS
From: Ravi Raman (ravira_at_online.microsoft.com)
Date: 05/10/04
- Next message: Ravi Raman: "WMRM SDK"
- Previous message: Beth: "Faulty DNS recognition by WM server"
- In reply to: Jason Brown: "Re: Cumulative Bandwidth limits under Windows 2000 WMS"
- Next in thread: Zahir_Cibexnet: "Re: Cumulative Bandwidth limits under Windows 2000 WMS"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 May 2004 11:02:46 -0700
Simple script which will deny new connections if the
number of bytes exceeded certain limit since last reset.
Please copy this as "limit.vbs" and run from command
prompt as "cscript limit.vbs" after modifying the script
with parameters to suit your needs:
---
pubptname = "Yourpubname" ' The pubpt. being tracked
CheckingFrequency = 60 ' How often you would
check in seconds - currently every minute
NumIterationsCheck = 60*24*31 ' How many iteration of
checking will be done
MaxBytesAllowed = 10000000 ' Maximum bytes allowed
after which we will stop permitting connections
set obj = createobject("WMSServer.server")
set pubpt = obj.PublishingPoints(pubptname)
set totcnt = pubpt.TotalCounters
do
bytessent = CLng(totcnt.PlayerBytesSent)
if BytesSent > MaxBytesAllowed then
WScript.echo "Pubpt. "+pubptname+" reports "+CStr
(bytessent)+" bytes sent."
WScript.echo "Limits exceeded. We will deny any new
connections, existing connections will still run though .."
pubpt.AllowClientsToConnect = false
exit do
else
WScript.echo "Pubpt. "+pubptname+" reports "+CStr
(totcnt.PlayerBytesSent)+" bytes streamed."
end if
wscript.sleep checkingfrequency*1000
loop while i < NumIterationsCheck
WScript.echo "Script ended."
---
To reset counters, copy the following
as "resetcounter.vbs" and run on cmd line as "cscript
resetcounter.vbs":
pubptname = "YourPubName" ' The pubpt. being tracked
set obj = createobject("WMSServer.server")
set pubpt = obj.PublishingPoints(pubptname)
set totcnt = pubpt.TotalCounters
totcnt.Reset
WScript.echo "Pubpt. "+pubptname+" has been reset. Total
player bytes: "+CStr(totcnt.PlayerBytesSent)
--
Hope this helps. Unfortunately, this has been tested yet -
please try this and modify this to suit your need. The
above is provided just as a sample.
--
This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"
>-----Original Message-----
>Ravi - yes, I would be interested in a little more info
on this property.
>meantime I'll have a scoot round in MSDN and see if I can
find it.
>"Ravi Raman" <ravira@Online.microsoft.com> wrote in
message
>news:a64b01c43644$88a7c970$a401280a@phx.gbl...
>> There is a TotalCounters.PlayerBytesSent counter that is
>> available on object model that you can check to find out
>> the total number of bytes sent "since the last reset". I
>> am not sure if this counter would get reset if I stop
and
>> restart the server, i will need to check - in which
case,
>> it will not work if you restarted your server (unless
you
>> code around it again).
>>
>> You can write an application (or I can try to provide a
>> sample VBScript on how to retrieve the counter if you
are
>> interested), that will run in a loop checking every
>> minute whether the total bytes sent on that publishing
>> point exceeded a specific amount or not. Please let me
>> know if you will be interested in knowing how.
>>
>> Thx,
>> Ravi
>> --
>> This posting is provided "AS IS" with no warranties, and
>> confers no rights.
>>
>> >-----Original Message-----
>> >We have a requirement right now to set a maximum
>> bandwidth limit on a
>> >windows media server (on a per-publishing point basis).
>> so a point could
>> >deliver a maximum of, say, 3GB per month.
>> >
>> >I've been in and out of the docs till I'm blue in the
>> face and have come to
>> >the conclusion there's nothing built in for this.
>> >
>> >My current harebrained scheme is to write some sort of
>> log parser which
>> >would monitor each PP's consumption at regular
intervals
>> and shut down the
>> >point when the limit is exceeded. This is, of course, a
>> non-trivial task and
>> >I'd rather not do it if there's another way.
>> >
>> >so the question is, is there another way?
>> >
>> >thanks folks.
>> >
>> >Jason
>> >
>> >
>> >.
>> >
>
>
>.
>
- Next message: Ravi Raman: "WMRM SDK"
- Previous message: Beth: "Faulty DNS recognition by WM server"
- In reply to: Jason Brown: "Re: Cumulative Bandwidth limits under Windows 2000 WMS"
- Next in thread: Zahir_Cibexnet: "Re: Cumulative Bandwidth limits under Windows 2000 WMS"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|