All of lore.kernel.org
 help / color / mirror / Atom feed
* logging all input and output on a tty
@ 2004-01-21 16:48 Esben Stien
  2004-01-21 17:12 ` Andreas Dilger
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Esben Stien @ 2004-01-21 16:48 UTC (permalink / raw)
  To: linux-kernel

I've been trying to get an answer to tty logging for a long time without anyone able to answer. I want to log everything that is written to and from a certain tty. I expect this to be a kernel module. Anyone have any pointers where I can look?. Is there an existing module?

-- 
b0ef


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: logging all input and output on a tty
  2004-01-21 16:48 logging all input and output on a tty Esben Stien
@ 2004-01-21 17:12 ` Andreas Dilger
  2004-01-21 21:37   ` Esben Stien
  2004-01-21 18:04 ` Ludootje
  2004-01-21 21:55 ` William Stearns
  2 siblings, 1 reply; 7+ messages in thread
From: Andreas Dilger @ 2004-01-21 17:12 UTC (permalink / raw)
  To: Esben Stien; +Cc: linux-kernel

On Jan 21, 2004  17:48 +0100, Esben Stien wrote:
> I've been trying to get an answer to tty logging for a long time
> without anyone able to answer. I want to log everything that is written
> to and from a certain tty. I expect this to be a kernel module. Anyone
> have any pointers where I can look?. Is there an existing module?

This can be done relatively easily in userspace via "script" or "screen".

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: logging all input and output on a tty
  2004-01-21 16:48 logging all input and output on a tty Esben Stien
  2004-01-21 17:12 ` Andreas Dilger
@ 2004-01-21 18:04 ` Ludootje
  2004-01-21 21:34   ` Esben Stien
  2004-01-21 21:55 ` William Stearns
  2 siblings, 1 reply; 7+ messages in thread
From: Ludootje @ 2004-01-21 18:04 UTC (permalink / raw)
  To: Esben Stien; +Cc: linux-kernel

On Wed, 2004-01-21 at 16:48, Esben Stien wrote:
> I've been trying to get an answer to tty logging
> for a long time without anyone able to answer.
> I want to log everything that is written to and
> from a certain tty.

You can just cat the device, like cat /dev/tty<number>. So you can also
use normal redirectors (> , >> etc) or use a pager.

Ludootje
-- 
    -----BEGIN GEEK CODE BLOCK-----
    Version: 3.1
    GCS/CC/MU>TW d- s: a--->-->$ C++>$
    UL++++ L+++>++++ M- w--(---) !O V(-)
    P-- E--->+ W++ N+>++ o? PS++(+++)
    PE-() Y+ PGP t- 5? X(+) R- tv+() b+
    DI+(---) D- G e- h! r- y?
    ------END GEEK CODE BLOCK------ 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: logging all input and output on a tty
  2004-01-21 18:04 ` Ludootje
@ 2004-01-21 21:34   ` Esben Stien
  2004-01-21 21:41     ` Mike Fedyk
  0 siblings, 1 reply; 7+ messages in thread
From: Esben Stien @ 2004-01-21 21:34 UTC (permalink / raw)
  To: linux-kernel

Ludootje <ludootje@linux.be> writes:

> You can just cat the device, like cat /dev/tty<number>. So you can also
> use normal redirectors (> , >> etc) or use a pager.

If I do cat /dev/tty1 on /dev/tty2, I see what I write to /dev/tty1 on /dev/tty2, but I don't see what I write to /dev/tty1 while working in /dev/tty1 (all the input is being printed on /dev/tty2) . And besides, I only see the input I type, not the output of f.ex a command (on /dev/tty2). I want to monitor users and log everything that is done on a specific tty when they log in. 

-- 
b0ef


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: logging all input and output on a tty
  2004-01-21 17:12 ` Andreas Dilger
@ 2004-01-21 21:37   ` Esben Stien
  0 siblings, 0 replies; 7+ messages in thread
From: Esben Stien @ 2004-01-21 21:37 UTC (permalink / raw)
  To: linux-kernel

Andreas Dilger <adilger@clusterfs.com> writes:

> This can be done relatively easily in userspace via "script" or "screen".

Yes, though I want this for monitoring. I don't want to start neither script nor screen when a user logs into a tty. I just want to log everything written in a tty.  

-- 
b0ef


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: logging all input and output on a tty
  2004-01-21 21:34   ` Esben Stien
@ 2004-01-21 21:41     ` Mike Fedyk
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Fedyk @ 2004-01-21 21:41 UTC (permalink / raw)
  To: Esben Stien; +Cc: linux-kernel

On Wed, Jan 21, 2004 at 10:34:05PM +0100, Esben Stien wrote:
> Ludootje <ludootje@linux.be> writes:
> 
> > You can just cat the device, like cat /dev/tty<number>. So you can also
> > use normal redirectors (> , >> etc) or use a pager.
> 
> If I do cat /dev/tty1 on /dev/tty2, I see what I write to /dev/tty1 on /dev/tty2, but I don't see what I write to /dev/tty1 while working in /dev/tty1 (all the input is being printed on /dev/tty2) . And besides, I only see the input I type, not the output of f.ex a command (on /dev/tty2). I want to monitor users and log everything that is done on a specific tty when they log in. 

This is in debian:

Package: ttysnoop
Priority: optional
Section: admin
Installed-Size: 56
Maintainer: Alberto Gonzalez Iniesta <agi@agi.as>
Architecture: i386
Version: 0.12c-8
Depends: libc6 (>= 2.3.2-1)
Filename: pool/main/t/ttysnoop/ttysnoop_0.12c-8_i386.deb
Size: 15126
MD5sum: 462a28b83327bd2ae987791528e9e095
Description: TTY Snoop - allows you to spy on telnet+serial connections
 TTYSnoop allows you to snoop on login tty's through another tty-device or
 pseudo-tty. The snoop-tty becomes a 'clone' of the original tty,
 redirecting both input and output from/to it.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: logging all input and output on a tty
  2004-01-21 16:48 logging all input and output on a tty Esben Stien
  2004-01-21 17:12 ` Andreas Dilger
  2004-01-21 18:04 ` Ludootje
@ 2004-01-21 21:55 ` William Stearns
  2 siblings, 0 replies; 7+ messages in thread
From: William Stearns @ 2004-01-21 21:55 UTC (permalink / raw)
  To: Esben Stien; +Cc: ML-linux-kernel, William Stearns

Good afternoom, Esben,

On 21 Jan 2004, Esben Stien wrote:

> I've been trying to get an answer to tty logging for a long time without
> anyone able to answer. I want to log everything that is written to and
> from a certain tty. I expect this to be a kernel module. Anyone have any
> pointers where I can look?. Is there an existing module?

	User-Mode Linux can log all traffic to or from a tty to files 
stored on the host.
	http://user-mode-linux.sourceforge.net/tty_logging.html

	Any questions about this feature should be directed to: 
User-mode-linux-user@lists.sourceforge.net
	Cheers,
	- Bill

---------------------------------------------------------------------------
	How's my programming?  Call 1-800-DEV-NULL
(Courtesy of http://www.tux.org/~ricdude/)
--------------------------------------------------------------------------
William Stearns (wstearns@pobox.com).  Mason, Buildkernel, freedups, p0f,
rsync-backup, ssh-keyinstall, dns-check, more at:   http://www.stearns.org
Linux articles at:                         http://www.opensourcedigest.com
--------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-01-21 21:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-21 16:48 logging all input and output on a tty Esben Stien
2004-01-21 17:12 ` Andreas Dilger
2004-01-21 21:37   ` Esben Stien
2004-01-21 18:04 ` Ludootje
2004-01-21 21:34   ` Esben Stien
2004-01-21 21:41     ` Mike Fedyk
2004-01-21 21:55 ` William Stearns

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.