4

Log Parser is great tool for parsing log files. I can parse not just IIS log files but also custom log files with it.

For example I can use SQL syntax to parse logs:

C:\>LogParser "SELECT TimeGenerated, SourceName, 
EventCategoryName, Message INTO report.txt FROM Security WHERE 
EventID = 528 AND SID LIKE '%TESTUSER%'" -resolveSIDs:ON

Is there any tool like that for linux?

Thanks.

Sanghyun Lee
  • 21,644
  • 19
  • 100
  • 126

3 Answers3

5

lnav supports SQL queries and supports most of the common Linux log formats. Look at the project's website and documentation page for more details and screenshots.

Sanghyun Lee
  • 21,644
  • 19
  • 100
  • 126
0

Maybe you'll take a look at multitail?

When it comes to text based logs grep is your friend—it can do pretty much the same what SQL-like syntax in your example.

thebodzio
  • 129
  • 4
-2

have you tired tail command ?

tail -f /path/to/log/file/log

if you prefer a log viewer with GUI, Have a look at Gnome Log Viewer

Vamsi Krishna B
  • 11,377
  • 15
  • 68
  • 94
  • I want to parse log files not just read. When I use Log Parser I can parse with SQL like syntax. – Sanghyun Lee Jun 16 '11 at 05:15
  • 1
    If you like "SQL-like syntax", you could store your logs in SQL. Rsyslog supports this with great flexibility. And I believe there are some web-based frontends designed to go along with SQL-stored rsyslog databases. Although it has enough flexibility that you can store your logs in whatever format you like--something I use all the time. – Jonathan Hall Jun 16 '11 at 05:24
  • 2
    I have down voted answer because it quite opposite to what was an original question. – Drachenfels Dec 24 '13 at 11:31