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
Solved

Unix "who" command is inaccurate

Posted on 2011-03-21
2
492 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 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

809 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