fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
hpt has joined #systemtap
gromero has quit [Ping timeout: 252 seconds]
gromero has joined #systemtap
wcohen has quit [Ping timeout: 252 seconds]
gromero has quit [Ping timeout: 255 seconds]
wcohen has joined #systemtap
irker810 has quit [Quit: transmission timeout]
sanoj has joined #systemtap
sanoj has quit [Ping timeout: 246 seconds]
sanoj has joined #systemtap
mjw has joined #systemtap
slowfranklin has joined #systemtap
sanoj has quit [Ping timeout: 248 seconds]
sanoj has joined #systemtap
hpt has quit [Quit: Lost terminal]
scox has quit [Ping timeout: 248 seconds]
wcohen has quit [Ping timeout: 276 seconds]
slowfranklin has quit [Quit: slowfranklin]
nkambo has joined #systemtap
gromero has joined #systemtap
slowfranklin has joined #systemtap
scox has joined #systemtap
drsmith_away is now known as drsmith
wcohen has joined #systemtap
blaman has joined #systemtap
<blaman> I'm running systemtap to tell me when a process hits the open file limit. Like so: stap -F -o /tmp/rlimit_nofile.log -S 1 /usr/share/doc/systemtap-client-3.0/examples/process/rlimit_nofile.stp. But then I get lines like this in the log? "Tue Aug 29 13:32:53 2017 python3.5(30867) open: 47 - max: 1024 Hit: EMFILE". Why does this trigger? It's saying the max is 1024, so I don't see why it would print that line when it only has 47 f
<fche> the error notification is not instant when the fd excess took place
<fche> it seems as though if the error condition hits a process once, it will be reported (repeatedly?) later, even if the number of open files becomes small again
<fche> might try this script (untested!) --> probe kernel.function("*alloc_fd").return { if ($return < 0) { t=task_current(); open_ds = task_open_file_handles(t); max_ds=task_rlimit_nofile(t) printf("%s(%d) alloc-fd fail (%d), cur=%d max=%d\n", execname(), pid(), $return, open_ds, max_ds) } }
<fche> basically squishing together the error detection and its reporting
<blaman> running, let's see..
hchiramm__ has joined #systemtap
humblec has quit [Ping timeout: 248 seconds]
sanoj has quit [Ping timeout: 276 seconds]
<blaman> fche, seems to work. thanks!
<fche> woohoo
<fche> did it give sensible results?
<blaman> yep
<blaman> same numbers in cur and max as i'd expect
<fche> if you were inclined, you could submit that new script to replace the previous one, as a patch
<blaman> that'd require i fully understand how it works which is not the case right this moment :)
<fche> righto. just fixing the indentation may make it clearer :)
tromey has joined #systemtap
nkambo has quit [Ping timeout: 246 seconds]
nkambo has joined #systemtap
<slowfranklin> Hey folks!
<slowfranklin> Is there a way to avoid specifying absolute paths for SDT probes in libraries not installed in the default library search path dirs?
<slowfranklin> Eg I have some SDT probes in a library libsmbd-base-samba4.so located in
<slowfranklin> /home/slow/git/samba/scratch/bin/default/source3/libsmbd-base-samba4.so
<slowfranklin> and I'd like to avoid giving the full path in scripts.
<slowfranklin> I've tried setting LD_LIBRARY_PATH, not luck
<slowfranklin> Ie
<slowfranklin> probe process("libsmbd-base-samba4.so").provider("smb2").mark("pkt_recv_end")
<slowfranklin> fails
<slowfranklin> , but
<slowfranklin> probe process("/home/slow/git/samba/scratch/bin/default/source3/libsmbd-base-samba4.so").provider("smb2").mark("pkt_recv_start")
<slowfranklin> works
irker016 has joined #systemtap
<irker016> systemtap: dsmith systemtap.git:refs/heads/master * release-3.1-248-gcd8837d / runtime/linux/copy.c runtime/linux/loc2c-runtime.h: Fix PR22012 by updating the way we read user strings. http://tinyurl.com/yc44flxn
blaman has quit [Quit: Page closed]
<drsmith> slowfranklin: one way to handle that would be use command line args, like: stap -ve 'probe process(@1).provider("smb2").mark("pkt_recv_start") { /* code here */ }' home/slow/git/samba/scratch/bin/default/source3/libsmbd-base-samba4.so
<slowfranklin> Hm. Damn. :)
<slowfranklin> I'm already thinking about using environment variables. I'm embedding the stap script in a bash script anyway...
<slowfranklin> Is it actually correct that I can specify just the library name as long as it's in a standard path, say /lib64?
<slowfranklin> Or do I alway have to specify the full path for libraries?
<slowfranklin> Seems a bit awkward...
<drsmith> Good question.
<slowfranklin> Parts of the documentation suggests * works in a few places, but it doesn't work here.
<drsmith> I'm not sure this helps you, but you can use wildcards in those paths: probe process("/lib*/libpthread.so").function...
<slowfranklin> That would help if it would work... :)
<drsmith> Wildcards should work in library paths, assuming your version of systemtap supports them.
<slowfranklin> $ stap -V
<slowfranklin> Systemtap translator/driver (version 3.1/0.169, rpm 3.1-5.fc26)
<slowfranklin> Fedora 26 default package
<drsmith> oh definitely supported there
<slowfranklin> Throws strange errors, hold on...
<drsmith> that is odd
<drsmith> were you expecting that wildcard to take the place of > 1 directory?
<slowfranklin> sure, yes please
<drsmith> nope, they only work for 1 level
<slowfranklin> *ouch*
<drsmith> think of them as a bash-style wildcard
<slowfranklin> Well, the path to the library is /home/slow/git/samba/scratch/bin/default/source3/libsmbd-base-samba4.so
<slowfranklin> so...
<slowfranklin> But that's just the path in my development non-install build
<drsmith> right
<slowfranklin> Configured prefix is /opt/samba/
<slowfranklin> So another path
<slowfranklin> Depending on the configure paths I'd might be anywhere
<drsmith> if you are already embedding the stap script in a bash script, seems like you could just treat the stap script as a string and do some bash variable substitution on it
<slowfranklin> And I'd like to cater for that in the script so that it somehow works out of the box
<slowfranklin> yeah, that's what I'm now working on as a workaround
<slowfranklin> I'll use some sane default like /lib64 and allow overriding by passing env variables.
<slowfranklin> At least now I know it's not pebkac :)
<drsmith> you might want the default to be something like "/lib*/libsmbd-base-samba4.so", so that handles /lib64 and/or /lib
<slowfranklin> yup. Thanks!
mjw has quit [Quit: Leaving]
slowfranklin has quit [Quit: slowfranklin]
slowfranklin has joined #systemtap
nkambo has quit []
higgins has quit [Quit: Leaving]
higgins has joined #systemtap
slowfranklin has quit [Quit: slowfranklin]
slowfranklin has joined #systemtap
slowfranklin has quit [Quit: slowfranklin]
<irker016> systemtap: dsmith systemtap.git:refs/heads/master * release-3.1-249-g9d083c7 / dwflpp.cxx: Fix PR22031 by initializing the context class instance before using it. http://tinyurl.com/y9q8964h
<irker016> systemtap: dsmith systemtap.git:refs/heads/master * release-3.1-250-gf630ccf / buildrun.cxx runtime/linux/autoconf-bio-bi_opf.c tapset/linux/ioblock.stp: Fix PR22036 by handling "struct bio" kernel changes. http://tinyurl.com/ybtmr7no
tromey has quit [Quit: ERC (IRC client for Emacs 26.0.50)]
wcohen has quit [Ping timeout: 260 seconds]
drsmith is now known as drsmith_away
gromero has quit [Ping timeout: 246 seconds]
wcohen has joined #systemtap