Skip to main content

Windows tasklist and sort result

tasklist run on git-bash vs on CMD

tasklist /M not run on git-bash

sample output (after kill Forxit connect and quit Slack)
(Win 8 x64 core i3 2100, 10GB memory)
Slack (idle) eat about 150MB
Foxit connect eat about 130MB (on TaskMgr only show 3MB :) )

To dump tasklist to file, run:
tasklist > tasklist.out
">" mean redirect output to file instead of cmd console.
If use ">>" mean new data (text) will append instead of replace old data in file.

sort -k5 mean sort output by column #5

$ sort -k5 -n tl_simple.out

========================= ======== ================ =========== ============
Image Name                     PID Session Name        Session#    Mem Usage
System Idle Process              0 Services                   0          4 K
smss.exe                       308 Services                   0        336 K
wininit.exe                    468 Services                   0        592 K
conhost.exe                    160 Console                    1        612 K
conhost.exe                   2268 Console                    1        612 K
conhost.exe                   4644 Console                    1        612 K
conhost.exe                   6380 Console                    1        612 K
conhost.exe                   6652 Console                    1        612 K
ViakaraokeSrv.exe             1992 Services                   0        684 K
System                           4 Services                   0        700 K
DbxSvc.exe                    1360 Services                   0        780 K
alg.exe                       3268 Services                   0        852 K
VirtualBox.exe                2180 Console                    1        940 K
VirtualBox.exe                3664 Console                    1        940 K
winlogon.exe                   512 Console                    1      1,020 K
tv_x64.exe                    1400 Console                    1      1,076 K
VirtualBox.exe                1528 Console                    1      1,116 K
VirtualBox.exe                5060 Console                    1      1,116 K
tv_w32.exe                    1348 Console                    1      1,376 K
ssh-pageant.exe               2436 Console                    1      1,396 K
remoting_host.exe             1340 Services                   0      1,592 K
mDNSResponder.exe             1292 Services                   0      1,616 K
svchost.exe                   2576 Services                   0      1,628 K
chrome.exe                    5368 Console                    1      1,780 K
bash.exe                       936 Console                    1      1,856 K
bash.exe                      1512 Console                    1      1,856 K
bash.exe                      8160 Console                    1      1,856 K
csrss.exe                      396 Services                   0      1,888 K
bash.exe                      2448 Console                    1      1,936 K
cygtermd.exe                  2716 Console                    1      2,040 K
cygtermd.exe                  6860 Console                    1      2,040 K
cygtermd.exe                  7552 Console                    1      2,040 K
cygtermd.exe                  3052 Console                    1      2,048 K
bash.exe                      5652 Console                    1      2,056 K
bash.exe                      7404 Console                    1      2,060 K
bash.exe                      2492 Console                    1      2,064 K
bash.exe                      1808 Console                    1      2,068 K
cygtermd.exe                  6664 Console                    1      2,232 K
RzSDKService.exe              1604 Services                   0      2,264 K
bash.exe                      2988 Console                    1      2,492 K
_ssh.exe                      3476 Console                    1      2,608 K
_ssh.exe                      7872 Console                    1      2,628 K
_ssh.exe                      2700 Console                    1      2,632 K
_ssh.exe                      6624 Console                    1      2,708 K
AppleMobileDeviceService.     1252 Services                   0      2,788 K
chrome.exe                    5636 Console                    1      2,924 K
conhost.exe                   3588 Console                    1      3,316 K
conhost.exe                   6584 Console                    1      3,316 K
conhost.exe                   7980 Console                    1      3,316 K
googledrivesync.exe           8928 Console                    1      3,484 K
Lightshot.exe                 5528 Console                    1      4,096 K
UniKeyNT.exe                  7956 Console                    1      4,188 K
spoolsv.exe                   1108 Services                   0      4,204 K
services.exe                   544 Services                   0      4,696 K
bash.exe                      1620 Console                    1      4,904 K
bash.exe                      7048 Console                    1      4,928 K
SMService.exe                 1868 Services                   0      4,976 K
bash.exe                      3916 Console                    1      5,108 K
StartMenu_Hook.exe            2400 Console                    1      5,216 K
tasklist.exe                 10384 Console                    1      5,696 K
bash.exe                     12280 Console                    1      5,788 K
MoTTY.exe                     4760 Console                    1      5,972 K
WmiPrvSE.exe                 12096 Services                   0      6,004 K
svchost.exe                   1420 Services                   0      6,036 K
MoTTY.exe                     4032 Console                    1      6,508 K
MoTTY.exe                     2864 Console                    1      7,084 K
mintty.exe                    6192 Console                    1      7,164 K
svchost.exe                    640 Services                   0      7,260 K
MoTTY.exe                     6644 Console                    1      7,296 K
GameScannerService.exe        1652 Services                   0      7,584 K
mintty.exe                    4136 Console                    1      7,844 K
remoting_host.exe             1392 Services                   0      7,868 K
dasHost.exe                   1504 Services                   0      8,108 K
TSVNCache.exe                 4816 Console                    1      8,308 K
taskhostex.exe                2376 Console                    1      8,340 K
MoTTY.exe                     6768 Console                    1      8,584 K
mintty.exe                    8100 Console                    1      8,788 K
audiodg.exe                   5860 Services                   0      8,888 K
svchost.exe                  10000 Services                   0      8,900 K
svchost.exe                   3200 Services                   0      9,020 K
vim.exe                      11940 Console                    1      9,428 K
NisSrv.exe                    3316 Services                   0     10,056 K
lsass.exe                      564 Services                   0     10,164 K
TGitCache.exe                 6988 Console                    1     10,268 K
InstallServices.exe           2896 Console                    1     10,472 K
StikyNot.exe                  5396 Console                    1     11,384 K
chrome.exe                    5908 Console                    1     12,456 K
svchost.exe                    684 Services                   0     12,720 K
Clover.exe                     400 Console                    1     12,828 K
TeamViewer_Service.exe        1956 Services                   0     13,876 K
plugin_host.exe               5116 Console                    1     15,284 K
svchost.exe                    848 Services                   0     17,608 K
chrome.exe                    5916 Console                    1     17,984 K
XWin_MobaX.exe                4436 Console                    1     17,984 K
XWin_MobaX.exe                5504 Console                    1     18,040 K
svchost.exe                    800 Services                   0     19,528 K
svchost.exe                    320 Services                   0     20,700 K
VBoxSVC.exe                   3236 Console                    1     22,288 K
svchost.exe                   1132 Services                   0     24,740 K
Taskmgr.exe                   8316 Console                    1     28,516 K
VirtualBox.exe                4184 Console                    1     29,532 K
chrome.exe                   11844 Console                    1     30,960 K
chrome.exe                    3620 Console                    1     34,372 K
chrome.exe                    5644 Console                    1     34,732 K
svchost.exe                    824 Services                   0     36,216 K
TeamViewer.exe                3692 Console                    1     40,052 K
chrome.exe                    5892 Console                    1     45,436 K
chrome.exe                    5900 Console                    1     49,312 K
SkypeBrowserHost.exe         12008 Console                    1     50,488 K
dwm.exe                        788 Console                    1     53,044 K
chrome.exe                    6708 Console                    1     60,676 K
SearchIndexer.exe             3360 Services                   0     61,860 K
MobaXterm_Personal_9.4.ex     5328 Console                    1     64,548 K
SkypeBrowserHost.exe          2244 Console                    1     65,772 K
chrome.exe                   10644 Console                    1     71,296 K
ClassicStart.exe              2548 Console                    1     76,744 K
chrome.exe                    3120 Console                    1     77,304 K
javaw.exe                     3128 Console                    1     77,340 K
VirtualBox.exe                3428 Console                    1     79,200 K
chrome.exe                    9716 Console                    1     86,296 K
chrome.exe                    7964 Console                    1     87,020 K
chrome.exe                    8824 Console                    1     89,324 K
VirtualBox.exe                5712 Console                    1     93,420 K
chrome.exe                    9188 Console                    1     95,264 K
chrome.exe                    9908 Console                    1     96,676 K
Skype.exe                     6500 Console                    1     98,040 K
googledrivesync.exe           9668 Console                    1    100,412 K
svchost.exe                    920 Services                   0    105,864 K
chrome.exe                    1704 Console                    1    123,396 K
chrome.exe                    4764 Console                    1    124,184 K
explorer.exe                  2520 Console                    1    133,924 K
csrss.exe                      460 Console                    1    137,352 K
sublime_text.exe              3152 Console                    1    150,400 K
chrome.exe                    5792 Console                    1    177,832 K
chrome.exe                    3044 Console                    1    186,856 K
MsMpEng.exe                   2012 Services                   0    188,792 K
chrome.exe                    5568 Console                    1    219,904 K
chrome.exe                    4732 Console                    1    241,284 K
chrome.exe                    5356 Console                    1    321,288 K

Summarize: (> 100MB) 
- Chome about 2.5GB (without GDrive + 250MB).
- MsMp (Windows Defender)
- Teamviewer (idle) If remoting it may take huge memory.
- VirtualBox (not show here) 2 running machine: 1 Ubuntu server 1GB mem, 1 desktop 2GB mem.
- Skype
- Sublime:
-

TaskMgr show total : 75% ~ 7.5GB

Without sort (default sort by name)
$ cat tl_simple.out

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
System Idle Process              0 Services                   0          4 K
System                           4 Services                   0        700 K
smss.exe                       308 Services                   0        336 K
csrss.exe                      396 Services                   0      1,888 K
csrss.exe                      460 Console                    1    137,352 K
wininit.exe                    468 Services                   0        592 K
winlogon.exe                   512 Console                    1      1,020 K
services.exe                   544 Services                   0      4,696 K
lsass.exe                      564 Services                   0     10,164 K
svchost.exe                    640 Services                   0      7,260 K
svchost.exe                    684 Services                   0     12,720 K
dwm.exe                        788 Console                    1     53,044 K
svchost.exe                    800 Services                   0     19,528 K
svchost.exe                    824 Services                   0     36,216 K
svchost.exe                    848 Services                   0     17,608 K
svchost.exe                    920 Services                   0    105,864 K
svchost.exe                    320 Services                   0     20,700 K
spoolsv.exe                   1108 Services                   0      4,204 K
svchost.exe                   1132 Services                   0     24,740 K
AppleMobileDeviceService.     1252 Services                   0      2,788 K
mDNSResponder.exe             1292 Services                   0      1,616 K
remoting_host.exe             1340 Services                   0      1,592 K
DbxSvc.exe                    1360 Services                   0        780 K
remoting_host.exe             1392 Services                   0      7,868 K
svchost.exe                   1420 Services                   0      6,036 K
dasHost.exe                   1504 Services                   0      8,108 K
RzSDKService.exe              1604 Services                   0      2,264 K
GameScannerService.exe        1652 Services                   0      7,584 K
SMService.exe                 1868 Services                   0      4,976 K
TeamViewer_Service.exe        1956 Services                   0     13,876 K
ViakaraokeSrv.exe             1992 Services                   0        684 K
MsMpEng.exe                   2012 Services                   0    188,792 K
taskhostex.exe                2376 Console                    1      8,340 K
explorer.exe                  2520 Console                    1    133,924 K
ClassicStart.exe              2548 Console                    1     76,744 K
StartMenu_Hook.exe            2400 Console                    1      5,216 K
InstallServices.exe           2896 Console                    1     10,472 K
Clover.exe                     400 Console                    1     12,828 K
sublime_text.exe              3152 Console                    1    150,400 K
svchost.exe                   3200 Services                   0      9,020 K
alg.exe                       3268 Services                   0        852 K
NisSrv.exe                    3316 Services                   0     10,056 K
SearchIndexer.exe             3360 Services                   0     61,860 K
svchost.exe                   2576 Services                   0      1,628 K
plugin_host.exe               5116 Console                    1     15,284 K
TeamViewer.exe                3692 Console                    1     40,052 K
TSVNCache.exe                 4816 Console                    1      8,308 K
tv_w32.exe                    1348 Console                    1      1,376 K
tv_x64.exe                    1400 Console                    1      1,076 K
chrome.exe                    5356 Console                    1    321,288 K
chrome.exe                    5368 Console                    1      1,780 K
StikyNot.exe                  5396 Console                    1     11,384 K
Lightshot.exe                 5528 Console                    1      4,096 K
chrome.exe                    5636 Console                    1      2,924 K
chrome.exe                    5792 Console                    1    177,832 K
chrome.exe                    5892 Console                    1     45,436 K
chrome.exe                    5900 Console                    1     49,312 K
chrome.exe                    5908 Console                    1     12,456 K
chrome.exe                    5916 Console                    1     17,984 K
chrome.exe                    3044 Console                    1    186,856 K
chrome.exe                    5644 Console                    1     34,732 K
chrome.exe                    3620 Console                    1     34,372 K
VirtualBox.exe                4184 Console                    1     29,532 K
VBoxSVC.exe                   3236 Console                    1     22,288 K
VirtualBox.exe                3664 Console                    1        940 K
VirtualBox.exe                5060 Console                    1      1,116 K
VirtualBox.exe                3428 Console                    1     79,200 K
mintty.exe                    4136 Console                    1      7,844 K
conhost.exe                   3588 Console                    1      3,316 K
bash.exe                      1620 Console                    1      4,904 K
audiodg.exe                   5860 Services                   0      8,888 K
VirtualBox.exe                2180 Console                    1        940 K
VirtualBox.exe                1528 Console                    1      1,116 K
VirtualBox.exe                5712 Console                    1     93,420 K
MobaXterm_Personal_9.4.ex     5328 Console                    1     64,548 K
MoTTY.exe                     2864 Console                    1      7,084 K
cygtermd.exe                  3052 Console                    1      2,048 K
conhost.exe                   4644 Console                    1        612 K
XWin_MobaX.exe                4436 Console                    1     17,984 K
bash.exe                      1808 Console                    1      2,068 K
ssh-pageant.exe               2436 Console                    1      1,396 K
bash.exe                      1512 Console                    1      1,856 K
_ssh.exe                      3476 Console                    1      2,608 K
XWin_MobaX.exe                5504 Console                    1     18,040 K
TGitCache.exe                 6988 Console                    1     10,268 K
MoTTY.exe                     6644 Console                    1      7,296 K
cygtermd.exe                  6664 Console                    1      2,232 K
conhost.exe                   6652 Console                    1        612 K
bash.exe                      2492 Console                    1      2,064 K
MoTTY.exe                     6768 Console                    1      8,584 K
cygtermd.exe                  6860 Console                    1      2,040 K
conhost.exe                   2268 Console                    1        612 K
bash.exe                      5652 Console                    1      2,056 K
MoTTY.exe                     4760 Console                    1      5,972 K
cygtermd.exe                  2716 Console                    1      2,040 K
conhost.exe                   6380 Console                    1        612 K
bash.exe                      2988 Console                    1      2,492 K
mintty.exe                    6192 Console                    1      7,164 K
conhost.exe                   6584 Console                    1      3,316 K
bash.exe                      7048 Console                    1      4,928 K
bash.exe                      2448 Console                    1      1,936 K
_ssh.exe                      6624 Console                    1      2,708 K
bash.exe                       936 Console                    1      1,856 K
_ssh.exe                      2700 Console                    1      2,632 K
chrome.exe                    5568 Console                    1    219,904 K
chrome.exe                    4764 Console                    1    124,184 K
javaw.exe                     3128 Console                    1     77,340 K
UniKeyNT.exe                  7956 Console                    1      4,188 K
Skype.exe                     6500 Console                    1     98,040 K
chrome.exe                    7964 Console                    1     87,020 K
mintty.exe                    8100 Console                    1      8,788 K
conhost.exe                   7980 Console                    1      3,316 K
bash.exe                      3916 Console                    1      5,108 K
MoTTY.exe                     4032 Console                    1      6,508 K
cygtermd.exe                  7552 Console                    1      2,040 K
conhost.exe                    160 Console                    1        612 K
bash.exe                      7404 Console                    1      2,060 K
bash.exe                      8160 Console                    1      1,856 K
_ssh.exe                      7872 Console                    1      2,628 K
chrome.exe                    4732 Console                    1    241,284 K
chrome.exe                    6708 Console                    1     60,676 K
chrome.exe                    8824 Console                    1     89,324 K
chrome.exe                    3120 Console                    1     77,304 K
svchost.exe                  10000 Services                   0      8,900 K
chrome.exe                    1704 Console                    1    123,396 K
chrome.exe                    9188 Console                    1     95,264 K
chrome.exe                    9908 Console                    1     96,676 K
chrome.exe                    9716 Console                    1     86,296 K
googledrivesync.exe           8928 Console                    1      3,484 K
googledrivesync.exe           9668 Console                    1    100,412 K
SkypeBrowserHost.exe          2244 Console                    1     65,772 K
SkypeBrowserHost.exe         12008 Console                    1     50,488 K
chrome.exe                   11844 Console                    1     30,960 K
chrome.exe                   10644 Console                    1     71,296 K
vim.exe                      11940 Console                    1      9,428 K
Taskmgr.exe                   8316 Console                    1     28,516 K
bash.exe                     12280 Console                    1      5,788 K
tasklist.exe                 10384 Console                    1      5,696 K
WmiPrvSE.exe                 12096 Services                   0      6,004 K

You can use ProcessExplorer to have better view list task than default TaskManager.
Expert can use another program like PC Hunter (I think it wrote by a Chinese man) for more detail.
Both are windows program so you do not have to type command.

Comments

Popular posts from this blog

Rand mm 10

https://stackoverflow.com/questions/2447791/define-vs-const Oh const vs define, many time I got unexpected interview question. As this one, I do not know much or try to study this. My work flow, and I believe of many programmer is that search topic only when we have task or job to tackle. We ignore many 'basic', 'fundamental' documents, RTFM is boring. So I think it is a trade off between the two way of study language. And I think there are a bridge or balanced way to extract both advantage of two method. There are some huge issue with programmer like me that prevent we master some technique that take only little time if doing properly. For example, some Red Hat certificate program, lesson, course that I have learned during Collage gave our exceptional useful when it cover almost all topic while working with Linux. I remember it called something like RHEL (RedHat Enterprise Linux) Certificate... I think there are many tons of documents, guide n books about Linux bu

Martin Fowler - Software Architecture - Making Architecture matter

  https://martinfowler.com/architecture/ One can appreciate the point of this presentation when one's sense of code smell is trained, functional and utilized. Those controlling the budget as well as developer leads should understand the design stamina hypothesis, so that the appropriate focus and priority is given to internal quality - otherwise pay a high price soon. Andrew Farrell 8 months ago I love that he was able to give an important lesson on the “How?” of software architecture at the very end: delegate decisions to those with the time to focus on them. Very nice and straight-forward talk about the value of software architecture For me, architecture is the distribution of complexity in a system. And also, how subsystems communicate with each other. A battle between craftmanship and the economics and economics always win... https://hackernoon.com/applying-clean-architecture-on-web-application-with-modular-pattern-7b11f1b89011 1. Independent of Frameworks 2. Testable 3. Indepe