2012-12-18 4 views
4

가능한 중복 :
Who “Killed” my process and why?프로세스 킬러 식별

한 자바 프로세스 내 server.In에 의해 내가 찾은 로그를 실행 내 서버가 자동으로 다시 시작한다는 (논리가 그 경우 프로세스가 종료 됨, 자동으로 시작). 여기 누가 내 자바 프로세스를 죽이고 있는지 알지 못한다. 스크립트 나 뭐 그런 것 같아. 그것에 대해 모른다.

누가 프로세스 킬러인지 알 수있는 방법이 있습니까?

저는 Linux 컴퓨터에서 작업하고 있습니다.

+0

당신이 (HTTP [unix.stackexchange.com]에서이 요청 시도 유무 : // unix.stackexchange.com/)? – jlordo

+0

http://stackoverflow.com/questions/726690/who-killed-my-process-and-why – opi

답변

1

SystemTap보십시오 :

apt-get install systemtap 

을 저장 sigmon.stp 파일에이 코드 :

# Track when a specific process ID receives a specific signal. For example, 
# when process ID 31994 receives a SIGKILL signal. 
# 
# Example command line: 
# 
# stap -x 31994 sigmon.stp SIGKILL 
# 
# Example output: 
# 
# SPID  SNAME   RPID RNAME   SIGNUM SIGNAME 
# 5609  bash    31994 find    9  SIGKILL 
# 

probe begin 
{ 
    printf("%-8s %-16s %-5s %-16s %6s %-16s\n", 
     "SPID", "SNAME", "RPID", "RNAME", "SIGNUM", "SIGNAME") 
} 

probe signal.send 
{ 
    if (sig_name == @1 && sig_pid == target()) 
    printf("%-8d %-16s %-5d %-16s %-6d %-16s\n", 
     pid(), execname(), sig_pid, pid_name, sig, sig_name) 
}