Webアプリケーションに最高の機能を実装したいです。top
非対話型シェルからコマンドの出力を取得できますか?
答え1
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.