• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

How do you get the available memory on a web server?

I want to be able to get the available memory on a web server, by going to the page in asp.net and displaying the value. I want to be able to test under WindowsXP before moving it to production, so any help on this would be appreciated. Thanks.
0
JDEE8297
Asked:
JDEE8297
  • 3
  • 3
1 Solution
 
daveamourCommented:
0
 
JDEE8297Author Commented:
that should work, not totally familiar with csharp, but should be able to convert this to vb.net
0
 
daveamourCommented:
Ok good luck
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
JDEE8297Author Commented:
thank you again.
0
 
JDEE8297Author Commented:
This was my conversion

 Dim ram As New System.Diagnostics.PerformanceCounter("Memory", "Available MBytes")
        dim cpu as New System.Diagnostics.PerformanceCounter()

        cpu.CategoryName = "Processor"
        cpu.CounterName = "% Processor Time"
        cpu.InstanceName = "_Total"
        Response.Write("Server Name - " & Environment.MachineName)
        Response.Write("<br>")
        Response.Write("Memory available - " & ram.NextValue().ToString & " Mb")
        Response.Write("<br>")
        response.Write ("CPU Used - " & cpu.NextValue().ToString & " %")

Thanks again for your help.
0
 
daveamourCommented:
Looks nice and easy, nice one.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now