Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /opt/rh/gcc-toolset-11/root/usr/share/systemtap/examples/profiling/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/rh/gcc-toolset-11/root/usr/share/systemtap/examples/profiling/syscallerrorsbypid.stp
#!/opt/rh/gcc-toolset-11/root/usr/bin/stap
#
# Copyright (C) 2018 Red Hat, Inc.
# By William Cohen, Red Hat Inc.
# [email protected]
#
# USAGE: stap syscallerrorsbypid.stp --suppress-handler-errors
#
# The "--suppress-handler-errors" option allows the script to continue
# run when probes are skipped.  The probe skips make the data less accurate,
# but are otherwise harmless.

global arr%[20000], sys%[20000]
global procname%
      
probe syscall_any {
  sys[tid()] = syscall_nr
}
probe syscall_any.return {
    if (tid() in sys && retval < 0 ) {
       arr[pid(), sys[tid()], retval]++
       procname[pid()] = execname()
    }
    delete sys[tid()]
}

probe scheduler.process_exit {
  delete arr[pid(),*,*]
  delete procname[pid()]
}

function process_name(pid) {
  return sprintf("%s[%d]", procname[pid], pid)
}

probe prometheus {
    @prometheus_dump_array3_map(arr, "syscall_error_count", "pid", "syscall", "error",
				sprint, process_name, syscall_name, errno_str)
}

Spamworldpro Mini