Check Users Logged In To a Router

Purpose

You may need to take note of the users currently logged in to a router.

Action

To list all users who are currently logged in to a router, enter the following Junos OS command-line interface (CLI) operational mode command:

user@host> show system users

Sample Output

user@host> show system users
1:49PM PDT up 6:44, 3 users, load averages: 0.00, 0.00, 0.00
USER     TTY      FROM                              LOGIN@  IDLE WHAT
jgchan   p0       big.company.net              1:36PM     12 -csh (csh)    
user   p1       pink.company.net              1:49PM      - -cli (cli)    
blue     p2       level5.company.net               2:30PM      - -cli

Meaning

The sample output lists information about the users who are currently logged in to a router. There are three users, one of whom has not recently accessed the router. Two of the users are running the CLI, and one is working from the UNIX-level shell (csh). Checklist for Checking User Accounts and Permissions lists and describes the fields in the output of the show system users command.

Table 40: Description of Output Fields for the show system users Command

Field

Description

time and up

Current time, in the local time zone, and how long the router has been operational.

users

Number of users logged in to the router.

load averages

Load averages for the last 1 minute, 5 minutes, and 15 minutes.

USER

Username.

TTY

Terminal through which the user is logged in.

FROM

System from which the user is logged in. A hyphen indicates that the user is logged in through the console.

LOGIN@

Time when the user logged in.

IDLE

How long the user has been idle.

WHAT

Processes that the user is running.