Who to make a RAM Test ?
Who to make a RAM Test ?
I want to test my RAM usage, who can I create the test for this.?
What exactly kind of RAM? Physical memory available to all processes? Virtual memory? "Working set" for some process? Address space available for some process?
There are various counters offered by Performance Counters and WMI providers so you may use Performance Counter or WMI test methods.
E.g.
- Select PageFileUsage from Win32_Process where Caption = 'some_process_name.exe'
- Select VirtualSize from Win32_Process where Caption = 'some_process_name.exe'
- \Memory\Available MBytes
More information about these test methods
http://www.ks-soft.net/hostmon.eng/mfra ... ts.htm#wmi
http://www.ks-soft.net/hostmon.eng/mfra ... erfcounter
Regards
Alex
There are various counters offered by Performance Counters and WMI providers so you may use Performance Counter or WMI test methods.
E.g.
- Select PageFileUsage from Win32_Process where Caption = 'some_process_name.exe'
- Select VirtualSize from Win32_Process where Caption = 'some_process_name.exe'
- \Memory\Available MBytes
More information about these test methods
http://www.ks-soft.net/hostmon.eng/mfra ... ts.htm#wmi
http://www.ks-soft.net/hostmon.eng/mfra ... erfcounter
Regards
Alex
It matches what Task Manager shows on my system
Anyway, HostMonitor can display any numeric or string counter provided by Performance Counter or WMI classes. Just select counter that you want to monitor.
If Task Manager gets some information using some other API or undoumented functions, HostMonitor cannot do this.
Regards
Alex

Anyway, HostMonitor can display any numeric or string counter provided by Performance Counter or WMI classes. Just select counter that you want to monitor.
If Task Manager gets some information using some other API or undoumented functions, HostMonitor cannot do this.
Regards
Alex
Then may be Task Manager uses TotalVisibleMemorySize and FreePhysicalMemory counters provided by Win32_OperatingSystem class
Percentage := FreePhysicalMemory/TotalVisibleMemorySize*100
If you want to get value of several counters in one test, you need to create your own script or external application and use Shell Script, Active Script or External test methods to launch script.
We recommend Shell Script
http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell
Regards
Alex

Percentage := FreePhysicalMemory/TotalVisibleMemorySize*100
If you want to get value of several counters in one test, you need to create your own script or external application and use Shell Script, Active Script or External test methods to launch script.
We recommend Shell Script
http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell
Regards
Alex
PS
You may use script like this
Regards
Alex
You may use script like this
Code: Select all
'-----------------------------------------------------------------------
'this script checks percentage of Free Physical Memory on Windows system
'parameter: <minimum_limit>
'designed for Shell Script test method:
'http://www.ks-soft.com/hostmon.eng/index-tests.htm
'-----------------------------------------------------------------------
Option Explicit
const statusAlive = "scriptRes:Host is alive:"
const statusDead = "scriptRes:No answer:"
const statusUnknown = "scriptRes:Unknown:"
const statusNotResolved = "scriptRes:Unknown host:"
const statusOk = "scriptRes:Ok:"
const statusBad = "scriptRes:Bad:"
const statusBadContents = "scriptRes:Bad contents:"
dim objArgs, strComputer, objWMIService, colSettings, objOperatingSystem, freemem, limit
Set objArgs = WScript.Arguments
if objArgs.Count>0 then
limit = int(objArgs(0))
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colSettings
'WScript.StdOut.WriteLine "Available Physical Memory: " & objOperatingSystem.FreePhysicalMemory
'WScript.StdOut.WriteLine "Total Physical Memory: " & objOperatingSystem.TotalVisibleMemorySize
'WScript.StdOut.WriteLine "Free percentage: " & round(objOperatingSystem.FreePhysicalMemory/objOperatingSystem.TotalVisibleMemorySize*100)
freemem = round(objOperatingSystem.FreePhysicalMemory/objOperatingSystem.TotalVisibleMemorySize*100)
IF freemem<limit THEN
WScript.StdOut.WriteLine statusBad & freemem
ELSE
WScript.StdOut.WriteLine statusOk & freemem
END IF
EXIT FOR
Next
ELSE
WScript.StdOut.WriteLine statusUnknown & "Not enough parameters specified"
END IF
Alex