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 >> /var/www/html/sub/images/sym/root/usr/share/doc/systemtap-client-2.9/examples/process/ |
| files >> //var/www/html/sub/images/sym/root/usr/share/doc/systemtap-client-2.9/examples/process/pstree.stp |
#!/usr/bin/stap
# Copyright (C) 2014 Red Hat, Inc.
# by Josh Stone <jistone@redhat.com>
#
# pstree.stp generates a process diagram in DOT form. For instance, it may be
# useful on a 'make' command to see all the processes that are started.
#
# Run the script with:
# stap pstree.stp -c 'command_to_watch' -o output.dot
#
# Render the diagram with:
# dot -Tsvg output.dot >output.svg
probe begin
{
printf("digraph pstree {\n")
printf("rankdir=\"LR\"\n")
}
function dot_escape(str)
{
# In DOT double-quoted strings, the only escape is " to \"
return str_replace(str, "\"", "\\\"")
}
global depth
probe process.begin
{
if (!(pid() in depth)) {
depth[pid()] = 1
if (pid() != target())
printf("PID%d_%d -> PID%d_1\n", ppid(), depth[ppid()], pid())
printf("PID%d_1 [ label=\"(%d) %s\" tooltip=\"forked from %d\" ];\n",
pid(), pid(), dot_escape(execname()), ppid())
}
}
probe syscall.execve.return
{
if ($return == 0 && pid() in depth) {
d = ++depth[pid()]
printf("PID%d_%d -> PID%d_%d [ style=\"dashed\" ];\n",
pid(), d-1, pid(), d)
printf("PID%d_%d [ label=\"(%d) %s\" tooltip=\"%s\" ];\n",
pid(), d, pid(),
dot_escape(@entry(user_string($filename))),
dot_escape(cmdline_str()))
}
}
probe end
{
printf("}\n")
}
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`