LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-27-2006, 01:46 PM   #1
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148

Rep: Reputation: 28
Question Top on Virtual Console


Is it possible to run the command top, on a virtual console?

I've tried top -s >/dev/tty12 & but nothing happens.

Thanks for your help.

Last edited by gbowden; 01-27-2006 at 02:40 PM.
 
Old 01-27-2006, 01:52 PM   #2
Jelle
Member
 
Registered: Feb 2004
Location: Utrecht, The Netherlands
Distribution: Debian
Posts: 79

Rep: Reputation: 15
yes, edit your inittab. instead of getty you can run your own program on any tty.
putting top there makes some sense. next to it you could pipe your syslog messages.
 
Old 01-27-2006, 02:02 PM   #3
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148

Original Poster
Rep: Reputation: 28
Would something like 12:2345:respawn:/usr/bin/top -s work?
I've already got firewall and syslog messages on terminals 9 and 10.

Thanks for your help.

Last edited by gbowden; 01-27-2006 at 02:41 PM.
 
Old 01-27-2006, 02:18 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Hi gbowden, can't really help but would like to know how you send messages and your firewall logs to other virtual consoles. If I am thinking correctly you would hit Alt-Ctrl-F9 to get to the virtual console.

Thank you for your time.
Brian1
 
Old 01-27-2006, 02:31 PM   #5
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148

Original Poster
Rep: Reputation: 28
I'm using Arno's iptables so it might be different for you.
Here is the parts from my /etc/rc.d/rc.local file:

Code:
# Set tty10 to full screen.
stty -F /dev/tty10 rows 48 columns 128
# Start logging of firewall on tty10.
echo "Firewall logging show on tty10."
tail --follow /var/log/firewall | arno-fwfilter >/dev/tty10 &
# Set tty9 to full screen.
stty -F /dev/tty9 rows 48 columns 128
# Start logging of /var/log/messages on tty9.
echo "/var/log/messages shown on tty9."
tail --follow /var/log/messages >/dev/tty9 &
# Set tty11 to full screen.
stty -F /dev/tty11 rows 48 columns 128
# Start tcpdump on tty11
echo "tcpdump shown on tty11."
tcpdump -vv >/dev/tty11 &
I had to use the stty command to set the virtual terminals to the correct rows and columns.

Hope that helps.
 
Old 01-27-2006, 02:37 PM   #6
Jelle
Member
 
Registered: Feb 2004
Location: Utrecht, The Netherlands
Distribution: Debian
Posts: 79

Rep: Reputation: 15
uhm, wouldn't tty11 be in use by this script?
That would explain why you could not write to it?
 
Old 01-27-2006, 02:42 PM   #7
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148

Original Poster
Rep: Reputation: 28
Sorry about that I meant tty12, I have edited my posts to reflect this.
 
Old 01-27-2006, 06:15 PM   #8
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Thanks for the info. Just playing around I can send top to tty2 using the command ' top -s > /dev/tty ' like you tried in the first post except you used tty12. As long as the tty is already defined I think it should work. Working from a centos system my tty's are defined in /etc/inittab. Not sure where Slackware is doing it. I have the default 6 defined 1-6 and the gui for the 6 at 7-12. How the 7-12 are defined I am not sure. To me once you have all tty defined. Just a thought there might be something other that just a plain tty there on 12. A thught it might be attached to a second gui tty.

If you are not using tty2 or something try sending it to one of the lower ones and see if it works. You could kill one of the tty9 or 10 ones and send to one of them.

Again thanks for a learning treat.
Brian1
 
Old 01-27-2006, 06:51 PM   #9
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Another thought does /dev/tty12 exist?

Brian1
 
Old 01-28-2006, 05:05 AM   #10
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Maybe you just can't send firewall output for tty12, because it is left to use with X.
 
Old 01-29-2006, 12:54 PM   #11
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148

Original Poster
Rep: Reputation: 28
/dev/tty12 exists, and I can send top to it, but I can't get my /etc/inittab file correct to display it on boot.

I tried 12:2345:respawn:/usr/bin/top -s but it dispalys top on tty1.
 
Old 01-30-2006, 06:41 PM   #12
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Have you tried this. Send what ever is going to tty10 to tty12 and what you want on tty12 to tty10. If it does the same either way not using tty12 for either I am at a lost then.

Haven't seen anything different in your rc.local file. Does creating a basic tty12 and then using rc.local to start top and redirect it to tty12 work.

Brian1
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
virtual console colors johnson_steve Linux - General 0 05-11-2005 01:27 PM
virtual console Ammad Linux - Networking 2 04-05-2005 10:20 PM
[openbsd] more virtual console noir911 *BSD 1 09-02-2004 02:13 PM
virtual console kjsubbu Linux - Networking 0 07-23-2003 11:18 AM
VIrtual Console Garbled nxny Linux - Software 6 08-31-2002 09:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration