Tag: [email protected]

[email protected] Init Script Additions: throttle & unthrottle

January 13, 2010 » Geek

As I’ve posted before, I’ve started running [email protected] on my machines. One issue I’ve found is that on a dual core machine I will sometimes bog down as [email protected] consumes a whole core. That plus a lot of busy Firefox tabs and my box starts to crawl.

To fix that, I added a few pieces to my [email protected] init script, which was originally scavenged from this site, though on Googling there is a much nicer one on the [email protected] wiki. You might just want to apply my changes to that one.

In any case, I just added two commands to throttle and unthrottle the [email protected] application using cpulimit. This way I can add a cron job to manage it, or just throttle it when it starts to bug me.

Here it is if you want it!

[email protected] Team Statistics Scraper

December 11, 2009 » Geek

I created a team for Little Filament on [email protected] Our team number is 172406 (in case you want to join), but I wanted to add our latest stats on the Little Filament site. As far as I can tell there is no API for the stats, so I worked up a scraper in bash.

Basically all it does is fetch the page, then grep and sed it’s way to the variables, finally dumping them into a json file (for easy JavaScript consumption).

The kicker is that the stats server is overloaded or down a lot, so we can’t rely on it and we don’t want to stress it out further. My decision was to poll it at a large interval, 12-24 hours. I don’t have enough clients on the team to exact significant change over 6-12 hours, but I don’t want to fall too far out of date either. So if the server is overloaded and drops it once or twice, not a big deal.

Without further ado, here is the script.

That cranks out fah_check.json, which looks like this:

To see it in action, check out the Little Filament Folding page.