Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!princeton!phoenix!subbarao From: subbarao@phoenix.Princeton.EDU (Kartik Saligrama Subbarao) Newsgroups: news.newusers.questions Subject: The word on w and Talk Message-ID: <11833@phoenix.Princeton.EDU> Date: 30 Nov 89 14:54:34 GMT Reply-To: subbarao@phoenix.Princeton.EDU () Organization: Princeton University, NJ Lines: 71 The w command is a very interesting and useful one! I quote SYNTAX w [ -h ] [ -s ] [ -l ] [ user ] DESCRIPTION The w command prints a summary of the current activity on the system, including what each user is doing. The heading line shows the current time of day, how long the system has been up, the number of users logged into the system, and the load averages. The load average numbers give the number of jobs in the run queue averaged over 1, 5 and 15 minutes. The fields output are: the users login name, the name of the tty the user is on, the time of day the user logged on, the number of minutes since the user last typed anything, the CPU time used by all processes and their children on that terminal, the CPU time used by the currently active processes, the name and arguments of the current process. The -h flag suppresses the heading. The -s flag asks for a short form of output. In the short form, the tty is abbre- viated, the login time and cpu times are left off, as are the arguments to commands. -l gives the long output, which is the default. The -d flag outputs debug information. The -u flag outputs the same information uptime command. If a user name is included, the output will be restricted to that user. RESTRICTIONS The notion of the ``current process'' is unclear. The current algorithm is roughly ``the last process started on the terminal that is not ignoring interrupts, or, if there is none, the last process started on the terminal''. 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 to ignore interrupts. (In cases where no process can be found, _w prints ``-''.) Background processes are not shown, even though they account for much of the load on the system. Sometimes processes, typically those in the background, are printed with null or garbaged arguments. In these cases, the name of the command is printed in parentheses. Mind you, the w command is not perfect, and it won't be accurate 100% of the time. But as far as getting info on other people, the w command is GREAT! Alas, it is not supported on all UNIX systems -- In that case, look up finger, who, rusers, rwho and similar commands! As to talking to a SPECIFIC window, you first have to get the person's tty# (with w or some other command). Then, it is simple. Type talk userid tty# where tty# is the tty on which you want to talk to the person. That's all there is to it! -An up and coming UNIX personality, Kartik Subbarao P.S. Please, no Miss Manners on talk!! PLEASE!!!! subbarao@phoenix.princeton.edu subbarao@gauguin.princeton.edu subbarao@bogey.princeton.edu