Node.js User-Space Markers

Node.js included support for SystemTap user-space markers. The SystemTap user-space markers are enabled in Fedora 28 and RHEL 7 and allow SystemTap to probe various aspects of Node.js operation such as garbage collection start/end and http server request/response. Below is the SystemTap command and the resulting output listing the Node.js user-space tapset probes points:

$ stap -L 'node_*'
node_gc_start scavenge:long compact:long type:string flags:long probestr:string $arg1:long $arg2:long $arg3:long
node_http_client_request remote:string port:long method:string url:string fd:long probestr:string $arg1:long $arg2:long $arg3:long $arg4:long $arg5:long $arg6:long $arg7:long
node_http_client_response remote:string port:long fd:long probestr:string $arg1:long $arg2:long $arg3:long $arg4:long
node_http_server_request remote:string port:long method:string url:string fd:long probestr:string $arg1:long $arg2:long $arg3:long $arg4:long $arg5:long $arg6:long $arg7:long
node_http_server_response remote:string port:long fd:long probestr:string $arg1:long $arg2:long $arg3:long $arg4:long
node_net_server_connection remote:string port:long fd:long probestr:string $arg1:long $arg2:long $arg3:long $arg4:long
node_net_stream_end remote:string port:long fd:long probestr:string $arg1:long $arg2:long $arg3:long $arg4:long

Using Node.js User-Space Markers

To use the SystemTap user-space markers on a Fedora you will need:

Examples Scripts for Node.js Probing

Short example scripts:

References

None: NodejsMarkers (last edited 2018-10-08 13:38:09 by WilliamCohen)