![]() 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/self/root/opt/rh/gcc-toolset-11/root/usr/share/systemtap/examples/virtualization/ |
#!/opt/rh/gcc-toolset-11/root/usr/bin/stap # # Copyright (C) 2011 Red Hat, Inc. # Written by William Cohen <[email protected]> # # The qemu_io.stp script tallies the number of times each of the IO # port on the guest virtual machines is touched by a input or output # operation. When the script exits, it prints a count of the number of # times each IO port read and written. global cpu_in, cpu_out probe qemu.*.*.cpu_in?, qemu.kvm.cpu_in? { cpu_in[addr]++ } probe qemu.*.*.cpu_out?, qemu.kvm.cpu_out? {cpu_out[addr]++ } probe end { # write out the data printf("\ncpu_in\n%6s %8s\n","port", "count") foreach (addr+ in cpu_in) printf("0x%04x %8d\n", addr, cpu_in[addr]) printf("\ncpu_out\n%6s %8s\n","port", "count") foreach (addr+ in cpu_out) printf("0x%04x %8d\n", addr, cpu_out[addr]) }