Sindbad~EG File Manager

Current Path : /proc/1553489/root/usr/share/systemtap/examples/profiling/
Upload File :
Current File : //proc/1553489/root/usr/share/systemtap/examples/profiling/syscallsrw.stp

#!/usr/bin/stap --bpf

global arr

probe kernel.function("ksys_read") !, kernel.function("vfs_read") {
    arr[0]++;
}

probe kernel.function("ksys_write") !, kernel.function("vfs_write") {
    arr[1]++;
}

probe prometheus {

    $value .= ("count{syscall=\"ksys_read\"} " . sprint(arr[0]) . "\n")
    $value .= ("count{syscall=\"ksys_write\"} " . sprint(arr[1]) . "\n")

}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists