Debian on the SGI O2

Yet another post on the net about installing Debian on the SGI O2. Mine is a bit on the lower end, it runs with only 64 MiB RAM on an R5000 CPU. I’m still pretty amazed by the EFI-like BIOS with mouse support. That is pretty advanced for a machine from 1996!

But back to topic: Most tutorials and tips about installing Debian on an O2 that you find online are a bit dated by now. Also, most of those sites link to a tutorial by Jiann-Ming Su, which is offline by now. Thanks to the Internet Archives WayBackMachine I was still able to retrieve it:

Installing Debian on SGI O2 by Jiann-Ming Su

Thank you, Su, Martin, Jon and all those other friendly folks for your documentations!

Convert a UNIX timestamp into a date

Was just googling for a fast way to convert a timestamp into a date without having to leave the shell (yes, I’m lazy 😉 ) and thanks to Anton found some solutions:
clipped from anton.lr2.com

BASH: Convert Unix Timestamp to a Date

Awk has a wrapper for the standard C strftime function:
echo $EPOCH|awk ‘{print strftime(”%c”,$1)}’
[UPDATE]
# date -d @1000000042
Sun Sep  9 01:47:22 GMT 2001
But this only works on newer versions of date.  It fails on my FC2 server and my Debian Sarge machine, but works fine on Ubuntu Feisty and Debian Etch.

When NFS4 shares with Kerberos encryption will not mount after an upgrade to Debian Squeeze

Then maybe you are facing this problem:
clipped from ubuntuforums.org
kinit in krb5-user (Ubuntu 10.04 beta2) not working

To use Kerberos, I installed the ssh-krb5 & krb5-user package in Ubuntu 10.04 beta 2, but when I call kinit, it gives the following error message:

No supported encryption types (config file error?) while getting initial credentials

I had this same problem. The reason for me was that my KDC requires des-cbc-crc encryption, which is apparently deprecated as of 10.04. After a Google search, I found:

„Please also note, that des-cbc-crc encryption is depreciated and, starting with Ubuntu 10.04, is no longer supported by default in the Kerberos libraries. For nfs4 to work, you need to add allow_weak_crypto = true to /etc/krb5.conf“
under [libdefaults] section

Printing dd status

clipped from prefetch.net
The dd utility doesn’t report status information by default, but when fed a SIGUSR1 signal it will dump the status of the current operation:
$ dd if=/dev/zero of=/dev/hda1 bs=512 &
$ kill -SIGUSR1 1749
1038465+0 records in
1038465+0 records out
531694080 bytes (532 MB) copied, 11.6338 seconds, 45.7 MB/s

RRDs are architecture dependent

When migrating our old monitoring server (x86), running munin and smokeping, to our new virtualized platform (x86_64), I ran into a problem. After copying the RRD-files to the new system I did not get nice graphs, but instead the error message „This RRD was created on another architecture“ in the logs. After searching around in the ’net I found the solution in a forum post which worked for me:
clipped from rrd-mailinglists.937164.n2.nabble.com

How do I move my rrds to my new MRTG system.

I dont know if rrdtool has a option for doing it recursivly,

but something like this should do it if the filenames stay the same:
for i in *.rrd; do rrdtool dump $i > `basename $i .rrd`.xml; done
for i in *.xml; do rrdtool restore $i `basename $i .xml`.rrd; done
HTH
Matthias.Merk

Less is more: the hidden treasure of less command

Wow, I just stumbled over less‘ PDF display capability and found this blog post with even more awsome features of less:
clipped from www.cyberciti.biz

Less is more: the hidden treasure of less command
# less +53 /etc/httpd/httpd.conf
Ok let us display an error at line number 53 (no need to scroll down all 52 lines)
Search and highlight particular text:
# less "+/*VirtualHost" /etc/httpd/httpd.conf
lessfile and lesspipe are programs that can be used to modify the way the contents of a file are displayed in less. What this means is that less can automatically open up tar files, uncompress gzipped files, and even display something reasonable for graphics files.
less command supports following extensions:

  • *.arj

  • *.tar.bz2

  • *.bz

  • *.deb, *.udeb

  • *.bz2

  • *.doc

  • *.gif, *.jpeg, *.jpg, *.pcd, *.png, *.tga, *.tiff, *.tif

  • *.lha, *.lzh

  • *.iso, *.raw, *.bin

  • *.pdf

  • *.rar, *.r[0-9][0-9]

  • *.rpm

  • *.tar.gz, *.tgz, *.tar.z, *.tar.dz

  • *.gz, *.z, *.dz

  • *.tar

  • *.jar, *.war, *.xpi, *.zip

  • *.zoo
Watch a log file
Watch maillog in real time, useful to troubleshoot mail server problem
less +F /var/log/maillog
less +F /var/log/message
You can also use tail command:
tail -f /var/log/maillog

Testing a null modem serial connection under linux

Used this to test the connectivity of two HA-Nodes connected via a null modem cable on their serial ports. Also nice to find which ports are connected, since not every machine has their ports mapped to the same devices…
clipped from www.ibm.com
Set up the serial connection
Use a null modem cable to connect the two nodes through their serial ports. Now test the serial connection, as follows:
On ha1 (receiver), type:


cat < /dev/ttyS0

On ha2 (sender) type:


echo "Serial Connection test" > /dev/ttyS0

You should see the text on the receiver node (ha1). If it works, change their roles and try again.

Installierte Debian Pakete auf einen neuen Rechner übertragen

sudo dpkg --get-selections "*" > datei.txt
sudo dpkg --set-selections < datei.txt
sudo apt-get -u deselect-upgrade

Bilder rasch und schnell mit imagemagick verkleinern

clipped from snippets.aktagon.com

for image in *.jpg; do convert $image -resize 800x600 800x600-$image; done

Probleme mit 32 Bit Java Applikationen auf 64 Bit Systemen

Scheinbar haben gewisse Java-Applikationen Probleme mit x86-64 GNU/Linux-Distributionen. Mich traf es, als ich die diesjährige Version des Steuern-Programmes auf Ubuntu 8.04.2 amd64 (Hardy Heron aka der gehärtete Reiher ;-). Zum Glück fand aber bereits jemand eine Lösung für das Problem. Man muss einfach noch die 32-Bit-Java-Version installieren und zum System-Standard machen:

clipped from forum.frostwire.com

Re: after upgrading to Ubuntu 8.04 frostwire is not starting.

by xbj9000 on Fri May 16, 2008 3:13 pm

I have a solution for those of us running 64 bit systems:

sudo apt-get install ia32-sun-java6-bin
sudo update-alternatives --config java

Then choose the ia32 version of Java 6.