|
|
View remote log files with Console and ssh
This is a very cool tip. Of course, if you're happy with viewing the logs in the Terminal, you just shell in and tail the log. Here's a few related tips: Put the local copy of the log in and you can use Console's "File...Open Quickly" feature.
If the log doesn't get updated frequently, you can use Console's alert features (see "Console...Preferences") - either bounce the icon in the dock or bring the window to the front when an event is logged. Console's filter feature is good - type a word in the title bar, and only matching lines will be displayed. Unfortunately, all log updates will trigger the alerts - not just matching lines. If you want to be alerted to specific events (like a rejection in a mail log), then use a command like this in conjunction with Console's alert features:
Only matching lines will be put into the local copy. You can use egrep to do sophisticated pattern matching, if you like. For example: ssh mailserver "tail -f /var/exim/log/exim_smtp_mainlog" | egrep -i 'apple|banana' >> Library/Logs/Remote/mailserver.smtp.logwill match lines containing either apple or banana, with case insensitivity. --- |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|