17:13:22 <maxamillion> #startmeeting
17:13:22 <zodbot> Meeting started Sat Dec  5 17:13:22 2009 UTC.  The chair is maxamillion. Information about MeetBot at http://wiki.debian.org/MeetBot.
17:13:22 <zodbot> Useful Commands: #action #agreed #halp #info #idea #link #topic.
17:13:51 <maxamillion> Setting user permission to run systemtap: Member group stapusr (run precompiled and "unprivileged" scripts)
17:14:04 <maxamillion> Member group stapdev (build systemtap scripts)
17:14:06 <maxamillion> root
17:14:18 <maxamillion> (Should be improved -> PolicyKit?)
17:14:36 <maxamillion> mchua: I suppose I will go on to the wiki and munge in the rest later
17:14:50 <maxamillion> Very Simple Example Script -> hello.stp:
17:14:58 <maxamillion> probe begin {
17:15:09 <maxamillion> printf("hello world\n");
17:15:13 <maxamillion> exit();}
17:15:17 <maxamillion> run with:
17:15:38 <maxamillion> stap hello.stp
17:15:40 <maxamillion> output:
17:15:44 <maxamillion> hello world
17:16:13 <maxamillion> systemtap script termination:
17:16:17 <maxamillion> control-c
17:16:21 <maxamillion> exit() function
17:16:32 <maxamillion> Termination of executable start with stap -c
17:16:47 <maxamillion> "Read to Run" scripts:
17:17:00 <maxamillion> - Building catalog of SystemTap scripts (currently in the process)
17:17:29 <maxamillion> - Catalog included in systemtap RPM, /usr/share/doc/systemtap-1.0/examples/index.html <--- current version of catalog as of release
17:18:05 <maxamillion> if in the event you have written a script that you feel would be useful to others, please submit it to the project and it could potentially be included and shipped in the next version of the catalog/documentation of the project
17:19:28 <maxamillion> the helloworld example can be found in the previously mentioned index.html and that page also includes a general description of the scripts as they are listed
17:19:35 <maxamillion> Lots of Documentation:
17:19:45 <maxamillion> /usr/share/doc/systemtap-1.0/
17:19:50 <maxamillion> - Tutorial
17:19:56 <maxamillion> - Language reference
17:20:04 <maxamillion> - Tapsets documentation
17:20:58 <maxamillion> Tapsets -> essentially a library to create an interface to hide some of the details for things like user space probes ..... in lamens terms, its a library to make life easier on the collective "you"
17:22:06 <maxamillion> The tapset documentation is quite verbose and well written and formatted for easy viewing through a web broswer (also located in the docs directory mentioned earlier)
17:22:25 <maxamillion> Demo time:
17:22:34 <maxamillion> cd /usr/share/doc/systemtap-1.0
17:22:39 <maxamillion> ls
17:22:41 <maxamillion> cd examples
17:23:25 <maxamillion> find | grep timeout
17:23:44 <maxamillion> stap ./profiling/timeout.stp
17:24:11 <maxamillion> <Shows a running ncurses based "graph" of current usage and statistics>
17:25:16 <maxamillion> (NOTE: that stap command should be run as root unless user permissions are already setup)
17:26:44 <maxamillion> (NOTE*: that might not be correct, but you will need to 'debuginfo-install kernel'
17:26:47 <maxamillion> )
17:27:00 <maxamillion> <currently inspecting the script we just ran>
17:29:46 <jistone> to run as non-root, you need to be in the stapdev group
17:30:22 <maxamillion> jistone: ah, thank you ... I apparently don't have the debug info installed and its still in the middle of the 420mb download so I wasn't able to test
17:31:57 <jistone> maxamillion, you can still do basic stuff without that, like begin/end/timers, but yeah the debuginfo is needed for most of the examples
17:32:46 <maxamillion> <currently looking through the source code of /usr/share/doc/systemtap-1.0/examples/memory/pfaults.stp>
17:32:54 <maxamillion> jistone: gotchya
17:34:26 <maxamillion> the probe called vm.pagefault.return will tell us what kind of fault has occured (the recording of data process side of it)
17:34:53 <maxamillion> is then steps through and prints that data to stdout (user terminal)
17:34:56 <maxamillion> it*
17:40:09 <maxamillion> The difference between a major and minor page fault as reported by this script is that a major page fault will cause a sleep and a wait on i/o which will slow things way down where as a minor page fault is something that can be recovered from quite quickly (between 5-15 cpu instructions, where as a major can take upward of 25000 as reported in this example while running this script and launching evolution)
17:44:50 <maxamillion> <now looking at a script located in /usr/share/doc/systemtap-1.0/examples/io/iostats.stp>
17:45:41 <maxamillion> is it noted that there are probably other tools that can be found/used to accomplish similar tasts but this is a useful bit of information and is using systemtap
17:46:14 <maxamillion> (similar tasks = similar information found by iostats.stp ... other bits are highly unique to the power of systemtap)
17:51:46 <maxamillion> stap -l 'process("/bin/ls").function("*")'
17:52:08 <maxamillion> this command will list out the source code location for the function that is being called
17:52:44 <maxamillion> (requires coreutils debuginfo)
17:53:07 <maxamillion> this will work for any ELF so it could be a shared library as well
17:55:38 <maxamillion> in systemtap, you can probe things like java as well as things that are happening natively on the machine and combine that information with network operations in order to get a complete overview profile of what your system is doing
17:56:25 <maxamillion> that being significant because java runs within the JVM (Java Virtual Machine) and therefore doesn't actually touch the system on its own
17:58:59 <maxamillion> specifics on how to use systemtap to profile java will be covered in a different talk later today by someone who is working with systemtap from the java side of the development world
18:00:01 <maxamillion> #endmeeting