perl

Perl is a family of high-level, general-purpose, interpreted, dynamic programming languages. The languages in this family include Perl 5 and Perl 6. read more at WikiPedia

  • munin&160; Munin the monitoring tool surveys all your computers and remembers what it saw. It presents all the information in graphs through a web interface. Its emphasis is on plug and play capabilities. After completing a installation a high number of monitoring plugins will be playing with no more effort.
    Using Munin you can easily monitor the performance of your computers, networks, SANs, applications, weather measurements and whatever comes to mind. It makes it easy to determine "what's different today" when a performance problem crops up. It makes it easy to see how you're doing capacity-wise on any resources.
    [Site]

    Install

    Can be done with using zypper (the command line package manager used in openSUSE since 10.2), first search the right package name

    # zypper se munin

    S | Name&160;&160;&160;&160;&160;&160; | Zusammenfassung&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; | Typ&160;
    --+------------+----------------------------------------------------+------
    | munin&160;&160;&160;&160;&160; | Network-wide graphing framework (grapher/gatherer) | Package

    | munin-node | Network-wide graphing framework (node)&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; | Package

    &160;

    You’ll have to install both especially if your web server is not in a farm and run MYSQL, Tomcat and Apache at the same time. If you have more than one server, you can install munin-node (clients) on them and make them report on munin (server)

    # zypper in munin

    # zypper in munin-node

    Configure

    Open the file

    # vi /etc/munin/munin.conf

    and configure at least the following 3 keys, I recommend you to create a PLESK sub domain

    # The next three variables specifies where the location of the RRD
    # databases, the HTML output, and the logs, severally.&160; They all
    # must be writable by the user running munin-cron.
    dbdir&160;&160; /var/lib/munin
    htmldir /srv/www/xxxxxxxxxxx/xxxxx/xxxx/xxxxx/xxxx
    logdir&160; /var/log/munin
    rundir&160; /var/run/munin

    Change ownership of htmldir to the user and group munin, otherwise munin cannot place new files in that directory.

    chown munin:munin /srv/www/xxxxxxxxxxx/xxxxx/xxxx/xxxxx/xxxx

    Start the node daemon

    /etc/init.d/munin-node start

    Start the server node

    /etc/init.d/munin start

    Finish by protecting access to that sub domain

    Create .htaccess

    # vi .htaccess

    AuthType Basic
    AuthName "Administrator area"
    AuthUserFile /srv/www/vhosts/waltercedric.com/subdomains/stats/httpdocs/.htpasswd
    AuthType Basic
    AuthName "Administrator area"
    AuthUserFile /srv/www/vhosts/waltercedric.com/subdomains/stats/httpdocs/.htpasswd
    <limit GET PUT POST>
    require valid-user
    </limit>

    Create the password file

    # htpasswd2 -c .htpasswd admin

    Point your browser to the subdomains, and log yourself with admin, your password

    Install Munin plugins

    There is a huge list of available plugins, just visit http://muninexchange.projects.linpro.no/

    Example for displaying the number of PHP sessions as a graph

    475-1

    # cd /etc/munin/plugins

    and wget the desired plugins

    # wget http://muninexchange.projects.linpro.no/download.php?phid=475

    restart the node

    munin.running

    munin.running2

  • git-stitch-repo

    Stitch several git repositories (merging git repository) into a git fast-import stream from Git-FastExport

    Installation

    $ perl -MCPAN -e shell
      
    cpan[6]> i /fastexport/
    	Distribution    BOOK/Git-FastExport-0.107.tar.gz
    	Module  < Git::FastExport        (BOOK/Git-FastExport-0.107.tar.gz)
    	Module  < Git::FastExport::Block (BOOK/Git-FastExport-0.107.tar.gz)
    	Module  < Git::FastExport::Stitch (BOOK/Git-FastExport-0.107.tar.gz)
    	4 items found
    
    cpan[6]> install BOOK/Git-FastExport-0.107.tar.gz
    
    cpan[6]> CTRL-D
    

    Usage

    git-stitch-repo will process the output of git fast-export --all --date-order on the git repositories given on the command-line, and create a stream suitable for git fast-import that will create a new repository containing all the commits in a new commit tree that respects the history of all the source repositories. Typical usage is like this:
    git clone https://github.com/xxxx/A.git
    git clone https://github.com/xxxxx/B.git
    
    $ ls
    A B
    
    mkdir result
    cd result
    git init
    git-stitch-repo ../A:folderA ../B:folderB | git fast-import
    
    # pull both repository in a new branch for examples
    git checkout -b newBranch
    git pull . master-A
    git pull . master-B
    
    # when finished delete unused branches
    git branch -d master-A 
    git branch -d master-B