Help with reading strace

Dan Track dan.track at gmail.com
Thu Mar 23 13:38:31 UTC 2006


On 3/22/06, Nigel Wade <nmw at ion.le.ac.uk> wrote:
> Dan Track wrote:
> > Hi
> >
> > I have a problem with one of my server, where basically I get a
> > network hang for a few seconds every minute when communicating with
> > another server on the same subnet.
> >
> > I caught the hang when running tnsping, and here's the strace. The
> > space between the strace is where I found the problem to be.
> >
> > My question is can someone please help wme figure out what is going
> > on, and guide me to where I can read up on these system calls, like
> > POLLIN etc. I'd particularly would like to know what is happening
> > before and after the space in the strace.
> >
>
> [snip]
>
> > socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
> > connect(4, {sa_family=AF_INET, sin_port=htons(53),
>
> This is the important bit. You've opened a UDP socket on port 53, i.e DNS and
> the file descriptor used is 4.
>
> > sin_addr=inet_addr("10.11.10.1")}, 28) = 0
> > fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)
> > fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
> > gettimeofday({1143022459, 869414}, NULL) = 0
> > poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
> > send(4, "\367\201\1\0\0\1\0\0\0\0\0\0\7neptune\2l3\next"..., 43, 0) = 43
>
> here, it looks like it's sent a request to the DNS server...
>
>  > poll(
>  >
>
> and now it's polling for the response.
>
> My guess would be it's a delay in resolving ip/hostnames. Check you DNS settings.
>
What does it mean by the file decriptor having avalue of 4, is that good or bad?

Thanks
Dan




More information about the fedora-list mailing list