Manage Service utility

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.

-p

The password of the user who was specified with the -u parameter.

-s

The URL of the site, in the format http://myserver:6080.

-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.

-t

Passes the token to the server when the utility is executed. If this parameter is omitted, HTTP authentication is used.

-h

Prints help for the utility.

Examples

The following example stops a service named Fire in the root folder.

<Python installation location>\python.exe "C:\Program Files\ArcGIS\Server\tools\admin\manageservice.py" -u admin -p admin -s http://gisserver.domain.com:6080 -t -n Fire -o stop

The following example starts a service named Parcels in the folder Beirut.

<Python installation location>\python.exe "C:\Program Files\ArcGIS\Server\tools\admin\manageservice.py" -u admin -p admin -s http://gisserver.domain.com:6080 -t -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.

<Python installation location>\python.exe "C:\Program Files\ArcGIS\Server\tools\admin\manageservice.py" -u admin -p admin -s http://gisserver.domain.com:6080 -t -n Fire -o status
configuredState: STARTED
realTimeState: STARTED

The following example deletes the service named Fire.

<Python installation location>\python.exe "C:\Program Files\ArcGIS\Server\tools\admin\manageservice.py" -u admin -p admin -s http://gisserver.domain.com:6080 -t -n Fire -o delete

The following example lists all the services in the site.

<Python installation location>\python.exe "C:\Program Files\ArcGIS\Server\tools\admin\manageservice.py" -u admin -p admin -s http://gisserver.domain.com:6080 -t -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
12/18/2014