HOW TO

Manage ArcIMS from the command line

Last Published: April 26, 2020

Summary

ArcIMS Services, Spatial Servers, and Virtual Servers can be managed from the command line. In addition, information about an ArcIMS site can be retrieved using the command line. To manage ArcIMS from the command line, the ArcIMS servlet connector must be installed on the Web server. Reference to the hostname in this article is referencing the Web server hostname.

Procedure

The sections below detail how to manage servers and services and retrieve site information using the command line.
  • To manage ArcIMS from the command line, first open a command prompt. From the command prompt use the following syntax:
    java com.esri.aims.admincore.cmd.Exec <url> <user> <pwd> <options> <commands>
    Where:
    url		= http://host_web_server - Example: http://arcims1
    user		= login user name for ArcIMS Administrator
    pwd		= login password for ArcIMS Administrator
    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
    • Retrieving ArcIMS Site Information
      Note:
      Information about an ArcIMS site can be retrieved using the command line.  Note that the following jar files (installed with ArcIMS) must be in the Java runtime's classpath for the command line to function properly:  jaxp.jar, parser.jar, esri_mo10.jar, esri_mo10res.jar, arcims_admincore.jar, arcims_admin.jar, jcert.jar, jnet.jar, jsse.jar, arcims_resadmin.jar.  These jar files can be found under $AIMSHOME/Manager/lib.
      The following examples show how to:
      Get Statistics:
      java com.esri.aims.admincore.cmd.Exec http://arcims1 admin admin cmd STATS
      Get Services:
      java com.esri.aims.admincore.cmd.Exec http://arcims1 admin admin cmd SERVICE
      Get Virtual Servers:
      java com.esri.aims.admincore.cmd.Exec http://arcims1 admin admin cmd VSERVER
      Get Physical Servers:
      java com.esri.aims.admincore.cmd.Exec http://arcims1 admin admin cmd PSERVER
      List computers that Monitor Services are running on:
      java com.esri.aims.admincore.cmd.Exec http://arcims1 admin admin cmd MONITOR
      Save the current site configuration:
      java com.esri.aims.admincore.cmd.Exec http://arcims1 admin admin cmd SAVE
      Managing Services and Servers

      To administer ArcIMS services and/or servers from the command line, two files are used, both of which are created by the user:

      · An ADMINCMD XML file.
      · A batch file or script.

      The ADMINCMD XML file contains the instructions for adding or removing services and servers, and starting or stopping of services. The following examples show proper construction of an ADMINCMD XML file, for UNIX and Windows operating systems.

      The following command line syntax illustrates how to:

      Add spatial and virtual servers:
      For ArcIMS 3.1, 4.0 and 4.0.1 on Windows:
      java com.esri.aims.admincore.cmd.Exec <b>http://arcims1</b> admin admin file <b><drive>:\Folder_Name\</b>testAddSpatialandVirtualServer.xml
      For ArcIMS 3.1 on UNIX:
      #!/bin/csh
      setenv JARHOME $AIMSHOME/Manager/lib
      setenv AIMSHOST <b>http://arcims1</b>
      java -cp $JARHOME/jaxp.jar:$JARHOME/parser.jar:$JARHOME/arcims_sdk.jar:$JARHOME/arcims_ressdk.jar:$JARHOME/arcims_admincore.jar:$JARHOME/arcims_admin.jar:$JARHOME/jcert.jar:$JARHOME/jnet.jar:$JARHOME/jsse.jar:$JARHOME/arcims_resadmin.jar com.esri.aims.admincore.cmd.Exec http://$AIMSHOST <b>user_id password</b> file $FILEHOME/testAddSpatialandVirtualServer.xml
      For ArcIMS 4.0 and 4.0.1 on UNIX:
      #!/bin/csh
      setenv JARHOME $AIMSHOME/Manager/lib
      setenv AIMSHOST <b>http://arcims1</b>
      java -cp $JARHOME/jaxp.jar:$JARHOME/parser.jar:$JARHOME/esri_mo10.jar:$JARHOME/esri_mo10res.jar:$JARHOME/arcims_admincore.jar:$JARHOME/arcims_admin.jar:$JARHOME/jcert.jar:$JARHOME/jnet.jar:$JARHOME/jsse.jar:$JARHOME/arcims_resadmin.jar com.esri.aims.admincore.cmd.Exec http://$AIMSHOST <b>user_id password</b> file $FILEHOME/testAddSpatialandVirtualServer.xml
      The ADMINCMD.xml file testAddSpatialandVirtualServer.xml (includes threads from two physical servers):
      <?xml version="1.0"?>
      <ADMINCMD version="1.0">
      	<PSERVERS>
      		<PSERVER type="add" machine="<b>mymachine.domain.com</b>"/>
      	</PSERVERS>
      	<VSERVERS>
      		<VSERVER type="add" name="MyIS" access="Public" description="My test VS" servicetype="ImageServer">
      			<PSERVER id="<b>mymachine.domain.com</b>_2" threads="3"/>
      			<PSERVER id="<b>mymachine.domain.com</b>_1" threads="1"/>
      		</VSERVER>
      	</VSERVERS>
      </ADMINCMD>
       
      Note:
      When adding a PSERVER (or spatial server) to your machine using the line <PSERVER type="add" machine="<b>mymachine.domain.com</b>"/> it will automatically be appened with a number. Spatial Servers are listed in numerical order, therefore if you have 3 Spatial Servers currently running the newly added Spatial Server will be mymachine.domain.com_4. You will have to update the batch file so that the line <PSERVER id="<b>mymachine.domain.com</b>_2" threads="3"/> reflects this.
      Add and start map services:
      For ArcIMS 3.1, 4.0 and 4.0.1 on Windows:
      java com.esri.aims.admincore.cmd.Exec <b>http://arcims1</b> admin admin file <b><drive>:\Folder_Name\</b>testAddandStartMapService.xml
      For ArcIMS 3.1 on UNIX:
      #!/bin/csh
      setenv JARHOME $AIMSHOME/Manager/lib
      setenv AIMSHOST <b>http://arcims1</b>
      java -cp $JARHOME/jaxp.jar:$JARHOME/parser.jar:$JARHOME/arcims_sdk.jar:$JARHOME/arcims_ressdk.jar:$JARHOME/arcims_admincore.jar:$JARHOME/arcims_admin.jar:$JARHOME/jcert.jar:$JARHOME/jnet.jar:$JARHOME/jsse.jar:$JARHOME/arcims_resadmin.jar com.esri.aims.admincore.cmd.Exec http://$AIMSHOST <b>user_id password</b> file $FILEHOME/testAddandStartMapService.xml
      For ArcIMS 4.0 and 4.0.1 on UNIX:
      #!/bin/csh
      setenv JARHOME $AIMSHOME/Manager/lib
      setenv AIMSHOST <b>http://arcims1</b>
      java -cp $JARHOME/jaxp.jar:$JARHOME/parser.jar:$JARHOME/esri_mo10.jar:$JARHOME/esri_mo10res.jar:$JARHOME/arcims_admincore.jar:$JARHOME/arcims_admin.jar:$JARHOME/jcert.jar:$JARHOME/jnet.jar:$JARHOME/jsse.jar:$JARHOME/arcims_resadmin.jar com.esri.aims.admincore.cmd.Exec http://$AIMSHOST <b>user_id password</b> file $FILEHOME/testAddandStartMapService.xml
      The ADMINCMD.xml testAddandStartMapService.xml (This example will add an ImageService that uses the original ImageServer, an ImageService that uses the newly created ImageServer and a FeatureService that uses the original FeatureServer. For adding an ArcMapImageService please see the ArcXML Programmers reference guide.):
      <?xml version="1.0"?>
      <ADMINCMD version="1.0">
      <SERVICES>
      	<SERVICE type="add" name="world_image"
      		axl="<b><drive></b>:\arcims\axl\world.axl"
      		vsname="ImageServer1"
      		imgloc="<b><drive></b>:\arcims\output"
      		imgurl="http://<b>mymachine.domain.com</b>/output"
      		imagememory="4"
      		cleanup="20"
      		imgtype="JPG" />
      
      	<SERVICE type="start" name="world_image" />
      
      	<SERVICE type="add" name="world_image2"
      		axl="<b><drive></b>:\arcims\axl\world.axl"
      		vsname="MyIS"
      		imgloc="<b><drive></b>:\arcims\output"
      		imgurl="http://<b>mymachine.domain.com</b>/output"
      		imagememory="4"
      		cleanup="20"
      		imgtype="JPG" />
      
      	<SERVICE type="start" name="world_image2" />
      	<SERVICE type="add" name="world_feature"
      		axl="<b><drive></b>:\arcims\axl\world.axl"
      		vsname="FeatureServer1"/>
      
      	<SERVICE type="start" name="world_feature" />
      
      </SERVICES>
      </ADMINCMD>

      Stop and delete map services:
      For ArcIMS 3.1, 4.0 and 4.0.1 on Windows:
      java com.esri.aims.admincore.cmd.Exec <b>http://arcims1</b> admin admin file <b><drive>:\Folder_Name\</b>testStopandDeleteServices.xml
      For ArcIMS 3.1 on UNIX:
      #!/bin/csh
      setenv JARHOME $AIMSHOME/Manager/lib
      setenv AIMSHOST <b>http://arcims1</b>
      java -cp $JARHOME/jaxp.jar:$JARHOME/parser.jar:$JARHOME/arcims_sdk.jar:$JARHOME/arcims_ressdk.jar:$JARHOME/arcims_admincore.jar:$JARHOME/arcims_admin.jar:$JARHOME/jcert.jar:$JARHOME/jnet.jar:$JARHOME/jsse.jar:$JARHOME/arcims_resadmin.jar com.esri.aims.admincore.cmd.Exec http://$AIMSHOST <b>user_id password</b> file $FILEHOME/testStopandDeleteServices.xml
      For ArcIMS 4.0 and 4.0.1 on UNIX:
      #!/bin/csh
      setenv JARHOME $AIMSHOME/Manager/lib
      setenv AIMSHOST <b>http://arcims1</b>
      java -cp $JARHOME/jaxp.jar:$JARHOME/parser.jar:$JARHOME/esri_mo10.jar:$JARHOME/esri_mo10res.jar:$JARHOME/arcims_admincore.jar:$JARHOME/arcims_admin.jar:$JARHOME/jcert.jar:$JARHOME/jnet.jar:$JARHOME/jsse.jar:$JARHOME/arcims_resadmin.jar com.esri.aims.admincore.cmd.Exec http://$AIMSHOST <b>user_id password</b> file $FILEHOME/testStopandDeleteServices.xml
      The ADMINCMD.xml testStopandDeleteServices.xml (This sample will stop and delete the above added services):
      <?xml version="1.0"?>
      <ADMINCMD version="1.0">
      	<SERVICES>
      		<SERVICE type="stop" name="world_image" />
      		<SERVICE type="remove" name="world_image" />
      		<SERVICE type="stop" name="world_image2" />
      		<SERVICE type="remove" name="world_image2" />
      		<SERVICE type="stop" name="world_feature" />
      		<SERVICE type="remove" name="world_feature" />
      	</SERVICES>
      </ADMINCMD>

      Delete spatial and virtual servers:
      For ArcIMS 3.1, 4.0 and 4.0.1 on Windows:
      java com.esri.aims.admincore.cmd.Exec <b>http://arcims1</b> admin admin file <b><drive>:\Folder_Name\</b>testDeleteSpatialandVirtualServer.xml
      For ArcIMS 3.1 on UNIX:
      #!/bin/csh
      setenv JARHOME $AIMSHOME/Manager/lib
      setenv AIMSHOST <b>http://arcims1</b>
      java -cp $JARHOME/jaxp.jar:$JARHOME/parser.jar:$JARHOME/arcims_sdk.jar:$JARHOME/arcims_ressdk.jar:$JARHOME/arcims_admincore.jar:$JARHOME/arcims_admin.jar:$JARHOME/jcert.jar:$JARHOME/jnet.jar:$JARHOME/jsse.jar:$JARHOME/arcims_resadmin.jar com.esri.aims.admincore.cmd.Exec http://$AIMSHOST <b>user_id password</b> file $FILEHOME/testDeleteSpatialandVirtualServer.xml
      For ArcIMS 4.0 and 4.0.1 on UNIX:
      #!/bin/csh
      setenv JARHOME $AIMSHOME/Manager/lib
      setenv AIMSHOST <b>http://arcims1</b>
      java -cp $JARHOME/jaxp.jar:$JARHOME/parser.jar:$JARHOME/esri_mo10.jar:$JARHOME/esri_mo10res.jar:$JARHOME/arcims_admincore.jar:$JARHOME/arcims_admin.jar:$JARHOME/jcert.jar:$JARHOME/jnet.jar:$JARHOME/jsse.jar:$JARHOME/arcims_resadmin.jar com.esri.aims.admincore.cmd.Exec http://$AIMSHOST <b>user_id password</b> file $FILEHOME/testDeleteSpatialandVirtualServer.xml
      The ADMINCMD.xml testDeleteSpatialandVirtualServer.xml (This sample will delete the previously added Spatial and Virtual Servers):
      <?xml version="1.0" encoding="UTF8"?>
      <ADMINCMD version="1.0">
      	<VSERVERS>
      		<VSERVER type="remove" name="MyIS"/>
      	</VSERVERS>
      
      	<PSERVERS>
      		<PSERVER type="remove" machine="<b>mymachine.domain.com</b>"		
      		id="<b>mymachine.domain.com</b>_2"/>
      	</PSERVERS>
      </ADMINCMD>

Article ID:000003838

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic