|
Guides All Guides and HOWTO's. |
|
Thread Tools | Display Modes |
|
|||
Automatic dual xterm setup for log file monitoring
While testing a Apache webserver configuration, I became tired of setting up two xterms for monitoring both the /var/log/httpd-access and /var/log/httpd-error.log files.
The following simple script does this now for me: Code:
#!/bin/sh # Set up two xterms # 1) tail -f /var/log/httpd-access.log # 2) tail -f /var/log/http-error.log ACCESS='ssh j65nko.org "tail -f /var/log/httpd-access.log"' ERROR='ssh j65nko.org "tail -f /var/log/httpd-error.log"' # geometry (See X(7) 'GEOMETRY SPECIFICATIONS') # WidthxHeight+X_offset+Y_offset # Width and Height either in pixels or characters # X_offset and Y_offset in pixels # See xterm(1) for the other options xterm -geometry 200x30+0+0 -bg black -fg green -e "${ACCESS}" & xterm -geometry 200x30+0+500 -bg black -fg red -e "${ERROR}" & This script has been tested and is being used in Debian as you can see in the trimmed screenshot.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump Last edited by J65nko; 24th May 2013 at 01:02 AM. |
|
|||
Cool.
Too often we forget the good old -geometry command line options and X resources. People often recommend tiling or other simple window manages to eliminate the silly repetitive fiddling with window arrangements, but geometry can eliminate this with most any wm for your common cases. I recently did something similar to get to my new preferred emacs frame layout (a fixed font taking the left 3/4 of the screen for editing and a variable pitch font taking the rest for reading documentation -- okay, technically I did this with emacs settings not X settings, but same difference). This with fluxbox, but it should translate unchanged when I finally get around to replacing fluxbox with a wm I like on this machine, like cwm or stumpwm (hmm, maybe geometry won't work with stumpwm or ratpoison). |
|
||||
@J65nko
Have You tried multitail?
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd |
|
|||
No, I was not aware that such a tool like multitail existed. There even seems to be an OpenBSD package for it
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
automatic or timed suspend on battery | asemisldkfj | OpenBSD General | 3 | 25th May 2011 11:55 PM |
tmux disable automatic resize | Carpetsmoker | General software and network | 7 | 25th June 2009 10:54 PM |
Automatic launching of a script upon login. Help me figure this out | EvilMonkeySlayer | OpenBSD General | 5 | 28th June 2008 03:27 PM |
Automatic Mount for Devices/Filesystems | vermaden | FreeBSD General | 11 | 12th June 2008 04:55 AM |
Automatic Thread Subscription When Posting? | JMJ_coder | Feedback and Suggestions | 6 | 6th May 2008 03:20 AM |