1*c29d5175SchristosThe following is a demonstration of the dappprof command, 2*c29d5175Schristos 3*c29d5175SchristosThis is the usage for version 0.60, 4*c29d5175Schristos 5*c29d5175Schristos # dappprof -h 6*c29d5175Schristos USAGE: dappprof [-cehoTU] [-u lib] { -p PID | command } 7*c29d5175Schristos 8*c29d5175Schristos -p PID # examine this PID 9*c29d5175Schristos -a # print all details 10*c29d5175Schristos -c # print syscall counts 11*c29d5175Schristos -e # print elapsed times (us) 12*c29d5175Schristos -o # print on cpu times 13*c29d5175Schristos -T # print totals 14*c29d5175Schristos -u lib # trace this library instead 15*c29d5175Schristos -U # trace all libraries + user funcs 16*c29d5175Schristos -b bufsize # dynamic variable buf size 17*c29d5175Schristos eg, 18*c29d5175Schristos dappprof df -h # run and examine "df -h" 19*c29d5175Schristos dappprof -p 1871 # examine PID 1871 20*c29d5175Schristos dappprof -ap 1871 # print all data 21*c29d5175Schristos 22*c29d5175Schristos 23*c29d5175Schristos 24*c29d5175SchristosThe following shows running dappprof with the "banner hello" command. 25*c29d5175SchristosElapsed and on-cpu times are printed (-eo), as well as counts (-c) and 26*c29d5175Schristostotals (-T), 27*c29d5175Schristos 28*c29d5175Schristos # dappprof -eocT banner hello 29*c29d5175Schristos 30*c29d5175Schristos # # ###### # # #### 31*c29d5175Schristos # # # # # # # 32*c29d5175Schristos ###### ##### # # # # 33*c29d5175Schristos # # # # # # # 34*c29d5175Schristos # # # # # # # 35*c29d5175Schristos # # ###### ###### ###### #### 36*c29d5175Schristos 37*c29d5175Schristos 38*c29d5175Schristos CALL COUNT 39*c29d5175Schristos __fsr 1 40*c29d5175Schristos main 1 41*c29d5175Schristos banprt 1 42*c29d5175Schristos banner 1 43*c29d5175Schristos banset 1 44*c29d5175Schristos convert 5 45*c29d5175Schristos banfil 5 46*c29d5175Schristos TOTAL: 15 47*c29d5175Schristos 48*c29d5175Schristos CALL ELAPSED 49*c29d5175Schristos banset 37363 50*c29d5175Schristos banfil 147407 51*c29d5175Schristos convert 149606 52*c29d5175Schristos banprt 423507 53*c29d5175Schristos banner 891088 54*c29d5175Schristos __fsr 1694349 55*c29d5175Schristos TOTAL: 3343320 56*c29d5175Schristos 57*c29d5175Schristos CALL CPU 58*c29d5175Schristos banset 7532 59*c29d5175Schristos convert 8805 60*c29d5175Schristos banfil 11092 61*c29d5175Schristos __fsr 15708 62*c29d5175Schristos banner 48696 63*c29d5175Schristos banprt 388853 64*c29d5175Schristos TOTAL: 480686 65*c29d5175Schristos 66*c29d5175SchristosThe above output has analysed user functions (the default). It makes it 67*c29d5175Schristoseasy to identify which function is being called the most (COUNT), which 68*c29d5175Schristosis taking the most time (ELAPSED), and which is consuming the most CPU (CPU). 69*c29d5175SchristosThese times are totals for all the functions called. 70*c29d5175Schristos 71*c29d5175Schristos 72