Friday, October 31, 2008

Log memory used by a process over time

Messy script. This logs memory usage by the process called "swift" to the file called "log":

while true;do ps -euf | grep "./swift --align" | grep -v grep | awk '{print $6}' >> log;sleep 5; done

Tuesday, October 28, 2008

Beagleboard HandheldsMojo no serial console

On first boot on Handhelds console (installed using instructions from: http://elinux.org/BeagleBoardHandheldsMojo) the serial console doesn't appear to be setup. To set it up mount the SD card on your PC and add a file at /etc/event.d/ttyS2 with the following contents:

# ttyS2 - getty
#
# This service maintains a getty on tty6 from the point the system is
# started until it is shut down again.

start on runlevel 2
start on runlevel 3

stop on runlevel 0
stop on runlevel 1
stop on runlevel 4
stop on runlevel 5
stop on runlevel 6

respawn
exec /sbin/getty -L 115200 ttyS2



also add ttyS2 to /etc/securetty

mmcinit causes reboot on beagleboard

mmcinit causes a beagleboard to reboot if it can't draw enough power. I had this problem when powering the beagleboard over USB from a unpowered hub. Plugging directly in to the PC solved the problem.

Thursday, October 9, 2008

last.fm-ripper: Undefined argument in option spec

I couldn't get last.fm-ripper to work, it kept giving the error "Undefined argument in option spec". I commented out a bunch of stuff then it worked again, watevar! Here are the random changes I made:

GetOptions(
#'help|?' => \$help,
# 'debug|d' => \$debug,
# 'no_covers|n' => $no_covers,
'artist|a=s' => \$artist,
'username|u=s' => \$username,
'password|p=s' => \$password,
'output_dir|o=s' => \$output_directory#,
#'aws_token|w=s' => \$aws_token
);




I don't know perl I don't want to know perl.