JMeter cannot collect CPU per process due to Access Denied error

K. B.

I have setup server monitoring in a JMeter test. The setup is very similar to the one in this stackoverflow answer. When I am collecting CPU or memory without specifying a process, everything works as expected. I see the graphs with correct metrics.

However, when I try to collect CPU per process, for example with metric parameter pid=8948:percent, the graph is empty, no samples are collected and I see the following exception on the monitored server:

ERROR   2018-04-03 13:17:14.607 [kg.apc.p] (): Error getting metric
org.hyperic.sigar.SigarPermissionDeniedException: Access is denied.
: 8948
        at org.hyperic.sigar.SigarProxyCache.invoke(SigarProxyCache.java:218)
        at com.sun.proxy.$Proxy0.getProcCpu(Unknown Source)
        at kg.apc.perfmon.metrics.CPUProcMetric.getValue(CPUProcMetric.java:35)
        at kg.apc.perfmon.PerfMonMetricGetter.getMetricsLine(PerfMonMetricGetter
.java:114)
        at kg.apc.perfmon.PerfMonWorker.processSenders(PerfMonWorker.java:280)
        at kg.apc.perfmon.PerfMonWorker.run(PerfMonWorker.java:243)
        at java.lang.Thread.run(Unknown Source)

I tried getting the process by name, but the exception is the same. I run startAgent.bat --sysinfo and indeed the user has no rights on the process w3wp.exe (8948) that I want to monitor (The user does not "see" this process).

The documentation states explicitly that I do not need admin rights on the application server (Windows Server 2012 R2). The user already has Performance Monitor Users and Performance Log Users role.

So how can I monitor CPU per process in a JMeter test with user that is not an administrator on the application server?

Dmitri T

You can work this around by running Server Agent with elevated privileges, it could be done in 2 ways:

  1. Using psexec tool you can run a process with SYSTEM account rights

    PSExec become system

  2. Using Task Scheduler you also have possibility to start process with the highest privileges

    JMeter Task Scheduler

Given you run Server Agent with elevated rights - you should be able to collect CPU metrics for IIS process.

See How to Monitor Your Server Health & Performance During a JMeter Load Test article for more information on using PerfMon Metrics Collector and Server Agent.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Powershell Start-Process : This command cannot be executed due to the error: Access is denied

Jmeter showing error : Cannot create PoolableConnectionFactory (Access denied for user 'shubham@localhost'@'118.185.61.226' (using password: YES))

IBM Watson error: Access is denied due to invalid credentials

WatsonApiException: Error: Unauthorized: Access is denied due to invalid credentials , Code: 401

ERROR: Could not install packages due to an OSError: [WinError 5] Access denied

Calculate CPU per process

the process cannot access the file 'filename' because it is being used by another process. and Access to the path 'filename' is denied

iOS - Xcode Error: cannot attach to process due to System Integrity Protection

Netbeans - Error : Failed to create process Access is denied (5)

"Access Denied" error during TFS XAML build process

Monitor cpu usage per process

Cannot authenticate to push or pull repository: remote error: Access denied

Cannot create new agent pool, Access denied error

JMeter - Error when starting test plan- keytool error: proxysever.jks (access is denied)

FileStream error - The process cannot access the file...used by another process

"Access is denied due to invalid credentials" REST API error. How to solve?

Retrieving the COM class factory for component with CLSID failed due to the following error: 80070005 Access is denied

Getting an error calling watson conversation service - Unauthorized : Access is denied due to invalid credentials

IBM Watson Visual Recognition (NodeJS) - Error code 403 : Forbidden: Access is denied due to invalid credentials

Access denied Process.Start

Cannot bind to some ports due to permission denied

Cannot execute gcc due to "permission denied"

Access denied due to firewall policy violation

unable to create database due access denied

Have local admin privileges on Windows XP, but getting "Error terminating process: Access is denied". How to kill the process?

Error apache : access denied

MySQL error access denied

PSSession Access Denied Error

Error due to private access