I'm working on learning to use DTrace to profile NodeJS applications and
have hit a wall that I'm hoping to get some additional insight on.

I have a NodeJS application that is sending an HTTP request to
https://example.com every 5 seconds. This is working and getting a proper

*I'm using the following DTrace script:*

#pragma D option quiet

                printf("Connection to %s:%d on fd %d - Request %s: %s\n",
                    args[1]->remoteAddress, args[1]->remotePort,
                    args[0]->method, args[0]->url);


[root@00-0c-29-ab-31-af /development]# dtrace -s ./test.d
Connection to undefined:0 on fd 0 - Request GET: /
Connection to undefined:0 on fd 0 - Request GET: /
Connection to undefined:0 on fd 0 - Request GET: /

It appears to me that all of the args[1] properties are not assigned and
giving back default values (undefined or 0 depending on type).

*The documentation for this probe lists the arguments:*

12437  node35247              node

        Probe Description Attributes
                Identifier Names: Private
                Data Semantics:   Private
                Dependency Class: Unknown

        Argument Attributes
                Identifier Names: Evolving
                Data Semantics:   Evolving
                Dependency Class: ISA

        Argument Types
                args[0]: node_http_request_t *
                args[1]: node_connection_t *
                args[2]: string
                args[3]: int
                args[4]: string
                args[5]: string
                args[6]: int

The node_http_request_t struct properties appear to work, while the
node_connection_t properties do not.

I'm not sure where to go next in debugging this, or determining what I've

This is running on a SmartOS VM, running NodeJS 8.4.

Any insight, or a kick in the right direction would be greatly appreciated.

Brad Gardner

Archives: https://www.listbox.com/member/archive/184261/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184261/25769126-e243886f
Modify Your Subscription: 
Powered by Listbox: http://www.listbox.com

Reply via email to