Tag Archives: input

spew: For testing purposes

I’m suddenly inundated with testing a half-dozen new laptops here, so I don’t have a lot of time for writing up posts.

I did have a moment this morning to check out spew, which I believe is in the Debian repos, in Fedora and in their derivatives, but surprisingly not in Arch.

2015-02-12-r8-0acre-spew

spew is a tool for testing I/O performance and generating workloads for those tests. What you see above is spew’s text-based interface, writing out a quick 128Mb file and checking the read-write stats.

By default spew works mostly in a CLI-fashion, as opposed to the whole-screen approach you see above. We haven’t seen too many I/O tools for the console — not counting iotop, which was the first one I could think of offhand — so it’s probably a good idea to keep this one around.

The next time I get an ancient laptop and a wicked-slow hard drive, I’m going to hunt down spew and see what it can tell me. Next time. 😉

ionice: It’s nice to be nice to the nice

I don’t use ionice as much as I should. I know better, but it’s always an afterthought to me. Mea culpa.

ionice works where nice doesn’t. The best example I can think of is laggy behavior on disk transfers, like copying a giant file from one place to another.

You can nice the copy process all you want, but you’ll probably still sense some lag, because you’re just devoting more processor priority to cp, which isn’t where the problem lies.

To that end, next time you are waiting for a big file to decrypt, or you’re splitting volumes in the background, try. …

sudo ionice -c3 -p###

where ### is the process number for the copy process or gnupg or split or whatever. Class 3 sets it to “idle,” meaning so long as nothing else needs disk access, this process can do as it wants. Otherwise, it takes a back seat.

I think I first learned about this from jdong’s website, years ago. The page is still there, and so is a gimmick to switch your whole shell process — and therefore everything subsequent that you start from there — to idle process. Take a peek; it’s a short but useful read.

ionice is part of util-linux. 😉

gpm: And you thought you were mouseless

No, living at the terminal does not mean you are rodentless (and I don’t mean gopher). In fact, there is very strong mouse support for you, and your text-only lifestyle.

2013-11-13-lv-r1fz6-gpm

If you actually sat through that whole gif, I applaud you. If you could make out what was happening, then doubly so.

Basically, gpm is a mouse daemon for consoles. Perhaps you know about it; it’s no big secret. Not like gnuit was. 😕

You’ve got both left- and right-button functions, middle button and/or mousewheel — depending of course on the application. Highlighting is (mostly) done by holding down the shift key. You can see most of the practical use there, with elinks.

But I’m guessing you know most of the basics of a mouse. 🙄

The home page suggests it’s wired for the console and for xterm, but I don’t use xterm so I’m not sure what the special benefit there is.

And take a look at the man page if you get a chance. It strikes me as odd that the default behavior for a triple-click is a system shutdown. 😯

Aside from elinks, vim I think, Midnight Commander and maybe a few others, I’m not sure how much practical gpm support is out there. If you know of something, please share.

P.S., depending on your system, you might have to manually start the gpm daemon. In Debian I think that’s taken care of for you, when you install gpm. In Arch, you’ll need sudo systemctl start gpm. Enjoy.

bwm-ng: Flexible, smart and pretty

bwm-ng comes along at just the right time. We haven’t seen any network monitors in quite a while.

Of course, I have to make the obligatory offhand remark that there are hundreds — literally hundreds — of network monitors and visualizers out there.

I’ve listed a few of them on this site, but I’ve barely scratched the surface.

But, seeing as we are in the “B” section now, bwm-ng has good timing.

2013-08-18-v5-122p-bwm-ng-curses2

Rather like VU meters, on stereo equipment from a long time ago.

That’s not the default display, by the way. That is with the “curses2” flag, which I am sure you can hunt down on your own.

bwm-ng will also output to html or csv, and has options to make sure your data can be converted to another format, be it spreadsheet or browser or whatever.

2013-08-18-v5-122p-bwm-ng-html

And best of all? It’s not just a network monitor, it can also watch disk access, and output in the same style — VU meters, or whatever.

Pretty nifty, if you ask me.