본문 바로가기
Linux/Log 관리

Linux Log 파일 경로 및 설명

by 프리윙즈 2021. 10. 18.
728x90
반응형

Linux Log 파일 경로 및 설명입니다.

 

$Priority(우선순위)  -   log 경고 우선순위로 오른쪽으로 갈수록 약한 경고입니다.

emerg -> alert -> crit -> error -> warn -> notice -> info -> debug

 

$  /var/log/maillog

    - 메일에 관련된 모든 메시지는 /var/log/maillong 파일에 저장

 

  $ /var/log/wtmp

    - 로그인 로그아웃 및 시스템 부팅 정보

    - 바이너리 파일 -> cat 명령어로 확인 X

    - 명령어 : last

 

  $ /var/log/btmp

    - 로그인 실패에 대한 로그 정보

    - 바이너리 파일

    - 명령어 : lastb

 

  $ /var/run/utmp

    - 현재 로그인 중인 사용자 정보

    - 바이너리 파일

    - 명령어 : w(*), who, who am i, ....

 

  $ /var/log/lastlog

    - 마지막 로그인 정보

    - 바이너리 파일

    - 명령어 : lastlog

----------------------------------------------------------

  $ /var/log/secure

    - 보안 및 승인에 대한 로그(인증 및 승인에 관련된 로그)

    - PAM(Pluggable Atuentication Module) -> 리눅스 인증 모듈

    - 텍스트 파일

 

 

  $ /var/log/messages(*중요)

   - ** 시스템 동작에 대한 전반적인 모든 이벤트 저장

   - 리눅스에서 가장 중요한 로그 중의 하나

   - 텍스트 파일

   - cat /var/log/messages

 

반응형

 

  $ ~/.bash_history

   - 사용자 별 수행한 명령 저장

   - 시스템 침입이 발생 시 로그인 후 어떤 명령을 수행햇는지를 추적

        (피해 범위, 접근 등을 확인)

   - cat /root/.bash_history, cat /home/test/.bash_history

   - 명령어 : history

 

----------------------------------------------------------

  $ /var/log/boot.log

   - 부팅시 출력되는 메시지

   - cat /var/log/boot.log

 

  $ /var/log/dmesg

   - 부팅시 출력되는 메시지

   - dmesg

   - demsg | grep eth

   - eth0 renamed eth1

 

----------------------------------------------------------

[서비스 사용시 로그]

  $ /var/log/xferlog

   - FTP로그

  

  $ /var/log/httpd/access.log, /var/log/httpd/error.log

- 아파치 로그 -> 웹 서비스 로그

반응형

댓글