[mosh-users] logging to wtmp
Keith Winstein
keithw at MIT.EDU
Thu Sep 6 14:46:07 EDT 2012
Hello Zach,
By default, mosh-server adds an entry to utmp (including the user's IP
address) whenever the user becomes active, and replaces it with a
different entry (with just the mosh PID) when they go inactive. This
can help you find abandoned mosh servers.
We don't have a configuration option to change this behavior, but if
you only want the initial utmp entry, you can comment out the source
code in mosh-server.cc that begins "/* update utmp if has been more
than 10 seconds since heard from client */" (near line 678).
Best regards,
Keith
On Wed, Sep 5, 2012 at 5:57 PM, Zachary Miller <zmiller at cs.wisc.edu> wrote:
>
> hello,
>
> is there any way to tell mosh-server not to log to /var/log/wtmp?
>
> i'm not sure what mechanism mosh is using that causes this, but my wtmp file
> is filled with multiple identical entries like:
>
> zmiller pts/2 Wed Sep 5 09:07 - 09:26 (00:18) 76.250.XX.YY via mosh [8627]
> zmiller pts/2 Wed Sep 5 09:07 - 09:07 (00:00) mosh [8627]
> zmiller pts/2 Wed Sep 5 09:07 - 09:07 (00:00) 76.250.XX.YY via mosh [8627]
> zmiller pts/2 Wed Sep 5 08:52 - 09:07 (00:14) mosh [8627]
> zmiller pts/2 Wed Sep 5 08:52 - 08:52 (00:00) 76.250.XX.YY via mosh [8627]
> zmiller pts/2 Wed Sep 5 08:52 - 08:52 (00:00) mosh [8627]
> zmiller pts/2 Wed Sep 5 08:52 - 08:52 (00:00) 76.250.XX.YY via mosh [8627]
> zmiller pts/2 Wed Sep 5 06:52 - 08:52 (01:59) mosh [8627]
> zmiller pts/2 Wed Sep 5 06:51 - 06:52 (00:00) 76.250.XX.YY via mosh [8627]
> zmiller pts/2 Wed Sep 5 06:51 - 06:51 (00:00) mosh [8627]
> zmiller pts/2 Wed Sep 5 06:51 - 06:51 (00:00) 76.250.XX.YY via mosh [8627]
> ...
>
> and it's too much noise. it would be nice to only log when the session is
> initiated. any ideas?
>
>
> cheers,
> -zach
>
> _______________________________________________
> mosh-users mailing list
> mosh-users at mit.edu
> http://mailman.mit.edu/mailman/listinfo/mosh-users
More information about the mosh-users
mailing list