If you experience a slow SSH connection to a Solaris 10 host while after connection everything works fine, then read on !
Continue reading SSH slow to connect to a Solaris 10 host
If you upgraded your Ubuntu on an IBM T40 Laptop only to find out that there is no sound anymore, you’re not alone in this 😉
Follow the bug report for more information !
Edit 2008-05-11 : As of today I don’t have this problem anymore … update your machine if you haven’t yet !
Edit 2008-06-22 : Sound vanished again … I really need to look into this before this drives me crazy !!
Sound seems to come back and vanish unpredictably reboot after reboot …
CFEngine can do wonders to keep a cluster in shape, but it can be very useful for a single server as well. Here is a configuration sample to monitor a few common services and restart them should they fail.
Continue reading CFEngine : Checking for processes
I ran into this into the following article, “Learn 10 good UNIX usage habits“. This article is mainly common sense, but there are interesting points, such as :
- avoid piping when you can, in order to save performance (the classical construct grep | wc to count the lines is useless as most versions of grep can count with grep -c)
- use awk to “grep” on a specific field of a line with “… | awk ‘$1 == “XXX”‘ which is cool and I never use
- the find | xargs construct (I’d add “find -print0 | xargs -0”, useful if your find brings back filenames with a space inside …)
All in all it is worth a reading, if only to refresh your memory.
I currently manage all my X10 home automation with MisterHouse which is a fantastic tool but is a bit on the heavyweight side. Plus you need to know a bit of Perl to take full advantage of it.
If you are looking for something simpler to use, you might want to consider HEYU. Continue reading X10 Home automation : Heyu a tool for managing a CM11
A common problem when you deal with a pool of servers (clusters or server farms, you name it) is to execute the same command line on each server. It is usual to solve this with a “for” construct such as :
for i in server1 server2 ; do ssh $i "uname -a"; done
But this is basically re-inventing the wheel everytime. Here comes Distributed Shell (DSH).
Continue reading dsh : a distributed shell
I’m back from a 3-day-training about clusters with Linux which was pretty exciting, and here are the main points which were covered :
- Vitualization with Xen
- Sharing data with GFS / GNBD
- Clusters with RedHat Cluster Suite
- Load Balancing with Linux Virtual Server (LVS)
Continue reading Linux : Clusters, Vitualization, High Availability, Load balancing
This little Perl one-liner can get handy when you need to translate “time in seconds since the Epoch” (for example in logs) to local time :
% perl -e 'print scalar(localtime(1202484725)), "\n";'
Fri Feb 8 16:32:05 2008
This was pretty useful today when browsing through Nagios event logs, where times are given in seconds from the Epoch.
By the way, the Epoch is defined as 00:00 UTC on January, 1st, 1970.
If you downloaded an ISO file and you want to mount it into your filesystem, you can proceed as follows :
spaghetti% sudo losetup /dev/loop0 cdrom.iso
spaghetti% sudo mount /dev/loop0 /mnt
spaghetti% ls /mnt
Autorun.inf setup.exe setup.ico
spaghetti% sudo umount /mnt
spaghetti% sudo losetup -d /dev/loop0
This will use the feature known as “loop devices”, which lets you use a file as a device, and subsequently mount it as it would be one.
You can of course mount an ISO using loop devices, but there is more to it. You could for example mount a ciphered file containing an EXT2 filesystem.
Check out the man page for more details.
As you might have read in my previous post about accessing your cell phone with the AT-commands under Linux.
If not, you might want to start there for a little context.
I finally wrote and released on CPAN a Perl module which will help to automate cell phone operations such as saving/restoring the phonebook or sending an SMS.
Examples are included in the documentation. I believe I made it easy to use, but let me know if I’m wrong 😀 .
Features will be added on demand (if possible of course 🙂 ).
The module is Device::Modem::GSM.