From ee658c359d5b012f507cfe7c5b65f94b59bc11ea Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Sat, 24 Jun 2023 13:20:15 -0700 Subject: [PATCH] Clarify docs and error strings for scsimon (#1175) * Better usage hints in scsimon man page * In error message, clarify that piscsi needs to be shut down --- cpp/hal/gpiobus_raspberry.cpp | 4 ++-- doc/scsimon.1 | 4 +++- doc/scsimon_man_page.txt | 22 ++++++++++++++-------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/cpp/hal/gpiobus_raspberry.cpp b/cpp/hal/gpiobus_raspberry.cpp index c3dfe3ca..fb3ba249 100644 --- a/cpp/hal/gpiobus_raspberry.cpp +++ b/cpp/hal/gpiobus_raspberry.cpp @@ -183,7 +183,7 @@ bool GPIOBUS_Raspberry::Init(mode_e mode) // GPIO chip open fd = open("/dev/gpiochip0", 0); if (fd == -1) { - LOGERROR("Unable to open /dev/gpiochip0. Is PiSCSI or RaSCSI already running?") + LOGERROR("Unable to open /dev/gpiochip0. If PiSCSI is running, please shut it down first.") return false; } @@ -199,7 +199,7 @@ bool GPIOBUS_Raspberry::Init(mode_e mode) // Get event request if (ioctl(fd, GPIO_GET_LINEEVENT_IOCTL, &selevreq) == -1) { - LOGERROR("Unable to register event request. Is PiSCSI or RaSCSI already running?") + LOGERROR("Unable to register event request. If PiSCSI is running, please shut it down first.") close(fd); return false; } diff --git a/doc/scsimon.1 b/doc/scsimon.1 index 48a76230..7b971803 100644 --- a/doc/scsimon.1 +++ b/doc/scsimon.1 @@ -18,9 +18,11 @@ To quit scsimon, press Control + C. None .SH EXAMPLES -Launch scsimon to capture all SCSI traffic available to the PiSCSI hardware: +Make sure you've stopped the piscsi service. Then launch scsimon to capture all SCSI traffic available to the PiSCSI hardware: scsimon +If you're trying to capture a specific scenario, you'll want to wait to start scsimon until immediately before the scenario. + .SH SEE ALSO scsictl(1), piscsi(1), scsidump(1) diff --git a/doc/scsimon_man_page.txt b/doc/scsimon_man_page.txt index 97b7e1bf..f708fbfa 100644 --- a/doc/scsimon_man_page.txt +++ b/doc/scsimon_man_page.txt @@ -2,20 +2,22 @@ !! ------ The native file is scsimon.1. Re-run 'make docs' after updating -scsimon(1) General Commands Manual scsimon(1) +scsimon(1) General Commands Manual scsimon(1) NAME - scsimon - Acts as a data capture tool for all traffic on the SCSI bus. Data is stored in a Value Change Dump (VCD) file. + scsimon - Acts as a data capture tool for all traffic on the SCSI bus. Data is stored in a Value Change Dump + (VCD) file. SYNOPSIS scsimon DESCRIPTION - scsimon monitors all of the traffic on the SCSI bus, using a PiSCSI device. The data is cached in memory while the tool is - running. A circular buffer is used so that only the most recent 1,000,000 transactions are stored. The tool will continue - to run until the user presses CTRL-C, or the process receives a SIGINT signal. + scsimon monitors all of the traffic on the SCSI bus, using a PiSCSI device. The data is cached in memory while + the tool is running. A circular buffer is used so that only the most recent 1,000,000 transactions are stored. + The tool will continue to run until the user presses CTRL-C, or the process receives a SIGINT signal. - The logged data is stored in a file called "log.vcd" in the current working directory from where scsimon was launched. + The logged data is stored in a file called "log.vcd" in the current working directory from where scsimon was + launched. Currently, scsimon doesn't accept any arguments. @@ -25,12 +27,16 @@ OPTIONS None EXAMPLES - Launch scsimon to capture all SCSI traffic available to the PiSCSI hardware: + Make sure you've stopped the piscsi service. Then launch scsimon to capture all SCSI traffic available to the + PiSCSI hardware: scsimon + If you're trying to capture a specific scenario, you'll want to wait to start scsimon until immediately before + the scenario. + SEE ALSO scsictl(1), piscsi(1), scsidump(1) Full documentation is available at: - scsimon(1) + scsimon(1)