Skip to content

Instantly share code, notes, and snippets.

@myaut
Created March 30, 2015 07:22
Show Gist options
  • Save myaut/092197586097f8895f95 to your computer and use it in GitHub Desktop.
Save myaut/092197586097f8895f95 to your computer and use it in GitHub Desktop.
Example of usage of SystemTap in Debian
root@r520:~# apt-get update
Hit http://mirror.yandex.ru wheezy Release.gpg
Hit http://mirror.yandex.ru wheezy Release
Hit http://mirror.yandex.ru wheezy/main Sources
Hit http://mirror.yandex.ru wheezy/main amd64 Packages
Hit http://mirror.yandex.ru wheezy/main i386 Packages
Hit http://mirror.yandex.ru wheezy/main Translation-en
Reading package lists... Done
root@r520:~# stap -e 'probe kprocess.exec { println(argstr); }'
"/usr/bin/apt-get" "update"
"/usr/bin/dpkg" "--print-foreign-architectures"
"/usr/lib/apt/methods/http"
"/usr/lib/apt/methods/http"
"/usr/lib/apt/methods/gpgv"
"/usr/lib/apt/methods/gpgv"
"/usr/bin/gpgv" "--ignore-time-conflict" "--status-fd" "3" "--keyring" "/etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg" "--keyring" "/etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg" "--keyring" "/etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg" "--keyring" "/etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg" "--keyring" "/etc/apt/trusted.gpg" "/var/lib/apt/lists/partial/mirror.yandex.ru_debian_dists_wheezy_Release.gpg" "/var/lib/apt/lists/mirror.yandex.ru_debian_dists_w
"/usr/bin/dpkg" "--print-foreign-architectures"
"/usr/bin/dpkg" "--print-foreign-architectures"
^C
root@r520:~# uname -a
Linux r520 4.0.0-rc5 #1 SMP Fri Mar 27 13:29:09 MSK 2015 x86_64 GNU/Linux
root@r520:~# stap -V
Systemtap translator/driver (version 2.7/0.152, non-git sources)
Copyright (C) 2005-2014 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: TR1_UNORDERED_MAP NLS LIBXML2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment