Site Index

windows questions from a noob

created: Mon Jul 3 19:31:51 2006
last mod: Wed Jul 19 08:55:19 2006
everyone's favorite OS

Is there any way to load a driver manually?

Is there any way to list the loaded drivers?

If the machine crashes, is there a human-readable system log anywhere?

When using the GUI to configure the network, what's taking so long when I click "OK"?

When the startup is taking forever, is there a way to see what it's doing?

By default, every file is executable by any user. Is there any way to change that?

My impression is that a lot of priority is given to the GUI. Unknown stuff is going on in the background, but the user interface runs fairly snappily, considering how heavyweight it's supposed to be, and considering all the unnecessary animation. This is on a pIII with 256 Mb of RAM.

A strange thing I noticed is that you can't delete a running program from the disk. That's not necessarly bad - in fact it could be good. If the priveleged user executes a program that's writable by anyone, but only reads part of it, another user can come along and replace parts of that program with his own, thereby running code as the privileged user. Of course, in Windows this sort of security measure probably makes no difference. In Linux, too, an unpriveleged user canescalate privileges on a lot of systems.

windows questions from a noob is filed under sysadmin (10) windows (2) questions (5) .

the myth of cheap hardware

created: Sun Mar 5 16:59:39 2006
last mod: Tue Mar 14 12:59:05 2006
cheap hardware

The myth is: computer hardware is cheap now, so even if it's less reliable it's ok, because you design your system for redundancy, and when a system fails you just chuck it out and plug in a new one.

The problem is, the cost of hardware is an insignificant part of running a computer system.

You have a bad drive.

You think you have a bad drive. Not sure. Something is wrong. Could be that cheap motherboard, too. Excercise the drive. Crap, the system froze. The cheap system still cost $1200. OK. Chuck the drive. Seems to be OK now. Wait, the other drive is dead. Or is it?

See, the myth of cheap hardware is a myth because hardware (cheap) is not that cheap. It's not 5 times cheaper, it's half the price, or 3/4. And it's not just slightly less reliable, it's a good deal less reliable.

From now on, I buy the good stuff.

the myth of cheap hardware is filed under sysadmin (10) computer (50) .

a script for watching /tmp/

created: Wed Feb 22 11:00:00 2006
last mod: Wed Feb 22 11:00:00 2006

Here is a good server crontab command-line: ls /tmp/ |diff /root/ls_of_tmp - ; ls /tmp/ > /root/ls_of_tmp. What's hapening is that you're storing a list of whatever is in /tmp/ and notifying whoever gets the crontab email whenever it changes. You might want to modify this with a grep -v sess_* or a grep with a regular expression if you run PHP or Ruby on Rails and the session files get stored in /tmp/.

There are programs that will do the same thing, but this one's simpler. It's good to keep an eye on /tmp/ directories because it's where attackers will upload their attacking stuff, some times. You could also watch other places with the same script.

a script for watching /tmp/ is filed under computer (50) sysadmin (10) scripts (4) .

apache benchtest mania

created: Thu Jan 12 12:27:41 2006
last mod: Thu Jan 12 15:45:40 2006

I've been getting really in to benchtesting recently. Apache httpd comes with this program called ab - apache benchtest. Admittedly, my benchtesting skillz are lame, but some interesting things:

Interesting thing 1: I can't get the httpd to go higher than about 200 req/second when using mod_rewrite, even with a super-simple rule that just sends everything to one php script. (This system will push about 1600 req/sec for a static html page.)

IT2: All the OO php stuff is sloooow. Cake, a sort of php-on-rails, does 50 req/sec just serving the hello-world. Two other php web-dev frameworks are not much better. They will push about 250 req/sec, which is enough for production but not super.

Seems like performance of just reading files is slow. This is corroborated by the benchtest for a default apache-gnerated index of an open directory with about 15 files in it. This only goes at 400 req/second! Better to write your own html index pages.

IT3: a php script that connects to the DB and does a request with several left-joins will run at 600 req/sec. This is without any connection pooling. That's pretty good. Performance degrades, however, if one of the tables gets over 100 rows. So the connecting is fast, but the querying can be slow.

The command for most of this is along the lines of ab -c100 -n10000 http://localhost/. The rewrite rules were like

RewriteEngine On
RewriteBase  /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.* /demoindex.php [L]

Disclaimer: I don't know what the fuck I'm talking about. All that stuff about file opening and mod_rewrite might be total bullshit. Or not.

apache benchtest mania is filed under test (3) sysadmin (10) .

webjay on new servers

created: Fri Oct 7 12:53:00 2005
last mod: Tue Nov 15 23:23:21 2005
cranes from Djumbo' on flickr

This week Lucas and I moved WebJay to new servers and the performance problems have gone away, for now. There are still thousands of little things to obsess over, but in general the new boxen are serving quite fast.

If you have not yet checked out my WebJay playlists, you are hereby invited to do so.

It is a pleasure to be a small part of such an interesting project.

webjay on new servers is filed under webjay (5) sysadmin (10) .

MySQL 5.0 out

created: Tue Oct 25 11:36:13 2005
last mod: Tue Nov 15 23:21:53 2005

MySQL 5.0 is out! But does it support crunchy tables? Postgres has had crunchy tables since 3.1 beta. And redundant sessions. MS SQL Server has supported those for years! And what about evil bit storage? When are we going to have a specific data type for malicious single-digit binary values? Because performance on a relational data store is inversely proportional to the number of data types you have to shoehorn in to the varchar field.

Of course, if you look at the changelog, there are a lot of great new features in 5.0. They've finally merged incrememtal backoff into the stable branch of the tree. There's also a new field that holds nothing but tabs. Not sure if that's an ASCII or unicode tab, or both.

I can't wait for 5.1.

MySQL 5.0 out is filed under sysadmin (10) tech_announce (3) software (6) .

NetworkManager == evil

created: Fri Mar 25 09:33:19 2005
last mod: Sun Nov 13 18:01:08 2005

I have traced a ton of networking problems I have had over the last few days back to a utility called NetworkManager, which I just uninstalled. This thing, which starts through some unknown process, runs as root, changing /etc/resolv.conf and changing my wireless networking configuration (to wireless networks that it can't join), and won't let me, even as root, change them back if it is running.

But, the most terrible thing is, there is no dcumentation, and no man page.

This is my web-based warning not to use NetworkManager until somebody writes up some documentation.

By the way, here's the NetworkManager on Debian/Ubuntu mini-howto. Check out the NetworkManager home page. If I'm wrong, and there is docuentation, I wil certainly correct this post.

NetworkManager == evil is filed under sysadmin (10) linux (4) .

Top ranking

created: Tue Sep 27 12:55:00 2005
last mod: Tue Sep 27 13:55:28 2005

I had the same problem with only one CPU showing up in top. What's scary here is that the wrong answer leads to all sorts of unneeded investigation of the proc mechanism and the kernel. Only one person knows top.

Top ranking is filed under sysadmin (10) linux (4) .

blog script in an htacess file

created: Sun May 30 11:11:11 2004
last mod: Thu Nov 18 18:41:39 2004
I spent some time this weekend working on blogging software that consists only of an htaccess file. didn't get too far, but you can try it out if you like:

ServerSignature Off ErrorDocument 404 "document not found.

home ErrorDocument 403 "forbidden.

home ErrorDocument 500 "error.

home IndexOptions NameWidth=* FoldersFirst FancyIndexing SuppressSize SuppressHTMLPreamble SuppressDescription FoldersFirst IconsAreLinks IconWidth=1 IconHeight=1 #SuppressLastModified ReadmeName /foot.html HeaderName /head.html IndexOrderDefault Descending Date # AddIcon /icons/unknown.gif .. IndexIgnore ".." foot.html head.html

This goes with some HTML files called foot.html and head.html that hold the html header and footer stuff, like the doctype declaration, the tag, etc. Seems like you need to write a replacement for mod_dir or you need some sort of script. Here is a really bad script:

#!/bin/sh echo Content-Type: text/plain echo echo echo WEBLOG /bin/cat `/bin/ls -tR *.html | /usr/bin/head -n3` echo echo ---------------------------------------- echo OLDER ENTRIES /bin/ls -tR *.html | /usr/bin/tail -n +3 This script cats, or prints to the browser, the three most recently modified files in the directory, and lists the rest.

blog script in an htacess file is filed under computer (50) web (36) blogging (21) sysadmin (10) .


created: Sun Aug 10 11:11:11 2003
last mod: Tue Nov 16 13:05:46 2004
Though Cnet's headline, "Merrill Lynch boots outside ISPs," is at best inaccurate, Merrill Lynch's new policy of blacking access to outside email services makes a lot of sense. Users have had a few years to get used to working with computers. Many have, and many have resisted learning anything about their job tool. This is fine, as not all users need to be power users, as long as they don't compromize security through lack of giving a shit. Security is really the administrators' job, and one huge hurdle is going to be to take back control over what users are able to do with "their" computers.

The other thing is, many of these financial firms are required to keep a careful accounting of their communications. Expect to see this sort of thing happening more often. Ah, the joys of being root.
> From what I've seen, a lot of users would actually benefit from having their ability to surf the 'net and chat on IM taken away. They would gt their job done faster and have more time to go home early or to relax.

This does not go for everyone.

understandable is filed under computer (50) sysadmin (10) users (3) .