리눅스 33

[syslog] kernel: NOHZ: local_softirq_pending 100

1. 에러 메시지: kernel: NOHZ: local_softirq_pending 100 2. 원인: - 시스템이 어떤 소프트웨어 interrupt 를 처리하는 대신 CPU 를 sleep 상태로 만드는 것 - 메시지 마지막의 숫자는 hexadecimal 로 표현되며, ‘100’ 은 HRTIMER_SOFTIRQ 를 의미 - HRTIMER_SOFTIRQ 는 High Resolution Timer(HRT) 에 대한 소프트웨어 interrupt(HRT에 대한 상세정보는 아래 참조 URL 참고) - 커널 버전 2.6.22 이후부터 add 된 debug 메시지 3. 조치 방안: - /etc/grub.conf 파일에 nohz=off 옵션을 설정하여 disable 가능(단, 커널 버전 2.6.32-431.el6 보다..

[syslog] JBD: barrier-based sync failed on xvda1-8 - disabling barriers

1. 에러 메시지: JBD: barrier-based sync failed on xvda1-8 - disabling barriers 2. 원인: - RedHat 이나 CentOS 등의 Linux 계열에서는 journaling 파일시스템을 사용하는데, 이 journaling 파일시스템 중 ext4 파일시스템에는 기본적으로 Write Barrier 라는 커널 매커니즘이 enable 되어 있음(barrier=1) - ext3 파일시스템은 Write Barrier 기능을 사용 가능하나, 기본 disable 되어 있어 위와 같은 메시지가 발생하지 않음 - Write Barrier 는 파일시스템의 메타데이터가 올바르게 기록되고 디스크에 제대로(심지어 디스크 전원이 나갈 지라도) 반영되게 하기 위한 커널 매커니즘 -..

[syslog] daemon[PID]: warning: can't get client address: Connection reset by peer

1. 에러 메시지: daemon[PID]: warning: can't get client address: Connection reset by peer 2. 원인: - C/S 구조에서의 TCP 통신은 기본적으로 3-way handshake 방식을 통해 서로 세션을 연결하게 되는데, SYN/ACK 시퀀스가 Connection 이 완료되기 전에 torn down(해체) 되어 daemon 이 source system 을 확인할 수 없을 때 발생 - unauthorized user 가 daemon 을 통해 해당 시스템에 접근하려 했다가 정상적인 절차로 Connection 이 맺어지기 전에 세션이 terminate 되면 발생 - 서버에서 취약점 확인을 위한 스캔 시 발생 3. 조치 방안: - 단순 경고성 메시지이므..

[syslog] kernel: type=1101 audit(1412069761.325:844941): user pid=23092 uid=0 auid=4294967295 msg='PAM: accounting acct="sysadm" : exe="/usr/sbin/crond" (hostname=?, addr=?, terminal=cron res=success)'

1. 에러 메시지:kernel: type=1101 audit(1412069761.325:844941): user pid=23092 uid=0 auid=4294967295 msg='PAM: accounting acct="sysadm" : exe="/usr/sbin/crond" (hostname=?, addr=?, terminal=cron res=success)'kernel: type=1103 audit(1412069761.325:844942): user pid=23092 uid=0 auid=4294967295 msg='PAM: setcred acct="sysadm" : exe="/usr/sbin/crond" (hostname=?, addr=?, terminal=cron res=success)' 2. 현상:..

[dmesg] kernel: type=1400 audit(1404149145.749:40): avc: denied { write } for pid=438 comm="ifconfig" path="/tmp/edscan.lck" dev=xvda3 ino=390926 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=file

1. 에러 메시지:kernel: type=1400 audit(1404149145.749:40): avc: denied { write } for pid=438 comm="ifconfig" path="/tmp/edscan.lck" dev=xvda3 ino=390926 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=file 2. 원인:- SELinux 설정값이 enforcing 으로 되어 있을 때 발생하는 메시지 3. 조치 방안:- setenforce 명령 실행 # setenforce 0 // SELinux 데몬 끄기(setenforce 1 은 켜기) - 위 명령이 정상 수행되지 않을 경우, /..

[syslog] ntpd[pid]: frequency error 510 PPM exceeds tolerance 500 PPM

1. 에러 메시지:ntpd[pid]: frequency error 510 PPM exceeds tolerance 500 PPM 2. 원인 & 상세 설명:- CloudStack XEN 가상화 환경에서 기본적으로 DomU(Guest VM) 에서의 clock 은 Dom0(Control Domain 또는 cnode) 의 clock 에 동기화되도록 설정되어 있음- 하지만, xen.independent_wallclock 값이 ‘0’으로 설정되어 있으면 Dom0 에 독립적으로 clock 이 동작 0 = The clock will NOT be sync with the host. 1 = The clock will be sync with the host. - 독립적으로 clock 이 동작하려는 상황에서 ntp 데몬을 통해..

[UNIX/LINUX] netstat 상태값, 옵션 정리

netstat 과 관련하여 글 올립니다.아시다시피 netstat 은 해당 명령을 수행하는 서버가 다른 시스템과 어떤 서비스 또는 포트로 연결되어 있는지를 확인하는 명령어입니다.알아두면 매우 유용한 명령어이므로 netstat의 각 상태값에 대한 정의, 옵션 등에 대해 정리합니다. 1. netstat 상태값 state description CLOSED 완전히 연결이 종료된 상태 CLOSING 흔하지 않으나 주로 확인 메시지가 전송 도중 유실된 상태 CLOSE_WAIT TCP 연결이 상위 응용프로그램 레벨로부터 연결 종료를 기다리는 상태 Passive Close 하는 쪽에서 프로그램이 소켓을 종료시키는 것을 기다리기 위한 상태. 가령, 소켓 프로그래밍 시 TCP connection 을 close 함수로 명시적..

[UNIX/LINUX] 1분 단위 netstat 상태값 로깅 스크립트

#!/bin/bash outDir=/home/NETSTAT if [ ! -d ${outDir} ]; then // outDir 변수로 지정한 디렉토리가 존재하지 않을 경우, 디렉토리를 생성한다.mkdir -p ${outDir}fi idx=1 outFile=${outDir}/netstat_`hostname`_`date +%y%m%d`.log if [ ! -f ${outFile} ]; then // outFile 변수로 지정한 파일이 존재하지 않을 경우, 컬럼명을 탭 간격을 주고 outFile 에 프린팅한다.printf "CLOSED\\tCLOSING\\tCLOSE_WAIT\\tESTABLISHED\\tFIN_WAIT1\\tFIN_WAIT2\\tLAST_ACK\\tLISTEN\\tSYN_SENT\\tSYN_..