Что делает эта команда: top -bHn 1 -u mail?
top -bHn 1 -u mail
Я прочитал справочные страницы, и там, кажется, есть кое-что, что не включено в них. Указание мне на дополнительную документацию также было бы полезно. В частности, я не уверен, что делает 1 или почта. Спасибо!
1 ответ
Решение
От man top
-b : Batch mode operation
Starts top in 'Batch mode', which could be useful for sending
output from top to other programs or to a file. In this
mode, top will not accept input and runs until the iterations
limit you've set with the '-n' command-line option or until
killed.
-H : Threads toggle
Starts top with the last remembered 'H' state reversed. When
this toggle is On, all individual threads will be displayed.
Otherwise, top displays a summation of all threads in a
process.
-n : Number of iterations limit as: -n number
Specifies the maximum number of iterations, or frames, top
should produce before ending.
-u : Monitor by user as: -u somebody
Monitor only processes with an effective UID or user name
matching that given.
Так что значит работать в пакетном режиме (-b
), переключение отображения темы (-H
), за одну итерацию (-n 1
), показывая только процессы, принадлежащие пользователю mail
(-u mail
): в основном одноразовый снимок текущих потоков, принадлежащих mail
более или менее эквивалентно ps -Lfu mail