Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Archive for the '*nix' Category

    R under Debian testing/i386: permanently set pdfviewer option

    21st October 2009

    If you get this message when opening vignettes:

    Error in openPDF(vif) :
    getOption(‘pdfviewer’) is ”; please use ‘options(pdfviewer=…)’

    and you are tired of running this command every time:

    > options(pdfviewer=”okular”)

    then you should check if your system-wide Renviron file has proper PDF viewer set:
    Read the rest of this entry »

    Share

    Posted in *nix, how-to, Notepad, Software | No Comments »

    Convenient design and debugging of regular expressions under Linux

    10th October 2009

    redet-supported languagesRegular expressions (regexps) are powerful indeed. But debugging non-trivial regexps is a burden even if you understand how regexps work, and remember most (if not all) regexp syntax.

    Miscellaneous tools exist to ease this task. This post was inspired by redet’s comparison of regexp helper tools – it could be sufficient to read only that, if you’re going to try the mentioned tools yourself. Otherwise, read on.
    Read the rest of this entry »

    Share

    Posted in *nix, Notepad, Programming, Software | No Comments »

    IOMMU: This costs you 64 MB of RAM

    30th September 2009

    If you have happened to observe similar messages in your dmesg:

    aperture

    [ 0.004000] Checking aperture…
    [ 0.004000] No AGP bridge found
    [ 0.004000] Node 0: aperture @ 20000000 size 32 MB
    [ 0.004000] Aperture pointing to e820 RAM. Ignoring.
    [ 0.004000] Your BIOS doesn’t leave a aperture memory hole
    [ 0.004000] Please enable the IOMMU option in the BIOS setup
    [ 0.004000] This costs you 64 MB of RAM
    [ 0.004000] Mapping aperture over 65536 KB of RAM @ 20000000

    and you are using AMD-based system w/o AGP video, then my advice is: just leave that as is, do not bother “improving”! Any tinkering with kernel boot options won’t do you any good, as the kernel has already done the best it could.

    Just a note: all those messages at the top of the post should only happen if you have 4 or more GiBs of RAM. If you have less than that, and do have those messages – my experience might be inappropriate for your case.

    Another note: my BIOS does not have any IOMMU settings (or “Memory hole remapping” settings), so I didn’t try that. You should check if your BIOS has IOMMU-related options first, just as kernel message suggests.

    Read on for details.
    Read the rest of this entry »

    Share

    Posted in *nix, how-to | No Comments »

    Screem HTML editor dies with ‘GSlice: assertion failed: sinfo->n_allocated > 0′

    20th August 2009

    Screem HTML/XML editor has tag-specific auto-complete, and is a nice editor for web-developers (at least as long as Quanta is not available for Debian testing).

    However, version 0.16.1 is very unstable, and dies with

    ***MEMORY-ERROR***: screem[5527]: GSlice: assertion failed: sinfo->n_allocated > 0

    As a workaround (initially suggested for the highly similar Firestarter crashes), try running screem with this command:

    G_SLICE=always-malloc screem

    Too bad last development version of Screem is dated March 2006.

    Share

    Posted in *nix, Software, XHTML/CSS | No Comments »

    Bad memory handling and server stability

    13th July 2009

    The two graphs below (clickable) are for CPU and RAM use during a period of a program going wild between 23:17 and 23:41 (24+ minutes of server’s downtime). The program was run non-root, it just consumed all the memory it could. It was killed by kernel, so the server started responding without any interventions – which were hard to perform, because none of the services (including ssh) were responding during downtime.
    cpugraph
    memgraph

    If you happen to be developing a C/C++ program – do use mtrace and valgrind, those are huge helpers against the problems akin to that shown on the graphs.

    Share

    Posted in *nix, Programming, Software | No Comments »

    Harness the power of rsync

    6th July 2009

    I have read manpages of rsync today.
    I feel enlightened.

    I had a dream of rsync being one of the legendary nix Super-Cows.

    A tiny perversive part of self created a PDF version of rsync manpages (43 pages).

    It seems that Super-Cows can damage the brain, when stared at too intensely.

    Share

    Posted in *nix | 4 Comments »

    Best method to recursively chmod/process files or directories

    8th June 2009

    Found here.

    Recursively set directories only to drwx-rx-rx (755):

    find . -type d -exec chmod 755 {} \;

    Recursively set files only to rwx-r-r (644):

    find . -type f -exec chmod 644 {} \;

    Recursively remove carriage returns (^M) from the end of all *.php files:

    find . -type f -name “*.php” -exec /home/user/dos2unix.sh {} \;

    In all these cases, {} is replaced with the filename/directory find has found matching your parameters; \; at the end just stops exec processing.

    Share

    Posted in *nix, how-to, Links, Notepad | No Comments »