PDA

View Full Version : W2K: Unable to add performance counter "\UnknownPerformanceCounter(_Total)\...


helixblue
16-02-2005, 20:13
First I would like to thank the Zabbix crew for this fine product. We're in the midst of migrating our departmental monitoring (80 hosts) from Nagios to Zabbix 1.1a5. I just started rolling it out onto our Windows servers and hit a bit of a snag. While the Zabbix 1.1 agent worked great on our XP host, both the Zabbix 1.0 and 1.1a5 agents bomb out on our Windows 2000 backup server.

This is what I get in the log file with DebugLevel=4:

[16-Feb-2005 13:34:41] Log file opened
[16-Feb-2005 13:35:24] Unable to add performance counter "\UnknownPerformanceCounter(_Total)\UnknownPerforma nceCounter" to query: The specified object is not found on the system.

I suspect that there may not be some service running on the machine that may be required for Zabbix to acquire it's performance information. Here are the normal 'microsoft' services that are currently running, am I missing any that may be required?

Background Intelligent Transfer Service
COM+ Event System
Disk Management Service
Distributed Transaction Coordinator
DNS Client
Event Log
Microsoft Console Manager
Net Logon
Network Connections
Plug and Play
Print Spooler
Protected Storage
Remote Procedure Call (RPC)
Remote Procedure Call (RPC) Locator
Remote Registry Service
RunAs Service
SavRoam
Security Accounts Manager
Server
System Event Notification
Task Scheduler
TCP/IP NetBIOS Helper Service
Windows Management Instrumentation
Windows Management Instrumentation Driver Extensions
Windows Time
Workstation

Let me know if there is anything I can do to help figure out the problem. Thanks!

helixblue
16-02-2005, 21:02
It seems to work great on another Windows 2000 machine that I have, so I'm pretty confused on what it may be. I tried to compare services on between the two hosts, and enabled the Telephony and Computer Browser just in case. Still the same error.

I'm now thinking that it is not related to a particular service not running on the broken W2K box. Using the Performance Monitor in Control Panel works just fine. All obvious services are enabled. These are the only services that are running on the working server, but not the non-working one:

+ Distributed File System
+ File Server for Macintosh
+ Remote Access Connection Manager
+ TCP/IP Print Server
+ WMDM PMSP Service

Nothing obvious. I wonder if it's some strange permissions thing? I'm pretty sure the Zabbix agent runs as SYSTEM, however.

festivalman
01-03-2005, 06:28
Well, you're not alone. After over 100 successful windows agent setups with Zabbix, I hit my first snag which produces the error you mentioned above. I've tried setting both the performance service and zabbix to run as administrator, I've made sure all the files involved have the right permissions... The only thing I can think of that's different is that this particular server is Win2k3 Web edition. All the others are standard or enterprise for us. I'm stumped though.

vkimball
21-03-2005, 14:30
I'm having the same problem on two Windows XP SP2 machines here. One works and the other one doesn't. Haven't been able to figure out why yet.

rysar
14-04-2005, 16:53
I'm having a similar problem with 2 Windows 2003 servers, one standard, and one enterprise... the Enterprise server has Service Pack 1 for 2K3 installed, but the Standard Server doesn't.

Has anyone gotten a fix for this?

Lovespider
15-04-2005, 14:16
Same for me. I opened a topic but no answers.
I'm monitoring few server but the only one I got problem is Windows 2003.
I played with the logon informations of the service, I checked the permissions but nope :mad: .
I still cannot get performances from it.

boylesa
18-04-2005, 12:38
Hi, unfortunately I ran into a dead-end with this one as well, very weird.

I successfully installed 4 boxes that worked like a dream and then the 5th produced the Performance counter error. I spent ages trying to get to the bottom of it but in the end had to give up (& look at alternatives).

While I was investigating this I found loads of similar posts, none of which ever seemed to get any hints as to the cause of the problem.

timo
02-05-2005, 18:47
Hi everybody,

please check how long your computer names are. I think I found the reason for the problem.

It's enough to report the length of the name, not the name itself.

Wolfgang
02-05-2005, 20:06
Hi everybody,

please check how long your computer names are. I think I found the reason for the problem.

It's enough to report the length of the name, not the name itself.

Any hint or direction beyond the computername, or do you think it is the length itself?

To all:

Does the eventlog say something about perfmon issues?

timo
02-05-2005, 20:26
It's probably related to the computer name length, or the problem applies to platforms with Unicode charsets. I will investigate it tomorrow in-depth, as I have similar problems on a Windows 2003 Server.

The Win32 API function which returns the name of a performance counter expects a LPTSTR, which seems to be different size, depending on the platform type. I think LPTSTR is defined using a TCHAR, and the size of a TCHAR varies across platforms. However, the Win32 agent defines its MAX_COUNTER_LEN statically (which would be okay as the counter-name is a char), but also uses MAX_COUNTER_LEN for the call to the win32 api function which probably says "hey dude, your string is not long enough". I don't have the exact constant and function names in mind, but as I said above, I will check this tomorrow and send you a feedback and probably a bugfix.

timo
03-05-2005, 14:36
I've built a debug binary. Please run it from the console using

"zabbix_agent_win32.exe standalone"

Here's my debug build for the zabbix win32 agent:

http://www.timohummel.com/temp/zabbix_agent_win32.exe

You don't need to have a running zabbix server, and you can use the following config file (place in c:\zabbix_agentd.conf) for testing:


Server=127.0.0.1
DebugLevel=3
Timeout=30


If you are receiving the "Unable to add performance counter" message again, please post the whole output here.

carls
09-05-2005, 23:22
I am getting a similar error in my event log (application):

The timeout waiting for the performance data collection function "PerfProc" in the "M:\WINNT\system32\perfproc.dll" Library to finish has expired. There may be a problem with this extensible counter or the service it is collecting data from or the system may have been very busy when this call was attempted.

I install from the command line as in the documentation:
zabbixw32 --config c:\config.file install
zabbixw32 start

I get a successful install from the commandline, but zabbix shows "starting" under services, and I see lots of Perconf messages in the event viewer.

This server is running Windows 2000 server with service pack 3.

I have successfully installed zabbix on many similar servers. Only one of those servers so far has this problem. We have a mix of NT4.0, WIN2K and WIN2003 servers. The server with the zabbix error has a server name with 6 characters.

I checked in the registry and didn't see anything wrong - zabbix seems to add a key in "services".

I would like to try the debug version but I don't have visual studio 2005. The debug version (above) complains about a missing msvcr80d.dll. Is there any way to debug without vs 2005?

timo
09-05-2005, 23:25
You can find the DLL here:

http://www.scratch-ware.net/dfiles/

carls
12-05-2005, 16:55
I copied msvcr80d.ddl to my system32 folder from the link above. However now I get a "The procedure entry point __report_gsfailure_gsfailure could not be located in the dynamic link library msvcr80d.dll"

Is this a dll version problem? Sorry I have no experience with windows debugging.

Thanks,

Carl

timo
12-05-2005, 18:48
yes, probably. I will create a static binary in a while.

dm0nkz
13-05-2005, 05:38
.. This is really great news.. i tried using zabbix but switched back to nagios last month when i encountered the said problem :o :o

Would like to know if anyone has tried the mentioned solution and perhaps share their success stories? ;)

Thanks!

dm0nkz

timo
13-05-2005, 08:58
Uhm there isn't a solution yet. The debug binary gives us more information what happens, in order to see what the problem is. As I said above, I have to create a debug binary so that we can find out what happens.

timo
13-05-2005, 10:02
Please use this DLL:

http://www.timohummel.com/temp/msvcr80d.dll

Overwrite the old DLL you previously downloaded. Let me know if it works and what the debug zabbix agent outputs on your console.

It seems that VC doesn't let me build static binaries, I have no clue why.

carls
13-05-2005, 23:20
I successfully ran your binary / dll. Here are my results:

M:\>zabbix_agent_win32 --config m:\zabbix_agentd.conf standalone
Using configuration file "m:\zabbix_agentd.conf"
Configuration file OK
Buffer len: 108
System Up Time (14)
Buffer len: 108
System (6)
Buffer len: 108
% Processor Time (16)
Buffer len: 108
Processor (9)

I also noticed lots of messages in the event log like:

The timeout waiting for the performance data collection function "PerfProc" in the "M:\WINNT\system32\perfproc.dll" Library to finish has expired. There may be a problem with this extensible counter or the service it is collecting data from or the system may have been very busy when this call was attempted.


Thanks a lot for your help on this!!

lewars
01-07-2005, 16:54
I have also tried with the supplied agent, these are my results:


D:\>zabbix_agent_win32.exe --config "d:\zabbix_agentd.conf" standalone install-e
vents
Using configuration file "d:\zabbix_agentd.conf"
Configuration file OK
Buffer len: 108
System Up Time (14)
Buffer len: 108
System (6)
Buffer len: 108
% Processor Time (16)
Buffer len: 108
Processor (9)
[01-Jul-2005 10:47:57] Unable to add performance counter "\Processor(_Total)\% Processor Time" to query: The specified object is not found on the system.

cybaspace
08-07-2005, 18:17
We had the same problem and it was indeed the servername length. It was Nexdoublerdl380 and it gave exact the same errors as described above. I changed the name to NexDblr and all went smooth!

So changing the servername to a shorter name will solve most of these problems.

mucknet
02-08-2005, 03:36
I too have this problem..

Is there a fix available?

Machine name is

webserver2-perf

Alexei
20-08-2005, 08:43
I've added additional debug information for tracing this problem. Please, download the latest agent from www.zabbix.com/downloads, specify LogFile and run the agent.

Alexei
21-08-2005, 12:32
I did additional changes. Please, download the agent from www.zabbix.com/downloads (../downloads), test it and let me know if it works.

Thanks!

steve.tempest
22-08-2005, 03:00
I have installed and tested the new w32agent. It work's

************************************************** ************
[22-Aug-2005 08:44:05] Log file opened
[22-Aug-2005 08:44:05] Collector thread initialized successfully
[22-Aug-2005 08:44:05] Zabbix Win32 Agent started

Thanks you very much for taking the time to help resolve this.

sysigs
26-08-2005, 10:27
i still have the probleme with the last zabbixw32.exe version 1.1Alpha12
my server is w2K sp4 US with security patch uptodate and with language french Pack. Only one server make this sort of problem the 20 other not.

Alexei
26-08-2005, 12:51
i still have the probleme with the last zabbixw32.exe version 1.1Alpha12
my server is w2K sp4 US with security patch uptodate and with language french Pack. Only one server make this sort of problem the 20 other not.

The W32 agent from 1.1alpha12 distribution does not fix this problem. You have to use the very latest one from www.zabbix.com/downloads (http://www.zabbix.com/downloads).

sysigs
26-08-2005, 13:21
first thank for your answer and for this good software.
I download the ZabbixW32.exe in the folder http://www.zabbix.com/download
and when i launch it :
ZabbixW32.exe version
Zabbix Win32 Agent Version 1.1alpha12 Build of Aug 21 2005
wich one i have to download

Alexei
26-08-2005, 13:23
ZabbixW32.exe version
Zabbix Win32 Agent Version 1.1alpha12 Build of Aug 21 2005
wich one i have to download

Yes, this the agent you should use to get rid of the "long hostname" problem.

sysigs
26-08-2005, 13:37
Yes, this the agent you should use to get rid of the "long hostname" problem.

than it doesn't work for me i maybe have another problem

Extrat of the logfile

[26-Aug-2005 13:27:26] Log file opened
[26-Aug-2005 13:27:31] Unable to add performance counter "\Processor(_Total)\% Processor Time" to query: L'objet spécifié n'a pas été trouvé sur le système.

C:\zabbix_agent_win32-1.0\Debug\ZabbixW32.exe version
Zabbix Win32 Agent Version 1.1alpha12 Build of Aug 21 2005

Maximum
08-09-2006, 19:21
I installed Zabbix for the first time yesterday and I managed to get the agent for linux working on the same machine as the server. When I tried the windows agent I ran into the:
Unable to add performance counter "\Processor(_Total)\% Processor Time" to query: The specified object is not found on the system.

To fix this I googled like h*ll and came to this solution:

First, what is the problem ?
The problem is one (or more) of the following:
1. The files c:\windows\system32\perf*009.dat where * can be c, d, h or f are damaged
2. The entries in the registry under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\Perflib\009 are corrupt
3. The perfos.dll counters are disabled

Second, what the f**k do you do to fix this ?
1. let us hope that its just the perfos.dll counters that are disabled and start with enabling them.
Download the program exctrlst.exe from M$
http://www.microsoft.com/downloads/details.aspx?FamilyID=7ff99683-b7ec-4da6-92ab-793193604ba4&displaylang=en
install the program and start it, klick on the "library file" radio button and mark the line starting with perfos.dll in the list. Now the "Performance Counters Enabled" checkbox should be checked, if it's not - check it and reboot...and pray that it works after the reboot. (I belive that this step is rather harmless so I should try it on machines that are in production).

2. If step 1 above did not work you have to do scary things that I should not try on important servers (without a real good backup, maybe clone your machine first) follow the directions on
http://support.microsoft.com/?kbid=300956

I tried step 2 first and it did not help me, it only broke some of my .Net-performance counters, but did not give me the processor counter back.
After this I found step 1 and when I enabled the perfos.dll counters the Zabbix agent started just fine. Because of this I dont know if "step 1" alone can fix the problem so you have to try, please post any success stories and tell me if you needed to do step 2.
The machine that I had this problem on is running Windows XP Pro SP 2 english with all released hotfixes installed.
Hope this post can help you guys.

Best regards /Maximum

coldfire
17-10-2006, 13:05
Hello there,

great that's it for me too - I just had to do the first step - even without reboot, after checking the box for perfos.dll it worked immediately.