Filemon Regmon
Filemon Regmon
Filemon Regmon
Mark Russinovich
Co-founder and chief software architect of Winternals Software (www.winternals.com) Co-author of Windows Internals, 4th edition and Inside Windows 2000, 3rd Edition with David Solomon Author of tools on www.sysinternals.com
Home of Marks blog and forums
Microsoft Most Valuable Professional (MVP) Senior Contributing Editor to Windows IT Pro Magazine Ph.D. in Computer Engineering
David Solomon
President of David Solomon Expert Seminars (www.solsem.com)
Founded in 1992 1982-1992: VMS operating systems development
Teach public and private live classes on Windows Internals and Advanced Troubleshooting Microsoft Most Valuable Professional (MVP) Books
Windows Internals, 4th edition Inside Windows 2000, 3rd edition Inside Windows NT, 2nd edition Windows NT for OpenVMS Professionals
Videos
Windows Internals COMPLETE New! Sysinternals Video Library (see DVD in bag)
4
Outline
Introduction Troubleshooting with Filemon Troubleshooting with Regmon Using Filemon and Regmon Together
Ideal for troubleshooting a wide variety of application failures Also useful for to understand and tune file system and Registry access
Understand hard drive activity Optimize application installation and configuration
Filemon and Regmon run on Microsoft Windows 95, Windows 98, Windows Me, Windows 2000, Windows XP, Windows Server 2003, x64 64-bit Editions, Windows Vista
7
Using Regmon/Filemon
Two basic techniques:
Go to end of log and look backwards to where problem occurred or is evident and focused on the last things done Compare a good log with a bad log
Often comparing the I/O and Registry activity of a failing process with one that works may point to the problem
Have to first massage log file to remove data that differs run to run
Delete first 3 columns (they are always different: line number, time, process id) Easy to do with Microsoft Office Excel by deleting columns
Outline
Introduction Troubleshooting with Filemon Troubleshooting with Regmon Using Filemon and Regmon Together
Filemon GUI
Using Filemon
# - operation number Process: image name + process id Request: internal I/O request code Result: return code from I/O operation Other: flags passed on I/O request
11
Controlling Filemon
Start/stop logging (Control/E) Clear display (Control/X) Open Microsoft Internet Explorer window to folder containing file:
Double click on a line does this
Find finds text within window Save to log file Advanced mode Network option
12
14
You can also use Filemon on a server to determine which file(s) were being accessed most frequently
Import into Excel and make a pie chart by file name or operation type Move heavy-access files to a different disk on a different controller
15
Alternative: file change notification When you run Filemon on an idle system you should only see bursty system background activity
Polling is visible as periodic accesses to the same files and directories File change notification is visible as directory queries that have no result
16
17
19
20
21
22
23
24
25
DLL Problems
Process Explorer may solve a DLL versioning issue, but may not if:
A DLL is missing The order of DLL loads is relevant
Solution:
Ran Filemon, looked at last DLL loaded before Dr. Watson It was a printer DLL Uninstalled printer problem went away
27
28
29
30
Conclusion:
DLL loaded on Windows 95 system was not for Windows 95 Got proper version for Windows 95, problem went away
31
32
33
35
Someone had misread a request to remove EDIT rights and removed all rights
37
38
39
Outline
Introduction Troubleshooting with Filemon Troubleshooting with Regmon Using Filemon and Regmon Together
40
Configuration Problems
Missing, corrupted or overly-secure Registry settings often lead to application crashes and errors Some applications dont completely remove registry data at uninstall Regmon may yield the answer
41
Application
Regmon GUI
42
Regmon
UI is similar to Filemon Request: OpenKey, CreateKey, SetValue, QueryValue, CloseKey Path
HKCU=HKEY_CURRENT_USER (per-user settings) HKLM=HKEY_LOCAL_MACHINE (system wide settings)
Result return code from Registry operation Other extended information or results
43
44
Registry Troubleshooting
If you suspect registry data is causing problems, rename the key and rerun the application
Most applications recreate user settings when run In this way, the data wont be seen by the application Can always rename the key back
45
2. Change Font
3. Run Regmon and filter to Notepad.exe 4. Exit Notepad
Notepad settings 6. Double click on a line to jump to Regedit 7. Delete top level Notepad user settings key 8. Re-run Notepad and confirm font resets to default setting
46
Solution:
With Regmon, captured startup of Word Found location of user-specific settings for Word Deleted this Registry key Re-ran Word, which recreated user settings from scratch
47
48
49
Solution: renamed ATT key and problem went away Conclusion: previous ISPs dialer had left junk behind
50
Missing Settings
Sometimes queries to what is not there is more interesting than what is there
Identify missing Registry keys
Search for status NOTFOUND
52
Outline
Troubleshooting with Filemon Troubleshooting with Regmon Using Filemon and Regmon Together
54
55
56
Regmon showed icon lookup configured for missing computer Fix: Delete Paint Shop Pro (PSP) browse files and all PSP file associations
57
Solutions:
Run Filemon/Regmon in a different logon session
psexec s i d
58
Resources
Technical Chats and Webcasts
http://www.microsoft.com/communities/chats/default.mspx http://www.microsoft.com/usa/webcasts/default.asp
Virtual Labs
http://www.microsoft.com/technet/traincert/virtuallab/rms.mspx
Newsgroups
http://communities2.microsoft.com/ communities/newsgroups/en-us/default.aspx
User Groups
http://www.microsoft.com/communities/usergroups/default.mspx
59
60
2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.