Blog Archives

vi mode inside your shell

Posted in Tips and Tricks

For as long as I can remember I’ve used vim (or vi) as my editor of choice when on Linux or UNIX systems. I’ve also used bash as my shell, except in circumstances where it wasn’t available. We’ve been using Macs for a long time now, and one of the things that I only recently learnt was that you can use CTRL-a to take you to the beginning of a line in a terminal. This meant I no longer leant on the left arrow key to get me back to the beginning of a long command.

I use screen to maintain remote, active connections to our various servers, and with my setup the CTRL-a trick didn’t work. I’ve just found that setting vi mode in bash will allow me to hit ESC then shift-I and take me to the beginning of a line. ESC engages vi mode, and you can navigate around the command as you would inside vi. For example, shift-I or 0 takes you to the start of the line, shift-a or $ to the end and h, l, k and j act as cursor keys.

You can engage vi mode by executing the following code, or adding it to your ~/.profile (or any other dot file that is executed upon login).

set -o vi

I always like finding new shortcuts, even if there’s some minor annoyance at my former lack of awareness. It’s like how we discovered syntax highlighting in vim after completing our uni degrees… very bittersweet.

Stressed out to the eyeballs

Posted in Inside TFG, Tips and Tricks, Websites or Tools

We’ve bought a cute little Shuttle KPC for the office. It’s a very compact PC that we’re going to use as a VOIP PBX. The bare-bone version of the machine ships with a motherboard and power supply already mounted in the case, but it lacks a CPU, memory or hard disk. Last week, for the first time in about 5 years, I built a computer. Not much has changed, though I did have a hard time mounting the CPU. It resulted in a broken fan/heat-sink assembly, though thankfully a replacement was only $20.

Today I loaded the operating system, Ubuntu Linux 8.10 “Intrepid Ibex” and got a taste of the latest Ubuntu release. As usual, I’m quite impressed, and the improvements in the two and a half years since I regularly used a graphical Linux interface are highly noticeable. There’s lots of animation and the experience is more… fun?

I thought it would be wise to stress test this little box, as even though it’s not going to get that much of a workout at our office, I wanted to make sure the CPU was seated properly and was being cooled appropriately.

The two tools I picked for the job are stress and cpuburn.

mlambie@arcee:~$ stress --cpu 16 --io 12 --vm 8 --vm-bytes 128M -d 4 --timeout 60s
stress: info: [22065] dispatching hogs: 16 cpu, 12 io, 8 vm, 4 hdd
stress: info: [22065] successful run completed in 65s

The little machine loved stress, maxing the CPU and causing the load average to skyrocket. The temperature stayed nice and chilly.

mlambie@arcee:~$ cat /proc/acpi/thermal_zone/THRM/temperature
temperature:             37 C

Similarly, loading up the CPU with burnMMX only added a few extra degrees Celsius.

I’m confident that this little box will perform well under stress. What tools do you like to use to stress your Linux systems?

Twitter

Great web stats at @petrescue , the driving force behind the rebuild of their systems by @frontiergroup . http://t.co/MTvfoxnU

@frontiergroup about 3 weeks ago #

Search Posts

Featured Posts

Categories

Archives

View more archives