On Wed, 2004-01-21 at 08:01, Sudev Barar wrote: > May be this is a LTSP issue. See attached post. Any pointers?? > -- > Sudev Barar > > Learning Linux > > Address: D10 NH2, Faridabad 121001 > Tel; +91-129-5021588 > > ______________________________________________________________________ > > From: Sudev Barar <[EMAIL PROTECTED]> > To: Linux Help <[EMAIL PROTECTED]> > Subject: [LIH]Strange behaviour by top / who > Date: 20 Jan 2004 18:03:04 +0530 > > Whenever I am giving top / who to find out stats from system I get only > two / three users, even though I know that more than that are actually > logged in. Even top shows processes belong to many more users but the > first line keeps showing: > 17:59:30 up 5:08, 2 user, load average: 0.03, 0.06, 0.07 > Is there any setting that I mangled???!!! I am running RH9 and LTSP.
I've seen this with Red Hat 9 and LTSP 3. The default GDM settings use sessreg to register logins and logouts in wtmp and utmp. Unfortunately, they use the long hostname, which gets truncated. I've changed /etc/X11/gdm/PreSession/Default and /etc/X11/gdm/PostSession/Default. The changes to PreSession/Default are simple and address your problem; PostSession/Default addresses this problem as well as a problem with processes getting left behind (by running oaf-slay, then killing all procs belonging to the user). Here are the files: -- David Johnston <[EMAIL PROTECTED]> Little Bald Consulting, LLC
#!/bin/sh PATH=/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH if command -v sessreg > /dev/null 2>&1; then sessreg -d -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER fi /etc/X11/gdm/PostSession/gdmCleanup exit 0
#!/bin/sh # # Note that any setup should come before the sessreg command as # that must be 'exec'ed for the pid to be correct (sessreg uses the parent # pid) # # Note that output goes into the .xsession-errors file for easy debugging # PATH=/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH if command -v xsetroot > /dev/null 2>&1; then xsetroot -cursor_name left_ptr -solid "#363047" fi if command -v sessreg > /dev/null 2>&1; then # some output for easy debugging echo "$0: Registering your session with wtmp and utmp" echo "$0: running: sessreg -a -w /var/log/wtmp -u /var/run/utmp -x \"$X_SERVERS\" -h \"$REMOTE_HOST\" -l $DISPLAY $USER" exec sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER # this is not reached fi # some output for easy debugging echo "$0: could not find the sessreg utility, cannot update wtmp and utmp" exit 0