__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
Demonstrations of klockstat, the Linux eBPF/bcc version.

klockstat traces kernel mutex lock events and display locks statistics

# klockstat.py
Tracing lock events... Hit Ctrl-C to end.
^C
                                  Caller   Avg Spin  Count   Max spin Total spin
                      psi_avgs_work+0x2e       3675      5       5468      18379
                     flush_to_ldisc+0x22       2833      2       4210       5667
                       n_tty_write+0x30c       3914      1       3914       3914
                               isig+0x5d       2390      1       2390       2390
                   tty_buffer_flush+0x2a       1604      1       1604       1604
                      commit_echoes+0x22       1400      1       1400       1400
          n_tty_receive_buf_common+0x3b9       1399      1       1399       1399

                                  Caller   Avg Hold  Count   Max hold Total hold
                     flush_to_ldisc+0x22      42558      2      76135      85116
                      psi_avgs_work+0x2e      14821      5      20446      74106
          n_tty_receive_buf_common+0x3b9      12300      1      12300      12300
                       n_tty_write+0x30c      10712      1      10712      10712
                               isig+0x5d       3362      1       3362       3362
                   tty_buffer_flush+0x2a       3078      1       3078       3078
                      commit_echoes+0x22       3017      1       3017       3017


Every caller to using kernel's mutex is displayed on every line.

First portion of lines show the lock acquiring data, showing the
amount of time it took to acquired given lock.

  'Caller'       - symbol acquiring the mutex
  'Average Spin' - average time to acquire the mutex
  'Count'        - number of times mutex was acquired
  'Max spin'     - maximum time to acquire the mutex
  'Total spin'   - total time spent in acquiring the mutex

Second portion of lines show the lock holding data, showing the
amount of time it took to hold given lock.

  'Caller'       - symbol holding the mutex
  'Average Hold' - average time mutex was held
  'Count'        - number of times mutex was held
  'Max hold'     - maximum time mutex was held
  'Total hold'   - total time spent in holding the mutex

This works by tracing mutex_lock/unlock kprobes, updating the
lock stats in maps and processing them in the python part.


An -i option can be used to display stats in interval (5 seconds in example below):

# klockstat.py -i 5
Tracing lock events... Hit Ctrl-C to end.

                                  Caller   Avg Spin  Count   Max spin Total spin
                      psi_avgs_work+0x2e       3822     15       5650      57338
                     flush_to_ldisc+0x22       4630      1       4630       4630
                            work_fn+0x4f       4185      1       4185       4185

                                  Caller   Avg Hold  Count   Max hold Total hold
                      psi_avgs_work+0x2e      12155     15      15739     182329
                     flush_to_ldisc+0x22      13809      1      13809      13809
                            work_fn+0x4f       5274      1       5274       5274

                                  Caller   Avg Spin  Count   Max spin Total spin
                      psi_avgs_work+0x2e       3715     17       4374      63163

                                  Caller   Avg Hold  Count   Max hold Total hold
                      psi_avgs_work+0x2e      13141     17      19510     223399
^C


A -p option can be used to trace only selected process:

# klockstat.py -p 883
Tracing lock events... Hit Ctrl-C to end.
^C
                                  Caller   Avg Spin  Count   Max spin Total spin
                          pipe_wait+0xa9        625 412686      16930  258277958
                          pipe_read+0x3f        420 413425      16872  174017649
                         pipe_write+0x35        471 413425      16765  194792253

                                  Caller   Avg Hold  Count   Max hold Total hold
                          pipe_read+0x3f        473 413425      20063  195773647
                          pipe_wait+0xa9        604 412686      16972  249598153
                         pipe_write+0x35        481 413425      16944  199008064


A -c option can be used to display only callers with specific substring:

# klockstat.py  -c pipe_
Tracing lock events... Hit Ctrl-C to end.
^C
                                  Caller   Avg Spin  Count   Max spin Total spin
                          pipe_read+0x3f        422 469554      18665  198354705
                          pipe_wait+0xa9        679 469536      17196  319017069
                         pipe_write+0x35        469 469554      17057  220338525

                                  Caller   Avg Hold  Count   Max hold Total hold
                         pipe_write+0x35        638 469554      17330  299857180
                          pipe_wait+0xa9        779 469535      16912  366047392
                          pipe_read+0x3f        575 469554      13251  270005394


An -n option can be used to display only specific number of callers:

# klockstat.py -n 3
Tracing lock events... Hit Ctrl-C to end.
^C
                                  Caller   Avg Spin  Count   Max spin Total spin
                          pipe_read+0x3f        420 334120      16964  140632284
                          pipe_wait+0xa9        688 334116      16876  229957062
                         pipe_write+0x35        463 334120      16791  154981747

                                  Caller   Avg Hold  Count   Max hold Total hold
                     flush_to_ldisc+0x22      27754      3      63270      83264
                          pipe_read+0x3f        571 334120      17123  190976463
                          pipe_wait+0xa9        759 334115      17068  253747213


An -s option can be used to display number of callers backtrace entries:

# klockstat.py -n 1 -s 3
Tracing lock events... Hit Ctrl-C to end.
^C
                                  Caller   Avg Spin  Count   Max spin Total spin
                          pipe_wait+0xa9        685 811947      17376  556542328
                          pipe_wait+0xa9
                         pipe_read+0x206

                                  Caller   Avg Hold  Count   Max hold Total hold
                     flush_to_ldisc+0x22      28145      3      63872      84437
                     flush_to_ldisc+0x22
                  process_one_work+0x1b0


Output can be sorted by using -S <fields> option on various
fields, the acq_total will force the acquired table to be
sorted on 'Total spin' column:

# klockstat.py -S acq_total
Tracing lock events... Hit Ctrl-C to end.
^C
                                  Caller   Avg Spin  Count   Max spin Total spin
                          pipe_wait+0xa9        691 269343      17190  186263983
                         pipe_write+0x35        464 269351      11730  125205417
                          pipe_read+0x3f        422 269351      17107  113724697
                      psi_avgs_work+0x2e       2499     11       4454      27494
                     flush_to_ldisc+0x22       3111      3       5096       9334
                       n_tty_write+0x30c       2764      1       2764       2764
                               isig+0x5d       1287      1       1287       1287
                   tty_buffer_flush+0x2a        961      1        961        961
                      commit_echoes+0x22        892      1        892        892
          n_tty_receive_buf_common+0x3b9        868      1        868        868

                                  Caller   Avg Hold  Count   Max hold Total hold
                          pipe_wait+0xa9        788 269343      17128  212496240
                         pipe_write+0x35        637 269351      17209  171596811
                          pipe_read+0x3f        585 269351      11834  157606323
                      psi_avgs_work+0x2e       8726     11      19177      95996
                     flush_to_ldisc+0x22      22158      3      43731      66474
                       n_tty_write+0x30c       9770      1       9770       9770
          n_tty_receive_buf_common+0x3b9       6830      1       6830       6830
                               isig+0x5d       3114      1       3114       3114
                   tty_buffer_flush+0x2a       2032      1       2032       2032
                      commit_echoes+0x22       1616      1       1616       1616

Filemanager

Name Type Size Permission Actions
lib Folder 0755
argdist_example.txt File 22.49 KB 0644
bashreadline_example.txt File 882 B 0644
bindsnoop_example.txt File 4.42 KB 0644
biolatency_example.txt File 23.46 KB 0644
biolatpcts_example.txt File 2.97 KB 0644
biopattern_example.txt File 1.37 KB 0644
biosnoop_example.txt File 3.47 KB 0644
biotop_example.txt File 9.11 KB 0644
bitesize_example.txt File 4.98 KB 0644
bpflist_example.txt File 2.13 KB 0644
btrfsdist_example.txt File 9.32 KB 0644
btrfsslower_example.txt File 6.65 KB 0644
cachestat_example.txt File 3.92 KB 0644
cachetop_example.txt File 3.83 KB 0644
capable_example.txt File 6.5 KB 0644
cobjnew_example.txt File 2.97 KB 0644
compactsnoop_example.txt File 9.92 KB 0644
cpudist_example.txt File 16.48 KB 0644
cpuunclaimed_example.txt File 15.2 KB 0644
criticalstat_example.txt File 4.81 KB 0644
cthreads_example.txt File 2.08 KB 0644
dbslower_example.txt File 3.89 KB 0644
dbstat_example.txt File 6.5 KB 0644
dcsnoop_example.txt File 4.27 KB 0644
dcstat_example.txt File 3.26 KB 0644
deadlock_example.txt File 16.25 KB 0644
dirtop_example.txt File 4.98 KB 0644
drsnoop_example.txt File 5 KB 0644
execsnoop_example.txt File 6.64 KB 0644
exitsnoop_example.txt File 6.22 KB 0644
ext4dist_example.txt File 8.78 KB 0644
ext4slower_example.txt File 11.07 KB 0644
filegone_example.txt File 743 B 0644
filelife_example.txt File 2.04 KB 0644
fileslower_example.txt File 5.58 KB 0644
filetop_example.txt File 6.8 KB 0644
funccount_example.txt File 13.29 KB 0644
funcinterval_example.txt File 15.28 KB 0644
funclatency_example.txt File 20.98 KB 0644
funcslower_example.txt File 6.63 KB 0644
gethostlatency_example.txt File 1.29 KB 0644
hardirqs_example.txt File 37.05 KB 0644
inject_example.txt File 6.67 KB 0644
javacalls_example.txt File 3.91 KB 0644
javaflow_example.txt File 5.88 KB 0644
javagc_example.txt File 3.78 KB 0644
javaobjnew_example.txt File 2.97 KB 0644
javastat_example.txt File 2.98 KB 0644
javathreads_example.txt File 2.08 KB 0644
killsnoop_example.txt File 1.31 KB 0644
klockstat_example.txt File 8.34 KB 0644
kvmexit_example.txt File 11.63 KB 0644
llcstat_example.txt File 3.24 KB 0644
mdflush_example.txt File 1.74 KB 0644
memleak_example.txt File 10.02 KB 0644
mountsnoop_example.txt File 1.45 KB 0644
mysqld_qslower_example.txt File 2.3 KB 0644
netqtop_example.txt File 12.2 KB 0644
nfsdist_example.txt File 8.31 KB 0644
nfsslower_example.txt File 7.68 KB 0644
nodegc_example.txt File 3.78 KB 0644
nodestat_example.txt File 2.98 KB 0644
offcputime_example.txt File 19.2 KB 0644
offwaketime_example.txt File 37.36 KB 0644
oomkill_example.txt File 1.88 KB 0644
opensnoop_example.txt File 10.33 KB 0644
perlcalls_example.txt File 3.91 KB 0644
perlflow_example.txt File 5.88 KB 0644
perlstat_example.txt File 2.98 KB 0644
phpcalls_example.txt File 3.91 KB 0644
phpflow_example.txt File 5.88 KB 0644
phpstat_example.txt File 2.98 KB 0644
pidpersec_example.txt File 677 B 0644
ppchcalls_example.txt File 6.93 KB 0644
profile_example.txt File 31.08 KB 0644
pythoncalls_example.txt File 3.91 KB 0644
pythonflow_example.txt File 5.88 KB 0644
pythongc_example.txt File 3.78 KB 0644
pythonstat_example.txt File 2.98 KB 0644
rdmaucma_example.txt File 1.94 KB 0644
readahead_example.txt File 3.17 KB 0644
reset-trace_example.txt File 9.15 KB 0644
rubycalls_example.txt File 3.91 KB 0644
rubyflow_example.txt File 5.88 KB 0644
rubygc_example.txt File 3.78 KB 0644
rubyobjnew_example.txt File 2.97 KB 0644
rubystat_example.txt File 2.98 KB 0644
runqlat_example.txt File 31.3 KB 0644
runqlen_example.txt File 11.85 KB 0644
runqslower_example.txt File 2.13 KB 0644
shmsnoop_example.txt File 2.73 KB 0644
slabratetop_example.txt File 5.22 KB 0644
sofdsnoop_example.txt File 3.14 KB 0644
softirqs_example.txt File 11.02 KB 0644
solisten_example.txt File 2.3 KB 0644
sslsniff_example.txt File 6.74 KB 0644
stackcount_example.txt File 21.45 KB 0644
statsnoop_example.txt File 3.02 KB 0644
swapin.txt File 2.57 KB 0644
swapin_example.txt File 1.39 KB 0644
syncsnoop_example.txt File 387 B 0644
syscount_example.txt File 6.27 KB 0644
tclcalls_example.txt File 3.91 KB 0644
tclflow_example.txt File 5.88 KB 0644
tclobjnew_example.txt File 2.97 KB 0644
tclstat_example.txt File 2.98 KB 0644
tcpaccept_example.txt File 2.76 KB 0644
tcpcong_example.txt File 33.31 KB 0644
tcpconnect_example.txt File 6.27 KB 0644
tcpconnlat_example.txt File 2.55 KB 0644
tcpdrop_example.txt File 1.95 KB 0644
tcplife_example.txt File 6.83 KB 0644
tcpretrans_example.txt File 3.85 KB 0644
tcprtt_example.txt File 9.83 KB 0644
tcpstates_example.txt File 2.84 KB 0644
tcpsubnet_example.txt File 5.37 KB 0644
tcpsynbl_example.txt File 1.15 KB 0644
tcptop_example.txt File 5.75 KB 0644
tcptracer_example.txt File 1.98 KB 0644
threadsnoop_example.txt File 1.07 KB 0644
tplist_example.txt File 4.4 KB 0644
trace_example.txt File 21.62 KB 0644
ttysnoop_example.txt File 3.24 KB 0644
vfscount_example.txt File 2.17 KB 0644
vfsstat_example.txt File 1.66 KB 0644
virtiostat_example.txt File 2.62 KB 0644
wakeuptime_example.txt File 33.25 KB 0644
xfsdist_example.txt File 6.77 KB 0644
xfsslower_example.txt File 6.91 KB 0644
zfsdist_example.txt File 9.52 KB 0644
zfsslower_example.txt File 7.37 KB 0644
Filemanager