Tuesday, March 5, 2013

Dtrace and ZFS on my Ubuntu VM

I wanted to have a desktop OS capable of running Dtrace/ZFS/KVM native'ly. Thus I set out  on the path of exploring SmartOS/OpenIndiana/Illumos etc.
In parallel, I continued my efforts to compile these on my Ubuntu VM. VM first because I wanted to make sure I handled/iron'ed out most of the issues using these before I shift it to real h/w.
Somehow KVM inside VBOX Ubuntu guest is not working. Though I am less worried about this as, I know a VT capable processor running Ubuntu would help this resolve( or may be its issue with VBOX not supporting VT under VT for h/w virtualization ). 
Anyways, I am happy to share that I am able to compile Dtrace4Linux port by Paul Fox. Thanks to him, for directing me to a stable release(17th Jan 2013 released tar). It was easy, the readme had it all that was necessary for this to get going.

 $ tools/get-deps.pl # if using Ubuntu
 $ make all
 $ make install
 $ make load           (need to be root or have sudo access)
akam@akam-kvm:~/dtrace4linux/dtrace-20130117$ sudo make load tools/load.pl 22:54:03 Syncing... 22:54:03 Loading: build-3.2.0-38-generic-pae/driver/dtracedrv.ko 22:54:06 Preparing symbols... 22:54:06 Probes available: 417878 22:54:20 Time: 17s :~/dtrace4linux/dtrace-20130117$ lsmod | grep dtrace dtracedrv 556437 0 :~/dtrace4linux/dtrace-20130117$ :~/dtrace4linux/dtrace-20130117$ dtrace -n 'syscall:::entry { @num[execname] = count(); }' dtrace: description 'syscall:::entry ' matched 346 probes ^C gconfd-2 6 ssh-agent 12 dnsmasq 16 rtkit-daemon 30 accounts-daemon 40 zeitgeist-datah 40 bluetooth-apple 42 gdu-notificatio 42 gnome-fallback- 42 gnome-session 42 nm-applet 42 polkit-gnome-au 42 telepathy-indic 42 indicator-print 58 unity-applicati 99 gnome-screensav 160 gvfs-afc-volume 160 nautilus 160 thunderbird 169 update-notifier 253 hud-service 301 VBoxService 505 unity-panel-ser 546 gnome-settings- 739 unity-2d-shell 1178 bamfdaemon 1613 rsyslogd 2008 dbus-daemon 2252 unity-2d-panel 2746 metacity 3537 gdbus 5068 gnome-terminal 5476 firefox 9281 Xorg 16588 dtrace 21232 ~/dtrace4linux/dtrace-20130117$ uname -a Linux 3.2.0-38-generic-pae #61-Ubuntu SMP Tue Feb 19 12:39:51 UTC 2013 i686 i686 i386 GNU/Linux :~/dtrace4linux/dtrace-20130117$ Next was ZoL(ZFS On Linux) $ sudo add-apt-repository ppa:zfs-native/stable $ sudo apt-get update $ sudo apt-get install ubuntu-zfs :~/dtrace4linux/dtrace-20130117$ lsmod | grep zfs zfs 1088229 0 zcommon 44901 1 zfs znvpair 77987 2 zfs,zcommon zavl 14490 1 zfs zunicode 330577 1 zfs spl 145088 5 zfs,zcommon,znvpair,zavl,zunicode :~/dtrace4linux/dtrace-20130117$
Next, will share the experiments with these tools ! But still have to go to SmartOS. Zones along with other advantages aren't still possible with my setup (yet) !

No comments: