quick and dirty log monitor one liner (requires multitail!)

multitail -D --follow-all -ev "cups" -ev "CUPS" -ev "AbusiveVMnameHere" -e "connect" -i /var/log/samba/yourUnifiedSambaLog -ev "cron" -i /var/log/auth.log -i /var/log/YourFTPlog
1st log (samba) has filters to omit annoying repetetive connections and messages about cups printer sharing, and ONLY show messages pertaining to connections to a samba service. Also requires Samba be configured to use a single logfile. use the path to your single samba logfile. 2nd log (for SSH) point to your /var/log/auth.log file. change path as needed. cron is filtered out to avoid looking at processes spawned by cron. which just eats up the screen unnecessarily. 3rd log (FTP), point at the logfile for your ftp daemon. assuming it uses a single file and does so neatly. multitail has lots of options. season to your tastes. this is a highly dumbed down version of the one liner I actually use for this, which incorporates several more logs, color options, window size options etc. depending how much garbage is generated by certain logs and what strings you ignore, when spawning this you may not see any previous log lines. this can be fixed using options like "-n [number]" to search back far enough to produce some lines. otherwise don't worry, it will display newly logged lines. --follow-all is used to follow filenames instead of descriptors. an important thing when following logfiles that rotate as most do.

0
2015-01-18 05:03:18

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: