Коли я бігаю top
в Cygwin, я отримую:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
Я хочу витягнути ці стовпці для всіх процесів:
PID PPID S COMMAND
ps
дає PID, PPID та COMMAND, але як мені отримати стовпчик 'S' для всіх процесів?
Редагувати:
Я не можу використовувати те, що я використовую в GNU / Linux:
$ ps -e -o pid,ppid,state,comm
ps: unknown option -- o
Try `ps --help' for more information.
$ ps --version
ps (cygwin) 1.7.33
Show process statistics
Copyright (C) 1996 - 2014 Red Hat, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ ps --help
Usage: ps [-aefls] [-u UID] [-p PID]
Report process status
-a, --all show processes of all users
-e, --everyone show processes of all users
-f, --full show process uids, ppids
-h, --help output usage information and exit
-l, --long show process uids, ppids, pgids, winpids
-p, --process show information for specified PID
-s, --summary show process summary
-u, --user list processes owned by UID
-V, --version output version information and exit
-W, --windows show windows as well as cygwin processes
With no options, ps outputs the long format by default
procps
:
version: 3.2.8-3
top
прискорити?