Windows에서 UNIX의 ps -aux와 같은 명령이 있습니까? ps -aux에서 GUI없이

학교에서는 SSH와 함께 UNIX를 사용하는 방법을 배우고 있습니다. Windows ps -aux에서 GUI없이 UNIX 명령 과 같은 출력을 얻는 방법이 있습니까? 커맨드 라인 인터페이스에서 프로그램 이름, PID 및 기타 세부 정보를보고 싶습니다.



답변

나는 당신이 tasklist명령을 찾고 있다고 생각합니다 .

C:\Documents and Settings\Administrator>tasklist /?

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

Description:
    This command line tool displays a list of application(s) and
    associated task(s)/process(es) currently running on either a local or
    remote system.

Parameter List:
   /S     system           Specifies the remote system to connect to.

   /U     [domain\]user    Specifies the user context under which
                           the command should execute.

   /P     [password]       Specifies the password for the given
                           user context. Prompts for input if omitted.

   /M     [module]         Lists all tasks that have DLL modules loaded
                           in them that match the given pattern name.
                           If the module name is not specified,
                           displays all modules loaded by each task.

   /SVC                    Displays services in each process.

   /V                      Specifies that the verbose information
                           is to be displayed.

   /FI    filter           Displays a set of tasks that match a
                           given criteria specified by the filter.

   /FO    format           Specifies the output format.
                           Valid values: "TABLE", "LIST", "CSV".

   /NH                     Specifies that the "Column Header" should
                           not be displayed in the output.
                           Valid only for "TABLE" and "CSV" formats.

   /?                      Displays this help/usage.

Filters:
    Filter Name     Valid Operators           Valid Value(s)
    -----------     ---------------           --------------
    STATUS          eq, ne                    RUNNING | NOT RESPONDING
    IMAGENAME       eq, ne                    Image name
    PID             eq, ne, gt, lt, ge, le    PID value
    SESSION         eq, ne, gt, lt, ge, le    Session number
    SESSIONNAME     eq, ne                    Session name
    CPUTIME         eq, ne, gt, lt, ge, le    CPU time in the format
                                              of hh:mm:ss.
                                              hh - hours,
                                              mm - minutes, ss - seconds
    MEMUSAGE        eq, ne, gt, lt, ge, le    Memory usage in KB
    USERNAME        eq, ne                    User name in [domain\]user
                                              format
    SERVICES        eq, ne                    Service name
    WINDOWTITLE     eq, ne                    Window title
    MODULES         eq, ne                    DLL name

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

출력 예 :

C:\Documents and Settings\Administrator>tasklist

Image Name                   PID Session Name     Session#    Mem Usage
========================= ====== ================ ======== ============
System Idle Process            0 Console                 0         16 K
System                         4 Console                 0         40 K
smss.exe                     564 Console                 0         52 K
csrss.exe                    628 Console                 0      2,168 K
winlogon.exe                 652 Console                 0      1,052 K
services.exe                 696 Console                 0      1,452 K
lsass.exe                    708 Console                 0      1,272 K
svchost.exe                  860 Console                 0      1,620 K
svchost.exe                  940 Console                 0      1,324 K
svchost.exe                 1032 Console                 0      8,204 K
svchost.exe                 1080 Console                 0      1,200 K
svchost.exe                 1132 Console                 0        544 K
spoolsv.exe                 1436 Console                 0        940 K
explorer.exe                1676 Console                 0      6,500 K
svchost.exe                 1920 Console                 0      1,372 K
cmd.exe                     1520 Console                 0         92 K
firefox.exe                  796 Console                 0     77,080 K
cmd.exe                      436 Console                 0      2,280 K
tasklist.exe                 196 Console                 0      3,984 K

/ V 인수 (verbose)를 사용하여보다 자세한 정보를 얻을 수 있지만 간단히 사용 tasklist하면 프로그램과 PID가 나열됩니다.


답변

tasklist필요한 것 같지만 Windows에는 다른 방법도 있습니다.

  • WMI 콘솔 wmic을 시작한 다음을 입력하십시오 process. 이것은 아마도 당신이 필요 이상으로 당신을 얻을 것입니다 🙂
  • Powershell에서 Get-Processcmdlet 또는 해당 별칭은 ps또는 Wil이gps 언급 한대로 입니다.
  • WMI를 통한 Powershell에서 : Get-WMIObject Win32_Process. 그러나 유용하게 표시하려면 필드를 좁혀 야합니다.
  • 특히 Sysinternals PSTools를 통해 pslist. 그것들 모두도 찾을 수 있습니다 \\live.sysinternals.com.

답변

또한 Microsoft Powershell을 사용하는 경우 PS 명령은 수많은 다른 * nix 명령과 함께 작동합니다!


답변