Category Archives: Arch Linux Forums

Running rtorrent as a daemon

A long time ago, I suggested rtorrent was something like an “rtorrent daemon.” That’s still true, of course — I don’t know of any torrent client that runs lighter and has the same range of controls as rtorrent.

I never really tried to set it up as a true daemon though, until I saw this thread on the Arch Linux forums, and its corresponding wiki page. It might not sound like it’s worth the effort, but it’s kind of nice to run the entire system in the background, unattended and preconfigured, and just drop torrents and run.

Mimicking the same concept in Crux was fairly easy; I needed to add a user called rtorrent, set up the proper subdirectories and then configure rtorrent’s rc file as I liked. The script shown in the thread and on the wiki needed scraped down a little bit, to where it’s really just a simple series of start and stop commands. (Oh, and the daemon needs either screen or dtach, depending on which you prefer.)

I don’t know if I’d go through the work of setting this up every time I wanted to install rtorrent, but I can see where this would be useful on a remote machine, or on a machine that sits by itself and does nothing but download. Oh wait, that was my original point, wasn’t it? :mrgreen:


How can it all fit?

Sixteen megabytes is a pitful amount of memory, and I sometimes have to remind myself of that. I have grown too accustomed to thinking of that in terms of a “workable” amount of space, and it’s not. Even by my standards, it’s far less than what is practical, usable or functional.

And yet these Awesome-based console-application systems are regularly using up less than half of the 12Mb htop says I have left to use, and there’s no sign of it demanding more space any time soon. What’s the story? How does it all fit in under 16Mb?

I don’t know. It’s got to be one of those Russian dolls things. Just in the way of explanation, here’s a “baseline” system, freshly booted and with nothing but two instances of urxvt running (and yes, that is how sparse a Crux system runs. If you want to avoid all those sputtering little do-nothings in your htop report, start using Crux. It returns your hardware to you).

A lowly 5Mb of memory consumed, plus a few more in swap. I should mention that my swappiness is set to 60, but I don’t know if that will really make much difference when there’s only 16Mb to work with in the first place.

Now let’s add a little to the workload. Here’s calcurse, which I mentioned a day ago as a fantastic replacement for the GTK-based Osmo, if you’re inclined to go console.

It hardly makes a dent. Memory consumption went from 5Mb to 6Mb, which means the space consumed by calcurse is probably less than a full megabyte. Even the swap space usage is the same. But that’s probably only to be expected, since calcurse is not exactly a intense or vivacious application. Unless you’re adding to it, there’s not a lot to expect of it. It could probably easily float along on a Commodore 64, with a few modifications.

Let’s up the ante. Here’s alpine, in the middle of a valid and live e-mail polling session. In other words, not fake e-mails to myself.

That’s more like it. Six megabytes consumed, and this time swap space has to give up two more megabytes to keep the system from imploding! Ha! Now we’re really eating up resources!

Maybe. That’s still only a grand total of 3Mb over what the freshly booted system needed, and unless alpine is actively sending or receiving e-mails, there’s not a lot it really does. Something that requires constant effort might show a real drain on memory. Here’s irssi.

Not as bad as I thought, even with irssi’s constant relay between me and Freenode. Only 6Mb live memory used, and up to 9Mb of swap needed, and that’s with both #archlinux and #crux open at the same time. I suppose if I really wanted smoke to come out of the floppy drive, I should have jumped into #ubuntu too. That place is a mess. 😯

After that though, I don’t know how much more I can tax this machine. Here’s snownews, which, like alpine, isn’t really very demanding so long as it’s not checking its feeds.

Not even twitching. And that swap space use, now, might even be cached programs that I already started. I don’t know, but I have a feeling looking at swap now isn’t much of an indicator of system demand.

Here’s Charm; Python might bog this down a bit. It’s a little slow to start (relatively speaking, of course), and that I blame on its Python underbelly. Prepare to be disappointed. …

At last, finally, I break the 7Mb mark. I still haven’t crested at two-thirds of the available memory, but at least now I can say I use more than half of the 12Mb I have on hand. And unused memory is wasted memory … or so the gurus say. Good thing I’m not a guru. 🙄

All right. I’m going for broke. I’m going to make this thing sweat if it’s the last thing I do. I shall force it to show a picture of itself, and in some sort of twisted backronymatic befuddlement, I will finally break 10Mb of usage. Here’s feh, displaying one of these screenshots on the host.

Survey says … no. No worse than anything else, really. It’s slow and I can blame that on the time it takes to scale down a photo to half its size, but it’s not exactly eating up my memory or causing rampant disk-swapping. I’m almost disappointed at this point.

Here’s mc, performing damage control, in a manner of speaking.

Still no singular chomp on my memory — that too seems to only take up a single megabyte. About the only thing I have left that might be a system demand is a browser, and I’m starting to worry that it won’t be very impressive. Here’s elinks, after signing into the Ubuntu Forums.

No luck there either. elinks tends to “hover” for a while, instead of opening pages very fast, but I wonder how much of that is elinks stripping out the visual garbage and stuffing it into /dev/null, and how much is just slow processor speed. The ‘forums are notoriously slow for me (it’s the design scheme), so elinks pausing for a second or two or three is only what I expect. (The Arch forums, by comparison, load exceptionally fast for me on a “normal” machine … well, on this machine too, I guess.)

But there’s not much of a drag on the system that I can blame on elinks. It might be slow, that might be the page, and it might be the processor. But it doesn’t seem to be anything I can say is because of low memory.

One last ace up my sleeve: cmatrix. This little monster has got to cause some sort of dent.

Bah. I give up. It’s taking up processor time, but not memory. The experiment is a failure, gentlemen. No one program is taking up much more than 1Mb at a time, and in that case there’s not much point in trying to find one program that will eat memory to a considerable degree.

I’ll go the opposite direction and open three or four at a time, and see what I get. Here’s snownews spawning elinks, with alpine, irssi and htop all running in their own rxvt-unicode instances. That will multiply the demands of rxvt-unicode several times over, and stack on a grand total of five applications. This should be good.

Well, I suppose that’s an “improvement,” in one way. Seventeen megabytes of swap consumed is definitely a high mark, but standing memory is still only requiring 7Mb. Since this is running freely and without paging, I can only assume that the bulk of what’s needed to do this can be done without disk access.

I suppose there’s something to be learned in this: That even if I dive into the guts of this machine, find the other memory bracket, install the 32Mb chip and successfully reassemble the thing, it might not lead to much of anything at all. As it stands now a running, active system doesn’t seem to need more than the 12Mb I have available, with a bit of swap space as insurance.

And going straight to console might speed things up a little bit because it takes less effort to display these applications in the native video environment, instead of under X. But the run speed isn’t going to improve drastically if I’m not ever paging out to the drive as a consequence of normal use.

The moral of the story: I have a lot to learn. But I knew that three years ago, when I put an Ubuntu CD in the drive and restarted my laptop. You just never stop being a newb.

Build up, don’t tear down

I found a nifty link to some more speedup tips for Arch. In fact, there’s a whole thread here that talks about ways to make Arch boot in a half or a third of the time it takes normally. If you use Arch and you’re not one of those people who runs a machine 24-7, you might find them interesting.

My own speedup tips for Arch are scattered around this blog, with most of them under the Howtos page, but all of them a couple of years old already. I still use Arch, but I don’t bother tweaking it for speed any more. My philosophy toward it has changed a bit.

I left Arch for Crux when I realized I was falling into the same habit I had begun a year before, when I started carving down Ubuntu in hopes of speeding it up. The problem is that both times, my perspective was a little off-kilter.

For my own part, building a system up from scratch is always faster than tearing out parts of another one. I don’t think I’m stepping too far out on the limb when I say that; it’s common knowledge that a Linux system crafted from the ground-up is going to outperform anything that was torn down.

It’s true for Ubuntu — a command-line system with desired packages added on top is going to run faster, probably, than one that was cut down from the complete version. The same thing is true for Arch: When I started recompiling entire systems with different CFLAGS, or building custom kernels, or carving out the default init scripts, I realized that it was time to look for a different brand.

Making Ubuntu into Arch isn’t any more promising, to me, than making Arch into Crux. The work you go through trimming away at Arch is sidestepped completely with Crux, and for some people that’s ideal. It’s true, it’s the difference between an intermediate distro and an advanced one, but if you’re doing all those things in Arch, then you’re ready.

If that sounds like you, I would recommend considering something that gives you more ground-level control, in such a way that you’re not taking extra time slimming things down when you could be building up from a pure core. And if performance is your goal, then the results will be very gratifying. After all, a 16-second boot in Arch is a grand thing on a dual core, but I get those numbers from a 550Mhz Celeron, just as a matter of course.

Think about it. If you want to ask questions, there are a few of us Crux experimenters floating around here, in addition to the standard Crux IRC and mailing lists. And what we don’t know we can research together. It’s part of the learning process. 😉

Lowarch and archlinux-i586

Don’t look now, but if you have an i586 machine (particularly an old one), you might be able to make a little progress in returning your machine to the fray. proc on the Arch forums has taken the initiative to recast the Lowarch project, and described some success in creating current packages tuned to that architecture.

If we’re lucky (because I too am in the same boat), that could mean a proper revision of Arch for i586s, for the first time since around late 2006. And considering that some of these old machines are becoming hard to find, it might be an opportunity to put your antique back on the front line again.

Of course first, you’ll have to scrape that centimeter of dust off the case. 😈

The rebirth of the uncool

The simple fact is this: All too often, in today’s world, mediocrity masquerades as quality.

Let me rephrase that: We allow ourselves to sacrifice quality based on popular representation. Things that look cool — or sound exciting, or are marketed well — take the place of things that are truly well done, or well made, or well created.

I’m not sure what it is about human behavior that allows us to make that mistake. But I am unable to count the number of people I know who are motivated to buy something, or use something, or play something — and not because it’s high quality, but because the allure of the item or the marketing around it entices them.

Case to the contrary: This screenshot.

That is probably the least-sexy screenshot since … oh, I don’t know. Probably since 1988 or so. I know 8-bit computer games that had more graphic flair and visual appeal than that picture right there. Heck, come to think of it, the weak-sauce games I wrote for high school computer class (a long time ago, thank you … and I always got high marks in computer class) had more shazam than that. That’s just plain … dull.

But I can tell you this: I have not seen, played, or even heard of a game with more intricacy, complexity, control or gratification than Dwarf Fortress in decades.

I’m not a hard-core gamer; I’ve mentioned that repeatedly here. I don’t spend much time playing games, usually because I’m engrossed with resurrecting old hardware and getting it out the door again. I don’t play WoW, I don’t follow the gaming industry. Most of the hardware I own can’t even handle Neverball. I do play games, from time to time, but they rank low on my list … somewhere near watching TV or online chat.

But Dwarf Fortress is posing a serious challenge in the battle for my free time. I was almost late putting together that desktop machine I gave away yesterday, because I was too busy orchestrating the innermost structure of my dwarven expedition — designing the underground halls and defenses, directing the construction, managing the workforce and labor teams, providing workshops and recreation areas, rationing for the coming winter seasons, converting raw materials into marketable goods. … Everything.

Sexy it is not. Beautiful it is not. Graphically appealing it is not. It will run on slow, slow machines and that’s actually a bad thing, because it means you don’t have the excuse of claiming your hardware can’t do it.* It’s blocky, chunky, stodgy — even primitive in some ways. And I guarantee that if you break the seal on this one you will not put it down for a week or more. After ten minutes, you won’t care what it looks like.

In a world where all too many games, all too many movies, all too much technology and all too much music is exceptionally poor quality, but sold with a thick veneer of quasi-cool on it, Dwarf Fortress is a complete antithesis. It’s uncool, but I can guarantee that taking even just a moment to try it will hook you.

So make sure that moment isn’t the night before a job interview, or your wedding, or a meeting with your boss. Try it out, but give yourself lots of free time. Transoceanic flight? Good time for Dwarf Fortress. Twenty minutes before picking up the kids from school? Bad time for Dwarf Fortress.

I have no better way of explaining it except to say that high-end, flashy professional games make are … dwarfed by this one. (LOL, a pun. 😀 ) This one has detail, control, plot, challenge, complexity, strategy — it’s just an all-around good game. For once, quality is obvious, and appearances be damned.

They say you either got it or you don’t. This one definitely does.

P.S.: Thanks — or maybe “thanks a lot, pal” — to Bionic Apple for mentioning it on the Arch forums.

*Disclaimer: It actually requires some 3D acceleration so you might not be able to run it on a 100Mhz laptop. However, I’m using an 8-year-old Pentium III with an Nvidia card in it, and it’s running fine.

Dark days

It figures that the day after a week-long winter holiday, I end up with mysterious network failures on my Thinkpad. It’s running Arch right now, and about two minutes after the first startup, the wireless network dropped, and there’s no sign of the outside world.

I have two other machines that run wireless and I’m sure it’s not the network that’s at fault. That is the only one running Arch though, and the fact that it is failing is all the more disappointing. In general, that’s the one I use to manage my daily tasks, manage my e-mail, hold my music collection, watch movies, track my desktop wiki … and yes, it’s only a 550Mhz Celeron.

My fear is that it might be something hardware-related. I didn’t update any core software in the past few days. Looking at /var/log/pacman.log I can see that I synced with the repositories yesterday, but didn’t upgrade. Technically, nothing has changed.

But I’ve tried two different PCMCIA wireless cards — a Buffalo WLI-PCM-L11 that uses the prism module, and a Linksys WPC11 v3 that uses orinoco-cs — and both of them behave erratically.

The Linksys is worse, but that’s the one that was working fine up until this morning. When that one is inserted, I get wacky keyboard behavior like sticking keypresses, one- and two-second-long lags on typing. dmesg is littered with “CMDMODE_ACCESS failed” messages. It’s almost like working with Windows.

I booted to the 2008-06 core CD and tried there, and things were better, but not perfect. No keyboard misbehavior and the Buffalo card would insert and work properly, but the Linksys card is still tetchy. Neither one will associate with my network. I don’t manage my modules or rearrange any boot scripts, mostly because I want Arch to do it all by itself on this machine. So I am fairly certain that my mismanagement hasn’t fouled this up.

The strange thing is (and perhaps this is just my memory that’s failing) I know that this has happened to me in the past — both times running Arch on a wireless machine. I’ll have to scrape this site and see if I can find the reason, but I could swear that this machine and my OLPC were both knocked offline about six months ago, and I never resolved it.

But on the whole this is rather problematic. If it were a software issue, I’d think I’d be able to access the network from the live CD. If it were a card problem, I’d think one of them would work. But what’s scaring me now is the thought that the PCMCIA socket hardware in this machine, which I love dearly, might be at fault. 😦

Edit, 2009-01-07: Well, now it appears to be okay. Whatever difficulty I was having has disappeared, and I haven’t the slightest clue why. Maybe something was interfering with the system. Like gremlins. I’m keeping an eye on this one though. I haven’t quit chasing it yet.

Banquo’s ghost: Lowarch 0.1.1 ISO and torrent

Desperate times call for desperate measures, and since the Lowarch web site has gone offline (presumably the account expired), I’ve taken it upon myself to post my remaining copy of the 0.1.1 ISO online, both as a direct download and as a torrent on LinuxTracker.

Lowarch, in case you don’t know what that is, was an i586 recompile of Arch Linux, and did amazing things for pre-i686 machines. Short of compiling it all yourself, it’s hard to find a faster, more impressive tool for recovering K6-series or similar hardware.

Unfortunately, the “developer” behind Lowarch abandoned the project, the web site fell unattended, and around the last day of 2008, the home page began to show an account closure message. That’s how it goes, when a distro finally dies.

But Banquo’s ghost is still hanging around, since I still have an ISO for it, and I’m sure there are others out there. And given that it’s possible to use third-party repositories to bring a Lowarch system up to date, it’s not worth throwing the whole business away.

This is the first time I’ve ever made a torrent, so I’m not sure how well it will work. LinuxTracker seems happy though, and with any luck it should be fine. As a guide I used this ancient “how-to” on, although I used mktorrent out of the Crux repositories, rather than CreateTorrent or MakeTorrent. The ideas are the same, and it appears to have succeeded.

If you have a little bandwidth, and you don’t mind keeping Lowarch alive for a little while longer, download the torrent and let’s see if it works as expected. Who knows, maybe we’ll be helping out someone with an old Pentium system. … 🙄