Changeset View
Changeset View
Standalone View
Standalone View
head/usr.bin/w/w.1
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)w.1 8.1 (Berkeley) 6/6/93 | .\" @(#)w.1 8.1 (Berkeley) 6/6/93 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd December 1, 2015 | .Dd August 24, 2020 | ||||
.Dt W 1 | .Dt W 1 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm w | .Nm w | ||||
.Nd "display who is logged in and what they are doing" | .Nd "display who is logged in and what they are doing" | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl -libxo | .Op Fl -libxo | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
If one or more | If one or more | ||||
.Ar user | .Ar user | ||||
names are specified, the output is restricted to those users. | names are specified, the output is restricted to those users. | ||||
.Sh FILES | .Sh FILES | ||||
.Bl -tag -width ".Pa /var/run/utx.active" -compact | .Bl -tag -width ".Pa /var/run/utx.active" -compact | ||||
.It Pa /var/run/utx.active | .It Pa /var/run/utx.active | ||||
list of users on the system | list of users on the system | ||||
.El | .El | ||||
.Sh EXAMPLES | |||||
Show global activity of the system: | |||||
.Bd -literal -offset indent | |||||
$ w | |||||
8:05PM up 35 mins, 3 users, load averages: 0.09, 0.35, 0.27 | |||||
USER TTY FROM LOGIN@ IDLE WHAT | |||||
fernape v0 - 7:30PM - tmux: client (/tmp/tmux-1001/default) (tmux) | |||||
root v1 - 8:03PM 1 -bash (bash) | |||||
fernape pts/0 tmux(1391).%0 8:04PM - w | |||||
.Ed | |||||
.Pp | |||||
Show the entire process list per tty: | |||||
.Bd -literal -offset indent | |||||
$ w -d | |||||
8:12PM up 42 mins, 3 users, load averages: 0.01, 0.11, 0.17 | |||||
USER TTY FROM LOGIN@ IDLE WHAT | |||||
1199 login [pam] (login) | |||||
1207 -bash (bash) | |||||
1507 tmux: client (/tmp/tmux-1001/default) (tmux) | |||||
fernape v0 - 7:30PM - tmux: client (/tmp/tmux-1001/default) (tmux) | |||||
1488 login [pam] (login) | |||||
1489 -bash (bash) | |||||
root v1 - 8:08PM 3 -bash (bash) | |||||
1510 -bash (bash) | |||||
1515 w -d | |||||
fernape pts/0 tmux(1509).%0 8:11PM - w -d | |||||
.Ed | |||||
.Pp | |||||
Same as above but only for the root user and omitting the heading: | |||||
.Bd -literal -offset indent | |||||
$ w -d -h root | |||||
1183 login [pam] (login) | |||||
1204 -bash (bash) | |||||
root v1 - 7:15PM - -bash (bash) | |||||
.Ed | |||||
.Sh COMPATIBILITY | .Sh COMPATIBILITY | ||||
The | The | ||||
.Fl f , | .Fl f , | ||||
.Fl l , | .Fl l , | ||||
.Fl s , | .Fl s , | ||||
and | and | ||||
.Fl w | .Fl w | ||||
flags are no longer supported. | flags are no longer supported. | ||||
Show All 22 Lines | |||||
This fails, for example, in critical sections of programs like the shell | This fails, for example, in critical sections of programs like the shell | ||||
and editor, or when faulty programs running in the background fork and fail | and editor, or when faulty programs running in the background fork and fail | ||||
to ignore interrupts. | to ignore interrupts. | ||||
(In cases where no process can be found, | (In cases where no process can be found, | ||||
.Nm | .Nm | ||||
prints | prints | ||||
.Ql \- . ) | .Ql \- . ) | ||||
.Pp | .Pp | ||||
The | The CPU time is only an estimate, in particular, if someone leaves a background | ||||
.Tn CPU | |||||
time is only an estimate, in particular, if someone leaves a background | |||||
process running after logging out, the person currently on that terminal is | process running after logging out, the person currently on that terminal is | ||||
.Dq charged | .Dq charged | ||||
with the time. | with the time. | ||||
.Pp | .Pp | ||||
Background processes are not shown, even though they account for | Background processes are not shown, even though they account for | ||||
much of the load on the system. | much of the load on the system. | ||||
.Pp | .Pp | ||||
Sometimes processes, typically those in the background, are printed with | Sometimes processes, typically those in the background, are printed with | ||||
null or garbaged arguments. | null or garbaged arguments. | ||||
In these cases, the name of the command is printed in parentheses. | In these cases, the name of the command is printed in parentheses. | ||||
.Pp | .Pp | ||||
The | The | ||||
.Nm | .Nm | ||||
utility does not know about the new conventions for detection of background | utility does not know about the new conventions for detection of background | ||||
jobs. | jobs. | ||||
It will sometimes find a background job instead of the right one. | It will sometimes find a background job instead of the right one. |