FOSSPicks

gotop

Over the years, we've looked at a lot of activity monitors. There are now so many that they've become difficult to write about with any originality. It must have become a Linux developer's rite of passage to create a tool that shows which processes are taking up CPU time and hogging all the system memory. But gotop is worth writing about because it takes the best parts of some of our favorite monitoring tools and combines them into an easy-to-install, cross-platform, and CPU-efficient single executable. There are precompiled binaries for many ARM variants, including executables that will simply run on a Raspberry Pi, x86 Linux, macOS, and even Windows. Each version runs identically, with a few exceptions. There's an option to monitor NVidia graphics hardware, for example, and power monitoring is also dependent on your hardware. Apart from that, every platform can take advantage of all the same features, which is a good thing because there are quite a few.

One of the best things about gotop is that it's clean and performant by default, especially compared to something such as htop, which can clutter your terminal and your CPU (but is still a great tool). With no further modification, gotop will graph the use of each CPU core across the top; disk usage, temperature, and memory usage through the middle; and networking throughput and process management below. All of this can be configured and saved as a preset, including themes, styles, widgets, update frequency, and some options on how the values are calculated. It's even possible to monitor the state of remote servers. It's incredibly configurable for a tool with such a small system footprint, and that's what makes gotop such a good find. It's the best of all possible worlds without any compromise.

Project Website

https://github.com/xxxserxxx/gotop

Thanks to popey (Alan Pope) and the now-defunct Ubuntu Podcast for this find in one of their final episodes.

HTML processor

htmlq

If you've ever done any development by working on your own scripts or hacking on a website, you will have encountered JSON. JSON is a text notation format for sending, retrieving, and storing data, and it uses a specific JavaScript-like syntax of curly brackets and square brackets, double quotes and commas to contain that data. These elements are used to describe key and value pairs ("name":"graham", for instance), arrays, and hierarchy. YAML files aren't difficult to comprehend, and many programming languages will provide libraries to help parse the data transparently, but they can be difficult when you want to create a simple script or use them from the command line because you need to find a way of navigating their hierarchical bracketed syntax. This is where the venerable jq command can help. It's a command that parses all of JSON's magical syntax for you, making it easy to access the actual data held within its confines. At its simplest, you can ask for the values assigned to names, but it's advanced features enable you to process JSON files in the same way sed processes text files. But what about working with HTML files directly?

htmlq is a tool that does just that, and it's why htmlq has a q in its name. It's a command that wants to do the same for HTML files that jq does for JSON. If you grab the HTML for a web page with curl, for example, you face the same problems retrieving exact values without complicated multiple uses of grep. Piping the output through htmlq instead lets you quickly retrieve page attributes, the raw main body of text, or specific sections or parts by identifier. It's a brilliant way to scrape data from websites that don't provide (or allow) their own REST API access, such as sites listing train timetables or ultra-local weather reports. It's the quickest way we've found to extract URLs from an external page, either for testing or for further scraping.

Project Website

https://github.com/mgdm/htmlq

htmlq takes the pain out of parsing HTML brackets and extracting content such as links.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • FOSSPicks

    Graham recently found the perfect use for his old Nintendo DS Lite. Thanks to having exactly the same screen resolution, it now runs the brilliant ZXDS Sinclair ZX Spectrum emulator.

  • Big Shot: OpenShot Video Editor Version 1.0 Released

    Video clip editors have been in short supply under Linux. Jonathan Thomas is now trying to fill that gap with the first stable version of the OpenShot Video Editor.

  • FOSSPicks

    This month Graham looks at Firefly Synth, Faircamp, Gnome Web, GPlates, Flowblade, CorsixTH, and more!

  • Video Editor Roundup

    In a comparison test, we checked out nine free video editing programs: Cinelerra, Flowblade, Kdenlive, Kino, Lightworks, LiVES, OpenShot, Pitivi, and Shotcut.

  • FOSSPicks

    Over the past couple of months, Graham's ever-versatile Steam Deck has synced books to an e-reader, played movies on a television, joined Mumble, recorded two podcast episodes, and even played a few games.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News