how "big in Mb" is my explorer process

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
megasound

how "big in Mb" is my explorer process

Post by megasound »

hi all

can you tell me how to test the following ?
i want to see which amount Mb my explorer process has

so i want to test :
if explorer proces is more 100Mb then it must alert

can somebody help me with this...
thanks in advance

m
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I think you may use WMI or Performance Counter test but its not clear what exactly means "which amount Mb my explorer process has".
What exactly parameter do you want to check? Private memory used by the process? Working set? Virtual bytes (address space)?

Regards
Alex
megasound

this is what i mean

Post by megasound »

thanks for the reply
this is what i mean

if you do a ctrl-shift-esc on your keyboard you see the taskmanager
if you go to processess end search for the explorer (image name) you will see the Mem usage

i what to check that mem usage
i hope its clear now

thanks in advance
m
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Re: this is what i mean

Post by KS-Soft Europe »

megasound wrote:i what to check that mem usage
i hope its clear now
You may use "WMI" test method with the following query:

Code: Select all

Select WorkingSetSize from Win32_Process where Name = 'some_process_name.exe' 
The following article might be helpfull for you:
http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=4283

Regards,
Max
megasound

allmost...

Post by megasound »

that is not exactly what i want
we are running a term.serv farm with a lott of explorer.exe (for every user 1)
i only whant to see the explorer.exe from the administrator
how many mb it uses

i hope i am now clear enough
thanks in advance
m
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Re: allmost...

Post by KS-Soft Europe »

megasound wrote:we are running a term.serv farm with a lott of explorer.exe (for every user 1)
i only whant to see the explorer.exe from the administrator
how many mb it uses
Ok. I understand. It's more complicated, but also possible. You may use "Active Script" test method ( http://www.ks-soft.net/hostmon.eng/mfra ... htm#script ) with the following script:

Code: Select all

Option Explicit
const statusAlive       = "Host is alive:"
const statusDead        = "No answer:"
const statusUnknown     = "Unknown:"
const statusNotResolved = "Unknown host:"
const statusOk          = "Ok:"
const statusBad         = "Bad:"
const statusBadContents = "Bad contents:"


Dim objWMIService, objProcess, colProcess, WorkingSetSize
Dim strComputer, strProcess, strUser, retval,strNameOfUser, memThreshold, found
strComputer = "."
strProcess = "'explorer.exe'"
strUser = "Administrator"
memThreshold = 128 'threshold in Mb


FUNCTION performtest()

  WorkingSetSize= 0
  found = 0
 
  Set objWMIService = GetObject("winmgmts:" _
  & "{impersonationLevel=impersonate}!\" _
  & strComputer & "\root\cimv2")
 
  Set colProcess = objWMIService.ExecQuery _
  ("Select WorkingSetSize from Win32_Process Where Name = " & strProcess )

  For Each objProcess in colProcess
    retval = objProcess.GetOwner(strNameOfUser)
    IF (retval = 0) and (strNameOfUser = strUser) THEN
       found = 1
       WorkingSetSize = Round(objProcess.WorkingSetSize/1048576)
       Exit For
    END IF
  Next
  IF (found = 0) THEN
    performtest = statusUnknown & "Process not found"
  ELSEIF (WorkingSetSize > memThreshold) THEN
    performtest = statusBad & WorkingSetSize
  ELSE
    performtest = statusOk & WorkingSetSize
  END IF

END FUNCTION
Scripts looks for the first process with given name (explorer.exe), started by specified user (Administrator), takes WorkingSetSize value in MB and compare it to specific value (128 Mb). Input parameters are hardcoded into script body, so you may change them by our own.

Regards,
Max
megasound

YESS

Post by megasound »

YESS this is working GREAT

thanks for all the help !!!!

:P :P :P
Post Reply