Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-27-2006, 01:46 PM
|
#1
|
Member
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148
Rep:
|
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.
|
|
|
01-27-2006, 01:52 PM
|
#2
|
Member
Registered: Feb 2004
Location: Utrecht, The Netherlands
Distribution: Debian
Posts: 79
Rep:
|
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.
|
|
|
01-27-2006, 02:02 PM
|
#3
|
Member
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148
Original Poster
Rep:
|
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.
|
|
|
01-27-2006, 02:18 PM
|
#4
|
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:
|
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
|
|
|
01-27-2006, 02:31 PM
|
#5
|
Member
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148
Original Poster
Rep:
|
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.
|
|
|
01-27-2006, 02:37 PM
|
#6
|
Member
Registered: Feb 2004
Location: Utrecht, The Netherlands
Distribution: Debian
Posts: 79
Rep:
|
uhm, wouldn't tty11 be in use by this script?
That would explain why you could not write to it?
|
|
|
01-27-2006, 02:42 PM
|
#7
|
Member
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148
Original Poster
Rep:
|
Sorry about that I meant tty12, I have edited my posts to reflect this.
|
|
|
01-27-2006, 06:15 PM
|
#8
|
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:
|
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
|
|
|
01-27-2006, 06:51 PM
|
#9
|
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:
|
Another thought does /dev/tty12 exist?
Brian1
|
|
|
01-28-2006, 05:05 AM
|
#10
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
Maybe you just can't send firewall output for tty12, because it is left to use with X.
|
|
|
01-29-2006, 12:54 PM
|
#11
|
Member
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148
Original Poster
Rep:
|
/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.
|
|
|
01-30-2006, 06:41 PM
|
#12
|
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:
|
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
|
|
|
All times are GMT -5. The time now is 12:42 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|