To get detailed information about a Linux PID you can use the strace command. If strace is not installed it can be installed via yum using the command below.

Strace Install:

yum install strace

Below is a sample output from using the strace command on a Litespeed web server process.

Sample Output:

[root@idev log]# strace -p14387
Process 14387 attached - interrupt to quit
[ Process PID=14387 runs in 32 bit mode. ]
gettimeofday({1238523307, 358130}, NULL) = 0
epoll_wait(6, {}, 1365, 100) = 0
gettimeofday({1238523307, 453603}, NULL) = 0
epoll_wait(6, {}, 1365, 100) = 0
gettimeofday({1238523307, 553723}, NULL) = 0
epoll_wait(6, {}, 1365, 100) = 0
gettimeofday({1238523307, 653950}, NULL) = 0
epoll_wait(6, {}, 1365, 100) = 0
gettimeofday({1238523307, 753772}, NULL) = 0
epoll_wait(6, {}, 1365, 100) = 0
gettimeofday({1238523307, 853665}, NULL) = 0
epoll_wait(6, {}, 1365, 100) = 0
gettimeofday({1238523307, 953680}, NULL) = 0
epoll_wait(6, {}, 1365, 100) = 0
gettimeofday({1238523308, 53737}, NULL) = 0
getppid() = 14383
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3543, ...}) = 0
stat64("/var/lsws/logs/access.log", {st_mode=S_IFREG|0644, st_size=872543, ...}) = 0
stat64("/var/lsws/logs/error.log", {st_mode=S_IFREG|0644, st_size=1637, ...}) = 0
stat64("/var/lsws/logs/stderr.log", {st_mode=S_IFREG|0644, st_size=7690737, ...}) = 0
open("/tmp/lshttpd/.rtreport.tmp", O_WRONLY|O_CREAT|O_TRUNC, 0644) = 17
fstat64(17, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
fcntl64(17, F_SETFD, FD_CLOEXEC) = 0
time(NULL) = 1238523308
write(17, "VERSION: LiteSpeed Web Server/St"..., 63) = 63
write(17, "BPS_IN: 0, BPS_OUT: 0, SSL_BPS_I"..., 216) = 216
write(17, "REQ_RATE [dev.domain.com"..., 91) = 91
write(17, "REQ_RATE [dev.domain.com]: "..., 79) = 79
write(17, "REQ_RATE [_AdminVHost]: REQ_PROC"..., 71) = 71
write(17, "REQ_RATE [dev2.domain.com]:"..., 82) = 82
write(17, "EXTAPP [LSAPI] [dev3.domain.com"..., 187) = 187
write(17, "EXTAPP [LSAPI] [dev2.domain.com"..., 207) = 207
write(17, "EOFn", 4) = 4
close(17) = 0
rename("/tmp/lshttpd/.rtreport.tmp", "/tmp/lshttpd/.rtreport") = 0
epoll_wait(6, {}, 1365, 100) = 0
gettimeofday({1238523308, 153682}, NULL) = 0
epoll_wait(6, {}, 1365, 100) = 0
gettimeofday({1238523308, 253579}, NULL) = 0
epoll_wait(6, {}, 1365, 100) = 0
gettimeofday({1238523308, 353582}, NULL) = 0
epoll_wait(6, {}, 1365, 100) = 0
gettimeofday({1238523308, 453573}, NULL) = 0
epoll_wait(6,
Process 14387 detached

As you can see there will be lots of information in the output including files that have been logged to, domains involved with the process, etc. This should easily allow you to find a loop with a specific PID if that is what your issue is.

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail
Tags: , , , , , , ,
Leave a Reply

*Type the letter/number combination in the abvoe field before clicking submit.

*