performance counter category 'Process' cannot be accessed on computer- VS load Test - visual-studio

When i run Load test using Vs Load Test i get an exception
The performance counter category 'Process' cannot be accessed on computer;check that the category and computer names are correct. - -

You need to sort out permissions etc to allow the user and computer running the tests to collect the performance counters from the remote machine. The short answer is that if the user running the tests cannot see the counters with Perfmon then Visual Studio will not be able to see them. Hence Perfmon can be used to give confidence that the settings are correct.
To enable collection of performance counters by a Visual Studio load test do the following in each remote computer to be monitored. Perform these steps while logged in to a sufficiently privileged account.
1) Run wf.msc. In the inbound category, enable the Performance Logs & Alerts firewall exception.
2) Run lusrmgr.msc. Add the user to the Performance Log Users, the Performance Monitor Users and the Event Log Readers groups. The user to be added is the user who will be running the tests.
3) Run services.msc. Ensure the Performance Logs & Alerts and the Remote Registry services are set to autorun.
4) Run secpol.msc. Ensure that the Performance Log Users and the Performance Monitor Users groups include the Log on as a Batch User privilege.
5) At a command prompt rebuild all counters on the machine by running lodctr /r. (Have seen this command returning the message Error: Unable to rebuild performance counter setting from system backup store, error code is 5. Have not tracked down the reason but it does not appear to cause any problems.)
These commands are explained in more detail here.

Related

JMeter cannot collect CPU per process due to Access Denied error

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?
You can work this around by running Server Agent with elevated privileges, it could be done in 2 ways:
Using psexec tool you can run a process with SYSTEM account rights
Using Task Scheduler you also have possibility to start process with the highest privileges
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.

OEM 13C Log File Monitoring

I have installed OEM 13c and deployed a couple of agents and want to test out the Log File Monitoring utility. I have enabled it and added a log file to monitor.
When I go and test it out, it does not show any alerts when they are put into the Log File. On the agent server, I have tailed the file and see the messages coming into the log file.
Does anyone have experience adding log files to OEM? I could have configured it wrong. Or is there any troubleshooting steps that I can follow to see if the server is even contacting the agent for reading the log file. Status of the agent is good with no incidents.
Without access to the system, it would be difficult to tell you the exact cause of this issue. However, I can list a few potential causes of this issue that I have experienced personally:
Permissions. The Oracle Enterprise Manager Agent is very convoluted when it comes to system permissions within a remote server. The agent can be owned and run as any number of users but during metric evaluation, may also need sudo or pam-authentication permissions to access certain entities on the server. Depending on the authentication profiles on that server, this could be the cause of your issue. There are ways to grant the agent access through the PAM stack if that is necessary.
Syntax. The wildcard syntax in the OEM GUI can be a little confusing as well. I would play with the wildcard elements a bit on the "String" component to ensure that it isn't as simple as adding wildcards to the beginning and end of the string. Without diving into the binaries of the agent plugins, it is difficult to assess exactly how the agent is evaluating this particular metric
One suggestion I would have is to go through the agent commands. There are specific commands you can run to manually force an agent to evaluate a particular metric for a particular target. This can allow you to manually trigger the metric collection locally on the server and evaluate what exactly is being performed at the agent level.
On the system I was running (12c) the command was as follows:
emctl control agent runCollection <hostname>:host host_storage

nca_connect_server: cannot communicate with host in LoadRunner 12.53

I'm currently testing HP LoadRunner 12.53 with Oracle EBS R12.2.5.
I created a simple script using both Oracle Apps, and Oracle NCA + Http protocol (Log in, bring up a form and close/log out) and replayed but run into below error. (same error for both scripts)
nca_connect_server: cannot communicate with host
icx_ticket is correlated and works OK as it is picked and replaced in the parameter.
No need to correlate JSessionIDForms as EBS is running on socket mode.
It is s just simple script with single correlation but can't find any clue for the error.
What could be the root cause of the error?
Where should I look at for a clue? How to make the error / log more verbose and detailed
Thanks in advance
Record it twice. If the value shifts, then correlate it.
Please ensure that you have properly set up the environment before recording, Below steps need to be taken for setting up the environment
1.Set "record = names" flag for specific user profile in Oracle EBS Application** via administrator login (search google how to achieve this or simply ask your application team to do it for you)
2.Run Time Settings and Default.cfg file changes
Run Time Settings
Keep the below values to high limit to avoid replay timeout errors
Run-Time Settings > Internet Protocol >Preferences > Options>
Step Download Limit
HTTP-request connect timeout:
HTTP-receive receive timeout:
Keep-Alive timeout:
Run-Time Settings >Browser>Browser Emulation>
1) Simulate a new user on each iteration – checked
3. default.cfg file inside script directory
"RelativeURL={NCAJServSessionId}" statement in the default.cfg file rolls back each time we run the script so we need to check that it is
/forms/lservlet;JsessionIDForms={NCAJServSessionId} -- R12 Version or
/forms/formservlet?JServSessionIdforms={NCAJServSessionId} -- EBS 11
i Version
4. Correlation - Last but not the least
Ensure correct correlation of each and every parameter, The best way to achieve this is by recording the script 2 times and comparing them using a suitable tool, Correlate each value which might be changing each time you replay the script
Note :- The Oracle EBS is not fully supported by Loadrunner please download the loadrunner compatability matrix and check if your version is supported by Loadrunner.

Unable to get performance counters from certain servers when running load tests

I am running load tests using the built in system in Visual Studio 2010. The setup is a test controller with four agents. The tests that I am running will put load on an application server and a database server. The problem I am having is that I am unable to get values from the performance counters on the application server and the database server. I have followed the instructions on http://msdn.microsoft.com/en-us/library/ms404661%28v=vs.100%29.aspx and http://blogs.catapultsystems.com/tlingenfelder/archive/2009/06/18/performance-counters-timeouts-and-load-testing-with-visual-studio-2008.aspx in order to troubleshoot, but to no avail.
Using Performance Monitor (perfmon) I can connect and get values from the performance counters on the application server and database, tested from several computers. But when running the load tests, I get nothing.
I am trying to get system performance counters like CPU% and memory usage, so there are no custom counters involved.
Any hints as to what I shoud do next?
The main problem was that I was not aware of that in order to get performance data from a computer during load testing it should have a test agent (or controller) installed on it.
Install test agents and register them with the controller on all machines used for load testing (for me, the appserver and the database, those did not have test agents installed)
In the actual load test in Visual Studio, remove the appserver and database from the counter sets
Add them again
Run the test!
Seems like the old reference to the appserver and database in the load test did not work as expected, hence the need to remove and add them again.
Voila! Performance counters appears and returns values!
I have also the same problem.
The only solution I found is to remove some counters in counter sets and also increase the sampling interval (see here).
Another things that i have in my rig are Roles : agents will run tests but not collect data ; this will be done by my web server (installed a test agent on it). Please look at the link.

Load Test : Exception for access denied for agent pc (LoadTestCounterCategoryNotFoundException)

Exception LoadTestCounterCategoryNotFoundException 1
The performance counter category 'Memory' cannot be accessed on computer 'SHIKHA-PC' (Access is denied) ; check that the category and computer names are correct.
I got this error while running a the load test. The test includes 2 agents one on the controller machine from where I run the test, and second on Shikha pc mentionned above.
I am using: Window Server 2008, VS2010. Load test is running on the controller machine.
How can I fix this error?
essentially what is happening is that when the load test controller is asking for an perfmon category from 'SHIKHA-PC' it is getting a timeout. Either that happens because you do not have the permission to access the perfmon settings on that PC (a mix of required user permissions and making sure the correct port is open), or there are simply to many requests for the PC to respond to in time.
I have in the past had some success by using TypePerf -q -s SHIKA-PC in a command line session. This "warms up" the performance counters.
Call the Typeperf command from a cmd console on the controller.
For Travis Lingenfelder's blog post on this problem see here
Some steps to take:
Make sure the account running the Visual Studio load test on the
controller is a member of the groups "Performance Monitor Users" and "Performance Log Users"
Test the port 139 is open on between the controller and SHIKA-PC by calling "Telnet shika-pc 139" from a cmd prompt on the controller.
To add my answer to this old question as I just solved this myself:
Ensure that you are running the Controller process as the correct user:
Start->Run->services.msc
Right Click Visual Studio Controller, Properties, Log On tab
Ensure correct user and password is entered there

Resources