Today, one of my colleagues inadvertently set off a linear fork bomb of ksh processes on a critical infrastructure machine. Linux held up well to this, since basically these processes were just entries in the scheduling table and very little else. The system was pretty responsive, albeit with a load average hovering between 800 and 3000, and we ran out of process identifiers fairly quickly.
Clearly, all of these processes would have the same process group, so we just needed to kill the process group as a whole. My other colleague and I came up with a good, stupid simple solution that neither of us had immediately thought of. As it turns out, Perl’s kill() system call interface has an interesting caveat that allows you to kill processes in exactly this way: when the signal is specified as a negative number, the function treats the other parameters as process groups to kill.
Actually, it turns out a lot of systems and shells allow specifying the process group ID as negative numbers to kill command/built-in where the pids would ordinarily go to specify the same action. It’s too bad my colleague was using an old version of ksh.
I work as a database administrator in a global team looking after a large financial institution’s relational database plant. For better or worse, this plant is 100% COTS; we’ll see what I can do to change that.
While database administration in our group is awesome (computing + adrenaline = fun), I most enjoy the time spent writing internal tools in Perl and C, from compiled plugins for DB2 to automation solutions, and analyzing system faults in Linux.
Evangelizing and teaching new trends, technologies, and best practices to my group is as important and enjoyable as the code I write, though. I love the reaction I get from disciples who finally realize and understand the power of git and zsh.
The company I work for somehow decided to get their SSL certificate for their employee portal from a CA not trusted by one of the main applications on the portal, the Citrix Client. (There may be an addition of “Xen” in the actual product name, who knows).
I received the error:
“You have not chosen to trust “UTN-USERFirst-Hardware”, the issuer of the server’s security certificate (SSL error 61).
The answer is fairly clear: we need to add this particular SSL cert, or the CA’s root cert into our trust anchor. To do this, we could save this cert and put it in the right place, or we can trust that OpenSSL has the appropriate root certs.
I chose the latter. To do this, we simply move the certificates trusted by the Citrix installation and symlink to the OpenSSL-based certs. Not rocket science.
The following paragraph from Benvenuti’s book really made me step back and take a look at the bigger picture:
A device driver can also disable the egress queue before a transmission (to prevent the kernel from generating another transmission request on the device), and re-enable it only if there is enough free memory on the NIC; if not, the device asks for an interrupt that allows it to resume transmission at a later time. Here is an example of this logic, taken from the el3_start_xmit routine, which the drivers/net/3c509.c driver installs as its hard_start_xmit function in its net_device structure…
That passage is just brilliant. Count the occurrences of jargon there!
I guess i should read more arXiv papers to better understand how much larger the world actually is.
I’ve always wondered why Macs could wakeup from sleep by a mere keystroke, but my Linux boxes required me to press the power button. It turns out you can enable wake from suspend/hibernate in Linux by adding the following to /etc/rc.local, which is run at startup:
for i in <code>/bin/grep USB /proc/acpi/wakeup | /usr/bin/awk '{print $1}'</code>;
do
echo $i > /proc/acpi/wakeup;
done
I’ve started to use ratpoison on my netbook. I’ve made a script that displays a menu of power-related actions and the current state of the battery. Here is a screenshot:
About: [some open source project] is a real-time collaboration (RTC) server. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber). [some open source project] is incredibly easy to setup and administer, but offers rock-solid security and performance.Changes [in the new version]: A security flaw allowed authentication to be bypassed, allowing arbitrary code execution. This was fixed. JDBC and JID optimizations were done.
(Emphasis mine).
Wait, really? rock-solid security != arbitrary code execution, last time I checked.