The mythology of spending money on things, or not doing so
A commentator on my entry on considering FreeBSD instead of Illumos wrote in part (about paying Oracle forSolaris 11 instead of going with FreeBSD):
Unless your data is not really worth to you $1-2k per year and thenyou are willing to run it on other platforms. In this case FreeBSD isfine choice.
When I read this (and similar things in other bitsof the comment) it made me viscerally angry. Whetheror not the commentator realized it this is FUD , and FUD of
A decorator for decorators that accept additional arguments
Once you're happy with functions returning other functions (technicallyclosures), basic ordinary decorators in Python are easy enough to use,write, and understand. You get things like:
from functools import wraps
def trace(func): @wraps(func) def _d(*args, **kwargs): print "start", func.__name__ try: return func(*args, **kwargs) finally: print "end", func.__name_
Looking at whether Zen-listed IPs keep trying to send us email
Here's a question: when an IP address listed in the Spamhaus Zen gets rejected, does it come back later orare most visits a one-time thing? This time I pulled 90 days worth oflogs, extracted each day's rejections from Zen-listed IPs, and checkedto see how many IPs showed up in more than one day's logs.
(Because an IP could be trying to deliver stuff right when the logsroll, the safe question is how many IPs show up in
Link: Go at Google: Language Design in the Service of Software Engineering
Go at Google: Language Design in the Service of Software Engineering is an article version ofa Rob Pike keynote on, well, let me just quote:
The Go programming language was conceivedin late 2007 as an answer to some of the problems we were seeingdeveloping software infrastructure at Google. [...]
Go was designed and developed to make working in this environment moreproductive. [...]
The article then discusses what this means and how various aspects ofGo's design were
How Linux servers should boot with software RAID
One of the things that I like least about themodern Linux server environment is how badly software RAID interactswith the initramfs in modern distributions and how easy it is todetonate your systems as a result. Ubuntu is especially obnoxious , but it's not the only offender . When this stuff blows up in my face it makesme angry for all sorts of reasons; not just that things have blownup (usually because I failed to do a magic rain dance, sometimesjust on their own) but also because the
Thinking about how much Solaris 11 is worth to us
As a result of some feedback I've gotten on earlier entries I've wound up thinking about what I'llsummarize as how much Solaris 11 is worth to us, ie what we might payfor it. To start with, is it worth anything at all?
My answer is 'yes, under the right circumstances' (one of thosecircumstances being that we get source code). Despite what I'vesaid in the past about Illumos and FreeBSD , Solaris 11 is still in many
Looking at whether (some) IP addresses persist in zen.spamhaus.org
After writing my entry on the shifting SBL I startedto wonder how many IP addresses we reject for being SBL listed stopbeing SBL listed after a (moderate) while. I can't answer thatdirectly, because we actually use the combined Zen Spamhaus list and we don't log the specific returncodes, but I can answer a related question: how many Zen-listed IPaddresses seem to stay in the Zen lists?
To check this, I pulled 10 days of records from January 18th
You should avoid using socket.SOMAXCONN
There you are, writing a socket-based server in Python,and you've decided that you should heed my advice and make its listen() backlog aslarge as possible. So you write the following code:
s = socket.socket(....)s.bind(....)s.list(socket.SOMAXCONN)
Given that SOMAXCONN is the traditional BSD sockets API name for 'themaximum value you can give listen() ', this looks good and should do
What limits the number of concurrent connections to a server
Suppose that you have a socket-based server/service of some sort andyou would like to know something about its load limits. An easy butartificial limit is how many true concurrent connections your servercan support before would-be clients (whatever they are) start gettingconnection errors.
The obvious but wrong answer is 'the number of worker processes (orthreads) that you have'. This is what I automatically believed foryears (with the result that I generally set very high limits onworker processes for
(Ab)using awk on the fly
Suppose that you have a file with lines of the form:
host1: package1 package2 package3host2: package3 package5ahost3: package1 package2 package3
You want to transform this into something that looks like:
package1 package2 package3 host1 ahost3package3 package5 host2
In other words, aggregate together all of the hosts with a common set ofpackages (in this case, packages to update that require manual work).
One of the problems of modern