25/06/2008

FlexLM Licence Manager Tricks (IDL version)

This is more of a very special entry for myself in order to store information - but maybe for some of you out there information of this might be useful.

The FlexLM Lincense manager is used e.g. by idl to distribute floating licenses. It uses two TCP/IP ports for communication, the first normally being 1700, the second one is chosen randomly in the standard installation. To fix the second port (which might be useful in order to configure the firewall of the server running it ;-) ) add the following to the specific license.dat file you received:
DAEMON idl_lmgrd /usr/local/itt/idl70/bin *PORT=31700
Another important step is to run the FlexLM license manager as a non-privileged user - which you can achieve by the following procedure:

  1. create a non-privileged user flexlm with own group and own user id - password set to * in order to avoid direct login and give it the standard shell /bin/sh

  2. locate the license files and manager executables and change their access rights to readable for the flexlm user (and group).

  3. locate the startup script (in my case on a SuSE 10.2 machine it is stored in /etc/init.d/sys5_idl_lmgrd)
    and modify the line where the daemon is started to:
    su flexlm -c "{original command line in startup file}"
  4. in the startup script add the line
    umask 022
    directly after
    #!/bin/sh

09/06/2008

Dumping a disk image to a remote share

Situation: You have a samba share on a networked PC (if not, set up a samba server) a broken system partition you want to back up before screwing with it, a Linux rescue CD and no available movable hard disks. Configure your network with ifconfig/ifup or the correspondig utilities on the rescue disk. Mount your Samba share with
# sudo mount -t cifs -o username=<yourusername>,password=<yourpassword> //ip.of.network.pc/<nameofshare> /<some mount folder>
Knoppix e.g. has an empty mount folder at /media/test.
Now the image can be dumped with
# dd_rhelp /dev/<sdxx> /<some mount folder>/<some image>

So far in theory: practically, I couldn't find ddrescue on my Knoppix 5.1 live CD (no idea why, maybe I was just tired), so I just plugged the drive into good old Archimedes again and dumped the drive locally before it got completely unreadable. However, dd onto a samba share worked up to the first I/O error, as expected, so dd_rhelp ought to work on the same lines. Booting the Knoppix 5.3 DVD afterwards produced a perfectly reasonable /sbin/ddrescue.

08/06/2008

Deleting more files tham rm can handle

I had to delete something between 20000 and 100000 bitmaps at work, which exceeded the 128k buffer for rm arguments.
Solution and extended discussion found here:
$ find . -name '*.bmp' | xargs rm
$ find . -name '*.bmp' -print0 | xargs -0 rm in case the file name contains spaces.