[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Unix "who" command is inaccurate

Posted on 2011-03-21
2
Medium Priority
?
500 Views
Last Modified: 2013-12-23
Within AIX when I do a simple "who" command, the system replies back with the users that are logged on plus others that are definately not logged in. I have done a ps -ef| grep "USER" and the result is always nothing. In addition, looking at netstat, the users are not connected either.

Any ideas on why this occurs and how I go about correcting it?
0
Comment
Question by:ScubeduFan
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 35187246
Hi,

this is a known blur in the processing of the /etc/utmp file in AIX. This file holds user process entries.
The problem is that when a user process terminates its entry in /etc/utmp is not always cleaned up.

Since this is a known problem there is a workaround, in the form of a dedicated cleanup daemon called "utmpd".

utmpd monitors the /etc/utmp file for validity of the user process entries at regular intervals and removes orphaned entries by cross checking the process id of the entry against the process table.

Log in as root and add to /etc/inittab:

utmpd:2:respawn:/usr/sbin/utmpd

and issue "telinit 2" to have the daemon respawned.

The default scan interval is 300 seconds. You can set the interval to let's say 180 seconds by adding this value as a commandline parameter to utmpd:

utmpd:2:respawn:/usr/sbin/utmpd 180


wmp
0
 

Author Closing Comment

by:ScubeduFan
ID: 35327052
wmp ... thank you so much for this answer. You are truly a AIX guru. Your answer has saved me from countless issues. (sorry it took so long to accept the answer - my membership expired on me)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question