I wanted to get a quick picture of what the on my were doing in the background, so I turned to (shout out to Julia Evans for ), which can tell me handy things like “who’s opening up which files?” and “what system calls are being made?” processes computer DTrace getting me excited about it Just to start, I decided to run this to see which programs were making the most system calls: one-liner sudo dtrace -n 'syscall:::entry { @num[execname] = count(); }' After running the above for a couple of minutes (and browsing idly in the background), I got this output (truncated for brevity): Now, I want to reboot into a relatively clean state, and run the command for exactly ten minutes, without having to manually stop it. This is what I came up with: The ampersand makes DTrace run as a background job. Running gives you back a list of the process IDs of jobs: jobs -p bash-3.2$ jobs -p10038 I pipe that through to take only the last one (in case you had other jobs running or suspended in the same shell instance). And then because doesn’t take input from stdin, we pipe the PID to which will pass its stdin as arguments to . And we make sure that we run with , because that’s how the DTrace process was started. tail -1 kill xargs, kill kill sudo By the way, because is a bash builtin, if you want help with it you need to use , not . jobs help jobs man jobs Let me know if there’s a better way of doing this! I’m by no means a bash expert. is how hackers start their afternoons. We’re a part of the family. We are now and happy to opportunities. Hacker Noon @AMI accepting submissions discuss advertising & sponsorship To learn more, , , or simply, read our about page like/message us on Facebook tweet/DM @HackerNoon. If you enjoyed this story, we recommend reading our and . Until next time, don’t take the realities of the world for granted! latest tech stories trending tech stories