- Most Recent |
24 hours |
7 days |
30 days |
365 days |
Installation
First we fetch the scripts from http://harnir.net/logspy/logspy-0.1.tar.gz
wget http://harnir.net/logspy/logspy-0.1.tar.gz
Unpack the stuff
tar xzf logspy-0.1.tar.gz
Copy the files to the right directories:
cd logspy-0.1
cp bin/* /usr/local/bin/
cp lib/* /usr/local/lib/
For colour output we install ccze
Debian/Ubuntu users do:
aptitude install ccze
Gentoo users have to:
emerge ccze
So nearly finished. A lazy adminstrator want to have completion!
For this we put the following lines in your ZSH config:
# add completion for logspy
function _log_completion () {
_files -W /usr/local/lib/logspy/resolvers
}
compdef _log_completion logs logf logg logp
(to enable zsh completion for logspy you have to relogin)
Usage
Run ‘logspy’ without arguments to see it’s options and usage instructions.
First make sure that the resolvers in /usr/local/lib/logspy/resolvers are correct.
Examples
# We want to watch the mail log in /home/mail/mail.log
logs mail /home/mail/mail.log
# Watch the mail logs in standard directory
logf mail
# Search for postmaster in maillogs
logg postmaster mail
Please log in or sign up and vote for this trick if it was helpful for you.
Don't forget to subscribe to our
RSS/Atom feed to get the latest tricks.
Don't forget to subscribe to our
RSS/Atom feed to get the latest tricks.









