Skip to content

Troubleshooting with Process Monitor from Windows Sysinternals

When diagnosing complex issues on Windows systems, such as application failures, performance degradation, or resource conflicts, you need a powerful and detailed tool. Process Monitor from the Windows Sysinternals suite is one of the most effective tools available for troubleshooting. It provides real-time data on file system, registry, process, and network activity, allowing you to uncover hidden causes behind issues. In this blog post, we’ll explore how to effectively use Process Monitor to troubleshoot problems and outline best practices for investigating issues.

What is Process Monitor?

Process Monitor (commonly referred to as ProcMon) is a free, lightweight tool provided by Sysinternals that records and displays real-time system activity related to:

  • File system operations (file reads, writes, etc.)
  • Registry operations (key creation, modification, deletion, etc.)
  • Process and thread activity (process creation, exit, etc.)
  • Network activity

ProcMon is an excellent troubleshooting tool for situations where you need to track down problems caused by software misconfigurations, permission issues, or corrupted files.

Downloading and Running Process Monitor

  1. Download Process Monitor from the Windows Sysinternals site.
  2. Extract the downloaded file and run Procmon.exe. Process Monitor does not require installation; it can be run directly.
  3. When you launch the application, it immediately begins capturing system activity. This real-time logging can be overwhelming, so the next step is to filter the data to make the troubleshooting process manageable.

Key Features of Process Monitor

Before diving into troubleshooting, it’s essential to understand the key features and components of Process Monitor:

  • Capture Events: Records all system activity related to processes, files, the registry, and the network.
  • Filters: Customize which events are captured by filtering based on process names, event types, or data related to files, network, or the registry.
  • Event Properties: View detailed information about individual events, such as file paths, registry keys, process IDs, and timestamps.
  • Highlighting: Mark specific events to identify key issues faster.
  • Stack Trace: View the execution path of each process, giving you insight into why an event occurred.

Use Cases for Process Monitor

1. Troubleshooting Application Startup Failures

One of the common scenarios where Process Monitor shines is diagnosing application startup failures. If an application fails to start, it’s likely due to a missing dependency, file permission issue, or configuration error.

Steps to Diagnose:

  1. Start Process Monitor and clear the current captured events (File > Clear Display).
  2. Filter the events to focus only on the target application. Click on Filter > Filter and add a rule such as Process Name is myapp.exe (where myapp.exe is the application you’re investigating).
  3. Run the application while Process Monitor is active.
  4. Examine the captured events. Look for File not found, Access denied, or other error messages.

Example:

If a required DLL file is missing or corrupted, you will likely see a NAME NOT FOUND error in the results:

Operation:    CreateFile
Result: NAME NOT FOUND
Path: C:\Program Files\MyApp\missing.dll

From this, you’ll know that the application is failing because it cannot find the missing.dll file.

2. Diagnosing Slow File Access or Performance Issues

If you suspect an application or process is slowing down due to file system issues (e.g., excessive file access or lock contention), Process Monitor can help pinpoint the exact cause.

Steps to Diagnose:

  1. Start Process Monitor and run the slow application while monitoring system activity.
  2. Use filters to show only file system events (Operation is FileSystem).
  3. Look for long delays in ReadFile or WriteFile operations. These delays can be identified by checking the Duration column.
  4. Check for excessive file access requests, file lock contention, or errors such as SHARING VIOLATION, which indicates that multiple processes are trying to access the same file simultaneously.

Example:

If an application is slow because it is repeatedly trying to access a file:

Operation:    ReadFile
Path: C:\ProgramData\app\data.json
Duration: 2.5 seconds

The Duration column tells you how long the operation took, which helps identify slow file access.

3. Solving Registry Access Issues

Registry issues, such as access permission problems or incorrect registry values, can cause an application to malfunction. Using Process Monitor, you can track all registry operations and detect issues.

Steps to Diagnose:

  1. Filter the events to show only registry operations (Operation is RegQueryKey, RegSetValue, RegCreateKey, RegDeleteValue).
  2. Run the application and check for registry access failures such as ACCESS DENIED or NAME NOT FOUND in the Result column.
  3. Investigate the registry paths that are causing the issue, and verify permissions or correct missing entries.

Example:

If an application is failing because it cannot access a required registry key:

Operation:    RegOpenKey
Result: ACCESS DENIED
Path: HKLM\Software\MyApp\Settings

This indicates that the application does not have the necessary permissions to access the Settings registry key.

4. Tracking Process and Network Activity

If your issue involves processes failing to launch correctly or network-related issues, Process Monitor provides insights into process creation and network events.

Steps to Diagnose:

  1. Filter the events to focus on process creation (Operation is ProcessCreate) or network activity (Operation is Send or Receive).
  2. Run the process or service in question and observe its activity, particularly checking for failed attempts to launch a process or connect to a network resource.

Example:

If a process fails to start due to missing permissions:

Operation:    ProcessCreate
Result: ACCESS DENIED
Process: C:\Program Files\MyApp\subprocess.exe

You can use this information to adjust permissions or investigate why the subprocess failed to start.

Filtering and Best Practices

1. Apply Filters to Reduce Noise

ProcMon captures an overwhelming amount of data by default, so applying filters is essential for effective troubleshooting. Use the following steps to add filters:

  1. Click Filter > Filter.
  2. Set filters based on the Process Name, Operation, or Path.
  3. Add multiple filters if needed to narrow down the data to the specific events you are interested in.

2. Highlight Key Events

To quickly spot issues, you can highlight important events like errors or failures:

  1. Right-click an event you want to highlight (e.g., ACCESS DENIED).
  2. Select Highlight, and Process Monitor will color the selected event type, making it easier to find.

3. Use Boot Logging for Startup Issues

If the issue only occurs during system boot, you can enable boot logging in Process Monitor:

  1. Select Options > Enable Boot Logging.
  2. Restart the system.
  3. Process Monitor will capture events that occur during system startup, which can be analyzed afterward.

Conclusion

Process Monitor is a powerful and versatile tool that helps troubleshoot a wide range of Windows system issues, from application startup failures to file access problems and registry permission errors. By effectively applying filters, analyzing captured events, and understanding the results, you can identify root causes and resolve issues faster.

ProcMon is a must-have tool for any Windows system administrator, developer, or IT professional looking to improve their troubleshooting workflow. Once you master it, the ability to pinpoint complex issues will save you time and frustration in maintaining stable and efficient systems.

Published inProcess Monitorprocmon.exeTroubleshootingWindows Sysinternals
LinkedIn
Share
WhatsApp