Windows performance counters & VBS/WMI via SNMP

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
tangocache
Posts: 2
Joined: Wed Aug 25, 2010 10:23 am

Post by tangocache »

.. bump

I know this may seem like a stupid question, but if you are all able to walk through the entire tree just fine let me know. At least I'll know if its a problem on my end and not just a limitation.

I'd also like to clarify that I am able to walk the .15 tree if I start there.

This is fine code by the way Erwan. Thank you for its creation.
jamdev12
Posts: 4
Joined: Mon Oct 18, 2010 7:21 pm

Re: Windows performance counters & VBS/WMI via SNMP

Post by jamdev12 »

Erwan,

Thank you very much for a nice tool. Are you still working on this program and if so would you be able to help out a Windows 2008 R2 x64 bit admin?

Thanks and again thanks for the great tool.

jamdev12
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Re: Windows performance counters & VBS/WMI via SNMP

Post by erwan.l »

Hi jamdev12,

Yep, still working on it whenever I get some bug report or some request.

Go ahead, just ask and I'll see what I can do :)

Regards,
Erwan.
my blog : [url]http://labalec.fr/erwan/[/url]
my web site : [url]http://erwan.labalec.fr/[/url]
hydra35
Posts: 3
Joined: Tue Oct 13, 2009 12:34 pm

Re: Windows performance counters & VBS/WMI via SNMP

Post by hydra35 »

Hello erwan,

We are using snmptools 32bit agent on 64bit windows, the version of snmptools is 2.0.0.15.
We have a curious issue that PdhAddCounter of "ASP.NET State Service" return C0000BB8 due to garbled pdf_count_path as below:

Code: Select all

GetNextRequest:1.3.6.1.4.1.35559.1.1.11.2(11)
12:46:37:921 , GetPerf: path=ASP.NET State Service\State Server Sessions Abandoned
12:46:37:937 , GetPerf: pdh_counter_path=\ASP.NET State Service\??
12:46:37:937 , PdhAddCounter: ret=C0000BB8
12:46:37:937 , GetPerf: vartype=String
12:46:37:937 , value=null length=4
In the meantime, other counters listed in counter.ini works fine:

Code: Select all

13:21:29:015 , GetRequest: OID=1.3.6.1.4.1.35559.1.1.4.2.4 (12)
13:21:29:015 , GetPerf: path=TCPv4\Connections Passive

13:21:29:015 , GetPerf: pdh_counter_path=\TCPv4\Connections Passive
13:21:29:015 , GetPerf: vartype=Integer
13:21:29:015 , GetRequest: value=9757940 asn_type=2
13:21:29:015 , GetRequest: OK
I don't have any clues why ASP.NET State Server failed because it is not that different from other counters, the following is an excerpt of our counters.ini

Code: Select all

;----------------------------------------------------------------------
; ASP.Net State Service
;----------------------------------------------------------------------
[1.3.6.1.4.1.35559.1.1.11]
type=string
counter=ASP.NET State Service

[1.3.6.1.4.1.35559.1.1.11.1]
type=string
counter=Key

[1.3.6.1.4.1.35559.1.1.11.1.1]
type=string
counter=State Server Sessions Abandoned

[1.3.6.1.4.1.35559.1.1.11.1.2]
type=string
counter=State Server Sessions Active

[1.3.6.1.4.1.35559.1.1.11.1.3]
type=string
counter=State Server Sessions Timed Out

[1.3.6.1.4.1.35559.1.1.11.1.4]
type=string
counter=State Server Sessions Total

[1.3.6.1.4.1.35559.1.1.11.2]
type=string
counter=Value

[1.3.6.1.4.1.35559.1.1.11.2.1]
counter=ASP.NET State Service\State Server Sessions Abandoned

[1.3.6.1.4.1.35559.1.1.11.2.2]
counter=ASP.NET State Service\State Server Sessions Active

[1.3.6.1.4.1.35559.1.1.11.2.3]
counter=ASP.NET State Service\State Server Sessions Timed Out

[1.3.6.1.4.1.35559.1.1.11.2.4]
counter=ASP.NET State Service\State Server Sessions Total


Please point out where I made wrong, thanks.
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Re: Windows performance counters & VBS/WMI via SNMP

Post by erwan.l »

hydra35 wrote:Hello erwan,

We are using snmptools 32bit agent on 64bit windows, the version of snmptools is 2.0.0.15.
We have a curious issue that PdhAddCounter of "ASP.NET State Service" return C0000BB8 due to garbled pdf_count_path as below:

Code: Select all

GetNextRequest:1.3.6.1.4.1.35559.1.1.11.2(11)
12:46:37:921 , GetPerf: path=ASP.NET State Service\State Server Sessions Abandoned
12:46:37:937 , GetPerf: pdh_counter_path=\ASP.NET State Service\??
12:46:37:937 , PdhAddCounter: ret=C0000BB8
12:46:37:937 , GetPerf: vartype=String
12:46:37:937 , value=null length=4

Please point out where I made wrong, thanks.
Hi Hydra35,
C0000BB8 means "The specified object is not found on the system".
And I see that snmptools cannot resolve the pdh_counter_path correctly.
Could it be that you have a non english platform? and that the native counter contains characters that I dont handle today?

If so, please try out the perf32 executable in the zip.
perf32 /enumobjects to list all objects.
then perf32 "ASP.NET State Service" /enumobjectitems and perf32 "ASP.NET State Service" /enumobjectcounters.

Dump all this to a text file and attach it here.

Thanks,
Erwan.
my blog : [url]http://labalec.fr/erwan/[/url]
my web site : [url]http://erwan.labalec.fr/[/url]
hydra35
Posts: 3
Joined: Tue Oct 13, 2009 12:34 pm

Re: Windows performance counters & VBS/WMI via SNMP

Post by hydra35 »

If so, please try out the perf32 executable in the zip.
perf32 /enumobjects to list all objects.
then perf32 "ASP.NET State Service" /enumobjectitems and perf32 "ASP.NET State Service" /enumobjectcounters.
perf32 /enumobjects shows that there is no "ASP.NET State Service" performance counter category and no state server counters under ASP.NET v2.0.50727 category either(The State Server counters usually appear under several category). Then I did a bit research and found out I should install IIS6 first and run the following commands to bring back State Server counters:

Code: Select all

aspnet_regiis -i
loadctr /R
After I done this, perf32 found those counters. So please see my attachments. However, this time GetPerf returns value=0:

Code: Select all

18:46:08:999 , GetPerf: path=ASP.NET v2.0.50727\State Server Sessions Total
18:46:08:999 , GetPerf: pdh_counter_path=\ASP.NET v2.0.50727\State Server Sessions Total
18:46:09:827 , GetPerf: vartype=Double
18:46:09:827 , value=0 length=1
Since Perfmon shows the counter is not zero, I think there maybe some other issues here.
1.PNG
1.PNG (9.7 KiB) Viewed 17074 times
Attachments
aspnet_counters.txt
(531 Bytes) Downloaded 1264 times
aspnet_items.txt
(889 Bytes) Downloaded 1226 times
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Re: Windows performance counters & VBS/WMI via SNMP

Post by erwan.l »

hydra35 wrote:
Since Perfmon shows the counter is not zero, I think there maybe some other issues here.
1.PNG
oki, so at least we took out one issue : iis6 is now installed and the counters registered.

1/
can you try perf32 "ASP.NET v2.0.50727\State Server Sessions Total" and perf32 "ASP.NET v2.0.50727\State Server Sessions Total" /raw ?
result should not be different from snmtools since perf32 and snmptools share the same code, but I want to be sure...

2/
and you can also try this

[1.3.6.1.4.1.35559.1.1.11.2.1]
counter=ASP.NET State Service\State Server Sessions Abandoned
flag=norefresh

since this counter is not a "calculated" one (processor time is one for instance), you will save 1sec delay and avoid any calculation between two intervals.

3/
last version is 2.0.0.16, make sure you download it fresh from http://erwan.labalec.fr .

Thanks,
Erwan.
Last edited by erwan.l on Wed Apr 11, 2012 10:59 am, edited 1 time in total.
my blog : [url]http://labalec.fr/erwan/[/url]
my web site : [url]http://erwan.labalec.fr/[/url]
hydra35
Posts: 3
Joined: Tue Oct 13, 2009 12:34 pm

Re: Windows performance counters & VBS/WMI via SNMP

Post by hydra35 »

1、yes, I've upgraded to 2.0.0.16 in case my problem has been fixed. :D

2、yes, snmptools and perf32 give same results.

Code: Select all

perf32 "ASP.NET v2.0.50727\State Server Sessions Total"
0
perf32 "ASP.NET v2.0.50727\State Server Sessions Total"  /raw
0
If those counters are corrupt, I wonder why perfmon.msc can display them correctly. It is possible to discover what pdh_path does perfmon used to find out values? By comparison, I think we may find out where the root causes are.

3、Thanks for the mention of flag=norefresh, we do set this flag for non-calculated counter. I deliberately unset that flag in case the State Server Sessions counter is a calculated one.

For the others: It's very important to not wait unnecessarily otherwise cacti poller will time out from time to time when you got 10000+ data sources to poll.
erwan.l
Cacti User
Posts: 138
Joined: Tue Jan 22, 2008 4:36 am
Contact:

Re: Windows performance counters & VBS/WMI via SNMP

Post by erwan.l »

hydra35 wrote:1、yes, I've upgraded to 2.0.0.16 in case my problem has been fixed. :D

2、yes, snmptools and perf32 give same results.

Code: Select all

perf32 "ASP.NET v2.0.50727\State Server Sessions Total"
0
perf32 "ASP.NET v2.0.50727\State Server Sessions Total"  /raw
0
If those counters are corrupt, I wonder why perfmon.msc can display them correctly. It is possible to discover what pdh_path does perfmon used to find out values? By comparison, I think we may find out where the root causes are.

3、Thanks for the mention of flag=norefresh, we do set this flag for non-calculated counter. I deliberately unset that flag in case the State Server Sessions counter is a calculated one.

For the others: It's very important to not wait unnecessarily otherwise cacti poller will time out from time to time when you got 10000+ data sources to poll.
oki, have put up a w2k3 vm, installed iis6, ran aspnet_regiis -i then lodctr /R but does not see the "ASP.NET v2.0.50727" counter.
I am running framework v1.1. may be why...
I'll now install framework v2.

edit : ok, so now after dotnet v2 installed, i can see finally the counter.
now debug time...

/Erwan
my blog : [url]http://labalec.fr/erwan/[/url]
my web site : [url]http://erwan.labalec.fr/[/url]
Rienzilla
Posts: 1
Joined: Tue Nov 23, 2010 10:17 am

[FIXED] Installation on Windows 2008R2 x64

Post by Rienzilla »

Hi OP,

I have been looking for a tool like snmptools for a while now, great that you started it.

I have issues installing snmptools on our Windows 2008R2 NL x64 servers. I added the SNMP Service feature, and installed with the 64-bits snmptools installer from your website. I configured counters.ini and set debug to "1" in the registry. However, snmptools seems to be doing nothing, since an snmpget of 1.3.6.1.4.1.15 returns SNMPv2-SMI::enterprises.15 = No Such Object available on this agent at this OID. No log.txt shows up in C:\.

I then uninstalled and installed the 32 bits version according to the instructions. After restarting the SNMP service, a get of 1.3.6.1.4.1.15 still doesnt yield a result.

Event log has two events (event descriptions may not match exactly because I translated them from dutch):

Source "EvenAgnt" Event 2020: the extension agent of SNMP-eventlog has been terminated
Source "snmptools" Event 0: Can't find the description for event-id 0 from source snmptools. ....

Did I do something wrong?

[edit: I managed to import the .reg file at the wrong place, hence snmptools couldnt find its settings. Maybe it's a good idea to let it log that to evenviewer or in a file in a predefined place?]
Pilly
Posts: 29
Joined: Thu Dec 18, 2008 6:26 am

Re: Windows performance counters & VBS/WMI via SNMP

Post by Pilly »

Hi,

I'm trying to monitor a SQL server, this is the perfmon (user connections)

Image
[1.3.6.1.4.1.15.5.4]
counter=MSSQL$LIVE:General Statistcs\User Connections
Always comes back with null, although in perfmon its averaging 45.
Ive tried variations on the instance part put all dont work.

Any ideas?
Pilly
Posts: 29
Joined: Thu Dec 18, 2008 6:26 am

Re: Windows performance counters & VBS/WMI via SNMP

Post by Pilly »

Grrr.... forget the above. spelling mistake. :oops:
Lazybones
Posts: 40
Joined: Wed Aug 23, 2006 9:47 am

Re: Windows performance counters & VBS/WMI via SNMP

Post by Lazybones »

I am having strange issues trying to get some perfmon values on a 64bit 2008 server.

If I run IP Tools on a remote 32 bit system and connect to the IP of the system I want to monitor I see the Objects listed the same as in Perfmon on the server
If I run IP Tools on the 64bit server with the target blank, there is no reference to the perfmon object I am looking for at all
If I run IP Tools on the 64bit server with the target set as the IP I get a DIFFERENT set of perfmon objects with different names but not the one I am looking for
If I enumerate the objects with perf32.exe I get the same results as IP Tools on the server with the target blank, IE none of the useful objects are listed.

Can anyone help?

The object I want is MediationServer - 00 - Outbound Calls\- 000 - Current as listed by Performance monitor on the server.

Update:The issue might be permissions related I have a VBScript that calls "typeperf" to get the values, it works remotely, and locally on the 64bit system but only if run as admin.
conrad
Posts: 2
Joined: Sun Jun 05, 2011 8:01 am

windows perfmon counters / snmptools

Post by conrad »

I'm using mrtg for many years, but always to monitor linux servers.

For the last few days i'm trying to get traffic data from a windows 2008 R2 64 server.

I did install the snmptools, which is working fine. But i don't know how to get the bytes/sec from the server.

I think its maybe not an snmptools issue because when i enter the Performance Monitor i can see the packets/sec and other counters. But the bytes/sec received and sent are 0 (zero).

Does anyone also has this issue? If so what can i do to resolve this issue, or is it another Windows related issue that cannot be resolved. Tried al lot of things but don't know how to get traffic data from the server.

Thanks in advance.

Conrad
Daniell
Posts: 4
Joined: Thu Sep 08, 2011 4:18 am
Contact:

Re: Windows performance counters & VBS/WMI via SNMP

Post by Daniell »

hi, conrad, look it in here, in this thread sqlservercentral.com/Forums/Topic1037309-360-2.aspx#bm1103782
Hope it helps.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests