欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Windows命令之tasklist命令用法詳解(Windows查看進程)

 更新時間:2025年03月14日 11:19:03   投稿:mdxy-dxy  
tasklist命令顯示本地計算機或遠程計算機上當前正在運行的進程列表,命令結合篩選器一起使用,可以按照我們的需求進行過濾,查找我們需要了解的進程信息

tasklist命令顯示本地計算機或遠程計算機上當前正在運行的進程列表。命令結合篩選器一起使用,可以按照我們的需求進行過濾,查找我們需要了解的進程信息。

tasklist 替換 tlist.exe 工具。

命令幫助

tasklist 可以查看當前運行的進程。

E:\>  tasklist /?

TASKLIST [/S system [/U username [/P [password]]]]
         [/M [module] | /SVC | /V] [/FI filter] [/FO format] [/NH]

描述:
    該工具顯示在本地或遠程機器上當前運行的進程列表。


參數列表:
   /S     system           指定連接到的遠程系統(tǒng)。

   /U     [domain\]user    指定應該在哪個用戶上下文執(zhí)行這個命令。

   /P     [password]       為提供的用戶上下文指定密碼。如果省略,則
                           提示輸入。

   /M     [module]         列出當前使用所給 exe/dll 名稱的所有任務。
                           如果沒有指定模塊名稱,顯示所有加載的模塊。

   /SVC                    顯示每個進程中主持的服務。

   /APPS 顯示 Microsoft Store 應用及其關聯(lián)的進程。

   /V                      顯示詳細任務信息。

   /FI    filter           顯示一系列符合篩選器
                           指定條件的任務。

   /FO    format           指定輸出格式。
                           有效值: "TABLE"、"LIST"、"CSV"。

   /NH                     指定列標題不應該
                           在輸出中顯示。
                           只對 "TABLE" 和 "CSV" 格式有效。

   /?                      顯示此幫助消息。

篩選器:
    篩選器名稱     有效運算符           有效值
    -----------     ---------------           --------------------------
    STATUS          eq, ne                    RUNNING | SUSPENDED
                                              NOT RESPONDING | UNKNOWN
    IMAGENAME       eq, ne                    映像名稱
    PID             eq, ne, gt, lt, ge, le    PID 值
    SESSION         eq, ne, gt, lt, ge, le    會話編號
    SESSIONNAME     eq, ne                    會話名稱
    CPUTIME         eq, ne, gt, lt, ge, le    CPU 時間,格式為
                                              hh:mm:ss。
                                              hh - 小時,
                                              mm - 分鐘,ss - 秒
    MEMUSAGE        eq, ne, gt, lt, ge, le    內存使用(以 KB 為單位)
    USERNAME        eq, ne                    用戶名,格式為
                                              [域\]用戶
    SERVICES        eq, ne                    服務名稱
    WINDOWTITLE     eq, ne                    窗口標題
    模塊         eq, ne                    DLL 名稱

注意: 當查詢遠程計算機時,不支持 "WINDOWTITLE" 和 "STATUS"
      篩選器。

Examples:
    TASKLIST
    TASKLIST /M
    TASKLIST /V /FO CSV
    TASKLIST /SVC /FO LIST
    TASKLIST /APPS /FI "STATUS eq RUNNING"
    TASKLIST /M wbem*
    TASKLIST /S system /FO LIST
    TASKLIST /S system /U 域\用戶名 /FO CSV /NH
    TASKLIST /S system /U username /P password /FO TABLE /NH
    TASKLIST /FI "USERNAME ne NT AUTHORITY\SYSTEM" /FI "STATUS eq running"

1、基本使用

執(zhí)行 tasklist 不加參數默認以TABLE表格格式輸出,從左到右依次是進程名、進程ID、會話、會話ID、內存使用大小。通常我們只看左邊的進程名和進程ID就夠了。

在這里插入圖片描述

tasklist /v 可以顯示所有字段。

在這里插入圖片描述

2、執(zhí)行原理

Windows系統(tǒng)的命令本質上都是「可執(zhí)行程序」,默認存放在 C:\Windows\System32 目錄下, tasklist 命令對應的便是 tasklist.exe 文件

在這里插入圖片描述

當我們執(zhí)行 tasklist 命令時,本質上就是執(zhí)行了 tasklist.exe 這個程序.因此,當我們在命令行輸入 tasklist.exe 時,執(zhí)行的結果也是一樣的。

在這里插入圖片描述

2.1、tasklist命令無法使用

你能在任意目錄都執(zhí)行這個命令,是因為 system32 這個目錄被配置到了「環(huán)境變量」里。

在這里插入圖片描述

當你執(zhí)行了一個沒有完整路徑的程序時,如果「當前路徑」下沒有同名的可執(zhí)行文件,就會到環(huán)境變量里去找。

比如我再當前目錄下新建一個 tasklist.exe 文件,他就執(zhí)行我的這個文件,而不是執(zhí)行系統(tǒng)的tasklist命令。

在這里插入圖片描述

當你的系統(tǒng)提示你沒有這個命令或無法使用時,可以到環(huán)境變量里檢查下 system32 目錄有沒有加到環(huán)境變量里,或者 system32 目錄下還有沒有這個命令的文件。

3、篩選器

/FI 參數可以指定篩選器,篩選器配合運算符實現過濾查詢、模糊匹配。

篩選器可用的運算符
STATUSeq,neRUNNING、SUSPENDED、NOT RESPONDING、UNKNOWN
IMAGENAMEeq,ne進程名稱
PIDeq,ne,gt,lt,ge,le進程ID
SESSIONeq,ne,gt,lt,ge,le會話ID
SESSIONNAMEeq,ne會話名稱
CPUTIMEeq,ne,ge,lt,ge,leCPU時間。格式 hh:mm:ss,即時:分:秒
MEMUSAGEeq,ne,ge,lt,ge,le內存使用大小,單位KB
USERNAMEeq,ne用戶名。格式 [域]用戶
SERVICESeq,ne服務名
WINDOWTITLEeq,ne窗口標題

運算符含義:

eq(equal):等于。ne(not equal):不等于。gt(greater than):大于。lt(less than):小于ge(greater than or equal):大于等于。le(less than or equal):小于等于。

3.1、根據PID查找進程

tasklist /FI "PID eq 996" 查找PID等于996的進程。

在這里插入圖片描述

3.2、根據進程名查找進程

tasklist /FI "imagename eq cmd.exe" 查找進程名時cmd.exe的進程。必須是全名,少個后綴都搜不到。

在這里插入圖片描述

3.3、查看指定用戶運行的進程

tasklist /FI "username eq administrator" /v 查看administrator用戶運行的進程。

在這里插入圖片描述

3.4、查看資源占用高的進程

tasklist /FI "cputime gt 0:00:30" /v 查看CPU使用超過30秒的進程

在這里插入圖片描述

排查資源占用時,通常會用任務管理器??梢园碈PU、內存使用大小排序。

在這里插入圖片描述

4、分頁查看

內容太多看起來不方便,用 tasklist | more 分頁查看。

根據當前窗口大小顯示一頁,回車下一行、空格下一頁、Ctrl+C退出查看。

在這里插入圖片描述

5、查看進程調用的DLL模塊

tasklist /m 查看進程調用的DLL模塊。

在這里插入圖片描述

5.1、查看調用指定DLL模塊的進程

tasklist /m wininet.dll 查看調用wininet.dll 模塊的進程。

在這里插入圖片描述

6、查看進程文件位置

查看cmd.exe進程的文件路徑。

wmic process where name="cmd.exe" get processid,name,executablepath 

在這里插入圖片描述

7、案例代碼

顯示進程號大于1000的進程

E:\>tasklist /fi "PID gt 1000"

映像名稱                       PID 會話名              會話#       內存使用
========================= ======== ================ =========== ============
svchost.exe                   1084 Services                   0     13,380 K
svchost.exe                   1132 Services                   0     11,260 K
dwm.exe                       1220 Console                    1    165,852 K
svchost.exe                   1260 Services                   0     12,876 K
svchost.exe                   1296 Services                   0      5,748 K
svchost.exe                   1312 Services                   0     12,132 K
svchost.exe                   1432 Services                   0     12,684 K
svchost.exe                   1440 Services                   0     10,568 K
svchost.exe                   1528 Services                   0     17,452 K
IntelCpHDCPSvc.exe            1608 Services                   0      7,928 K
svchost.exe                   1636 Services                   0      6,488 K
svchost.exe                   1720 Services                   0      9,384 K
svchost.exe                   1828 Services                   0      8,588 K
svchost.exe                   1852 Services                   0      8,228 K
IntelCpHeciSvc.exe            1872 Services                   0      7,668 K
svchost.exe                   1948 Services                   0     10,496 K
svchost.exe                   1984 Services                   0      7,068 K
svchost.exe                   2080 Services                   0      7,616 K
ibmpmsvc.exe                  2108 Services                   0      6,856 K
LPlatSvc.exe                  2128 Services                   0      8,004 K
LITSSvc.exe                   2140 Services                   0      8,012 K
svchost.exe                   2200 Services                   0     16,444 K
svchost.exe                   2260 Services                   0      6,892 K
QQPCRTP.exe                   2456 Services                   0     70,004 K
qmbsrv.exe                    2476 Services                   0      6,140 K
svchost.exe                   2504 Services                   0     12,944 K
svchost.exe                   2568 Services                   0      7,116 K

列出mysql用戶正在運行的進程

使用tasklist /fi "USERNAME ne mysql" /fi "status eq running"命令查看mysql用戶正在運行的進程。

E:\>tasklist /fi "USERNAME ne mysql" /fi "status eq running"

映像名稱                       PID 會話名              會話#       內存使用
========================= ======== ================ =========== ============
csrss.exe                      788 Console                    1      7,588 K
dwm.exe                       1220 Console                    1    164,540 K
LPlatSvc.exe                  8764 Console                    1      7,536 K
sihost.exe                    8832 Console                    1     32,280 K
svchost.exe                   8856 Console                    1     32,084 K
taskhostw.exe                 8984 Console                    1     17,592 K
ctfmon.exe                    7172 Console                    1     22,668 K
igfxEM.exe                    8376 Console                    1     14,596 K
explorer.exe                  8336 Console                    1    194,456 K
ChsIME.exe                    7844 Console                    1     24,808 K
TextInputHost.exe             4956 Console                    1     67,200 K
StartMenuExperienceHost.e     1228 Console                    1     55,820 K
SearchApp.exe                 9248 Console                    1     68,396 K
PowerMgr.exe                  9840 Console                    1      6,512 K
ShellExperienceHost.exe       9884 Console                    1     77,392 K
RuntimeBroker.exe             9976 Console                    1     33,968 K
igfxext.exe                   9548 Console                    1     11,020 K
SogouWBImeLoader.exe          4684 Console                    1     16,152 K
YunDetectService.exe          5484 Console                    1     15,024 K
svchost.exe                   1344 Console                    1     17,700 K
360ChromeX.exe                1780 Console                    1    276,432 K
360ChromeX.exe               11544 Console                    1    317,772 K
wpscloudsvr.exe               1960 Console                    1     19,300 K
SDXHelper.exe                 7832 Console                    1     29,284 K
QQ.exe                        5044 Console                    1    348,496 K
TXPlatform.exe                4816 Console                    1      3,368 K
QQGuild.exe                  12196 Console                    1    161,612 K
QQGuild.exe                   8660 Console                    1     61,296 K
POWERPNT.EXE                  4064 Console                    1    802,484 K
chromium.exe                  9388 Console                    1    110,232 K
chromium.exe                  6952 Console                    1      7,588 K
chromium.exe                 10340 Console                    1     65,908 K
cmd.exe                      12880 Console                    1      6,064 K
conhost.exe                  12720 Console                    1     40,108 K
語雀.exe                     10424 Console                    1    171,292 K
語雀.exe                      3660 Console                    1     30,492 K
語雀.exe                     12280 Console                    1    121,444 K
語雀.exe                      7484 Console                    1     48,652 K
smartscreen.exe               7328 Console                    1     23,624 K

列表遠程計算機運行的進程

使用命令tasklist /s 192.168.1.6 /u root /p password列出遠程主機192.168.0.9的進程,使用賬戶root,密碼password登錄。

列出使用shell32.dll文件的所有進程

E:\>tasklist /m shell32.dll

映像名稱                       PID 模塊
========================= ======== ============================================
dwm.exe                       1220 SHELL32.dll
ibmpmsvc.exe                  2108 SHELL32.dll
LPlatSvc.exe                  2128 SHELL32.dll
LITSSvc.exe                   2140 SHELL32.dll
svchost.exe                   2200 SHELL32.dll
svchost.exe                   2960 shell32.dll
svchost.exe                   3560 SHELL32.dll
svchost.exe                   3668 SHELL32.dll
spoolsv.exe                   4172 SHELL32.dll
AdskAccessServiceHost.exe     4496 SHELL32.dll
OfficeClickToRun.exe          4532 SHELL32.dll
OneApp.IGCC.WinService.ex     4892 shell32.dll
MSOfficePLUSService.exe       5092 shell32.dll
PAUpdateService.exe           4700 shell32.dll
vmware-usbarbitrator64.ex     6160 SHELL32.dll
svchost.exe                   8644 SHELL32.dll

列出svchost進程所運行的服務

使用命令tasklist /svc /fi "imagename eq svchost.exe"列出svchost進程所運行的服務。

E:\>tasklist /svc /fi "imagename eq svchost.exe

映像名稱                       PID 服務
========================= ======== ============================================
svchost.exe                    616 BrokerInfrastructure, DcomLaunch, PlugPlay,
                                   Power, SystemEventsBroker
svchost.exe                   1084 RpcEptMapper, RpcSs
svchost.exe                   1132 LSM
svchost.exe                   1260 TermService
svchost.exe                   1296 lmhosts
svchost.exe                   1312 bthserv
svchost.exe                   1432 TimeBrokerSvc
svchost.exe                   1440 NcbService
svchost.exe                   1528 EventLog

查看進程詳細信息

E:\>tasklist /V |more

映像名稱                       PID 會話名              會話#       內存使用  狀態(tài)            用戶名                                                 CPU 時間 窗口標題
========================= ======== ================ =========== ============ =============== ================================================== ============ ========================================================================
System Idle Process              0 Services                   0          8 K Unknown         NT AUTHORITY\SYSTEM                                    35:35:12 暫缺
System                           4 Services                   0        144 K Unknown         暫缺                                                    0:11:53 暫缺
Registry                       116 Services                   0     71,776 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:02 暫缺
smss.exe                       428 Services                   0      1,284 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暫缺
csrss.exe                      688 Services                   0      6,940 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:01 暫缺
wininit.exe                    768 Services                   0      7,192 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暫缺
csrss.exe                      788 Console                    1      7,620 K Running         NT AUTHORITY\SYSTEM                                     0:00:20 暫缺
services.exe                   836 Services                   0     10,708 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:19 暫缺
winlogon.exe                   868 Console                    1     11,804 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:01 暫缺
lsass.exe                      908 Services                   0     22,328 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:06 暫缺
svchost.exe                    616 Services                   0     29,508 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:23 暫缺
fontdrvhost.exe                644 Console                    1     60,380 K Unknown         Font Driver Host\UMFD-1                                 0:00:11 暫缺
fontdrvhost.exe                680 Services                   0     15,496 K Unknown         Font Driver Host\UMFD-0                                 0:00:00 暫缺
WUDFHost.exe                   668 Services                   0      5,692 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:00 暫缺
svchost.exe                   1084 Services                   0     13,684 K Unknown         NT AUTHORITY\NETWORK SERVICE                            0:00:11 暫缺
svchost.exe                   1132 Services                   0     11,380 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:02 暫缺
dwm.exe                       1220 Console                    1    149,108 K Running         Window Manager\DWM-1                                    0:24:28 DWM Notification Window
svchost.exe                   1260 Services                   0     12,880 K Unknown         NT AUTHORITY\NETWORK SERVICE                            0:00:00 暫缺
svchost.exe                   1296 Services                   0      5,732 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:00 暫缺
svchost.exe                   1312 Services                   0     12,136 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:00 暫缺
svchost.exe                   1432 Services                   0     12,664 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:00 暫缺
svchost.exe                   1440 Services                   0     10,552 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 暫缺

到此這篇關于Windows命令之tasklist命令用法詳解(Windows查看進程)的文章就介紹到這了,更多相關tasklist命令內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!

相關文章

最新評論