CoreFreq Gives Peek At CPU Performance Info On Linux

The CPU is the part of the computer that makes everything else tick. While GPUs have increasingly become a key part of overall system performance, we still find ourselves wanting to know how our CPU is doing. CoreFreq is a Linux tool that aims to tell you everything you want to know about your modern 64-bit CPU.

The tool relies on a kernel module, and is coded primarily in C, with some assembly code used to measure performance as accurately as possible. It’s capable of reporting everything from core frequencies to details on hyper-threading and turbo boost operation. Other performance reports include information on instructions per cycle or instructions per second, and of course, all the thermal monitoring data you could ask for. It all runs in the terminal, which helps keep overheads low.

The hardcore among us can build it from source, available on GitHub, though it’s reportedly available in package form, and as a live CD, too. We could imagine data captured from CoreFreq could be used for some fun performance visualizations, too. If you’ve been whipping up your own nifty command-line tools, be sure to drop us a line!

Arduino Gets Command Line Interface Tools That Let You Skip The IDE

Arduino now has an officially supported command-line interface. The project, called arduino-cli, is the first time that the official toolchain has departed from the Java-based editor known as the Arduino IDE. You can see the official announcement video below.

Obviously this isn’t a new idea. Platform IO and other command-line driven tools exist. But official support means even if you don’t want to use the command line yourself, this should open up a path to integrate the Arduino build process to other IDEs more easily.

The code is open source, but they do mention in their official announcement that you can license it for commercial use. We assume that would mean if you wanted to build it into a product, not just provide an interface to it. This seems like something Arduino expects, because a lot of the command line tools can produce json which is a fair way to send information to another application for parsing.

The command line interface doesn’t just build a sketch. You can do things like install and manage libraries. For example, to create a new sketch:

Continue reading “Arduino Gets Command Line Interface Tools That Let You Skip The IDE”

A Shell For The Stellaris & Tiva

cli

When [antoker] is working on a microcontroller project, he often has to write short bits of test code to make sure everything in his circuit is working properly. This is a time-consuming task, and a while back he started on a small side project. It’s a command line interface for a microcontroller that allows him to send short commands to the uC over a serial connection to play around with the ADC, UART, and GPIO pins.

[antoker]’s tiny Unix-like environment is based on modules  that can keep track of the time, print the current commands and stack to a terminal, and query things like the current speed of the uC and the available Flash and RAM.

This tiny shell also has scripting capabilities and a jump function, making this a true programming language, however minimal it is. Right now [antoker]’s work is available for the TI Stellaris and Tiva series microcontrollers, and a video of a scripted Larson scanner is available below.

Continue reading “A Shell For The Stellaris & Tiva”

WordPress 2.7 Upgrade In One Line

wordpress

BadPoetry WordPress 2.7 has just been released and features a complete interface overhaul. Hack a Day runs on WordPress MU hosted by WordPress.com, so we got this update last week. We run standard WordPress.org on all of our personal blogs though. We recommend it because it’s free, has a massive userbase, and if you host it yourself, you can do whatever you want with it.

To make the upgrade process as simple as possible (and for the sheer rush of ‘rm -rf’), we use a one line command.

$ curl http://wordpress.org/latest.zip -o "wp.zip" && unzip wp.zip && rm -rf ./wordpress/wp-content/ && cp -r ./wordpress/* ~/www/

curl downloads the latest version from wordpress. unzip unpacks all of the files into a directory called ‘wordpress’. rm -rf removes everything in the ‘wp-content’ directory. Otherwise, you will overwrite your images, themes, and plugins. cp -r copies everything to your http document root, overwriting the previous install.

Naturally, you should back up your current install and database beforehand. We tend to use the one-liner with reckless abandon. If you’re wondering about the terseness, it was designed to fit inside the 140 character limit of Twitter.

[Thanks, Chris Finke]