Jump to content

Release: Working status.php for Windows Servers


rmccny

Recommended Posts

Here is a working status/index.php for all of you with Windows servers. Since windows does not have any concept of "load averages", it instead will report current CPU usage for each CPU core. It also correctly reports system uptime as well.

 

Now, there a potential "gotcha"; because it uses COM to query WMI, it requires an elevated level of permissions to run. There are a few ways this can be done, but what I found the easiest was to create an account with local admin permissions with a strong password, create a site in IIS Manager running under the context of the admin account you just created, and place ONLY the status file in the root of it. You could probably also assign a different port to further secure it as well.

 

 

This has been tested on IIS 7/Server 2008 Enterprise. Includes full source.

 

Enjoy.

status.zip

Edited by rmccny
Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated