1

Possible Duplicate:
Total RAM % from perfmon Windows Server 2008 R2

I'm trying to get the percent of memory used from PerfMon. Essentially, I want to see the number that's available from Windows Task Manager > Performance. (The Blue line that shows the percent of memory as a ratio to the total in the machine.)

I see that the counter "Available MBytes" can be used to see how much bytes are free, but I'm going to program this across multiple servers, and I won't necessarily have access to the server total RAM. (I could maintain a map from server_name > total_RAM, but that seemed a bit awkward.)

I also see that the "Committed Bytes" represents the total bytes being used, so I can add this to the free bytes to get the ratio, but I wanted to know if there was a more straightforward way.

Ideas? (I'm running Windows 7 on my machine, and the servers are Windows Server 2008.)

Sal
  • 157
  • 1
  • 9
  • 1
    [See @WesleyDavid 's answer here.](http://serverfault.com/questions/377932/total-ram-from-perfmon-windows-server-2008-r2) There's no default performance counter for that, because... I dunno, makes too much sense, or something, so you're stuck with WMI calls or maybe a custom perfmon counter to do that. – HopelessN00b Nov 13 '12 at 18:18
  • Yeah, this question is nearly identical to the one mentioned. Have you guys found it easier to make the custom WMI calls or create a new counter? – Sal Nov 13 '12 at 18:20
  • 1
    I haven't even looked into making a custom counter, so I use WMI. When I have to, and don't have a monitoring suite to get the info for me, which is what I have at the current workplace. – HopelessN00b Nov 13 '12 at 19:03
  • _"I also see that the "Committed Bytes" represents the total bytes being used, so I can add this to the free bytes to get the ratio"_ - no, sorry - you can't do that. "Committed Bytes" is committed _virtual_ address space, but does not necessarily represent physical usage anywhere. On the other hand, "Available MBytes" is a count of _physical_ memory (RAM). You can't add the two together and have any sensible result. It's an "apples and oranges" situation. – Jamie Hanrahan Nov 16 '18 at 08:42

0 Answers0