Google Answers Logo
View Question
 
Q: Access to Windows perfmon data from PHP script (without using SNMP) ( No Answer,   3 Comments )
Question  
Subject: Access to Windows perfmon data from PHP script (without using SNMP)
Category: Computers > Programming
Asked by: lostandfound-ga
List Price: $30.00
Posted: 28 May 2004 20:06 PDT
Expires: 27 Jun 2004 20:06 PDT
Question ID: 353419
Hello.
I'm trying to build a web based server monitoring application with PHP
and MySQL.  One of the tests that I'd like to be able to perform would
be to poll Windows NT/2k/03 machines for performance data through the
built-in perfmon performance counters, such as CPU/Disk usage, etc.  I
understand that this data can be made accessible through the SNMP
service, but since SNMP isn't installed on Windows boxes by default I
don't find this to be an ideal solution.

The answer I'm looking for will provide me with a way to access
Windows Performance data from a PHP script if I suppy a counter type,
hostname, username and password.  Additionally, it will not require
anything to be installed on the Windows box that I'm polling.  The
entire point of this question is to come up with a simple, clean way
to access Windows performance data, so suggestions that require any
sort of client side hackery are unacceptable.

The absolutely ideal answer would be a php class that I can use to
poll a Windows box and return a result.  Unfortunately I haven't been
able to find such a class in my search so far, so I'm not sure that
one exists.

Clarification of Question by lostandfound-ga on 29 May 2004 18:18 PDT
Oh yes... I should also mention that the solution should work from unix based OSes.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Access to Windows perfmon data from PHP script (without using SNMP)
From: crythias-ga on 07 Jun 2004 14:06 PDT
 
Any chance you could have perfmon running on the remote machines but
dumping their logs as .csv and doing post filtering?
Subject: Re: Access to Windows perfmon data from PHP script (without using SNMP)
From: lostandfound-ga on 10 Jun 2004 17:13 PDT
 
I could, but the very problem that I'm trying to solve is that I don't
want to have to set up anything on the remote machine.
Subject: Re: Access to Windows perfmon data from PHP script (without using SNMP)
From: crythias-ga on 11 Jun 2004 07:12 PDT
 
I want to help you, really I do, because I'd like to see that solution
in action. I found http://www.microsoft.com/msj/codeupdates.aspx that
has source code (cpp) for interfacing Windows with perfmon data.

I found this http://www.developer.com/java/other/article.php/3087741
regarding hooking to perfmon via Java. It *almost* sounded promising
until I came across it needing a DLL? (maybe for the client, don't
know).

I thought about that you could have a dedicated Windows machine that
could provide you with a .csv of all the machines *it* polls.

I even tried to figure out how perfmon uses IPC$ to get that
information based upon hints from
http://patrolexpress.bmc.com/help/en_US/gal_webhelp/parameters/windows/windows_2000.htm

And something that appeared really promising at
http://search.cpan.org/modlist/Microsoft_Windows doesn't link
properly.

I found something regarding cricket, which seems to be a data
collection and display program. http://cricket.sourceforge.net
http://cricket.sourceforge.net/support/doc/perfmon.html 
Its Perl perfmon.pl seems promising. 

Search on Win32 perfmon may lead you to where you want to be.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy