fmlk Posted May 4, 2015 Posted May 4, 2015 As relative beginner with AutoIT I got stuk with memory logging. I have created a script that starts some applications, runs some tests in these applications and then stops the applications. This procedure is cycled. Now I like to log the memory usage of these processes each cycle.I found the function MemGetStats but don't know how to use it for logging the individual processes. Who can help me further with this?
Bert Posted May 4, 2015 Posted May 4, 2015 (edited) as you can see by the example for MemGetStats, it writes the output to a msgbox.#include <MsgBoxConstants.au3> Local $aMem = MemGetStats() MsgBox($MB_SYSTEMMODAL, "", "Total physical RAM (KB): " & $aMem[1])instead of writing the output to a msgbox, write the output to a file using FileWrite. Look at the example and you will see how it is done. Edited May 4, 2015 by Bert clarity The Vollatran project My blog: http://www.vollysinterestingshit.com/
spudw2k Posted May 4, 2015 Posted May 4, 2015 ...how to use it for logging the individual processes.It doesn't appear that MemGetStats allows you to collect stats for any particular process(es). Check out _WinAPI_GetProcessMemoryInfo in the help file. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
fmlk Posted May 11, 2015 Author Posted May 11, 2015 Here is a piece of code, how I got it working:local $aMemory = ProcessGetStats("FlucamViewer.exe") ConsoleWrite("Flucam_1 ; " & $aMemory[0] & " ; " & "Flucam_2 ;" & $aMemory[1] & @CR) Local $aMem = MemGetStats() ConsoleWrite ("Memory load and physical RAM" & @CR & $aMem[0] & "; " & $aMem[2] & @CR) FileWriteLine($logFile_memtest, @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC & " : " & $aMem[0] & " ; " & $aMem[2] & "Memory load and physical RAM (" & $nrRestarts & ")")
Bert Posted May 11, 2015 Posted May 11, 2015 what is FlucamViewer.exe?what does this app do? The Vollatran project My blog: http://www.vollysinterestingshit.com/
Moderators Melba23 Posted May 11, 2015 Moderators Posted May 11, 2015 Bert,Where has your Google-Fu gone? FlucamViewer is used by those who have to deal with scanning electron microscopes - nothing untoward at all.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Bert Posted May 11, 2015 Posted May 11, 2015 (edited) OH COOL! I was curious more than anything. I googled it and didn't find anything that said what the exe was so that is why I asked the question. Thanks! Edited May 11, 2015 by Bert The Vollatran project My blog: http://www.vollysinterestingshit.com/
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