The Manage Service utility allows you to stop, start, and delete services from the command line. You can also use this utility to view the status of your services.
Parameters
Parameter | Details |
---|---|
-u | The name of an ArcGIS Server user who will execute the utility. The user must have the appropriate level of privileges to execute the action. If your site is configured with web-tier authentication, specify a built-in user, such as the primary site administrator account. |
-p | The password of the user who was specified with the -u parameter. |
-s | The URL of the site, in one of the following formats:
|
-n | The name of the service on which you want to perform an operation. If in a folder, use the syntax <Folder name>/<Service name>. |
-o | The operation you want to perform on the service. Options are STATUS | START | STOP | DELETE. |
-l | Lists the services on the GIS server and displays whether they are stopped or started. |
-h | Prints help for the utility. |
Examples
The following example stops a service named Fire in the root folder.
Legacy:
At 10.2.2 and earlier versions, you were required to reference the Python directory and Python extension (.py) when executing the utilities from the command line. At 10.3, this is no longer required. You can run the utilities directly from the command line without referencing these Python dependencies.
If you implemented logic that automates the execution of these utilities, you need to update your scripts to remove the Python dependencies, for example:
- <ArcGIS Server installation location>/arcgis/server/tools/python
- The .py extension when referring to the name of the command line utility
See the following example below for correct usage:
<ArcGIS Server installation location>/arcgis/server/tools/admin/manageservice -u admin -p admin -s http://gisserver.domain.com:6080 -n Fire -o stop
The following example starts a service named Parcels in the folder Beirut.
<ArcGIS Server installation location>/arcgis/server/tools/admin/manageservice -u admin -p admin -s http://gisserver.domain.com:6080 -n Beirut/Parcels -o start
The following example gets the status of a service named Fire in the root folder. The configuredState is what you have configured in ArcGIS Server—in other words, the status you would expect to see under normal conditions. The realTimeState represents whether the service is actually functioning and is what you want to check if you are interested in finding out which services are down.
<ArcGIS Server installation location>/arcgis/server/tools/admin/manageservice -u admin -p admin -s http://gisserver.domain.com:6080 -n Fire -o status
configuredState: STARTED
realTimeState: STARTED
The following example deletes the service named Fire.
<ArcGIS Server installation location>/arcgis/server/tools/admin/manageservice -u admin -p admin -s http://gisserver.domain.com:6080 -n Fire -o delete
The following example lists all the services in the site.
<ArcGIS Server installation location>/arcgis/server/tools/admin/manageservice -u admin -p admin -s http://gisserver.domain.com:6080 -l
Africa.ImageServer | STARTED
GulfportTerrain.ImageServer | STARTED
Landsat.ImageServer | STARTED
NFL.MapServer | STARTED
Roads.MapServer | STARTED
SampleWorldCities.MapServer | STARTED
USA.MapServer | STARTED
Washington.MapServer | STARTED
Yellowstone.MapServer | STARTED
Beirut/Parcels.MapServer | STOPPED
Beirut/Restaurants.MapServer | STARTED
Evergreen/Cultural.MapServer | STARTED
Evergreen/Quakes.MapServer | STARTED
System/CachingTools.GPServer | STARTED
System/PublishingTools.GPServer | STARTED
System/ReportingTools.GPServer | STARTED
Utilities/Geometry.GeometryServer | STOPPED
Utilities/PrintingTools.GPServer | STOPPED
Utilities/Search.SearchServer | STOPPED