Re: w shows 0 users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 13, 2004 at 11:23:29PM -0400, Joe Szilagyi wrote:
> Has anyone seen this before:
> 
>  ~ $ w
>  23:19:52  up 10 days, 20:25,  0 users,  load average: 1.40, 1.22, 1.00
> USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
> 
> 
> 
> For some reason, no users show up. What does w read off of? Something in
> /proc? Any fix?

It is not broken for me here so there is something funny on your side.

Try this sequence of things:

 cat /selinux/enforce
 alias w
 alias ls
 which w
 ls -l `which w`
 id
 strace -o /tmp/trace-w /usr/bin/w

Now look at the various file access system calls made
by "w" in the trace file

 egrep "stat|open" /tmp/trace-w | less

Also inspect /var/log/messages and see if there is a clue there.

Stuff like this is 'normal' in the trace file.
    ....
    open("/proc/25191/stat", O_RDONLY)      = 4
    open("/proc/25191/cmdline", O_RDONLY)   = 4
    open("/etc/localtime", O_RDONLY)        = 3
    open("/proc/uptime", O_RDONLY)          = 3
    open("/var/run/utmp", O_RDWR)           = -1 EACCES (Permission denied)
    open("/var/run/utmp", O_RDONLY)         = 4
    open("/proc/loadavg", O_RDONLY)         = 4
    open("/var/run/utmp", O_RDWR)           = -1 EACCES (Permission denied)
    open("/var/run/utmp", O_RDONLY)         = 5
    ....

And just in case you do not have strace loaded. You can 
check for it.
  $ rpm -q --whatprovides `which strace`
  strace-4.5.5-1


-- 
	T o m  M i t c h e l l 
	In the USA, vote informed, second Tuesday Nov 2004.



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux