Finding VirtualMemory Offenders Using Monad

Microsoft’s new command shell and scripting language sports some very powerful capabilities.  I like this particular
command to quickly find programs that are eating lots of virtual memory:
> get-process | sort VS -asc:0 | format-table ProcessName,@{label="VirtualMem (M)";Expression={"{0,10:F2}" -f ($_.VS/1M)}} -a
ProcessName      VirtualMem (M)
———–      ————–
sqlservr             576.11
devenv               311.86
dexplore             204.87
dexplore             175.91
msh                  155.80
msh                  126.09
svchost              102.17
TeamBuildService      94.02
explorer              64.12
This particular example takes advantage of format-table hashtables to specify how a particular field should be displayed.  Note that VS is an alias property name for VirtualMemorySize.  There is also an alias for HandleCount called Handles.
This entry was posted in Monad. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s