On Sun, 3 May 1998, William T Wilson wrote:
> On Sun, 3 May 1998, macker wrote:
>
> > i'm having a problem with /usr/bin/who .. it keeps failing. i've seen
> ...
> > who: Memory exhausted
>
> who does this when your wtmp/utmp files get too large. The best solution
> is to use w, which is a little more robust, or clean out your utmp/wtmp
> files periodically. (which will make funny things happen for anyone who
> is logged in at the time).
[macker@shell macker]$ ls -l /var/log/wtmp /var/run/utmp
-rw-r--r-- 1 root root 279936 May 3 15:54 /var/log/wtmp
-rw-r--r-- 1 root root 97536 May 3 15:54 /var/run/utmp
280k is too big? The last rotated wtmp was 3 meg...
Also, the particular reason this comes to my attention (besides one or two
user complaints) is a script that uses 'who'... :)
WHO="/usr/bin/who"
export WHO
U=`$WHO | $WC`
what would be the best way to do this? pipe the output into grep to strip
the headers? also, would it be hard to take w and simplify it's output to
match that of who, maybe via an argument and check to see what it was
called as so a symlink to who for it would be equiv to calling it with
the arg?
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.