May 26

By default, solaris will only let you add 255 IP addresses to an interface. You’ll know you hit the limit when you get an out of buffer message when you try to add your next one. In Solaris 2.5, you’re pretty much stuck with this limitation. In solaris 2.6 and higher, you can run the followng to up that limit as high as 8192. Past 8192, you’ll need to add another interface.

/usr/sbin/ndd -set /dev/ip ip_addrs_per_if 8192

May 23

This assumes you’ve already run the convert spaces script. The following script will use mplayer and lame to convert WMAs to MP3s. Not much to talk about here. The wma is dumped to a wav which is then encoded in lame. You’ll end up with WMAs and MP3s of your music and you can pick and choose what you would like to do with them.

for i in `find ./ -type f |grep -i .wma`; do
mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader $i && lame -m s out.wav -o $i;
cp “$i” “`basename “$i” .wma`.mp3″
rm out.wav
done

May 22

Windows file names can be really frustrating, so I found a script on the web that recurses a directory and replaces every space it finds with an underscore. Good stuff.

IFS=’

#rename direcotories
for (( i=0; i<=j ; i++ )); do
for name in `find -mindepth $i -maxdepth $i -iname "* *" -printf "%p\n"`; do
newname=`echo "$name" | tr " " "_"`;
echo "$name" "$newname";
mv "$name" "$newname";
done;
done
#rename files
for name in `find ./ -iname "* *" -printf "%p\n"`; do
newname=`echo "$name" | tr " " "_"`
echo "$name" "$newname"
mv "$name" "$newname"
done

May 21

Most newer motherboards are shipping with frequency control capabilities in the BIOS that allows the system to control the clock rate at a very granular level. Trouble is that not all motherboards do a very good job of talking to the operating system and letting them know that they are adjusting the clockrate. The end result is some major clock drift. On my Foxcon board under Ubuntu for example, I was drifting 4 seconds for every 1 minute that passed. Keeping 56 seconds per minute essentially. Come to find out, my board was set to automatically try to adjust the CPU frequency based on load in the BIOS and was doing a poor job of it. Note that this is not Linux CPU Frequency scaling that Im talking about. Im talking about the board trying to do it on it’s own. So if your new machine can’t keep time, try checking for any kind of clocking options that might be enabled in your BIOS. Saved me 100 bucks and an RMA.

May 20

The /proc directory holds information about running process’s on a Unix machine, but in Linux it includes a file called cmdline. If you look at this file, you’ll be able to see the entire command as it was executed. For example looking at process with process ID 8281

cat /proc/8281/cmdline
gnome-volume-manager–sm-client-iddefault4

« Previous Entries