David's Technical Note

[OHS Administration]How to Rotate OHS(Oracle Httpd Server) Log 본문

Product Engineering/1. WebServer

[OHS Administration]How to Rotate OHS(Oracle Httpd Server) Log

David Joo 2012. 5. 5. 20:28

OHS(Oracle Httpd Server) LOG Rotate setting

 

 

httpd.conf 파일에 "rotatelogs" 파라미터를 제공하며 설정은 아래와 같습니다.

Eng. To rotate OHS logs(server.log, accesslog, etc. ), use rotatelogs parameter. The method of setting is like below.


1. 적용 가능 대상: apache Web Server, OHS

1. Target to apply: available to apache Web Server, OHS

 

2. 적용방법:

2. How to apply

  

2.1 httpd.conf 파일을 연다.

2.1 open a httpd.conf

 

2.2 파일 이름을 sequence 방식으로 24시간 마다 rotate 하는 경우 (86400은 24시간을 의미)

2.2 When to rotate log  each 24hours and set filename to sequence types (86400 = 24hours)

 

CustomLog "|{OHS_HOME}/bin/rotatelogs {LOG_DIR}/logfile 86400" common

 

 

2.3 파일 이름을 'logfile.년월일-시분초' 방식으로 rotate 하는 경우

2.3 When to rotate log each 24hours and set the filename to logfile.year-month-day-hour-minutes-second type

 

CustomLog "|{OHS_HOME}/bin/rotatelogs {LOG_DIR}/logfile.%y%m%d-%H%M%S 86400" common

 

 

2.4 logfile의 크기가 10M가 되면 rotate 하는 경우

2.4 When rotate log each 10Megabytes size

 

CustomLog "|{OHS_HOME}/bin/rotatelogs {LOG_DIR}/logfile 10M" common