 |
 |
I need your brain to use Console utility to view log files on a remote server.
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status:
Offline
|
|
Hi,
I need some hard-core unix magic.
I'm debugging a mail server on a linux box and it's log file city.
I like the OS X Console utility. It beats using tail, cat and grep in the terminal to go over the various log files.
How can I use it to view log files on a remote server?
I guessing I could mount the remote machine's /var/log partition with NFS. Would that be:
1. Smart
2. Secure
3. Fast
Is there some tricky ssh thing I can do?
Thanks
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status:
Offline
|
|
Do you want to look at them in real time?
If not, just transfer them over however you feel comfortable.
If you do want to look at them in real time, it may be easier/better to configure an AFP or SMB server on the Linux box to share the relevant folder.
Or, you could do some SSH magic... but this would involve:
set up SSH logins to not need passwords
run an SSH session for each file
execute tail -f remotely
redirect the output into a local log file
view the local copy
This would probably look something like:
ssh user@host tail -f /var/log/logfile.log > localfile.log
Note that I have not attempted this, and haven't even reality-checked it for where the > will be sent.
|

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status:
Offline
|
|
Originally posted by Detrius:
Do you want to look at them in real time?
generally, yeah.
not necessarily realtime with -f, but when I'm actually working on it I check them often enough that downloading each time would be annoying.
set up SSH logins to not need passwords
Already set up that way.
That might do the trick, and it's light weight enough that it's not going to slow things down.
Thanks
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status:
Offline
|
|
Works perfectly, thanks!
I can filter and search and everything in real time. The server's CPU isn't breaking a sweat and there's hardly any bandwidth used.
I just added & to the end so it will just go and I don't have a bunch of terminals floating around.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status:
Offline
|
|
Spiffy! Excellent to hear!
The big question is this: do you understand what it did and why it worked?
|

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status:
Offline
|
|
Ha!
Teach a man to fish...
Actually yes.
I used to do something like this with an older version of rsync but I had forgotten that ssh could run a command like this.
I probably never would have put them together though. My skill is to know that -something- is possible, then find someone to fill in the details. ;-)
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|