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 :  /proc/thread-self/root/opt/rh/gcc-toolset-11/root/usr/share/systemtap/examples/io/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/root/opt/rh/gcc-toolset-11/root/usr/share/systemtap/examples/io/eatmydata.stp
#! /bin/sh

# note use of guru mode, to enable changing of syscall parameters
//bin/true && exec stap -g $0 ${1+"$@"}

# see also http://www.flamingspork.com/projects/libeatmydata/

global dummy_fd = -1 # invalid filehandle; to try stdout, run with -G dummy_fd=1
global guilt, agony, piety

// Probing do_fsync() the common function called by syscall.{fsync,fdatasync}.
probe kernel.function("do_fsync") {
  # We can't actually disable the syscall from here, but can try to
  # weaken it by redirecting the work toward a dummy file descriptor
  if (pid() == target())
     try { 
         $fd = dummy_fd
         guilt ++
     } catch {
         agony ++
     }
  else
     piety ++
}

probe kernel.function("do_fsync").return {
  # override result code, just in case kernel sent back -EINVAL or somesuch
  if (pid() == target())
      try { $return = 0 } catch { }
}


probe begin {
    printf("Redirecting f*sync by pid %d to fd %d\n",
        target(), dummy_fd)
}
probe error,end {
    printf("Redirected f*sync by pid %d to fd %d, success %d times, failed %d times.\n",
        target(), dummy_fd, guilt, agony)
    printf("Preserved f*sync by other processes %d times.\n", piety)
}

Spamworldpro Mini