Solved

Unix "who" command is inaccurate

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
not output on the show arp command 5 45
Windows 7 Share with XP 22 66
OSPF Design NSSA 5 33
What's the problem with my DSL? 4 25
I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now