Log analysis in Linux

We have lots of default and third-party tool/commands for log analysis in Linux.
Will see some default commands which is used in Linux for log analysis.
 
Awk
Cut
Grep
Tail
Syslogd
 
Usage of  awk command
 
   We can find and replace text and will sort the output of this command.  It will search for a given pattern by us and if any text matches for that pattern then it will do the further action which given in the command.
 
For example, if we need to the second item from an output of the command will use in below format
 
#ls -l | ask '{print $2}'

12
5
13
 
Likewise will use ask command Wherever we need a specific value from a log file/output of command or text file.
 
 
 
 

6 thoughts on “Log analysis in Linux”

Leave a Reply

Your email address will not be published. Required fields are marked *