Socket
Book a DemoInstallSign in
Socket

dtscript

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dtscript

reformat a dtrace(1M) one-liner into a script

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

dtscript -- reformat dtrace(1M) one-liners

This is a simple command-line tool for converting a DTrace one-liner into a more readable script. I use it after a one-liner becomes gnarly enough that it's better to edit it as a script. It's not complete, and surely has bugs.

You run it exactly like you'd run dtrace(1M). For example:

$ ./dtscript -q -n 'syscall::write:entry/execname == "ls"/{ self->f = 1; }' \
      -n 'syscall::write:return/self->f/{ @[ustack()] = count(); }' 
#!/usr/sbin/dtrace -qs

syscall::write:entry
/execname == "ls"/
{
	self->f = 1;
}

syscall::write:return
/self->f/
{
	@[ustack()] = count();
}

Keywords

dtrace

FAQs

Package last updated on 25 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts