I couldn’t figure out if there are a tool or a way to count the number of allocated max\min instances for all published services. See below
Best Regards,
Rawan
Good Morning Rawan,
Check and download the attached python file and try to run it.
No need to spend time on format this code.
https://community.esri.com/docs/DOC-9922-arcgis-server-map-service-properties
You can look into writing a python script to get the "minInstancesPerNode" and "maxInstancesPerNode" properties from the Admin API:
https://<server>.<domain>.com:6443/arcgis/admin/services/SampleWorldCities.MapServer?f=pjson
Dear Jonthan,
Thanks for you reply,I need this to be applied on all services.
How could I add a python script to get the "minInstancesPerNode" and "maxInstancesPerNode" properties from the Admin API:?
I opened this link, and logins as admin but I couldn’t made any changes, maybe I misunderstand this point.
You're at the Rest API, not the Admin API:
The bolded section is the URL to the Admin API. Log in with administrative credentials to make changes.
I would start with looking at the overview of scripting administration of your Server, and the specific examples of editing service properties and checking a folder for stopped services for pieces of code you can use.
Dear Jonathan,
Hi
Please try below link code and generate one output file with all details about services.
From this file you can calculate total instance assigned from one ArcGIS server.
Dear Avinash Kumar Patel,
Thanks for your reply,
Actually, I’m not sure where should I apply this code to get the required information.
Can you please tell me the path in Admin API where I could run this code?
Best,
Hi Rawan,
You need to copy the code in notepad and make the extension as .py like(avinash.py).
After that you need to double click it
Give inputs like:
Enter user name: avinashEnter password:Enter server name: avinashOutput File: \avinash.csvYou can get the output file on you save location.
Make sure system have python installed on it like where ArcGIS server or desktop installed on it.
Dear Avinash,
Thank you for your answer.
I tried to do what you are mention, but it doesn’t work for me.
When I double click on the “file py” it’s not open like the screenshot you provide.
And I make sure the python is installed. attached
What might be the issue here?
Try like thisIn Start menu>search python >select python GUI>then in GUI file>new file>past your code & save >run it
Are you able to execute this.
Many thanks for your answer.
Kindly find the following screenshots.
The variables on line 6, 7, and 8 are simply place holders. Replace them with the appropriate information for your Server.
I got the same error even though I entered the specific variable
If you can reach what you entered for the baseURL in a browser on the machine you're running the script, there shouldn't be a reason why you see the getaddrinfo error in Python. That error simply means the host can't be found.
Jonathan Quinn script.
Find the out put like
Total minimum instances: ****---countTotal maximum instances: ***--count
https://community.esri.com/docs/DOC-9922/edit?draftID=328241
Jonathan_Avinash.zip
Are you able to execute this?
Thanks for your effort, actually I couldn’t access the above link. Attached
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.