| Server IP : 104.21.25.180 / Your IP : 162.159.115.41 Web Server : Apache/2.4.37 System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64 User : ricodeal ( 1046) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/systemtap/examples/process/ |
Upload File : |
#!/usr/bin/stap
global activity // [execname,tid]->syscall-count
global activity2 // [execname,tid]->syscall-name-string-history
global syscall_history_length = 50 // override with stap -Gsyscall_history_length=NNN
global top_threads = 20
probe syscall_any # use tracepoint based syscall_any; we don't need context data
{
activity[execname(),tid()]<<<1
history = name." ".activity2[execname(),tid()]
activity2[execname(),tid()] = substr(history,0,syscall_history_length)
}
probe timer.s(5)
{
printf("%16s %6s %5s %-*s\n\n", "execname", "tid", "count",
syscall_history_length, "recent syscalls");
foreach ([e,t] in activity- limit top_threads) {
printf("%16s %6d %5d %s", e, t, @count(activity[e,t]), activity2[e,t])
printf("\n")
}
printf("\n")
delete activity
delete activity2
}