'\" t .\" Title: sockdebug .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 04/06/2024 .\" Manual: NUT Manual .\" Source: Network UPS Tools 2.8.1 .\" Language: English .\" .TH "SOCKDEBUG" "8" "04/06/2024" "Network UPS Tools 2\&.8\&.1" "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" sockdebug \- simple developer/troubleshooting aid utility to communicate with a NUT driver using the socket protocol .SH "SYNOPSIS" .sp \fBsockdebug\fR socketname .sp For example (WIN32 and POSIX builds): .sp .nf sockdebug\&.exe dummy\-ups\-UPS1 .fi .sp For example (POSIX\-compliant systems using an alternate state path): .sp .nf sockdebug /var/state/ups/dummy\-ups\-UPS1 .fi .SH "DESCRIPTION" .sp \fBsockdebug\fR is a tool built when NUT configure \-\-with\-dev is enabled\&. It may alternatively be built by calling make sockdebug in the root of the build workspace\&. Actual source files used depend on the platform\&. .sp It is used to connect to a NUT driver using the socket protocol on an Unix socket or Windows pipe, similarly to how the \fBupsd\fR(8) data server talks to the locally running drivers in order to represent them on the network further using the common NUT protocol of the Network UPS Tools project, or how driver programs can communicate to their already running instances to implement commands like live reload\-or\-error\&. .sp This tool allows a developer or troubleshooter to watch the broadcast updates emitted by the driver, as well as to issue unicast commands and receive replies (during an interactive investigation session, you may want to command NOBROADCAST first)\&. .sp For more details see the docs/sock\-protocol\&.txt file in NUT sources\&. .SH "OPTIONS" .sp \fBsockdebug\fR accepts (and requires) the following option: .PP \fBsocketname\fR .RS 4 Either a full path (in POSIX builds) or the base name of device socket/pipe (on all platforms), comprised of a drivername\-devicename tuple, e\&.g\&. some dummy\-ups\-UPS1 for a dummy\-ups driver instance handling an UPS1 device configuration (which in turn may originate in the ups\&.conf file or be dynamically constructed for tests by calling the driver program with a \-s TMP CLI option)\&. .sp On POSIX systems, if this argument only represents a base name and not a full path to the Unix socket file, the tool should first look for the file in the current directory, and then fall back to configured (built\-in) state path or the value of NUT_STATEPATH environment variable, if set; e\&.g\&.: .sp .if n \{\ .RS 4 .\} .nf NUT_STATEPATH=/tmp \&./server/sockdebug dummy\-ups\-UPS1 .fi .if n \{\ .RE .\} .RE .SH "AUTHORS" .sp This manual page was written by Jim Klimov \&. .sp The program was originally written by Russell Kroll (POSIX version), and by Frederic Bohe (Windows version)\&. .SH "SEE ALSO" .sp \fBupsd\fR(8) .SS "Internet resources:" .sp The NUT (Network UPS Tools) home page: https://www\&.networkupstools\&.org/