HowTo: System Admin – Remotely Log Memory of Processes Greater Than X

If you ever wanted to remotely log memory usage (and CPU usage) of processes, you can use "tasklist"

The key is, "tasklist /s"  and then the remote computer name. That along with filters you can query and log process info remotely with no more than a cmd window, or batch file in a scheduled task.

For example, here is how you would log processes with memory over 25000 KB

tasklist /s remotecomputername /fi "memusage gt 25000" >> c:mem.txt

take a look at the tasklist help by typing "tasklist /?" at the cmd prompt. You can see how all the filter work. You can filter by PID, Image Name, etc. Pretty sweet. BTW it does work on your local machine too, just remove the /s computername

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s