Skip To Content

Manage Service utility

In this topic

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

ParameterDetails

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

  • http://gisserver.domain.com:6080
  • http://webadaptor.domain.com/arcgis
If your site is configured with web-tier authentication, you'll need to specify the local URL to your site.

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

<Python installation location>\python.exe "C:\Program Files\ArcGIS\Server\tools\admin\manageservice.py" -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.

<Python installation location>\python.exe "C:\Program Files\ArcGIS\Server\tools\admin\manageservice.py" -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.

<Python installation location>\python.exe "C:\Program Files\ArcGIS\Server\tools\admin\manageservice.py" -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.

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