qwertylol Posted April 15, 2007 Share Posted April 15, 2007 there is memgetstats to find out how much ram is in use, is it possible to fnd out, using handles, how much ram an app is using ? Link to comment Share on other sites More sharing options...
Zedna Posted April 15, 2007 Share Posted April 15, 2007 Search forum for CompInfo.au3: expandcollapse popup;=============================================================================== ; Description: Returns the Process information in an array. ; Parameter(s): $aProcessInfo - By Reference - Process Information array. ; Requirement(s): None ; Return Value(s): On Success - Returns array of Process Information. ; $aProcessInfo[0][0] = Number of Processes ; $aProcessInfo[$i][0] = Name ($i starts at 1) ; $aProcessInfo[$i][1] = Command Line ; $aProcessInfo[$i][2] = Creation Class Name ; $aProcessInfo[$i][3] = Creation Date ; $aProcessInfo[$i][4] = Description ; $aProcessInfo[$i][5] = CS Creation Class Name ; $aProcessInfo[$i][6] = CS Name ; $aProcessInfo[$i][7] = Executable Path ; $aProcessInfo[$i][8] = Execution State ; $aProcessInfo[$i][9] = Handle ; $aProcessInfo[$i][10] = Handle Count ; $aProcessInfo[$i][11] = Kernel Mode Time ; $aProcessInfo[$i][12] = Maximum Working Set Size ; $aProcessInfo[$i][13] = Minimum Working Set Size ; $aProcessInfo[$i][14] = OS Creation Class Name ; $aProcessInfo[$i][15] = OS Name ; $aProcessInfo[$i][16] = Other Operation Count ; $aProcessInfo[$i][17] = Other Transfer Count ; $aProcessInfo[$i][18] = Page Faults ; $aProcessInfo[$i][19] = Page File Usage ; $aProcessInfo[$i][20] = Parent Process ID ; $aProcessInfo[$i][21] = Peak Page File Usage ; $aProcessInfo[$i][22] = Peak Virtual Size ; $aProcessInfo[$i][23] = Peak Working Set Size ; $aProcessInfo[$i][24] = Priority ; $aProcessInfo[$i][25] = Private Page Count ; $aProcessInfo[$i][26] = Process ID ; $aProcessInfo[$i][27] = Quota Non Paged Pool Usage ; $aProcessInfo[$i][28] = Quota Paged Pool Usage ; $aProcessInfo[$i][29] = Quota Peak Non Paged Pool Usage ; $aProcessInfo[$i][30] = Quota Peak Paged Pool Usage ; $aProcessInfo[$i][31] = Read Operation Count ; $aProcessInfo[$i][32] = Read Transfer Count ; $aProcessInfo[$i][33] = Session ID ; $aProcessInfo[$i][34] = Status ; $aProcessInfo[$i][35] = Thread Count ; $aProcessInfo[$i][36] = User Mode Time ; $aProcessInfo[$i][37] = Virtual Size ; $aProcessInfo[$i][38] = Windows Version ; $aProcessInfo[$i][39] = Working Set Size ; $aProcessInfo[$i][40] = Write Operation Count ; $aProcessInfo[$i][41] = Write Transfer Count ; On Failure - @error = 1 and Returns 0 ; @extended = 1 - Array contains no information ; 2 - $colItems isnt an object ; Author(s): Jarvis Stubblefield (support "at" vortexrevolutions "dot" com) ; Note(s): ;=============================================================================== Func _ComputerGetProcesses(ByRef $aProcessInfo) Local $colItems, $objWMIService, $objItem Dim $aProcessInfo[1][42], $i = 1 $objWMIService = ObjGet("winmgmts:\\" & $cI_Compname & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Process", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then For $objItem In $colItems ReDim $aProcessInfo[UBound($aProcessInfo) + 1][42] $aProcessInfo[$i][0] = $objItem.Name $aProcessInfo[$i][1] = $objItem.CommandLine $aProcessInfo[$i][2] = $objItem.CreationClassName $aProcessInfo[$i][3] = __StringToDate($objItem.CreationDate) $aProcessInfo[$i][4] = $objItem.Description $aProcessInfo[$i][5] = $objItem.CSCreationClassName $aProcessInfo[$i][6] = $objItem.CSName $aProcessInfo[$i][7] = $objItem.ExecutablePath $aProcessInfo[$i][8] = $objItem.ExecutionState $aProcessInfo[$i][9] = $objItem.Handle $aProcessInfo[$i][10] = $objItem.HandleCount $aProcessInfo[$i][11] = $objItem.KernelModeTime $aProcessInfo[$i][12] = $objItem.MaximumWorkingSetSize $aProcessInfo[$i][13] = $objItem.MinimumWorkingSetSize $aProcessInfo[$i][14] = $objItem.OSCreationClassName $aProcessInfo[$i][15] = $objItem.OSName $aProcessInfo[$i][16] = $objItem.OtherOperationCount $aProcessInfo[$i][17] = $objItem.OtherTransferCount $aProcessInfo[$i][18] = $objItem.PageFaults $aProcessInfo[$i][19] = $objItem.PageFileUsage $aProcessInfo[$i][20] = $objItem.ParentProcessId $aProcessInfo[$i][21] = $objItem.PeakPageFileUsage $aProcessInfo[$i][22] = $objItem.PeakVirtualSize $aProcessInfo[$i][23] = $objItem.PeakWorkingSetSize $aProcessInfo[$i][24] = $objItem.Priority $aProcessInfo[$i][25] = $objItem.PrivatePageCount $aProcessInfo[$i][26] = $objItem.ProcessId $aProcessInfo[$i][27] = $objItem.QuotaNonPagedPoolUsage $aProcessInfo[$i][28] = $objItem.QuotaPagedPoolUsage $aProcessInfo[$i][29] = $objItem.QuotaPeakNonPagedPoolUsage $aProcessInfo[$i][30] = $objItem.QuotaPeakPagedPoolUsage $aProcessInfo[$i][31] = $objItem.ReadOperationCount $aProcessInfo[$i][32] = $objItem.ReadTransferCount $aProcessInfo[$i][33] = $objItem.SessionId $aProcessInfo[$i][34] = $objItem.Status $aProcessInfo[$i][35] = $objItem.ThreadCount $aProcessInfo[$i][36] = $objItem.UserModeTime $aProcessInfo[$i][37] = $objItem.VirtualSize $aProcessInfo[$i][38] = $objItem.WindowsVersion $aProcessInfo[$i][39] = $objItem.WorkingSetSize $aProcessInfo[$i][40] = $objItem.WriteOperationCount $aProcessInfo[$i][41] = $objItem.WriteTransferCount $i += 1 Next $aProcessInfo[0][0] = UBound($aProcessInfo) - 1 If $aProcessInfo[0][0] < 1 Then SetError(1, 1, 0) EndIf Else SetError(1, 2, 0) EndIf EndFunc ;_ComputerGetProcesses Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
qwertylol Posted April 15, 2007 Author Share Posted April 15, 2007 which of the info is mem size ? @_@ Link to comment Share on other sites More sharing options...
AutoItKing Posted April 16, 2007 Share Posted April 16, 2007 (edited) Check out My MemStats (in the sig) $mem = MemGetStats() MsgBox(0,"Ram","% of RAM in use:" & $mem[0]) $array[0] = Memory Load (Percentage of memory in use) $array[1] = Total physical RAM $array[2] = Available physical RAM $array[3] = Total Pagefile $array[4] = Available Pagefile $array[5] = Total virtual $array[6] = Available virtual Edited April 16, 2007 by AutoItKing http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
qwertylol Posted April 16, 2007 Author Share Posted April 16, 2007 what I want to know is how much ram that process/app is taking. thank you in advance ! Link to comment Share on other sites More sharing options...
qwertylol Posted April 16, 2007 Author Share Posted April 16, 2007 Is there no way to know how much ram a process is using? Link to comment Share on other sites More sharing options...
evilertoaster Posted April 16, 2007 Share Posted April 16, 2007 http://msdn2.microsoft.com/en-us/library/aa394372.aspx has the documentation for the properties of the first example. It would seem PeakWorkingSetSize would be the appropriate property you are after. Link to comment Share on other sites More sharing options...
qwertylol Posted April 16, 2007 Author Share Posted April 16, 2007 : WARNING: $cI_Compname: possibly used before declaration. i tried compuinfo.au3, yet it says above. where is the original file you downloaded? I found the thread yet i couldnt tell which one of those version you linked for me. Link to comment Share on other sites More sharing options...
Zedna Posted April 16, 2007 Share Posted April 16, 2007 (edited) : WARNING: $cI_Compname: possibly used before declaration.i tried compuinfo.au3, yet it says above.where is the original file you downloaded? I found the thread yet i couldnt tell which one of those version you linked for me.It's from JSThePatriot look hereI gave you just info to go to right direction. Make some work yourself.I don't use this function I just know about it and I shared my knowledge with you. Edited April 16, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now