Skip to content

Instantly share code, notes, and snippets.

@kassandry
kassandry / rw.d
Last active August 29, 2015 14:19
rw.d dtrace FreeBSD
#!/usr/sbin/dtrace -s
#pragma D option quiet
BEGIN
{
bio_cmd[1] = "Read";
bio_cmd[2] = "Write";
bio_cmd[4] = "Delete";
bio_cmd[8] = "Getattr";
# Log in to root user
apt-get update && apt-get install git-core build-essential emacs authbind runit scons libssl-dev curl -y
su - <unprivileged user>
git clone https://github.com/creationix/nvm.git ~/nvm && . ~/nvm/nvm.sh && nvm alias default v0.6.21 && nvm install v0.6.21
# Add to .profile, .bashrc or equiv.: . ~/nvm/nvm.sh
curl http://files.cast-project.org/install.sh | sh
# Setup files needed for cast agent and runsvdir
mkdir -p $HOME/cast-data/services-enabled/
mkdir $HOME/.cast