I have seen a question in stackoverflow, and tried the DTrace script in my host 
(Solaris 10):
        
        #!/usr/sbin/dtrace -s


        #pragma D option quiet


        dtrace:::BEGIN
        {
                printf("%-20s  %-12s %s\n", "TIME", "LATENCY(ms)", "HOST");
        }


        pid$target::getaddrinfo:entry
        {
                self->host = copyinstr(arg0);
                self->start = timestamp;
        }


        pid$target::getaddrinfo:return
        /self->start/
        {
                printf("%d", arg1);
                this->delta = (timestamp - self->start) / 1000000;
                printf("%-20Y  %-12d %s\n", walltimestamp, this->delta, 
self->host);
                self->host = 0;
                self->start = 0;
        }
        
        the output of arg1 isn't like 0 (success) nor error (fail), but likes a 
pointer. Per my understanding, the arg1 should be the return value.
        
        Could anyone help on this issue? Thanks very much in advance!
        
        Best Regards
        Nan Xiao


-------------------------------------------
dtrace-discuss
Archives: https://www.listbox.com/member/archive/184261/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184261/25769126-e243886f
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769126&id_secret=25769126-8d47a7b2
Powered by Listbox: http://www.listbox.com

Reply via email to