Mailbag
This month's answers created by:
[ Amit Kumar Saha, Ben Okopnik, Kapil Hari Paranjape, Karl-Heinz Herrmann, René Pfeiffer, Neil Youngman, Raj Shekhar, Rick Moen, Samuel Kotel Bisbee-vonKaufmann, Thomas Adam ]...and you, our readers!
Still Searching
Sudden Failure on Centos
Smile Maker [britto_can at yahoo.com]
Sat, 7 Jul 2007 02:35:58 -0700 (PDT)
Folks ,
I have got centos 5 on my box and i went through the default installation which creates LVM and mounts in /.
When i just rebooted linux thrown error :
"System lookup error: mount:undefined symbol:blkid_get_cache"Any advice.
Thanks & regards, Britto
XEN Installation Problems on Ubuntu 7.04
Amit Kumar Saha [amitsaha.in at gmail.com]
Mon, 2 Jul 2007 15:56:06 +0530
Hi all
I finally installed Xen using Synaptic on a fresh installed version of Ubuntu 7.04 (32-bit). For some reason the earlier efforts did not succeed However now I can boot to my custom Xen enabled 2.6.19 kernel.
Is there a problem with the amd-64 version of XEN? Can some one confirm this?
Cheers,
-- Amit Kumar Saha [URL]:http://amitsaha.in.googlepages.com
Clock problem
Jimmy Kaifiti [dgeemee03 at hotmail.com]
Mon, 30 Jul 2007 12:27:48 +1200
Hi , my name is Jimmy,can anyone help me fix the time on my PC. I change the Battery so many time ,I mean the new CMOS Battery ,but my time is still not read correct
Keeping indices of filesystems to handle backup archives
René Pfeiffer [lynx at luchs.at]
Wed, 11 Jul 2007 18:06:59 +0200
Hello!
So, here's my question about that index problem I mentioned in the answer to Ben's question about backups.
Imagine you have two backups servers. Server A keeps a rather recent copy of live servers. Server B tries to archive stuff from server A in order to keep recent backups recent and to save space on server A. Of course this means that server B keeps accumulating files and directories. In order to avoid this one could think of a strategy of deleting files according to a mathematical distribution. There's a tool called fileprune which does just that (http://www.spinellis.gr/sw/unix/fileprune/). I found it by browsing through an old issue of ;login:. fileprune deletes data by using a Gaussian, exponential oder Fibonacci distribution. The problem is that fileprune needs to read the metadata of the entire tree into memory before it can decide which files to delete. Backup storage may have millions of files and directories.
I'd like to ask the filesystem directly "which files have an access time of older than X" and get an answer. In the database world you have indices for that. (Most) filesystems don't have such things (at least not exported to userspace), so you would have to maintain one for yourself. This could be done by the Linux kernel's Inotify API which tells you what changes were done in a specific filesystem tree. I tried it, it works, but I have no idea if I catch every modification when rsync or other tools come along (I am going to test this with higher load as soon as my load is lower).
Another way is to see whether existing filesystems have similar functionality. I believe Reiser4 went into this direction. Yet another way is to parse the filesystem tree seperately in order to maintain a metadata index.
Do you have some more ideas besides writing a new filesystem?
Just being curious, René.
Linksys router
Stelian Iancu [stelu at siancu.net]
Tue, 3 Jul 2007 15:05:06 +0200
Hello all,
I have recently received a Linksys WRT54GS wireless router from a friend of mine who had it laying around and didn't need it anymore. He told me he changed the firmware of the device several times, when he originally bought it and now he doesn't remember which firmware is installed.
So how can I figure out which one it is? I tried to connect with Firefox to the specific IP administrative addresses of DD-WRT and OpenWRT but there's no response.
Any help is more than appreciated!
With regards, Stelian Iancu
Our Mailbag
Things Debian Project Leaders Do
Kapil Hari Paranjape [kapil at imsc.res.in]
Fri, 27 Jul 2007 17:09:08 +0530
Hello,
Well one of the things at least! http://sam.zoy.org/zzuf/ (Also available in Debian testing of course!) Quite a neat toy!
Regards,
Kapil. --
[ Thread continues here (3 messages/3.00kB) ]
Latex Editors
Amit Kumar Saha [amitsaha.in at gmail.com]
Thu, 12 Jul 2007 16:22:43 +0530
Hey all,
Suggest me a good, complete LATEX system - editors, typesetting system - preferably for Ubuntu (if thats important).
Cheers,
-- Amit Kumar Saha [URL]:http://amitsaha.in.googlepages.com
[ Thread continues here (13 messages/12.67kB) ]
perl: forking and children.... again
Ben Okopnik [ben at linuxgazette.net]
Wed, 4 Jul 2007 22:37:56 -0400
As sometimes happens, shortly - or not so shortly - after we finish a discussion in TAG, more info about the problem pops up out of nowhere, usually as a result of a completely unrelated Google search. I swear, if we were to have a discussion about Martian blood-drinking weasels, next week I'd run into a "The Vampire Mustelids of Ares: A Personal Interview" while searching for soap-scum removal info...
Anyway, Karl-Heinz: while I was fiddling about trying to come up with a "max-spread" sorting algorithm [1], I ran across a reference to Parallel::ForkManager on 'http://perlmonks.org'. Doing a quick lookup on CPAN came back with this (snipped from the documentation):
This module is intended for use in operations that can be done in parallel where the number of processes to be forked off should be limited. Typical use is a downloader which will be retrieving hundreds/thousands of files. The code for a downloader would look something like this: [...]This sounds like exactly the kind of thing you were describing. It allows nicely fine-grained individual control of the child processes, etc. - take a look!
http://search.cpan.org/author/DLUX/Parallel-ForkManager-0.7.5/ForkManager.pm
There's also Parallel::ForkControl -
http://search.cpan.org/author/BLHOTSKY/Parallel-ForkControl-0.04/lib/Parallel/ForkControl.pm
[1] For the mathematicians among us, you might find this to be fun. See my next post.
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
[ Thread continues here (2 messages/3.46kB) ]
MI/X PPC Classic Macintosh X Window server (freeware)
axel.stevens [axel.stevens at webcreator.be]
Mon, 02 Jul 2007 13:17:38 +0200
Martin, Ben
There are still .sit.bin files to be found.
I located 2 files - mix68k.sit.bin and mixppc.sit.bin both 1,8 MB
best of luck
axel stevens
support engineer - Macintosh, Linux, Windows
Belgium
[ Thread continues here (2 messages/0.99kB) ]
Tracking load average issues
Neil Youngman [ny at youngman.org.uk]
Wed, 18 Jul 2007 09:27:12 +0100
I was asked to look at a system that had a consistent load average around 5.3 to 5.5. Now I know very little about how to track down load average issues, so I haven't been able to find much. The CPU usage is about 90% idle, so it's not CPU bound.
I googled for "load average", "high load average" and "diagnose load average" and I found very little of use. the one thing I found was that if it's processes stuck waiting on I/O "ps ax" should show processes in state "D". There are none visible on this box.
Do the gang know of any good resources for diagnosing load average issues or have any useful tips?
Neil Youngman
[ Thread continues here (12 messages/18.50kB) ]
TUX Images
Ben Okopnik [ben at linuxgazette.net]
Fri, 6 Jul 2007 15:43:29 -0400
----- Forwarded message from Scott Rainey <[email protected]> -----
Date: Wed, 27 Jun 2007 14:19:54 -0700 From: Scott Rainey <[email protected]> Reply-To: [email protected] To: [email protected] Subject: TUX ImagesHi,
I'm looking for a large format vector-based digital versions of Tux, both color and monochrome. I'm even willing to pay for a really good one in monochrome suitable for sand-blasting on glass.
Do you know whom I should contact?
All the best,
Scott
----- End forwarded message -----
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
[ Thread continues here (2 messages/2.44kB) ]
need some help
Ben Okopnik [ben at linuxgazette.net]
Wed, 11 Jul 2007 11:49:04 -0400
On Tue, Jul 10, 2007 at 12:34:05PM +0530, Nayanam,Sarsij wrote:
> I am writing a shell script to run on MC/SG cluster , and I am facing an > issue as mentioned below: > > if we have a package with a dash in the name say sgpkg-cust : > > # PKGsgpkg-cust=hello > sh: PKGsgpkg-cust=hello: not found. > # PKGsgpkg=hello > # echo $PKGsgpkg-cust > hello-cust
This is not surprising; a dash is not a valid character in a variable for Bourne-derived shells.
> I have a function get_package_fqdn which starts as below: > > 37 get_package_fqdn() > 38 { > 39 eval var=$`echo PKG$1` > 40 if [[ -z $var ]]; then > [...] > 64 fi > 65 } > > we will notice that if $1=sgpkg-cust, var will be equal to "-cust" and the > rest of the funcion "if[[ -z $var ]];" will not be used and nothing will > be introduced in the PKG$packagename variable.
This isn't shell-specific, but an excellent Perl programmer named Mark-Jason Dominus has a writeup called "Why it's stupid to use a variable as a variable name" (http://perl.plover.com/varvarname.html). The above problem is explicitly cited. In short: since variable names are restricted to a specific set of characters, and the set of characters that could be contained in your '$1' is essentially arbitrary, you're creating a problem when you do that. So don't do that.
In Perl, the answer is "use a hash". In Bash, well, you need to rethink what it is that you're trying to do and use different functionality. As a general approach, you could try "flattening" that arbitrary character set - be sure to do do in both populating and reading the strings:
package_name=$(echo -n "PKG$1"|tr -c 'a-zA-Z0-9_' '_')
ben@Tyr:~$ var=$(echo -n "xyzabc@$%^&*()_++sadbjkfjdf" | tr -c 'a-zA-Z0-9_' '_') ben@Tyr:~$ echo $var xyzabc____________sadbjkfjdfDo note that this will still break if a "special" Bash character (e.g., '!') appears in the string. Overall, you just need to rethink your approach to this problem. MJD is right: it's a bad idea to use a variable as a variable name.
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
Virtual Desktops with individual folders
Ben Okopnik [ben at linuxgazette.net]
Sat, 14 Jul 2007 01:01:36 -0400
On Wed, Jun 20, 2007 at 01:20:31PM +0200, Peter Holm wrote:
> I have searched the net (google, newsgroups ...) to find an answer to > this question .- but without success. > > In KDE (for example) you can get individual desktops backgrounds for > each virtual desktop. > Well - i am used to a utility for M$-Windows called Xdesk that also > can set the the desktops to have individual icons / folders. > > I know that in the windows world they change a regkey that tells where > the desktop belongs for each switch so such a 'true virtual desktop' > > I have also in M$-Windows created bathc-files to use with less > intelligence window-managers, theese batch-files separately update the > regkey to get my own way to create 'true virtual desktops' > > Is there any program that i can get to have different desktops-folders > or is there any way to trick either kde / gnomw / idesk to have > different desktops?
I have very little experience with it myself, but based on what I do know, FVWM can probably accomodate you. You would, however, need to learn to write config files for it. I have no doubt that it has some kind of a "DetectDesktopSwitch" function, as well as either the capability of hiding the icons or allowing you to script such a function.
Here's an example of a very complicated (but still readable) FVWM config file:
http://www.cl.cam.ac.uk/~pz215/fvwm-scripts/config
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
[ Thread continues here (5 messages/13.80kB) ]
Help with Bash script
Chiew May Cheong [chiew_may at hotmail.com]
Tue, 26 Jun 2007 05:19:29 +0000
I have got a bash script called del_level0.sh that runs every Friday that looks like this:
#!/bin/bash cd /u1/database/prod/level0 rm *There's a cron entry for this script that runs every Friday:
linux:/usr/local/bin # crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.XXXXvi5yHq installed on Tue Jun 26 14:13:04 2007) # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $) 0 15 * * 5 /usr/local/bin/del_level0.sh > /dev/null 2>&1Can you help me so that the script runs at 3pm every 2nd and 4th Friday of the month?
Thanks.
Regards,
Chiew May
[ Thread continues here (6 messages/5.55kB) ]
Good vacation mailers?
René Pfeiffer [lynx at luchs.at]
Thu, 19 Jul 2007 00:55:01 +0200
Hello, TAG!
Every once in a while I am looking for a good vacation mailer that can read emails as good as I can while I am as far away from my mailbox as possible. I already tried
- vacation from Sendmail, - the Sieve vacation mailer that can be enabled in Cyrus and - a Perl script I wrote which is buried under the rubble of the company I worked for many years ago.What are your favourite vacation mailers that cause the least trouble with auto-generated emails? Do you have any preferences or experiences?
Best wishes, René.
[ Thread continues here (8 messages/10.67kB) ]
A Router With Just One Ethernet Port...
Jim Jackson [jj at franjam.org.uk]
Mon, 9 Jul 2007 14:30:40 +0100 (BST)
I was interested to see the discussion in this article on passive ethernet "hubs" etc. Other maybe interested in this passive 3 port ethernet hub design...
http://www.zen22142.zen.co.uk/Circuits/Interface/pethhub.htm
I've not actually built it yet, but plan to do so soon.
Jim
[ Thread continues here (2 messages/2.56kB) ]
Shuttle-SD39P2: Should I buy one?
Thomas Adam [thomas.adam22 at gmail.com]
Sun, 22 Jul 2007 01:10:28 +0100
Hey all,
As I am sure many of you know, I don't get on with hardware. Thanks to Ben's suggestion I now have a USB Sun keyboard though, and despite people's horrific claims, I at least like it. So thanks, Ben.
My next question concerns a possibe replacement for my workstation. I've had my current PC for about three years now, kindly donated by a friend of mine. It's a nice system, but it needs replacing. I've had enough of the CPU being at 70C plus, despite cooling attempts.
So I was looking at buying a Shuttle PC. Specifically the SD39P2 which would be a bare-bones system [1]. What I'm curious to know is whether any of you have used one, and how they stack up against a regular PC? My reading suggests they can act as a pretty good desktop replacements. Whilst the model I'm looking at only has two PCI slots, I only really need to add a wireless PCI card and an NVidia graphics card, so that's perfect.
Does the model I'm listing [1] suggest any problems with running Linux on it? I can't see how it would at a cursive glance of what's available. My only real reservation is what would be the driving force of me buying this model when I could go to Dell and spend an equivalent amount of money and get a whole lot more.
Kindly,
Thomas Adam
[1] http://www.trustedreviews.com/pcs/review/2007/05/30/Shuttle-SD39P2-Barebone/p1
[ Thread continues here (8 messages/9.57kB) ]
Max-spread algorithm
Ben Okopnik [ben at linuxgazette.net]
Wed, 4 Jul 2007 22:50:50 -0400
[ If you're not a programmer or a mathematician, you might want to hit the 'delete' key right about now. Either that, or risk being bored to tears. Remember, I warned you! ]
As I've just mentioned in my previous post, I've been fiddling with a "max-spread" algorithm - i.e., if I have two lists, and I want the items in the first list to be spread as widely as possible (using the items in the second list as the "padding"), how do I interpolate them?
This can also be stated as follows: given a barbecue, a bunch of pork cubes, and a number of cherry tomatoes, how would you arrange the skewers in such a way that a) there's a pork chunk at the beginning and the end of every skewer, b) each skewer is arranged in as even a manner as possible, and c) you use up all the pork and all the tomatoes?
I got most of the way to a solution - essentially reinventing the Bresenham line algorithm [1] (and the wheel... and fire... sheesh. I'm a very poor mathematician, and a worse statistician), but got scooped by a fellow Perl monk from the Monastery (perlmonks.org) - really nice work on his part. I rewrote his script to actually sort arrays rather than strings and added some guard conditions. Sample output looks like this:
ben@Tyr:~/devel/0$ ./skewer 2 2 pork1|tmt1|tmt2|pork2 ---#00#--- ben@Tyr:~/devel/0$ ./skewer 3 3 pork1|tmt1|tmt2|pork2|tmt3|pork3 ---#00#0#--- ben@Tyr:~/devel/0$ ./skewer 4 4 pork1|tmt1|tmt2|pork2|tmt3|pork3|tmt4|pork4 ---#00#0#0#--- ben@Tyr:~/devel/0$ ./skewer 5 4 pork1|tmt1|pork2|tmt2|pork3|tmt3|pork4|tmt4|pork5 ---#0#0#0#0#--- ben@Tyr:~/devel/0$ ./skewer 7 4 pork1|tmt1|pork2|tmt2|pork3|tmt3|pork4|tmt4|pork5|pork6|pork7 ---#0#0#0#0###---Can you reproduce this algorithm? I found it a very interesting exercise, myself.
[1] http://en.wikipedia.org/wiki/Special:Search?search=Bresenham%20line%20algorithm
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
[ Thread continues here (11 messages/20.47kB) ]
Backup software/strategies
Ben Okopnik [ben at linuxgazette.net]
Wed, 11 Jul 2007 09:24:40 -0400
All of us know - at least I hope we do - that we should all be doing regular backups; that's a given. Chances are, though, that we've all skipped one or two (or more) on the schedule ("heck, nothin's happened so far; it shouldn't make too much of a difference...") - that is, if you even have a schedule, rather than relying on some vague sense of "it's probably about time..." I have to admit that, as much as I advise my customers to have a solid backup plan, I'm less than stellar about having a polished, perfect plan myself.
In part, this is because backups are much easier with a desktop than a laptop - or even with a desktop to which you synch the laptop once in a while. Operating purely from a laptop, as I do, means that I don't have an always-connected tape drive (or whatever) - and doing a backup is always a hassle, involving digging out the external HD, hooking it up, and synchronizing. Moreover, since I do a lot of travelling, setting an alarm doesn't seem to be very useful; it usually goes off while I'm on the road, at which point I can only glare at it in frustration.
As with so many things, what I really need is a copy of "at" installed in my brain... but lacking that, well, I decided to dump the problem on you folks.
Can anyone here think of a sensible backup plan for the situation that I've described - laptop, external backup, arbitrary schedule - and some way to set up a schedule that work with that? Also, does anyone have a favorite WRT backup software? I really miss the ability to do incremental backups; that would be awf'lly nice (I don't mind carrying a few DVDs with me, and using the external HD for a monthly full backup.)
Good ideas in this regard - whether they competely answer the question or not - are highly welcome.
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
[ Thread continues here (30 messages/58.31kB) ]
Re-Update Your Online Banking !
Ben Okopnik [ben at linuxgazette.net]
Fri, 6 Jul 2007 14:13:35 -0400
[[[ I viciously snipped out the entirety of the original message which headed this thread, as it was horrendously replete with html garbage. - Kat ]]]
On Fri, Jul 06, 2007 at 11:33:15AM -0400, Bank Of America wrote:
> Bank of America Higher Standards > Online Banking Alert > Need additional up to Re-Update Your Online Banking > the minute account > information? Sign in Because of unusual number of invalid login > attempts on you account, we had to believe > that, their might be some security problem on > you account. So we have decided to put an extra > verification process to ensure your identity > and your account security. Please click on sign > in to Online Banking to continue to the > verification process and ensure your account > security. It is all about your security. Thank > you. and visit the customer service section.
[snip] Nice, even though completely ungrammatical. The 'sign in to Online Banking' link points to
http://www.tsv-betzigau.de/contenido/includes/hypper/repute/bankofamerica/online_bofa_banking/e-online-banking/index.htmTheir images are coming from yet another domain:
http://release35.par3.com/images/client/bankofamerica/em_logo.gifYet another example of PHP fuckmuppetry. And this isn't going to stop, since the creators of PHP refuse to fix the well-known vulnerabilities in the language. [sigh]
If someone who speaks Deutsch wants to contact the owners of the first domain and let them know, that would be a nice thing to do. I've just contacted the webmaster of the second domain; hopefully, they'll take that garbage offline and fix their leaks.
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
[ Thread continues here (4 messages/6.33kB) ]