Thanks,
Your strace examples are imminently more useful I just need to make sense
of the output. For some reason even though it seems that host is getting
the right answer it still tries the second dns server specified.

I also get:
2522  23:15:39 bind(20, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("0.0.0.0")}, 16) = 0
2522  23:15:39 recvmsg(20, 0x41753ef0, 0) = -1 EAGAIN (Resource temporarily
unavailable)

which is a bit strange.

Will investigate a bit further tomorrow when I am thinking clearly again.

Regards

On 1 March 2012 16:52, Hugh Brown <hbr...@divms.uiowa.edu> wrote:

>
>
>>>  strace -v -o filename host myserver.example.com
>>
>> Regards
>>
>
>
> strace -fvvvto filename -s 2048 <cmd>
>
> is my usual form of calling strace when I don't know what I want from
> strace. I think you want to add a -f to follow any forked processes at the
> least.
>
>
> When I set up a bogus nameserver in my resolv.conf and strace it, I see
> resolv.conf get read and then I see a
>
> sendmsg(20, {msg_name(16)={sa_family=AF_**INET, sin_port=htons(53),
> sin_addr=inet_addr("192.168.1.**2") ...
> and then later, I see a few -1 EAGAIN Resource temporarily unavailable.
>
> Next I see it attempt a sendmsg to the next IP in the list which gives it
> an answer in a recvmsg a few lines down.
>
> If I put a correct nameserver back in resolv.conf and redo the strace, I
> only see it attempt the first.
>
> So, a shortened version of strace that would just track the sendmsg call
> would be
>
> strace -f -e sendmsg -s 2048 host myserver.example.com
>
>
> If I don't do it with the -f flag, then I don't see the query process
> happening.
>
>
> Hugh
>
> ______________________________**_________________
> rhelv5-list mailing list
> rhelv5-list@redhat.com
> https://www.redhat.com/**mailman/listinfo/rhelv5-list<https://www.redhat.com/mailman/listinfo/rhelv5-list>
>



-- 
Gerhardus Geldenhuis
_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to