NT performance counter problem

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
michael
Posts: 7
Joined: Sun Sep 21, 2003 10:37 pm

NT performance counter problem

Post by michael »

Hello,

First of all i have to say that hostmon is a greate software.
But i have a problem that i can't resolve.

I use hostmon to monitor a wide range of performance and avalibility counter. All counter types and checktype works fine but only the Perfmon Counter from NT works not properly.

The problem is that sometimes the perfmon counter are unknown. I had configured the the status unknown is not threaded as bad. But if the counter is going back to ok always the Good Action Event will thrown. I use SMS for sending messages. So everytime if the Status will change from unknown to good i will get a SMS.

I have tryed to supress the messages by useing the macro variable %laststatus% (execute external Programm) and if the last status is Unknown so i suppress sending messages, but the variable is everytimie NULL.

Please help

Mike
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Hello,
I use hostmon to monitor a wide range of performance and avalibility counter. All counter types and checktype works fine but only the Perfmon Counter from NT works not properly.
The problem is that sometimes the perfmon counter are unknown
http://www.ks-soft.net/hostmon.eng/mfra ... #perfnotes
-----------------------------------
Note #2 (bugs): Windows implementation of performance counters has bugs. E.g., Windows 2000 (Professional, Server, and Advanced Server editions) can produce memory leak in Pdh.dll when user (application) querying performance counter that does not exist. This bug fixed in SP2. Also pdh.dll does not work correctly with multithread applications.
That's why in HostMonitor we have implemented several different methods to work with pdh.dll:

MultiThread mode: HostMonitor works almost according to Microsoft documentation with some workaround to avoid most likely problems. HM loads pdh.dll at once and uses it all the time. This method fast because HM can start several tests simultaneously. If everything will work correctly on your system, use this method (by default HostMonitor uses this method).
OneByOne mode: Using this method HM will start Performance Counter tests one by one and reload pdh.dll every time. This method slow (when you setup Performance Counter test using Test Properties dialog program even can hang for 1-2 min) but using this method you will avoid some problems due to a buggy pdh.dll
Smart mode: With this method HM will try to detect when pdh.dll need to be reloaded.

To change mode, add line "PerfWorkMode=N" to hostmon.ini file into [Misc] section and restart HostMonitor. N is number of the mode: 0 - MultiThread mode, 1 - OneByOne mode, 2 - Smart mode
-----------------------------------

Usually "OneByOne" mode helps in similar situations.

I had configured the the status unknown is not threaded as bad. But if the counter is going back to ok always the Good Action Event will thrown.
I think you are still using old version of HostMonitor. This behavior was changed in version 3.70. Version 3.71 and 4.10 available at www.ks-soft.net/hostmon.eng/downpage.htm

Regards
Alex
michael
Posts: 7
Joined: Sun Sep 21, 2003 10:37 pm

Post by michael »

Hello Alex,

I had installed 4.10 excellent new features. But 4.10 hasn't solved my problems.
1) I have still the Problem with the state unknow with PerfMon data. I had set all the settings in the Hostmon.ini but the problem is going bigger. So i had stoppt Alarming. (Overnight 118 notifications)

2) The Execute External Programm trigger will be trown in the case of the state change from unknown to OK.
3) I had tried to supress the SMS sending if Unknow changes to OK by checking the macrovariable %LastStatus%. The variable is NULL if the Status was unknown. If it was OK LastStatus ist OK.

Please help

Mike
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Mike,

>1) I have still the Problem with the state unknow with PerfMon data. I had set all the settings in the Hostmon.ini but the problem is going bigger. So i had stoppt Alarming. (Overnight 118 notifications)

H'm, what Windows do you use? Service Pack?

>2) The Execute External Programm trigger will be trown in the case of the state change from unknown to OK.

My mistake, you are right. I just checked our history log and see behavior of the actions was changed one more time. Comment that I see in the log is "its possible to use 'depend on option'".
It means if you use "action depends on bad one" option of an action and make "good" SMS dependant on "bad" SMS, HostMonitor will not send "good" SMS in case "bad" SMS was not sent before.

>3) I had tried to supress the SMS sending if Unknow changes to OK by checking the macrovariable %LastStatus%. The variable is NULL if the Status was unknown. If it was OK LastStatus ist OK.

Could not reproduce this problem. What action do you use to send SMS? What exactly condition do you use to start an action?
Or you do not use "advaced mode" to send "good" SMS but use some external filter that checks SMS message?

Regards
Alex
Wooltown
Posts: 115
Joined: Wed May 22, 2002 6:00 pm
Location: Sweden

Post by Wooltown »

I have an updated PDH.DLL from Microsoft (Post SP4), I can mail it to you if you like.


Sven
User avatar
M@ster
Posts: 78
Joined: Thu Oct 24, 2002 6:00 pm
Location: Germany

Post by M@ster »

Wooltown wrote:I have an updated PDH.DLL from Microsoft (Post SP4), I can mail it to you if you like.


Sven
Wow. I'd love to try it. We have similar Problems :-(
If you could mail it to me.

thx
René
Last edited by M@ster on Wed Oct 01, 2003 4:40 am, edited 1 time in total.
michael
Posts: 7
Joined: Sun Sep 21, 2003 10:37 pm

Post by michael »

Hello Alex.

H'm, what Windows do you use? Service Pack?

On the Monitor machine works Win 2000 SP3 Prof. On the monitored machnies Win2000 SP3 Server

Could not reproduce this problem. What action do you use to send SMS? What exactly condition do you use to start an action?
Or you do not use "advaced mode" to send "good" SMS but use some external filter that checks SMS message?

In a good or bad case a external program will be executed. Here is the commadline.

D:\hostmon\Tools\CreateMessage.cmd MyZellPhoneNo "%CommentLine1%" "%CommentLine1%" "%status%" D:\sms\out\Wag_%CommentLine2%_BAD_message.xml "%LastStatus%" 2>>d:\sms\Wag_messages.log

I had create also a debug script which dumps the %Laststatus% in a logfile and i can see that only OK or Host is alive states will be logged but for the state unknown the LastStatus is everytime NULL

Mike
michael
Posts: 7
Joined: Sun Sep 21, 2003 10:37 pm

Post by michael »

TX for your offer, i had a machine on which SP4 is running

[quote="Wooltown"]I have an updated PDH.DLL from Microsoft (Post SP4), I can mail it to you if you like.


Mike
Wooltown
Posts: 115
Joined: Wed May 22, 2002 6:00 pm
Location: Sweden

Post by Wooltown »

I can send it to you, but where ?


Sven
michael
Posts: 7
Joined: Sun Sep 21, 2003 10:37 pm

Post by michael »

Sorry for the confusion. I had already installed the pdh.dll from SP4

TX
Mike

[quote="Wooltown"]I can send it to you, but where ?


Sven[/quote]
Wooltown
Posts: 115
Joined: Wed May 22, 2002 6:00 pm
Location: Sweden

Post by Wooltown »

The fix I have is from after SP4.


Sven
michael
Posts: 7
Joined: Sun Sep 21, 2003 10:37 pm

Post by michael »

[quote="Wooltown"]The fix I have is from after SP4.


Sven[/quote]

:lol: Please send it to michael.wagner@ooevg.at

TX

Mike
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I had create also a debug script which dumps the %Laststatus% in a logfile and i can see that only OK or Host is alive states will be logged but for the state unknown the LastStatus is everytime NULL
HostMonitor does not execute action when status is "unknown" and "treat unknown status as bad" option is disabled.

Regards
Alex
michael
Posts: 7
Joined: Sun Sep 21, 2003 10:37 pm

Post by michael »

The option Thread unkonwn as bad is disabled. If the Status unknow occurs the Bad Acticon will not executed but if the status change from unknown the OK or Host is alive then the Good Action will be executed.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Michael,
The option Thread unkonwn as bad is disabled. If the Status unknow occurs the Bad Acticon will not executed but if the status change from unknown the OK or Host is alive then the Good Action will be executed.
Yes, I understand. But we are talking about 2 different problems:

1) No "unknown" status in the log.
You don't see it because HostMonitor does not start action. HostMonitor does not start action because "Treat unknown status as bad" option is disabled.
As I understand you don't realy need this status in the log and use it just for testing. Right? So, no problem here.

2) HostMonitor executes "good" action when status changes from "Unknown" to "Ok"
Use "Action depends on bad one" property of the "good" action to avoid this.

Regards
Alex
Post Reply