Как использовать вершину только с показом имени CMD

[1189134] нужно добавить -i вариант:

-i[SUFFIX], --in-slace[=SUFFIX]

1
30.07.2014, 18:34
2 ответа

Если ваш top поддерживает фильтрацию, запустите top, затем введите следующую интерактивную команду:

oCOMMAND=afile

Имя поля, COMMAND, должно быть заглавным.

Со страницы man:

5e. FILTERING in a Window
   You can use the 'Other Filter' feature to establish selection cri‐
   teria which will then determine which tasks are shown in the ´cur‐
   rent´ window.

   Establishing a filter requires: 1) a field name; 2)  an  operator;
   and  3) a selection value, as a minimum.

   Filter Basics
      .  field names are case sensitive and spelled as in the header
      .  selection values need not comprise the full displayed field
      .  separate unique filters are maintained for each task window

Keyboard Summary
     o  :Other-Filter (lower case)
         You will be prompted to establish a filter that ignores case
         when matching.

     O  :Other-Filter (upper case)
         You will be prompted to establish a case sensitive filter.
2
27.01.2020, 23:21

Я считаю, что вы могли бы сделать что-то вроде ниже, как предлагается здесь .

top -p `pgrep -d ',' "apache2"`

Я считаю, что разделитель запятой в этом случае не нужен, поскольку у нас есть только один процесс.

top -p `pgrep "apache2"`
2
27.01.2020, 23:21

Теги

Похожие вопросы