Skip to main content
The 2024 Developer Survey results are live! See the results
added 55 characters in body
Source Link
Xtra Coder
  • 243
  • 2
  • 8

I was trying to find out what is eating memory in my Windows 10 - the problem is to find values which sum up into "Committed" size shown in TaskManager at Performance/Memory tab.

Unfortunatelly I could not find where to get these number from. The closesest I could find is sum of PagedMemorySize64 provided by get-process in powershell. When "Commited" in task manager was at 21.7GB, sum of PagedMemorySize64 for all processes was around 19GB - 2.7GB is still hidden somewere. If someone knows better way to get list with processes commit size - please tell it in comments.

Here is the command for powershell to dump list to file, then Excel will help to sum the numbers.

$TypeData = @{
    TypeName = 'System.Diagnostics.Process'
    MemberType = 'ScriptProperty'
    MemberName = 'CommandLine'
    Value = {(Get-CimInstance Win32_Process -Filter "ProcessId = $($this.Id)").CommandLine}
}
Update-TypeData @TypeData

get-process | sort PagedMemorySize64 -desc | select PagedMemorySize64, ProcessName, CommandLine > processes.txt 

get-process | measure-object -sum PagedMemorySize64

PS: hint to use PagedMemorySize64 I took from here: https://stackoverflow.com/questions/46823670/commit-size-of-a-process-in-task-manager-c-sharp

I was trying to find out what is eating memory in my Windows 10 - the problem is to find values which sum up into "Committed" size shown in TaskManager at Performance/Memory tab.

Unfortunatelly I could not find where to get these number from. The closesest I could find is sum of PagedMemorySize64 provided by get-process in powershell. When "Commited" in task manager was at 21.7GB, sum of PagedMemorySize64 for all processes was around 19GB - 2.7GB is still hidden somewere. If someone knows better way to get list with processes commit size - please tell it in comments.

Here is the command for powershell to dump list to file, then Excel will help to sum the numbers.

$TypeData = @{
    TypeName = 'System.Diagnostics.Process'
    MemberType = 'ScriptProperty'
    MemberName = 'CommandLine'
    Value = {(Get-CimInstance Win32_Process -Filter "ProcessId = $($this.Id)").CommandLine}
}
Update-TypeData @TypeData

get-process | sort PagedMemorySize64 -desc | select PagedMemorySize64, ProcessName, CommandLine > processes.txt

PS: hint to use PagedMemorySize64 I took from here: https://stackoverflow.com/questions/46823670/commit-size-of-a-process-in-task-manager-c-sharp

I was trying to find out what is eating memory in my Windows 10 - the problem is to find values which sum up into "Committed" size shown in TaskManager at Performance/Memory tab.

Unfortunatelly I could not find where to get these number from. The closesest I could find is sum of PagedMemorySize64 provided by get-process in powershell. When "Commited" in task manager was at 21.7GB, sum of PagedMemorySize64 for all processes was around 19GB - 2.7GB is still hidden somewere. If someone knows better way to get list with processes commit size - please tell it in comments.

Here is the command for powershell to dump list to file, then Excel will help to sum the numbers.

$TypeData = @{
    TypeName = 'System.Diagnostics.Process'
    MemberType = 'ScriptProperty'
    MemberName = 'CommandLine'
    Value = {(Get-CimInstance Win32_Process -Filter "ProcessId = $($this.Id)").CommandLine}
}
Update-TypeData @TypeData

get-process | sort PagedMemorySize64 -desc | select PagedMemorySize64, ProcessName, CommandLine > processes.txt 

get-process | measure-object -sum PagedMemorySize64

PS: hint to use PagedMemorySize64 I took from here: https://stackoverflow.com/questions/46823670/commit-size-of-a-process-in-task-manager-c-sharp

Source Link
Xtra Coder
  • 243
  • 2
  • 8

I was trying to find out what is eating memory in my Windows 10 - the problem is to find values which sum up into "Committed" size shown in TaskManager at Performance/Memory tab.

Unfortunatelly I could not find where to get these number from. The closesest I could find is sum of PagedMemorySize64 provided by get-process in powershell. When "Commited" in task manager was at 21.7GB, sum of PagedMemorySize64 for all processes was around 19GB - 2.7GB is still hidden somewere. If someone knows better way to get list with processes commit size - please tell it in comments.

Here is the command for powershell to dump list to file, then Excel will help to sum the numbers.

$TypeData = @{
    TypeName = 'System.Diagnostics.Process'
    MemberType = 'ScriptProperty'
    MemberName = 'CommandLine'
    Value = {(Get-CimInstance Win32_Process -Filter "ProcessId = $($this.Id)").CommandLine}
}
Update-TypeData @TypeData

get-process | sort PagedMemorySize64 -desc | select PagedMemorySize64, ProcessName, CommandLine > processes.txt

PS: hint to use PagedMemorySize64 I took from here: https://stackoverflow.com/questions/46823670/commit-size-of-a-process-in-task-manager-c-sharp