質問: unixのps -auxのようなwindowsのコマンドはありますか? 学校では、sshでunixを使用する方法を学んでいます。 windowsでunixのような出力を取得する方法はありますかps -auxコマンド、guiなし?プログラム名、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引数(詳細)を使用してより詳細な情報を取得することもできますが、単にtasklistを使用すると、プログラムとそのpidが一覧表示されます。