July 2008
4 posts
"top" for filesystem usage...
Does your mac sometimes slow down to a crawl due to hard drive usage, and you can’t tell what’s causing it? I whipped up a little ruby script to act like “top” for filesystem usage. #!/usr/bin/env ruby data_read = '' process_times = Hash.new(0.0) # Clear screen print 27.chr + '[2J' # Open a pipe to fs_usage for file calls. data = IO.popen('fs_usage -wf filesys') while...
Jul 31st
I'm just sayin'...
Cheetahs Never Lose: 8 Ring of Fire: 9 http://www.sandlotsports.biz/leagues/teamview.asp?teamId=1254&leagueid=144 :)
Jul 29th
Ruby 1.8.5, REXML, and You
In my previous post, I mentioned that I was trying to track down why our mongrels (running Rails) at work were spinning out of control for no apparent reason.  However, finally being able to generate a backtrace from those mongrels led right to the issue. The relevant portion of the backtrace looked like this: from /usr/lib/ruby/1.8/rexml/encoding.rb:59:in `check_encoding’ from...
Jul 28th
Backtraces from Live Ruby Processes
We had some out-of-control mongrel processes at work recently… They wouldn’t respond to anything except a “kill -9”, were taking 100% cpu time, and spinning for hours before responding to any new requests. Unfortunately we had no idea what could be causing it, either. Loading up gdb and printing out a backtrace only gives a bunch of “rb_call” type entries,...
Jul 24th