웹 앱에 최고 기능을 구현하고 싶습니다 top
. 비 대화 형 셸에서 명령 출력을 얻을 수 있습니까?
답변
top -b -n 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.