Solved

Unix "who" command is inaccurate

Posted on 2011-03-21
2
495 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

707 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