Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Archive for the '*nix' Category

    Fresh install of Debian Etch 4.0r1 hangs/freezes dead after boot: solution

    24th October 2007

    Recently, I installed Debian Etch 4.0r1 onto my laptop. However, after the first boot into plain console, computer was dead-frozen after some console usage. I rebooted using the Power button – this time to gdm; and again, after some keyboard input system was hanging dead.

    I found the reason at debianhelp.org forums. Basically, it’s the PC speaker module (pcspr) not functioning correctly. I suspect this problem manifests itself only on some types of laptops. The solution is either to somehow reconfigure the pcspkr module, or just disable it. More on how to disable the module below.
    Read the rest of this entry »

    Share

    Posted in *nix, Links | 1 Comment »

    GoDaddy: undocumented 20-second CPU time maximal execution limit? (python, ELF, etc)

    16th October 2007

    Today, setting up a relatively serious (in CPU resources needed) web-system, I ran into a weird problem of python scripts ending prematurely. After some investigation, it looked like any process which uses up more than 20 seconds of CPU time, is automatically killed. To verify this, I wrote an infinite loop in C,

    int main () {
    unsigned int i;

    for (i = 0; i < 2 ; i++ ) { i = 0; } return 0; } [/c] compiled it and executed several times on the GoDaddy shared hosting server. I did observe the program running for the maximum of 20 seconds of CPU time, not a second more. Please note, that 20 seconds of CPU time can be much more of “real” time, if the script isn’t using 100% of CPU, which often the case for shared hosting. Thus if you have in your php.ini max_execution_time set to, say, 60 seconds, your php script may actually execute as long as one minute; but I’m pretty sure that if your script has lots of CPU-intensive procedures, then as soon as it uses 20 seconds of CPU time, it will be terminated (however, this statement still needs checking – anyone?). To verify, I also created a cron job with the same file. It ran for 30 seconds CPU time. Strangely, this behaviour is not documented anywhere. This limit may also explain a number of other problems, if you have heavy web-applications: they just might be killed before they are finished, causing errors. I do understand the reason for this limitation, and am sure similar limitations exist in other shared hosting environments. The only important thing here is that this limit should have been documented and even put upfront somewhere in the hosting plans descriptions. I also wonder if the limit is the same for all godaddy shared hosting plans, or if it differs. 20 seconds when executed from PHP, and 30 seconds when executed as a cron job were observed on the Deluxe Linux Hosting plan. Extensions, additions and comments are welcome.

    Share

    Posted in *nix, Misc, Programming, Web | 22 Comments »

    Linux package management: use aptitude, if your distro has it

    19th August 2007

    Found Aptitude vs Apt-Get post. Worth reading – both the post and the comments – if you are looking for a Linux distro or want a better package management tool.

    Share

    Posted in *nix, Links | 1 Comment »

    Compare and choose Linux distributions

    17th August 2007

    If you are considering an installation of a Linux or Unix-like system, then the Compare distros is a good place to visit. As a Slackware user, I find some evaluation methods a bit controversial, but still the resource is very good, and I’m currently perusing it in order to identify the system I might want to install on my older computer. Currently the candidates are (in no specific order) Kubuntu, Debian, Gentoo, and probably ALTLinux.

    For the sheer simplicity of choosing a Linux distribution, the polishlinux.org also has Distro chooser. After answering the questions, I got this list:

    1. Fedora
    2. openSUSE
    3. Ubuntu Linux
    4. Debian GNU/Linux
    5. Mandriva Linux

    As one can see, out of 3-4 distributions I’m currently considering, this list of 5 gave an overlap of 2 distributions (Ubuntu, if we assume that Kubuntu is roughly the same, and Debian). I’d say the Distro chooser, being somewhat simplistic, gave a close match to my own list (except for the not-so-well-known-by-me Fedora, openSUSE; Mandriva, based on my current knowledge, is a kind of superseded by Ubuntu’s ease of use).

    There’s another wizard-like Linux Distribution Chooser. This one is pretty and thus fun to complete. (Thanks to the authors for adding some JS-based questions which do not require page reload – this definitely adds to the comprehended speed of answering questions; I’d say the proportion of JS-based and POSTed responses is nearly perfect.) This time, I got 6 recommendations:

    1. Fedora
    2. Kubuntu
    3. ArchLinux
    4. Debian
    5. openSUSE
    6. Mandriva

    Again, I have Kubuntu and Debian in the list. It’s more interesting though, that Fedora, openSUSE and Mandriva are repeated from the previous list! Well, it might be due to the short-list nature of really popular Linux distros. But Fedora appears on top in both cases, Mandriva appears at the bottom, and Debian/openSUSE are not decided :) Based on these results I’m going to have a closer look at Fedora, might have missed my perfect match :)

    If even after these wizards/tests/tables you do not feel the complete satisfaction of a (converted?) believer, there’s also yet another Linux Distributions Chooser. It’s short and simple, and gave me only Mandriva and SUSE (without specifying which exactly SUSE flavour).

    When you are done choosing Linux distro, and your mother tongue isn’t English, it would be wise to look for already localized distros. For example, I’m using DeepStyle Slackware-based linux, which differs mostly in Ukrainian (Cyrillic) support and some add-on packages/enhancements. There are also many other examples, much more known and popular. Taking a localized distro, you save time and do not lose anything.

    Finally, if you are a Linux newbie but do want to learn the ins and outs of Linux, you may try Slackware-based Topologilinux (which also runs within windows). Slackware is not usually considered an option for newbies, but based on my impressions Topologilinux is quite friendly and easy to install/configure, at the same time providing more than enough space for experiments. The whole OS is in a single file, so after initial installation you may backup the ‘tlinux’ folder for the case that you experiment too much and kill Topolinux – then just unroll the backup in place :)

    Really finally, over the period of the last 2-3 years linux distros became so user-friendly, that migration from any other OS shouldn’t be too complicated. And, based on my blog’s statistics, Linux + MacOS X (BSD-based, if I remember correctly) already make up ~35-40% of all the visitors’ OSes :)

    Share

    Posted in *nix, Links | 1 Comment »

    Installing Linux onto an older computer

    17th August 2007

    As a primer and a generally good guide, read Linux on old hardware. Pay special attention to kernel arguments (“cheat codes”): those do come handy often with older hardware.

    From personal experience, have to say the following:
    Read the rest of this entry »

    Share

    Posted in *nix, Links | No Comments »

    Slackware Linux + ATI video drivers: extremely slow fgl_glxgears problem solution

    13th August 2007

    I had just installed the latest ATI video drivers for Linux onto my Slackware 11 (with kernel 2.4.33.3); I have Radeon Mobility X600 with 64MiB of non-shared memory.

    Running glxgears, I got ~2050 FPS (glxgears window focused) and ~4900 FPS (console window focused, glxgears window out of focus).

    But running fgl_glxgears yielded values as low as 1 FPS! As fgl_glxgears is much more similar to the real-world game visuals, it’s apparent that no game will be playable at e.g. 0.2 FPS.

    Also, there were numerous repetitions of a single error in the console window:

    FGLTexMgr: open of shared memory object failed (Function not implemented) __FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed! fglX11AllocateManagedSurface: __FGLTexMgrCreateObject failed!

    I found the solution which worked perfectly for me:
    Read the rest of this entry »

    Share

    Posted in *nix, Misc, Notepad | 2 Comments »

    Installing KRename on Slackware: libGL.la is not a valid libtool archive

    12th August 2007

    When ‘make’ing krename (after ./configure, of course), it failed with an error message like:

    libtool: link: `/usr/libGL.la’ is not a valid libtool archive

    After reading this topic (in Russian), I found that libGL.la is a configuration file for libGL.so.
    This configuration file is created when installing ATI or nVidia video drivers – they replace the bundled libGL.so and create libGL.la.

    The solution to the “absent libGL.la” file is, thus, either to install ATI/nVidia drivers (if you have ATI/nVidia video card), or to manually create “fake” libGL.la.
    Here is the sample of “fake” libGL.la (to copy-paste, click the “Plain text” header) :
    Read the rest of this entry »

    Share

    Posted in *nix, Software | 1 Comment »