Skip to content

Instantly share code, notes, and snippets.

View maduraimad's full-sized avatar

Arthi M Krishna maduraimad

  • The United States Patent and Trademark Office
View GitHub Profile
@bdkosher
bdkosher / show-chrome-mem.bat
Last active August 29, 2015 14:05
Shows the total mem usage (in KB) and count of chrome.exe instances (assumes Groovy shell being on PATH)
@tasklist /NH /FI "IMAGENAME eq chrome.exe" | groovy -e "int tm = 0, ci = 0; new BufferedReader(new InputStreamReader(System.in)).text.eachLine { def p = it.split(/\s{2,}/); if (p.length == 4) {tm += (p[-1] - ',' - ' K') as int; ci++} }; println tm + ' (' + ci + ' instances)'"