Select to view content in your preferred language

List arcsoc memory and cpu processs per service

1091
7
06-08-2023 06:51 PM
EdnaKanazawa
New Contributor II

Is it possivel to monitor arcsocs process per arcgis server service?

I would like to view n arcsocs process per service like above where 

EdnaKanazawa_0-1686274990281.png

but I just one arcsoc.exe process

EdnaKanazawa_1-1686275045211.png

My query is

{
  "resource": "components",
  "having": [
    {
      "resource": "labels",
      "where": "labels.name = 'MC'"
    }
  ],
  "join": [
    {
      "resource": "metrics",
      "where": "metrics.r_id LIKE '%process_instances%'",
      "join": [
        {
          "resource": "metrics_data"
        }
      ]
    }
  ]
}

What is wrong in my indicator?

0 Kudos
7 Replies
GeoJosh
Esri Regular Contributor

Hi Edna,

This can be accomplished by targeting the host component, joining all metrics that contain "process_instances:arcsoc.exe:", and then joining the metrics data. Here's my expression:

{
  "resource": "components",
  "where": "components.type = 'host' AND components.name = '<name>'",
  "join": [
    {
      "resource": "metrics",
      "where": "metrics.r_id LIKE '%process_instances:arcsoc.exe:%'",
      "join": [
        {
          "resource": "metrics_data"
        }
      ]
    }
  ]
}

Then, configure your chart like so:

GeoJosh_0-1686315057012.png

And the result will be a chart that shows number of arcsox.exe process per service over time.

GeoJosh_1-1686315117676.png

I hope this helps. Let me know if you have further questions.

Josh

 

EdnaKanazawa
New Contributor II

Hi @GeoJosh ,

Thanks for your help

I tried your setup, but now i do not have any record.

EdnaKanazawa_0-1686557161988.png

 

EdnaKanazawa_1-1686557185643.png

Is there any configuration or verification that we can do, because with this configuration it does not return any records.

Edna

0 Kudos
GeoJosh
Esri Regular Contributor

Hi Edna,

It would be helpful to know which part of the query is causing the issue.

  • If you remove the join, is the host returned as a record?
  • If you navigate to the component overview page for the host component you are targeting and click on the Metrics tab, do you see metrics that match the pattern you have defined? ("process_instances:arcsoc.exe")
EdnaKanazawa
New Contributor II

Hi @GeoJosh ,

 

Removing the join, yes, I have the host line

EdnaKanazawa_0-1686582107647.png

 

If I keep the join only withs  metrics with name like arcsoc.exe, I have 4 metrics

EdnaKanazawa_2-1686582341751.png

EdnaKanazawa_1-1686582261938.png

EdnaKanazawa_3-1686582403763.png

 

Navigating on host component, I have only 4 arcsoc pattern to arcsoc,exe

EdnaKanazawa_4-1686582501454.png

Is it something wrong in that part?

Edna

 

 

 

0 Kudos
AndrewSakowicz
Esri Contributor

@EdnaKanazawa I believe this might be related to windows service  ArcGIS Monitor Server (or agent) user permissions.  To parse process commend line, this use needs to be part of admin group and your original expression should work. @GeoJosh 

EdnaKanazawa
New Contributor II

Hi @AndrewSakowicz ,

I added the user that runs the arcgis monitor server service in the administrators group and restart the service, but it didn't happen as expected. I need to unregister e register the host again?

I found that  in https://doc.arcgis.com/en/monitor/latest/install/windows/set-up-and-manage-an-arcgis-monitor-account... that "The ArcGIS Monitor account does not need to be in the Windows Administrators group." 

Edna

0 Kudos
AndrewSakowicz
Esri Contributor

Did you register this host using inherit credentials or provided user name/password?  Whatever method you used, this user needs to be a member of admin group machine.  Re doc, we'll update documentation to clarify that in order to see process command line, a user needs to be member of admin group https://learn.microsoft.com/en-us/powershell/scripting/samples/decode-powershell-command-from-a-runn...