aboutsummaryrefslogtreecommitdiff
path: root/cddl/usr.sbin/dwatch
Commit message (Collapse)AuthorAgeFilesLines
* Fix the build by just installing systop since testing shows it works with:Brad Davis2018-08-111-1/+1
| | | | | | | | | | dwatch -X systop Reviewed by: kp Approved by: allanjude (mentor) Notes: svn path=/head/; revision=337629
* dwatch(1): Add systop profileDevin Teske2018-08-112-0/+85
| | | | | | | | | | | Provides a top-like view of syscall consumers. MFC after: 3 days X-MFC-to: stable/11 Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=337611
* dwatch(1): Fix syntax error in vop_readdir profileDevin Teske2018-08-111-0/+1
| | | | | | | | | | Reported by: Arne Ehrlich <ehrlich@consider-it.de> MFC after: 3 days X-MFC-to: stable/11 Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=337610
* Add a dtrace provider for UDP-Lite.Michael Tuexen2018-07-312-0/+92
| | | | | | | | | | | | | | The dtrace provider for UDP-Lite is modeled after the UDP provider. This fixes the bug that UDP-Lite packets were triggering the UDP provider. Thanks to dteske@ for providing the dwatch module. Reviewed by: dteske@, markj@, rrs@ Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16377 Notes: svn path=/head/; revision=337018
* dwatch(1): Update manual to reference actual releaseDevin Teske2018-06-031-1/+1
| | | | | | | | | MFC after: 3 days X-MFC-to: stable/11 Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=334594
* dwatch(1): Fix "-t test" for post-processing profilesDevin Teske2018-05-291-3/+3
| | | | | | | | | | | | | Profiles that perform post-processing of the DTrace output were dropping the "-t test" option on the floor. Fix handling of this option for said profiles. X-MFC-to: stable/11 X-MFC-with: r334261-334262 Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=334359
* dwatch(1): Eliminate ANSI dimming in developer modeDevin Teske2018-05-271-4/+0
| | | | | | | | | | | | | "Developer mode" (passing of "-dev" options), which enables debugging features on compilation error, used to dim lines unrelated to error. That proved distracting and feedback from testers also confirmed that simply highlighting the line the compiler complains about is enough. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=334262
* dwatch(1): Guard against error when given -t "*..."Devin Teske2018-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | dwatch allows you to customnize the predicate (condition) for when information is displayed. The DTrace syntax for this is: probe[, ...] /predicate/ { [actions] } But if predicate is something like "*args[1]!=NULL" to test that the first pointer in an array is non-NULL, the syntax produced is: probe[, ...] /*arg1!=NULL/ { [actions] } The issue being that "/*" is the beginning of a comment and thus the following error is emitted: dtrace: failed to compile script /dev/stdin: line 535: /* encountered inside a comment This patch adds whitespace around the argument given to -t, producing: probe[, ...] / *arg1!=NULL / { [actions] } Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=334261
* dwatch(1): Refactor sendrecv profileDevin Teske2018-05-121-17/+29
| | | | | | | | | | The profile for send(2)/recv(2) observation has been refactored to eliminate alloca() in favor of translations available in HEAD. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333519
* dwatch(1): Expose process for ip/tcp/udpDevin Teske2018-05-123-63/+0
| | | | | | | | | | | Knowing the value of execname during these probes is of some value even if it is commonly the interrupt kernel thread (intr[12]) -- quite often it is not, but that depends on the probe. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333518
* dwatch(1): Allow `-E code' to override profile EVENT_DETAILSDevin Teske2018-05-1217-0/+34
| | | | | | | | | This allows quick changes to the formatted output of a profile. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333517
* dwatch(1): Export ARGV to profiles loaded via load_profile()Devin Teske2018-05-121-0/+43
| | | | | | | | | | | | A module that wishes to post-process the output needs to know which arguments were passed in order to re-execute a child in a pipe-chain. Further, the expansion of ARGV needs to be such that items are escaped properly. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333516
* dwatch(1): Simplify info message testDevin Teske2018-05-121-1/+1
| | | | | | | | | The info() function already tests $QUIET Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333515
* dwatch(1): Separate default values so `-[BK] num' don't affect usageDevin Teske2018-05-121-4/+10
| | | | | | | | | | | | | | | If you were to pass an invalid option after `-B num' or `-K num' you would see that the usage statement would show the value you passed instead of the actual default. Moving the default values to separate variables that are unaffected by the options-parsing allows the usage statement to correctly show the hard-coded default values if no flags are used. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333514
* dwatch(1): Bugfix, usage displayed with `-1Q'Devin Teske2018-05-121-3/+2
| | | | | | | | | | | A return statement should have been an exit in list_profiles(). If the user passed `-Q' to list profiles and asked for one-line per profile (`-1'), list_profiles() would not exit as should. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333513
* dwatch(1): Remove the line used to demonstrate `-dev' optionDevin Teske2018-04-221-1/+0
| | | | | | | | | | | In recently added sendrecv profile, there was a line purposefully added to introduce a compilation error in which `-dev' is used to debug the entry. Removing the entry. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=332867
* dwatch(1): Add profile for send(2)/recv(2) syscallsDevin Teske2018-04-222-0/+223
| | | | | | | Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=332866
* dwatch(1): Add `-dev' option to aid debugging of profilesDevin Teske2018-04-221-1/+63
| | | | | | | | | | | | | | | | | | | The options `-d' (debug), `-e' (exit after compile), and `-v' (verbose) when combined in any order (though best remembered as `-dev') will run the conflated script through dtrace(1), test for error conditions, and show the line that dtrace(1) failed at (with context). If no errors are found, the output is the same as `-e[v]'. When writing a new profile for dwatch(1), you can quickly test to make sure it compiles by running `dwatch -devX profile_name' where profiles live in /usr/libexec/dwatch or /usr/local/libexec/dwatch (the latter being where profiles installed via ports should go). Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=332865
* Fix display of wrong pid from dtrace_sched(4)Devin Teske2018-03-081-2/+2
| | | | | | | | | Fix a comment while here. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=330672
* Bump dwatch(1) internal version from 1.0-beta-91 to 1.0Devin Teske2018-03-061-1/+1
| | | | Notes: svn path=/head/; revision=330560
* Introduce dwatch(1) as a tool for making DTrace more usefulDevin Teske2018-03-0622-0/+4236
Reviewed by: markj, gnn, bdrewery (earlier version) Relnotes: yes Sponsored by: Smule, Inc. Differential Revision: https://reviews.freebsd.org/D10006 Notes: svn path=/head/; revision=330559