xref: /freebsd/usr.sbin/watch/watch.8 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
116ae87aeSPaul Traina.\"
21995d3a4SDima Dorfman.Dd November 24, 2001
315c592c7SUgen J.S. Antsilevich.Dt WATCH 8
415c592c7SUgen J.S. Antsilevich.Os
515c592c7SUgen J.S. Antsilevich.Sh NAME
616ae87aeSPaul Traina.Nm watch
716ae87aeSPaul Traina.Nd snoop on another tty line
84a8d0283SMike Pritchard.Sh SYNOPSIS
9e97407b4SRuslan Ermilov.Nm
103278021bSDima Dorfman.Op Fl cinotW
111995d3a4SDima Dorfman.Op Fl f Ar snpdev
12840c0de7SAlexey Zelkin.Op Ar tty
1315c592c7SUgen J.S. Antsilevich.Sh DESCRIPTION
14490d5836SPhilippe CharnierThe
15490d5836SPhilippe Charnier.Nm
16490d5836SPhilippe Charnierutility allows the user to examine all data coming through a specified tty
17d3573aabSDima Dorfmanusing the
18d3573aabSDima Dorfman.Xr snp 4
19d3573aabSDima Dorfmandevice.
20d3573aabSDima DorfmanIf the
21d3573aabSDima Dorfman.Xr snp 4
22d3573aabSDima Dorfmandevice is not available,
23d3573aabSDima Dorfman.Nm
24d3573aabSDima Dorfmanwill attempt to load the module
25d3573aabSDima Dorfman.Pq Nm snp .
26490d5836SPhilippe CharnierThe
27490d5836SPhilippe Charnier.Nm
28490d5836SPhilippe Charnierutility writes to standard output.
2916ae87aeSPaul Traina.Pp
3016ae87aeSPaul TrainaThe options are as follows:
31dc763e50SPhilippe Charnier.Bl -tag -width indent
3216ae87aeSPaul Traina.It Fl c
3307bfccd7SRuslan ErmilovReconnect on close.
3407bfccd7SRuslan ErmilovIf the tty observed by
35dc763e50SPhilippe Charnier.Nm
3616ae87aeSPaul Trainais closed, automatically reattach to the same tty.
3716ae87aeSPaul TrainaIf this option is not specified,
38dc763e50SPhilippe Charnier.Nm
3916ae87aeSPaul Trainawill request a new tty if running in interactive mode or exit if running
4016ae87aeSPaul Trainawithout a controlling tty.
411995d3a4SDima Dorfman.It Fl f Ar snpdev
421995d3a4SDima DorfmanIf this option is specified,
431995d3a4SDima Dorfman.Nm
441995d3a4SDima Dorfmanwill use
451995d3a4SDima Dorfman.Ar snpdev
461995d3a4SDima Dorfmanas the
471995d3a4SDima Dorfman.Xr snp 4
481995d3a4SDima Dorfmandevice.
491995d3a4SDima DorfmanWithout this option,
501995d3a4SDima Dorfman.Nm
511995d3a4SDima Dorfmanwill attempt to find the next available
521995d3a4SDima Dorfman.Xr snp 4
531995d3a4SDima Dorfmandevice.
5416ae87aeSPaul Traina.It Fl i
5516ae87aeSPaul TrainaForce interactive mode.
5616ae87aeSPaul TrainaInteractive mode is a default if
57dc763e50SPhilippe Charnier.Nm
5816ae87aeSPaul Trainais started from a tty.
5916ae87aeSPaul TrainaIf output is redirected to a file, interactive mode can still be requested
6016ae87aeSPaul Trainaby specifying this option.
613278021bSDima Dorfman.It Fl n
6207bfccd7SRuslan ErmilovDisable the ability to switch the watched tty interactively.
6307bfccd7SRuslan ErmilovThis disables
643278021bSDima Dorfmanboth change requests made with <control-X> as well as automatic prompting
6507bfccd7SRuslan Ermilovwhen the current tty is closed or overflows.
6607bfccd7SRuslan ErmilovIn all cases where a prompt
673278021bSDima Dorfmanwould be displayed,
683278021bSDima Dorfman.Nm
6907bfccd7SRuslan Ermilovwill exit.
7007bfccd7SRuslan ErmilovThe reconnect flags are unaffected by
713278021bSDima Dorfmanthis option.
723278021bSDima DorfmanWhen this flag is used, <control-X> is passed through to the terminal.
7316ae87aeSPaul Traina.It Fl o
7416ae87aeSPaul TrainaReconnect on overflow.
754a8d0283SMike PritchardThe behavior of
76dc763e50SPhilippe Charnier.Nm
7716ae87aeSPaul Trainaif the observed tty overflows is similar to the behavior if the observed tty
7816ae87aeSPaul Trainais closed.
7916ae87aeSPaul TrainaFor more info see
8016ae87aeSPaul Traina.Xr snp 4 .
8116ae87aeSPaul Traina.It Fl t
8216ae87aeSPaul TrainaPrint the date and time when observation of a given tty is started.
83c1209799SUgen J.S. Antsilevich.It Fl W
84c1209799SUgen J.S. AntsilevichAllow write access to observed tty.
8516ae87aeSPaul Traina.It Ar tty
86d64ada50SJens SchweikhardtTty may be specified as a tty-style device, such as a pseudo tty device,
87cb95dc24SPaul Trainaa virtual console, or a serial line, etc.
881e7ae6a9SPhilippe CharnierNames may be preceded by
891e7ae6a9SPhilippe Charnier.Pa /dev/ .
901e7ae6a9SPhilippe Charnier.El
9116ae87aeSPaul Traina.Sh OPERATION
9216ae87aeSPaul TrainaWhile running in interactive mode, all user input is discarded except for:
9316ae87aeSPaul Traina.Pp
9416ae87aeSPaul Traina.Bl -tag -width "XXXX" -compact
9533bdf4c4SJordan K. Hubbard.It Sy "<control-G>"
9616ae87aeSPaul TrainaExit
97e97407b4SRuslan Ermilov.Nm .
9816ae87aeSPaul Traina.It Sy "<control-W>"
9916ae87aeSPaul TrainaClear screen.
10016ae87aeSPaul Traina.It Sy "<control-X>"
10122f94a0aSRobert WatsonChange attached tty, unless this feature is disabled, in which case
10222f94a0aSRobert Watsoncontrol-X is passed to the terminal as with other control characters.
1031e7ae6a9SPhilippe Charnier.El
10415c592c7SUgen J.S. Antsilevich.Sh SEE ALSO
10516ae87aeSPaul Traina.Xr pty 4 ,
106d3573aabSDima Dorfman.Xr snp 4 ,
107d3573aabSDima Dorfman.Xr kldload 8
10815c592c7SUgen J.S. Antsilevich.Sh HISTORY
109490d5836SPhilippe CharnierThe
110490d5836SPhilippe Charnier.Nm
111490d5836SPhilippe Charnierutility first appeared in
11285cf659aSMike Pritchard.Fx 2.1 .
11359a3c79dSRuslan Ermilov.Sh AUTHORS
114*01c2b8acSBaptiste Daroussin.An Ugen J.S. Antsilevich Aq Mt ugen@NetVision.net.il
11559a3c79dSRuslan Ermilov.Sh BUGS
11659a3c79dSRuslan ErmilovNo terminal emulation is performed.
11759a3c79dSRuslan ErmilovAll user output is reproduced as-is.
118