Listing 2 contains an excerpt from wmServerStatus.pl. As the code at callout B shows, this script uses the IWMSServer object (which $Server represents) to connect to the specified WMS server. The script then queries the server for the IWMSServer object's Status property value. The code at callout A defines the possible status values in a hash called %SERVER_STATUS.
The wmServerLimits.pl script demonstrates a more complicated interaction with a WMS server. This script retrieves the WMS server's limits. WMS defines multiple limits that prevent the service from exceeding a desired threshold. For example, the ConnectedPlayers limit defines how many players can be simultaneously connected to your service and the ConnectionRate limit defines the rate at which WMS allows new connections. These limits let WMS administrators determine how bandwidth and other resources are consumed.
You can download wmServerLimits.pl (as well as the other Perl scripts mentioned in this article) from the Windows Scripting Solutions Web site. (Go to http://www.windowsitpro.com/windowsscripting, enter 43757 in the InstantDoc ID text box, then click the 43757.zip hotlink.) To run wmServerLimits.pl, use the command
perl wmServerLimits.pl
[machine name]
[-p PUBPOINT]
This command is similar to the one for wmServerStatus.pl, except that it includes an optional -p switch. If you want to display the limits for a publishing point rather than the WMS server, you include -p PUBPOINT, where PUBPOINT is the name of that publishing point. (A publishing point is essentially a name with which content is associated. This concept is similar to how the name of a shared directory or a Microsoft IIS Web server maps virtual roots to directories on a hard disk.) . . .
krmoe April 21, 2006 (Article Rating: