Jon Suyo
Guest
|
Posted:
Thu Jul 01, 2004 10:18 pm Post subject:
Monitoring Scripts |
|
|
I have WMS running like a pro, but now I need to monitor the server. We'd like to see current # of users and current bandwidth at the least. I have been looking over the SDK samples but I've run into 2 issues.
1) I have no idea how to program in VB, C, C++ or JS.
2) The VB samples I try, I always (100% of the time) get:
"Microsoft VBScript compilation error: Expected end of statement". Here is an example of where I got this error sample = http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmsrvsdk/htm/iwmspublishingpointpeakcountersobject.asp
The error is on this line: (7, 16) - Dim Server As WMSServer.
I just run it as a .vbs file using wscript.
Regardless of the error issue - There must be some scripts out there that mirror what you see when you are using the WMS 'Monitor' pane.
If anyone replies, please keep in mind: I have 0 vb/js/c etc. etc. experience. Include step by step directions on how to compile/run any code samples.
|
|
Ravi Raman
Guest
|
Posted:
Thu Jul 01, 2004 11:08 pm Post subject:
Monitoring Scripts |
|
|
The sample you found is a VB Sample probably, it doesn't
work with VBScript. Here is sample script, you can copy
this into say myfile.vbs file and run this as "Wscript
myfile.vbs" (or from command prompt as "cscript
myfile.vbs"):
dim SrvObj
dim curPlayers, curBandwidth
set Srvobj = createobject("WMSServer.server")
curPlayers = Srvobj.CurrentCounters.ConnectedPlayers
curBandwidth =
Srvobj.CurrentCounters.PlayerAllocatedBandwidth
WScript.echo "Player#: "+CStr(curPlayers)+" Bandwidth
Used: "+CStr(curBandwidth)+ "Kbps"
--
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"
| Quote: | -----Original Message-----
I have WMS running like a pro, but now I need to monitor
the server. We'd like to see current # of users and |
current bandwidth at the least. I have been looking over
the SDK samples but I've run into 2 issues.
| Quote: | 1) I have no idea how to program in VB, C, C++ or JS.
2) The VB samples I try, I always (100% of the time) get:
"Microsoft VBScript compilation error: Expected end of
statement". Here is an example of where I got this error |
sample = http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/wmsrvsdk/htm/iwmspublishingpointpeakcountersobject.asp
| Quote: | The error is on this line: (7, 16) - Dim Server As
WMSServer.
I just run it as a .vbs file using wscript.
Regardless of the error issue - There must be some
scripts out there that mirror what you see when you are |
using the WMS 'Monitor' pane.
| Quote: |
If anyone replies, please keep in mind: I have 0 vb/js/c
etc. etc. experience. Include step by step directions on |
how to compile/run any code samples.
|
|