003 File Manager
Current Path:
/usr/src/cddl/usr.sbin/dwatch/libexec
usr
/
src
/
cddl
/
usr.sbin
/
dwatch
/
libexec
/
📁
..
📄
Makefile
(4.66 KB)
📄
chmod
(1.65 KB)
📄
errno
(1.22 KB)
📄
io
(3.09 KB)
📄
ip
(1.76 KB)
📄
kill
(1.19 KB)
📄
nanosleep
(1.44 KB)
📄
open
(1.48 KB)
📄
proc
(3.88 KB)
📄
rw
(1.8 KB)
📄
sched
(2.9 KB)
📄
sendrecv
(6.32 KB)
📄
systop
(2.22 KB)
📄
tcp
(5.37 KB)
📄
udp
(2.29 KB)
📄
udplite
(2.35 KB)
📄
vop_create
(4.96 KB)
📄
vop_readdir
(4.71 KB)
📄
vop_rename
(8.11 KB)
📄
vop_symlink
(5.04 KB)
Editing: systop
# -*- tab-width: 4 -*- ;; Emacs # vi: set filetype=sh tabstop=8 shiftwidth=8 noexpandtab :: Vi/ViM ############################################################ IDENT(1) # # $Title: dwatch(8) profile for top-like syscall $ # $Copyright: 2014-2018 Devin Teske. All rights reserved. $ # $FreeBSD$ # ############################################################ DESCRIPTION # # Every 3 seconds update the screen with syscall consumers. # ############################################################ PRAGMAS # Optional: You can override the default pragmas (shown below) DTRACE_PRAGMA=" option quiet option aggsortrev " # END-QUOTE ############################################################ PROBE : ${PROBE:=profile:::tick-3s} ############################################################ ACTIONS exec 9<<EOF BEGIN { printf("Sampling ...") } /* probe ID $ID */ syscall:::entry /* probe ID $(( $ID + 1 )) */ { @num[probefunc,execname] = count(); } END { trunc(@num) } /* probe ID $(( $ID + 2 )) */ EOF ACTIONS=$( cat <&9 ) ID=$(( $ID + 3 )) ############################################################ EVENT TAG # The EVENT_TAG is run inside the print action after the timestamp has been # printed. By default, `UID.GID CMD[PID]: ' of the process is printed. # # Here we override the default EVENT_TAG to include ANSI cursor-homing and # screen-clearing codes. size=$( stty size 2> /dev/null ) rows="${size%% *}" cols="${size#* }" exec 9<<EOF printf("\033[H"); /* Position the cursor at top-left */ printf("\033[J"); /* Clear display from cursor to end */ /* Header line containing probe (left) and date (right) */ printf("%-*s%s%Y%s\n", $(( ${cols:-80} - 20 )), "$PROBE", console ? "\033[32m" : "", walltimestamp, console ? "\033[39m" : ""); /* Column headers */ printf("%s%8s %-20s %s%s\n", console ? "\033[1m" : "", "COUNT", "SYSCALL", "EXECNAME", console ? "\033[22m" : ""); EOF EVENT_TAG=$( cat <&9 ) ############################################################ EVENT DETAILS exec 9<<EOF printa("%@8u %-20s %s\n", @num); trunc(@num); EOF EVENT_DETAILS=$( cat <&9 ) ################################################################################ # END ################################################################################
Upload File
Create Folder