Skip to Main Content
Running Mac OS X Tiger
book

Running Mac OS X Tiger

by Jason Deraleau, James Duncan Davidson
December 2005
Intermediate to advanced content levelIntermediate to advanced
400 pages
11h 33m
English
O'Reilly Media, Inc.
Content preview from Running Mac OS X Tiger

Monitoring Users

You can see who ’s logged in to the machine right now using the who command, as shown in Example 12-11.

Example 12-11. Using the who command

$ who
jldera   console  Jun 11 12:28
jldera   ttyp1    Jun 11 15:04
jldera   ttyp2    Jun 11 15:26
panic    ttyp3    Jun 11 15:27 (localhost)

The console entry is the GUI shell that you are logged into. The ttyp entries are created by active Terminal windows.

The w command outputs a different format of this information, as shown in Example 12-12.

Example 12-12. Using the w command

$ w
15:28  up  3:07, 4 users, load averages: 0.96 0.68 0.55
USER     TTY      FROM              LOGIN@  IDLE WHAT
jldera   console  -                12:28    2:59 -
jldera   p1       -                15:04       - w
jldera   p2       -                15:26       1 bash
panic    p3       localhost        15:27       - bash

As well as listing the users logged into the system, the w command gives the system uptime and load averages on the CPU.

You can see who has been logged into the system (as well as see when the system has been rebooted) by using the last command, as shown in Example 12-13.

Example 12-13. Using the last command

$ last
panic     ttyp3    localhost        Sat Jun 11 15:27   still logged in
jldera    ttyp2                     Sat Jun 11 15:26   still logged in
jldera    ttyp2                     Sat Jun 11 15:26 - 15:26  (00:00)
panic     console  ronin.local      Sat Jun 11 15:25   still logged in
jldera    ttyp1                     Sat Jun 11 15:04   still logged in
jldera    ttyp1                     Sat Jun 11 15:04 - 15:04  (00:00)
panic     console  ronin.local      Sat Jun 11 13:58 - 14:04  (00:06)
jldera    console  ronin.local      Sat Jun 11 12:28 - 13:58  (01:30)
reboot    ~                         Sat Jun 11 12:21
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Apple Training Series Mac OS X Directory Services v10.5

Apple Training Series Mac OS X Directory Services v10.5

Arek Dreyer

Publisher Resources

ISBN: 0596009135Catalog PageErrata