Live data from Hacker News

Log File Viewer for the Terminal

lnav.org

31–40 of 60 posts

Re: Log File Viewer for the Terminal

#32
post #19
post #18

This looks great. I've been using klogg and if you're more into GUI's then I think it's the best there is. It opens and searches in log files of many gigabytes with easy. It's a simple and clean multiplatform QT app. https://github.com/variar/klogg

The problem with GUIs is that AFAIK they need to be installed on the machine the logs you are reading are on so a heavy install on a server.

Qt still runs over X11. You can just have the app and support libs for remote display without a full desktop environment.

Re: Log File Viewer for the Terminal

#33
post #23

I'm a little disappointed that it's not written in Rust.

Speaking as the author, I too wish it was written in Rust. But, I started it in 2007 when I needed to get practice with C++ for work. At this point, there's so much code in lnav, rewriting would be a long process. There are some sub-components[1] that are written in Rust though.

A new project called logana[2] is written in Rust and is headed in a good direction. Use/contribute to that if you're really interested.

[1] - https://github.com/tstack/lnav/tree/master/src/third-party/l...

[2] - https://github.com/pauloremoli/logana/

Re: Log File Viewer for the Terminal

#35

I tried lnav about 7-8 years ago and as a terminal junkie I really liked the features. The only breaking thing was a huge (almost bloated) memory consumption. At that time lnav basically just kept everything in memory. Does anyone did that change?

> At that time lnav basically just kept everything in memory.

lnav has never really kept the contents of files in memory. It does build an index of every line in a file. One exception is that it will decompress small gzip files and keep them in memory as a tradeoff from decompressing on the fly.

The memory consumption has never been a problem for me. So, it's not something I've ever focused on.

Re: Log File Viewer for the Terminal

#37

Oh yeah! lnav is famous. I remember using it like a decade ago to monitor an array of web servers while at GoDaddy; good ol' times. First commit is from Sep 13, 2009: https://github.com/tstack/lnav/commit/b4ec432515e95e86ec9d71... . Woah! we’re old. This is what the UX looked like back in the day: https://github.com/tstack/lnav/commit/bce2caa654160518ec11f6...

Aside from the bitmap font, this looks pretty much the same as it does now lol

I'll also add I used lnav more recently for viewing logs from many small lab devices centralized via syslog, it was extremely lightweight and effective.

Re: Log File Viewer for the Terminal

#38

I've always just used less(1).

Yep, I would say the stiffest competition for lnav is the old tools[1]. I would just hope folks could have an open mind and give "new" things a chance (although lnav has been on github for 17 years).

[1] - https://lnav.org/2013/09/10/competing-with-tail.html

Re: Log File Viewer for the Terminal

#39
So, I started it and was doing something but there is no obvious way to exit. I tried Q,q, Ecc, :q. I tried `man lnav` in separate terminal - but no man page is provided. `ps` shows 3 processes which would not die with SIGTERM, have to `kill -9`. But nice web site :)

Re: Log File Viewer for the Terminal

#40

Oh yeah! lnav is famous. I remember using it like a decade ago to monitor an array of web servers while at GoDaddy; good ol' times. First commit is from Sep 13, 2009: https://github.com/tstack/lnav/commit/b4ec432515e95e86ec9d71... . Woah! we’re old. This is what the UX looked like back in the day: https://github.com/tstack/lnav/commit/bce2caa654160518ec11f6...

Wow, the GitHub mobile app doesn't preview PNGs. TIL

I'm not seeing them on Chrome on Windows either, but FF works for me.
Post reply on HN