'log'에 해당되는 글 1건

  1. 2016.03.28 logrotate 1

logrotate

삽질공유 2016. 3. 28. 14:33

로그를 관리할 때는 일단 데몬을 믿기보다는 시스템을 믿어라. 그런 차원에서 믿을 수 있는 logrotate. 


로그를 관리 할 때 방법

1. 날짜를 시간계산한다. (epoch)

2. find -mtime 해서 파일의 생성일자를 확인 후 삭제한다. 

3. logrotate를 사용한다.

- 나는 로그로테이트가 잘려져 있는 로그에 대해서는 사용하기 어렵다고 생각했는데 그것도 아니라고 함. 

즉 로그를 관리할 때는 로그 로테이트를 사용할 것을 추천받음. 바이 펄. 


 관련 링크 

http://www.thegeekstuff.com/2010/07/logrotate-examples/

http://blueskai.tistory.com/101

http://pchero21.com/?p=1367

http://www.jamescoyle.net/cheat-sheets/676-logrotate-cheat-sheet

http://linux.die.net/man/8/logrotate

'삽질공유' 카테고리의 다른 글

python에서 shell 커맨드 실행할 때  (0) 2016.04.22
http request 전송할 때 content-type 설정하기  (0) 2016.04.11
logrotate에서 dateyesterday  (0) 2016.03.28
springboot actuator  (0) 2016.03.25
logrotate.d  (0) 2016.03.25
Posted by 썬,더 호글
,