Summary
You can start, stop, add, and delete MapServices, Spatial Servers, and Virtual Servers from the command line.
Procedure
- To manage the ArcIMS Application Server from the command line, first open a command prompt. From the command prompt you will use the following syntax:
Code:
java com.esri.aims.admincore.cmd.Exec <url> <user> <pword> <options> <commands>
Where:
url = http://host_web_server - Example: http://corleone
user = login user name
pword = login password
options = cmd {used to specify an information tag follows}
file {a file containing predefined commands}
commands = filename or command to process:
SERVICE - Gets all services
VSERVER - Gets all Virtual Servers
PSERVER - Gets all Physical (Spatial) Servers
STATS - Gets stats for all Virtual Servers
- The following examples show how to:
Get Statistics:
Code:
> java com.esri.aims.admincore.cmd.Exec http://corleone admin admin cmd STATS
Get Services:
Code:
> java com.esri.aims.admincore.cmd.Exec http://corleone admin admin cmd SERVICE
Get Virtual Servers
Code:
> java com.esri.aims.admincore.cmd.Exec http://corleone admin admin cmd VSERVER
Get Physical (Spatial) Servers
Code:
> java com.esri.aims.admincore.cmd.Exec http://corleone admin admin cmd PSERVER
- The same command line syntax can be used to process XML batch files. The following illustrates how to do this with the sample testAddandStartService.xml and testStopandRemoveService.xml files:
Code:
> java com.esri.aims.admincore.cmd.Exec http://corleone admin admin file testAddandStartService.xml
Here is the testAddandStartService.xml file:
<?xml version="1.0" encoding="Cp1252"?>
<ADMINCMD VERSION="0.1">
<SERVICES>
<SERVICE TYPE="ADD"
NAME="WORLD1"
AXL="c:\ArcIMS\Axl\world.axl"
VSNAME="ImageServer1"
IMGLOC="c:\arcims\output"
IMGURL="http://corleone/output"
CLEANUP="5"
IMGTYPE="PNG"
/>
<SERVICE TYPE="START"
NAME="WORLD1"
/>
<SERVICE TYPE="ADD"
NAME="WORLD2"
AXL="c:\ArcIMS\Axl\world.axl"
VSNAME="FeatureServer1"
IMGLOC="c:\arcims\output"
IMGURL="http://corleone/output"
CLEANUP="5"
IMGTYPE="PNG"
/>
<SERVICE TYPE="START"
NAME="WORLD2"
/>
<SERVICE TYPE="ADD"
NAME="WORLD3"
AXL="c:\ArcIMS\Axl\world.axl"
VSNAME="ImageServer1"
IMGLOC="c:\arcims\output"
IMGURL="http://corleone/output"
CLEANUP="5"
IMGTYPE="PNG"
/>
<SERVICE TYPE="START"
NAME="WORLD3"
/>
<SERVICE TYPE="ADD"
NAME="WORLD4"
AXL="c:\ArcIMS\Axl\world.axl"
VSNAME="FeatureServer1"
IMGLOC="c:\arcims\output"
IMGURL="http://corleone/output"
CLEANUP="5"
IMGTYPE="PNG"
/>
<SERVICE TYPE="START"
NAME="WORLD4"
/>
</SERVICES>
</ADMINCMD>
Code:
> java com.esri.aims.admincore.cmd.Exec http://corleone admin admin file testStopandRemoveService.xml
Here is the testStopandRemoveService.xml file:
<?xml version="1.0" encoding="Cp1252"?>
<ADMINCMD VERSION="0.1">
<SERVICES>
<SERVICE TYPE="STOP" NAME="WORLD1" />
<SERVICE TYPE="REMOVE" NAME="WORLD1" />
<SERVICE TYPE="STOP" NAME="WORLD2" />
<SERVICE TYPE="REMOVE" NAME="WORLD2" />
<SERVICE TYPE="STOP" NAME="WORLD3" />
<SERVICE TYPE="REMOVE" NAME="WORLD3" />
<SERVICE TYPE="STOP" NAME="WORLD4" />
<SERVICE TYPE="REMOVE" NAME="WORLD4" />
</SERVICES>
</ADMINCMD>
Click below to see the XML batch file syntax for managing:
- Services (SERVICE)
<?xml version="1.0" encoding="Cp1252"?>
<ADMINCMD VERSION="0.1">
<SERVICES>
<SERVICE TYPE={ ADD | CHANGE | REMOVE | START | STOP }
NAME="WORLD1"
AXL={Any valid axl file e.g. "c:\ArcIMS\Axl\world.axl"}
VSNAME={Any valid Virtual Server name e.g. ImageServer1}
IMGLOC="c:\arcims\output"
IMGURL="http://corleone/output"
CLEANUP={integer number}
IMGTYPE={ PNG | GIF | JPG }
/>
</SERVICES>
</ADMINCMD>
- Physical (Spatial) Servers (PSERVER)
<?xml version="1.0" encoding="Cp1252"?>
<ADMINCMD VERSION="0.1">
<PSERVERS>
<PSERVER TYPE={ ADD | REMOVE }
ID={ unique id for this machine - usually added for you }
MACHINE={ any machine that has monitor running on it }
THREADS={ integer number of threads - used for virtual servers only }
/>
</PSERVERS>
</ADMINCMD>
- Spatial Servers (VSERVER)
<?xml version="1.0" encoding="Cp1252"?>
<ADMINCMD VERSION="0.1">
<VSERVERS>
<VSERVER TYPE={ ADD | CHANGE | REMOVE }
NAME={ Name of VSERVER }
SERVICETYPE={ any valid server component (e.g. ImageServer) }
<PSERVER ID={ ServerID } THREADS={ n } />
/>
</VSERVERS>
</ADMINCMD>