Query Details

Identify Processes That Are Heavily Using Disk Space

Query

// Use Case: Identifying and prioritizing processes with high on-disk working set size for system resource optimization.
Process
| where OnDisk == true
| project ProcessName, Path, WorkingSetSizeMB = WorkingSetSizeBytes / (1024 * 1024), OnDisk
| order by WorkingSetSizeMB desc

Explanation

This query is designed to help identify and prioritize processes that are using a significant amount of disk space for their working set, which can be important for optimizing system resources. Here's a simple breakdown of what the query does:

  1. Filter Processes: It starts by selecting processes that are currently using disk space (OnDisk == true).

  2. Select and Rename Columns: It then chooses specific information to display for each process:

    • ProcessName: The name of the process.
    • Path: The file path of the process.
    • WorkingSetSizeMB: The working set size of the process, converted from bytes to megabytes for easier readability.
    • OnDisk: A confirmation that the process is using disk space.
  3. Sort the Results: Finally, it orders the list of processes by their working set size in megabytes, from largest to smallest, so that the processes using the most disk space appear at the top.

In summary, this query helps you quickly identify which processes are consuming the most disk space, allowing you to focus on optimizing those that have the highest impact on system resources.

Details

Ugur Koc profile picture

Ugur Koc

Released: December 13, 2024

Tables

Process

Keywords

Process

Operators

whereprojectorder by

Actions

GitHub