※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。

top

*/10 * * * * /usr/bin/top -b -n 1 > /hogehoge/top/`date '+\%d\%H\%M'`.txt

「-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.」

「-d : Delay time interval as: -d ss.tt (seconds.tenths)
Specifies the delay between screen updates, and overrides the corresponding value in one's personal configuration file or the startup default. Later this can be changed with the 'd' or 's' interactive commands. Fractional seconds are honored, but a negative number is not allowed. In all cases, however, such changes are prohibited if top is running in 'Secure mode', except for root (unless the 's' command-line option was used). For additional information on 'Secure mode' see topic 5a. SYSTEM Configuration File.」

「 -n : Number of iterations limit as: -n number
Specifies the maximum number of iterations, or frames, top should produce before ending. 」
「-n 1」は一回実行

|