UsingProcessMonitor
ProcessMonitorTutorial Thisinformationwasadaptedfromthehelpfilefortheprogram. ProcessMonitorisanadvancedmonitoringtoolforWindowsthatshowsrealtimefilesystem, Registryandprocess/[Link] utilities,FilemonandRegmon,andaddsanextensivelistofenhancementsincludingrichand nondestructivefiltering,comprehensiveeventpropertiessuchsessionIDsandusernames, reliableprocessinformation,fullthreadstackswithintegratedsymbolsupportforeach operation,simultaneousloggingtoafile,[Link] makeProcessMonitoracoreutilityinyoursystemtroubleshootingandmalwarehunting toolkit. ProcessMonitorrunsonWindows2000SP4withUpdateRollup1,WindowsXPSP2,Windows Server2003SP1,andWindowsVistaaswellasx64versionsofWindowsXP,WindowsServer 2003andWindowsVista. UsingProcessMonitor
[Link] ProcessMonitoritimmediatelystartsmonitoringthreeclassesofoperation:filesystem, Registryandprocess. FileSystem ProcessMonitordisplaysfilesystemactivityforallWindowsfilesystems,includinglocal [Link] [Link] [Link],ifuserAhas
mountedashareasdriveletterZ:,anyaccessestheymaketothatsharewilldisplayin ProcessMonitorasbeingrelativetodriveZ:. Toremovefilesystemoperationsfromthedisplaydeselectthefilesystempushbutton intheProcessMonitortoolbarandtoaddbackfilesystemoperationsdepressthe button. Registry ProcessMonitorlogsallRegistryoperationsanddisplaysRegistrypathsusing conventionalabbreviationsforRegistryrootkeys(e.g.HKEY_LOCAL_MACHINEis representedasHKLM). ToremoveRegistryoperationsfromthedisplaydeselecttheRegistrypushbuttonin theProcessMonitortoolbarandtoaddbackRegistryoperationsdepressthebutton. Process Initsprocess/threadmonitoringsubsystemProcessMonitortracksallprocessand threadcreationandexitoperationsaswellasDLLanddevicedriverloadoperations. ToremoveProcessoperationsfromthedisplaydeselecttheprocesspushbuttoninthe ProcessMonitortoolbarandtoaddbackprocessoperationsdepressthebutton. Network ProcessMonitorusesEventTracingforWindows(ETW)totraceandrecordTCPand [Link],as wellastheamountofdatasentorreceived,butdoesnotincludetheactualdata. ToremoveNetworkoperationsfromthedisplaydeselectthenetworkpushbuttonin theProcessMonitortoolbarandtoaddbacknetworkoperationsdepressthebutton. Profiling [Link],ProcessMonitor scansalltheactivethreadsinthesystemandgeneratesaprofilingevenforeachone thatrecordsthekernelanduserCPUtimeconsumed,aswellasthenumberofcontext switchesexecuted,[Link]:theSystem processisnotincludedinprofiling.
ThereareanumberofbasicoptionsthatcontrolbasicProcessMonitoroperation: Capture:UsetheCaptureEventsmenuitemintheFilemenu,capturetoolbarbuttonorCtrl+E hotkeytotoggleProcessMonitor'smonitoring.
Autoscroll:SelectAutoscrollentryintheEditmenu,theautoscrolltoolbarbuttonorCtrl+A hotkeytotoggleProcessMonitor'sautoscrollbehavior,whichcausesittoensurethatthemost recentoperationisvisibleinthedisplay. Clear:ToclearthedisplayofallitemschooseClearDisplayfromtheEditmenuorusetheCtrl+X hotkey. ColumnSelection Youcandragcolumnstorearrangetheirorderandcustomizedthecolumnsdisplayedby [Link] thatareavailableforselectioninclude: ApplicationDetails
ProcessNameThenameoftheprocessinwhichaneventoccurred. ImagePathThefullpathoftheimagerunninginaprocess. CommandLineThecommandlineusedtolaunchaprocess. CompanyNameThetextofthecompanynameversionstringembeddedinaprocess [Link]. DescriptionThetextoftheproductdescriptionstringembeddedinaprocessimagefile. Thistextisoptionallydefinedbytheapplicationdeveloper. [Link] isoptionallyspecifiedbytheapplicationdeveloper.
EventDetails
SequenceNumberTheuniquenumberProcessMonitorassignstoanindividualevent. EventClassTheclass(File,Registry,Process)oftheevent. OperationThespecificeventoperation([Link],RegQueryValue,etc.). Date&TimeBoththedateandthetimeofanoperation. TimeofDayOnlythetimeofanoperation. PathThepathoftheresourcethataneventreferences. DetailAdditionalinformationspecifictoanevent. ResultThestatuscodeofacompletedoperation. RelativeTimeThetimeoftheoperationrelativetoProcessMonitor'sstarttimeorthe lasttimethattheProcessMonitordisplaywascleared. DurationThedurationofanoperationthathascompleted.
ProcessManagement
UserNameThenameoftheuseraccountinwhichtheprocessthatperformedan operationisexecuting.
SessionIDTheWindowssessioninwhichtheprocessthatexecutedanoperationis executing. AuthenticationIDThelogonsessioninwhichtheprocessthatexecutedanoperationis executing. ProcessIDTheProcessID(PID)oftheprocessthatexecutedanoperation. ThreadIDTheThreadID(TID)ofthethreadthatexecutedanoperation. IntegrityLevelTheintegritylevelatwhichtheprocessthatexecutedanoperationis running(WindowsVistaonly). VirtualizedThevirtualizationstatusoftheprocessthatexecutedanoperation(Windows Vistaonly).
EventProperties Youcanaccessthepropertiesforanindividualeventbydoubleclickingontheevent,orby selectingthePropertiesmenuitemfromtheEventmenuorthecontextmenuwhenyouright [Link],ProcessandStackpages. Youcanmovetothenextorprecedingdisplayedorhighlightedeventwiththearrowbuttonsat thebottomoftheEventPropertiesdialog.
Event TheEventpagedisplaysinformationspecifictoanevent,includingitssequencenumber,issuing thread,eventclassandoperation,result,timestamp,andifapplicable,[Link] [Link] [Link] shownforaneventintheDetailcolumnofthemaindisplay,buteachdetailisshownona separateline. Process Anevent'[Link] withthedataassociatedwithaprocess'image,suchasthepathandversionstrings,the ProcesspageshowsprocessexecutionattributesliketheprocessID,useraccountinwhichthe processisexecuting,andiftheeventwasgeneratedona64bitWindowssystem,whetherthe [Link],ProcessMonitor showstheintegrityleveloftheprocessandwhetherornotit'svirtualized. Thebottomareaoftheprocesspagedisplaysthelistofimagesloaded,andtheaddressesat whichtheyareloaded,[Link] inthelisttoviewmoreinformationabouttheimage,includingitsversioninformation. Stack [Link] canbeusefulfordeterminingthereasonaneventtookplaceandthecomponentresponsible [Link]'K'ontheleftofthe frameandusermodestacks(onlyavailableonlyon32bitsystemspriortoVistaSP1/Windows Server2008)withtheletter'U'.IfProcessMonitorisabletolocatesymbolsforimages referencedinthetraceitwillattempttoresolveaddressestothefunctionsinwhichthey [Link],for [Link],whichyou accessfromtheOptionsmenu,toconfiguresymbols. IfyouspecifyapathtosourcefilesintheSymbolConfigurationdialog,theStackdialog'sSource buttonwillenableforanyframeforwhichlinenumbersymbolsinformationisavailableand [Link] viewerthathighlightsthesourcecodelinereferenced. Toviewmoreinformationaboutanimagelistedinthestacktraceeitherdoubleclickonthe frameorselecttheframeandpressthePropertiesbuttonbelowthestacktracearea. SelecttheStackmenuentryfromtheEventmenutoopentheEventPropertiesdialogdirectly totheStackpage.
FilteringandHighlighting ProcessMonitoroffersseveralwaystoconfigurefiltersorhighlighting. IncludeandExcludeFilters YoucanspecifyeventattributessuchthatProcessMonitorwillonlydisplayorexcludeevents [Link],meaningthattheyaffectonly whicheventsProcessMonitordisplays,nottheunderlyingeventdata. WhenaneventisselectedtheIncludeandExcludesubmenusintheEventmenuallowsyouto easilyaddoneoftheevent'[Link] example,toonlyshoweventsexecutedbyaparticularprocessnamechoosetheProcessName [Link] configureanattributefilterforalloftheuniquevaluescontainedintheselectedevents. ProcessMonitorORstogetherallthefiltersthatarerelatedtoaparticularattributetypeand [Link],ifyouspecifiedprocessname [Link]:\Windows,Process [Link] theC:\Windowsdirectory. MorecomplexfilteringoptionsareavailableintheFilterdialog,whichyouopenbyselecting [Link] anattributefield([Link],ProcessName,etc.),acomparisonoperation,an attributevalue,[Link],ProcessMonitor willautomaticallypopulatetheattributevaluedropdownwithvaluesthatarepresentinthe loadedtracedata,butyoucanenterarbitraryvalues. FilterContextMenu IfyourightclickonaniteminthedisplayProcessMonitordisplaysacontextmenuthatlet's youviewtheitem'spropertiesorconfigureafilterbasedontheitem'[Link], quickfilterentriesareaddedtothemenuforthevalueofthecolumnonwhichyouclick. DestructiveFiltering Bydefault,ProcessMonitorfiltersapplytothedataitdisplays,[Link] youtochangefilterstoobtaindifferentviewsofdatawithoutaffectingtheexcludeddata. However,youcanconfigureProcessMonitortodeleteanydatathat'sexcludedbyafilteratthe timethedataiscapturedbytogglingdestructivefilteringmode,whichyoudobychoosingDrop FilteredEventsfromtheFiltermenu.
IncludeProcessfromWindow Thetoolbarincludesabuttonshapedlikeatargetthatyoucandragoffanddropontoa windowtocauseProcessMonitortoaddtheprocessIDoftheprocessthatownsthewindow totheIncludefilter. [Link] TheFiltermenu'sEnableAdvancedOutputmenuitemcontrolswhetherProcessMonitoris [Link] filterstoexcludesystemrelatedactivityfromthedisplayandusesintuitivenamesforinternal [Link],ProcessMonitorshowstheinternalIRP_MJ_READ [Link] eventsusuallynotrelevantforapplicationtroubleshooting. SavingandLoadingFilters OnceyouhaveconfiguredafilteryoucansaveitusingtheSaveFiltersmenuitemintheTools [Link] canchangetheorderinwhichthefiltersdisplayinthemenuusingtheOrganizeFiltersdialog [Link] renamesavedfiltersaswellastoeasilyexportfilterstoaformatthatyoucanthenreimport usingtheOrganizeFilterdialogonothersystems. Highlighting ProcessMonitorshighlightingfiltersenableyoutospecifyeventattributesthatcauseanevent [Link] accessfordefininghighlightfilterentriesandtheHighlightmenuentryintheToolsmenuopens theHighlightFilterdialog,whichoperatessimilarlytotheInclude/ExcludeFilterdialog. TheProcessTree TheProcessTreemenuentryintheToolsmenuopenstheProcessTreedialog,whichdisplays alloftheprocessesreferencedintheloadedtraceinahierarchythatreflectstheirparentchild [Link]. Processesthatarealignedalongtheleftsideofthewindowhaveparentprocessesthatdidnot executeanyeventinthetrace. WhenyouselectaprocessinthetreeasubsetofthedataProcessMonitorhasobtainedabout theprocess,suchasitsimagepath,useraccount,andstarttime,showsinthebottomofthe [Link], whichresultsinProcessMonitorlocatingandselectingthefirstvisibleiteminthetrace
[Link] excludingfromthedisplayallofthespecifiedprocess'events. TraceSummaryTools ProcessMonitorincludesanumberofdialogsthatallowyoutoperformsimpledataminingon theeventscollectedinatrace. SystemDetails ProcessMonitorcapturessomeinformationaboutthesystemonwhichitcollectsatrace, includingthemachinename,thesystemrootpath,[Link] canaccessthisinformation,whichProcessMonitorstoresinlogfiles,fromtheSystemDetails dialogintheToolsmenu. UniqueValues TheUniqueValuesdialog,whichyouopenusingthecorrespondingmenuentryintheTools menu,letsyouseetheuniquevaluesforeachofthedifferentattributevaluesdefinedfor [Link],ifyouwantquicklyseeallthepathsreferencedinthetrace, choosePathintheselectionentry. DoubleclickingonadisplayedvalueorclickingontheFilterbuttonaddsanincludefilterforthe currentlyselectedvalue. CountOccurrences [Link] tracefortheattributetypeyouspecifyalongwiththenumberoftimesinthetraceanevent containedthevalue. ProcessSummary Thisdialogsummarizestheprocessesseeninthetrace,includingtheirprocessID,imagename, andcommandline. FileSummary TheFileSummarydialoglistseachuniquefilesystempathpresentinthefilteredtrace,the amountoftimespentperformingI/Otothefile,totalnumberofeventsthatreferencedthe path,andthecountofindividualoperationtypes.
RegistrySummary TheRegistrySummarydialoglistseachuniqueRegistrypathpresentinthefilteredtrace,the amountoftimespentperformingI/OtotheRegistrypath,totalnumberofeventsthat referencedthepath,andthecountofindividualoperationtypes. NetworkSummary TheNetworkSummarydialoglistseachuniquedestinationIPaddresspresentinthefiltered traceandthenumberdifferenttypesofevents,includingsendsandreceives,toeachaddress. StackSummary UsetheStackSummarydialogtoseeindividualinstancesofstacktracesforeachprocess, includingthenumberoftimesthestacktraceoccursandthetotaltimespentineventsthat sharethesametrace. Options AnumberofsettingsintheOptionsmenumodifyProcessMonitor'sbehavior. AlwaysonTop SelectingthisoptioncausestheProcessMonitorwindowtoremainontopofotherwindows. Font ThisoptionopensafontselectiondialogwhereyoucanchosethefontProcessMonitoruses foritsdisplay. HighlightColors ChosethisentrytoopenadialogtopickthetextandbackgroundcolorsProcessMonitoruses forentriesthatmatchtheconfiguredhighlightfilters. ConfigureSymbols ProcessMonitorcanusesymbolinformation,ifavailable,toshowfunctionsreferencedon [Link] ToolsforWindowswebpage.
HistoryDepth ProcessMonitorwatchescommittedmemoryusageandturnsitselfoffwhenvirtualmemory runslow,buttheHistoryDepthdialoglet'syoulimitthenumberofentriesitkeepssothatyou canleaveProcessMonitorrunningforlongperiodsandensurethatitalwayskeepsthemost recentevents. ProfilingEvents Usethismenuentrytoopenthethreadprofilingconfigurationdialog,whereyouenablethread [Link] enabled,ProcessMonitorcapturesthreadstacktracesandCPUutilizationthatyoucanuseto identifythesourceofCPUrelatedperformanceissues. EnableBootLogging UsethisoptiontoconfigureProcessMonitorbootlogging. SavingandLogging FileFormats YoucanusetheSaveentryintheFilemenutosaveProcessMonitordatainnative(PML), commadelimitedvalue(CSV),[Link] capturedsothatyoucanreloaditbackintoProcessMonitoronthesamesystemoradifferent [Link],XML emitsXMLformatteddatathatcanbeparsedbytoolsthatmanipulateXML. Logging Bydefault,[Link] dialog,whichyouaccessfromtheFilemenu,toconfigureProcessMonitortostorecaptured [Link] PMLformatasitcapturesit. TheBackingFilesdialogalsodisplaysdiagnosticinformation,includingthenumberofevents captured,processesdefinedandthecapturethread'sloadstatus. BootLogging ProcessMonitorcanlogactivityfromapointveryearlyinthebootprocessduringthe [Link] [Link]'sdriverwilllogactivity
atthenextbootintoafileinthe%Windir%directoryandwillcontinueloggingthroughthe [Link],ifyoudon'trunProcessMonitorduring abootsessionyouwillcaptureatraceoftheentireboottoshutdowncycle. WhenyourunProcessMonitoritlookstoseeifapreviousbootloghasbeengenerated,andif so,[Link] [Link], whichistheonlyprocessearlyinaboot,selectEnableAdvancedOutputfromtheOptions menu. Ifyouconfigurebootloggingandthesystemcrashesearlyinthebootyoucandeactivateboot loggingbychoosingtheLastKnownGoodoptionfromtheWindowsbootmenu(whichyou accessbypressingF8duringtheboot). Note:networkevents,whicharebasedonETW(EventTracingforWindows),arenotavailable inbootlogs. ImportingandExportingConfiguration OnceyouhaveconfiguredafilteryoucansaveitusingtheSaveFiltersmenuitemintheTools [Link] canchangetheorderinwhichthefiltersdisplayinthemenuusingtheOrganizeFiltersdialog [Link] renamesavedfiltersaswellastoeasilyexportfilterstoaformatthatyoucanthenreimport usingtheOrganizeFilterdialogonothersystems. YoucanalsoexportProcessMonitor'sentireconfiguration,includingfilters,columnselection, columnorderandsize,logfilesettings,anddebughelpfilepathconfiguration,toaProcess MonitorConfigurationfile(.PMC)usingtheExportConfigurationmenuentryintheFilemenu. UsetheFilemenu'sImportConfigurationentrytoloadasavedconfigurationfile. CommandLineOptions ProcessMonitorsupportsseveralcommandlineoptions: /Openlog<savedPMLlogfile> DirectsProcessMonitortoopenandloadthespecifiedlogfile. /Backingfile<logfilename> HasProcessMonitorcreateandusethespecifiedfilenameastheloggingfile. /Pagingfile
Saveeventstothepagingfile. /Noconnect WhenthisflagispresentProcessMonitordoesnotautomaticallystartloggingactivity. /Nofilter Clearsthefilteratstartup. /AcceptEula AutomaticallyacceptsthelicenseandbypassestheEULAdialog. /Profiling Enablesthethreadprofilingeventclass. /Minimized StartsProcessMonitorwithitswindowminimizedtothetaskbar. /WaitForIdle WaitforaninstanceofProcessMonitortobecomeready. /Terminate TerminateallinstancesofProcessMonitorandexit. /Quiet Don'tconfirmfiltersettingsonstartup. /Run32 Usesthisswitchtorunthe32bitversionofProcessMonitoron64bitWindowstoopenlogs generatedon32bitsystems /HookRegistry Thisswitch,whichisavailableonlyon32bitVistaandServer2008,hasProcessMonitoruse systemcallhookinginsteadoftheRegistrycallbackmechanismtomonitorRegistryactivity, [Link]
optionmustbeusedthefirsttimethatProcessMonitorisrunonasystemandshouldonlybe usedtotroubleshootSoftGridapplications. /SaveAs,/SaveAs1,/SaveAs2 Usetheseswitcheswiththe/OpenLogswitchtohaveProcessMonitorexportalogfileinto CSV,XML,[Link]/SaveAs1optionincludesstackinformationforexporttoXML formatandthe/SaveAs2optionaddssymbolinformation. ScriptingProcessMonitor [Link] [Link]'sexecution: setPM=C:\sysint\[Link] start%PM%/quiet/minimized/backingfileC:\temp\[Link] %PM%/waitforidle [Link] %PM%/terminate ThefirstinvocationofProcessMonitorusingstartensuresthattheprocessdetachesfromthe consolewindow,[Link] invocationwith/WaitForIdlecausesthebatchfiletopauseuntilthefirstinstanceisupand [Link]/Terminatetellsthefirst instancetostopcapturing,commitanyoutstandingdatatothebackingfileandexitcleanly.