[svlug] How Could I Run top on tty9?

Serban Giuroiu gyzmobro at yahoo.com
Tue Jul 1 11:44:53 PDT 2003


Thanks!

--- Ix Nichols <fathom at armory.com> wrote:
> If you only want the output:
> 
> 	top > /dev/tty12
> 
> You can make it stick there permanently by putting
> it in /etc/inittab:
> 
> 	top:2345:respawn:top > /dev/tty12
> 
> If you want it to be intereactive (i.e., so you can
> change the view, kill 
> processes, etc.), change the command to:
> 
> 	top </dev/tty12 >/dev/tty12 2>/dev/tty12
> 
> Think about this carefully, though. Anyone sitting
> at the console can 
> manipulate your process table with root privilege if
> you leave this running 
> all the time (unless you start it as a different
> user). Unless you feel 
> really good about the access to your console, you
> should do the following:
> 
> 	1) Create an account just for this purpose (e.g.
> "top"), with a login shell
> 	    of /bin/false
> 	2) chown the tty (/dev/tty12 in my examples) to top
> 	3) run the command this way:
> 		su top -c "top </dev/tty12 >/dev/tty12
> 2>/dev/tty12"
> 
> - Ix

=====
This message was sent by Serban Giuroiu, also known as The Gyzmo.

E-MAIL: < g y z m o b r o  at  y a h o o  dot  c o m > (no spaces)
GAIM: < g y z m o b r o > (no spaces)

"Code Smarter, Not Harder"

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com




More information about the svlug mailing list