Skip to content

Instantly share code, notes, and snippets.

@wolfeidau
Last active December 10, 2015 12:19
Show Gist options
  • Select an option

  • Save wolfeidau/4433306 to your computer and use it in GitHub Desktop.

Select an option

Save wolfeidau/4433306 to your computer and use it in GitHub Desktop.
More node-worker-farm dtrace fun.
sudo dtrace -Z -n 'syscall::fork*: /execname == "node"/{ printf("%d %d", timestamp, pid); }' -n 'node-worker-farm*:::startChild{ trace(arg0) }'
dtrace: description 'syscall::fork*: ' matched 2 probes
dtrace: description 'node-worker-farm*:::startChild' matched 0 probes
CPU ID FUNCTION:NAME
0 135 fork:entry 13517852979208 83369
0 136 fork:return 13518351020260 83369
0 12238 startChild:startChild 0
0 135 fork:entry 13518352693874 83369
6 136 fork:return 13518939170250 83369
6 12238 startChild:startChild 1
6 135 fork:entry 13518940640036 83369
2 136 fork:return 13519571713983 83369
4 12238 startChild:startChild 2
4 135 fork:entry 13519572822632 83369
0 136 fork:return 13520588479455 83369
0 12238 startChild:startChild 3
0 135 fork:entry 13520589663940 83369
2 136 fork:return 13521778414851 83369
2 12238 startChild:startChild 4
2 135 fork:entry 13521779677951 83369
6 136 fork:return 13522470218516 83369
7 12238 startChild:startChild 5
7 135 fork:entry 13522471337120 83369
2 136 fork:return 13524063006861 83369
2 12238 startChild:startChild 7
6 136 fork:return 13523423930266 83369
6 12238 startChild:startChild 6
6 135 fork:entry 13523425125745 83369
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment