php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /proc/self/root/usr/share/doc/systemtap-client-2.9/examples/process/ |
files >> //proc/self/root/usr/share/doc/systemtap-client-2.9/examples/process/rlimit_nofile.stp |
############################################################ # rlimit_nofile.stp # Author: Robin Hack <rhack@redhat.com> # This script watches processes being scheduled and which # try to allocate a file descriptor without luck. ############################################################ global failed_calls probe kernel.trace("sched_wakeup") { pid = task_pid($p); name = task_execname($p); open_ds = task_open_file_handles($p); max_ds = task_rlimit_nofile($p); if (failed_calls[name, pid] == "EMFILE") { printf ("%s %s(%d) open: %d - max: %d Hit: %s\n", ctime(gettimeofday_s()), name, pid, open_ds, max_ds, failed_calls[name, pid]); } } probe kernel.trace("sched_process_exit") { pid = task_pid($p); name = task_execname($p); delete failed_calls[name, pid]; } # This is exactly point where all the fun happens # This function returns only EMFILE errno. probe kernel.function("__alloc_fd@fs/file.c").return { if (errno_str($return) == "EMFILE") { failed_calls[execname(), pid()] = errno_str($return); } }y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`