Differences between revisions 1 and 2
Revision 1 as of 2018-10-05 18:38:31
Size: 1807
Editor: WilliamCohen
Comment: Initial entry for Node.js user-space probing
Revision 2 as of 2018-10-08 13:38:09
Size: 1815
Editor: WilliamCohen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
allow !SystemTap to probe various aspects of PHP operation such as allow !SystemTap to probe various aspects of Node.js operation such as
Line 31: Line 31:
== Examples Scripts for PHP Probing == == Examples Scripts for Node.js Probing ==

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:

  • RPMs:
    • systemtap
    • nodejs
  • Membership to the stapdev group (or root access)

Examples Scripts for Node.js Probing

Short example scripts:

  • TBD

References

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