Tech Note 213 Finding Memory Leaks in Windows 95/98/98SE Using System Monitor All Tech Notes and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information. Topic#: 000932 Created: April 26, 2001 This Tech Note shows you how to use Windows 95/98/98SE System Monitor utility to collect system information to assist Wonderware Technical Support in identifying memory leaks. Note: This Tech Note utilizes Windows 95/98/98SE built- in utilities. By default, this utility is not installed when installing Windows 95/98/98SE. You can select these components by performing a custom install, which will allow you to pick which utilities you want to use. You can add this utility at any time by running the Windows install CD and adding components through the Add/Remove Software option. Background There are times when Wonderware Technical Support will ask you to set up diagnostic software to help identify possible memory leaks with programs running on your system. Memory leaks are caused by programs that use up system resources (i.e., memory, hard drive space, etc.) without releasing the resources back into the system, resulting in a lack of resources available for Windows to function. Memory leaks are normally suspected, when a known working Windows system crashes or completely locks up over a certain period of time, for no apparent reason. Running Windows System Monitor 1. From the Start button, select Program/Accessories/System Tools/SystemMonitor. By default the System Monitor will read values from the local machine. 2. If you choose to monitor a different machine, select the File menu option from the System Monitor and choose "Connect" as seen in Figures 1 and 2. https://wdnresource.wonderware.com/support/kbcd/html/1/t000932.htm 1/6
FIGURE 1: THE SYSTEM MONITOR FILE MENU OPTION FIGURE 2: THE CONNECT DIALOG BOX 3. Select the Edit pull- down menu and select "Add Item." This will open the Add Item dialog as seen in Figure 3. https://wdnresource.wonderware.com/support/kbcd/html/1/t000932.htm 2/6
FIGURE 3: THE ADD ITEM DIALOG BOX 4. Under the Category section, select "Kernal." 5. Under the Item section, select "Processor Usage," and hold down the key. 6. Under the Item section, select "Threads" while holding the key, then click OK. Note: Holding down the key allows you to select multiple items in the Item list. 7. Under the Category section select "Memory Manager" as seen in Figure 4. 8. Under the Item section select "Allocated memory" and hold down the key. FIGURE 4: THE ADD ITEM DIALOG BOX - MEMORY MANAGER 9. Repeat step 8 for Items: "Locked memory," "Swapfile in use," "Swapfile size," "Swappable memory," and "Unused physical memory". 10. Press OK when finished. You can now view all of the selected items for analysis. Choosing Chart Styles to Display Information Once you have selected all the items that you wish to monitor, you have a choice on different viewing parameters by selecting the given tool- bar buttons. By default you will see a numerical chart as seen in Figure 5. https://wdnresource.wonderware.com/support/kbcd/html/1/t000932.htm 3/6
FIGURE 5: THE SYSTEM MONITOR DIALOG BOX - NUMERICAL CHART You also can display the information in a Bar chart format or Graph, depending on your preference as seen in Figures 6 and 7. FIGURE 6: THE SYSTEM MONITOR DIALOG BOX - BAR CHART https://wdnresource.wonderware.com/support/kbcd/html/1/t000932.htm 4/6
FIGURE 7: THE SYSTEM MONITOR DIALOG BOX - GRAPH Logging and Reviewing Information Once all the information has been selected and a chart style is chosen, you can record all of the selected system resource items by performing the following steps. 1. Select the File pull- down menu and choose "Start Logging." You will then be prompted to enter a file name to save the information (Figure 8). FIGURE 8: THE SAVE AS DIALOG BOX - FILE NAME PROMPT https://wdnresource.wonderware.com/support/kbcd/html/1/t000932.htm 5/6
2. To stop logging, you must select the File pull- down menu and choose "Stop Logging." D. Boyd Note: The file should be saved with a.csv extension; this will allow viewing the recorded information in spreadsheet software, such as Microsoft Excel. The file saved here is what should be sent to Wonderware Technical Support upon request for evaluation of the recorded system information. When the files are received at Wonderware, the information will be loaded into Microsoft Excel and looked for possible memory leaks or trends in resource consumption. The Tech Note is published occasionally by Wonderware Technical Support. Publisher: Wonderware C orporation, 100 Technology Drive, Irvine C A 92618. There is also technical information on our software products at Wonderware Technical Support, our WonderFax fax-on-demand system at (949) 450-5050, and the C omprehensive Support Knowledge Base. For technical support questions, send an e-mail to support@wonderware.com. back to top 2013 Wonderware C orporation. All rights reserved. Terms of Use. https://wdnresource.wonderware.com/support/kbcd/html/1/t000932.htm 6/6