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

Reply via email to