Archive for April, 2005
-
10 Apr 2005
M just looked over my shoulder at the list of blogs that I read, and said "Do you really read that much shit every morning? How do you ever get any work done?"
Discuss -
7 Apr 2005
Once a process in Linux is running for more than 24 hours, it's impossible to get an exact measurement of its start time from ps. The best you can do it something like this:
lingalls@foobar:~$ ps -o "user pid stime tty comm" -u lingalls
USER PID STIME TT COMMAND
lingalls 32237 Apr06 ? gconfd-2
lingalls 11813 Apr06 ? gnome-session
lingalls 11940 Apr06 ? utaudio
lingalls 11950 Apr06 ? utslaunch
lingalls 11951 Apr06 ? utmhscreen
lingalls 11960 Apr06 ? utaction
lingalls 11975 Apr06 ? ssh-agent
lingalls 11979 Apr06 ? bonobo-activatiWhich is completely unhelpful. So I wrote a script to calculate the accurate starttime from information in the proc filesystem. Shared here for your conveniece:
stime ()
{
if ( test \! -d /proc/$1 ); then
echo "No process $1";
return;
fi;
U="`awk '{print $1}' /proc/uptime | sed -e 's/\.//'`";
N="`awk '{print $22}' /proc/$1/stat`";
D="$(( (U-N)/100 ))";
perl -e 'print scalar localtime(time - shift)."\n"' $D
}Copy and paste that script into your bash or ksh session (or append it to your .bash_profile or .profile), and then run "stime PID".
-
6 Apr 2005
Reading through this four-and-a-half year old thread on the demise of MetaFilter bends my mind. I find it extremely ironic that the linked article complains about the increase of noise to signal in the blue, but the comments are some of the most well-thought, cogent, and intelligent things I have ever read on MeFi. I wonder what the author thinks about the current state of the site.
-
5 Apr 2005
Congratulations to Brian for getting his first full-time job at TV Guide On Screen in Bedford, MA, outside of Boston!
Update: Also, he passed the test he needed for graduation! Hooray!
-
2 Apr 2005
This is a test of the moblogging interface that I'm setting up. Some other weirdos are going to be testing this interface as well, so any questionable things inside are not necessarily my responsibility.
Read more... -
1 Apr 2005
The conventional wisdom for when you're pulled over by a traffic cop is to not admit anything. You're always told to deny knowledge. "Sorry, officer, I don't know how fast I was going." I've never been able to do that convincingly, so I usually try to just be deferential and apologetic. It doesn't really work, but it's better than having the cop kick out my tail light and give me another citation.
This morning, I was pulled over on the I-8 on-ramp in Naugatuck. The officer asked me if I knew why I was stopped. I wasn't sure, but I had a pretty good idea. "Because I didn't fully stop at the stop sign?" "Yup." I got a written warning, and he told me that it was because I owned up to what I had done. If I had argued (and I bet traffic cops see a lot of that) or said I didn't know, he said he would have given me a ticket for violation of §14-301(c). (Well, he didn't cite the penal code section, but it was implied.) I'm glad that my wuss-ness saved me a ticket.