top이 ncurse로 만들어져서
원하는 내용만 파일로 로그 남기기가 쉽지 않다
아래처럼 하면 1초에 1번 top을 실행해서 top.log에 쭈욱 쌓아둘수 있다.
$ top -b -d 1 > top.log |
batch의 b
-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. |
'Linux' 카테고리의 다른 글
minicom에서 stty로 터미널 폭 조절하기 (0) | 2023.10.24 |
---|---|
multitail / tail (2) | 2023.10.18 |
tcpdump (0) | 2023.09.04 |
dhcpd IP 할당 규칙 (0) | 2023.09.01 |
시스템 audit 로그 (0) | 2023.08.30 |