NetBSD

    wip/downtimed

    Po wip/digitemp dzisiaj dodałem drugą paczkę do wip’a. Downtimed śledzi czasy uruchomienia, rebootów, zawieszeń, braku prądów itp i prowadzi statystyki jak długo system był offline. Co ciekawe, planowe restarty (przynajmniej w przypadku mojego serwera) trwają dokładnie tyle samo – 66 sekund (reboot) przy czym „shutdown -r now” jest o 3 sekundy szybszy (63 sek) niż reboot :)

    Przykładowe statystyki wyglądają tak:

    $ downtimes
    down 2012-02-28 14:57:17 -> up 2012-02-28 14:58:23 = 00:01:06 (66 s)
    down 2012-02-28 15:05:12 -> up 2012-02-28 15:06:18 = 00:01:06 (66 s)
    down 2012-02-28 15:07:25 -> up 2012-02-28 15:08:28 = 00:01:03 (63 s)

    © odwiedź stronę http://maciejewski.org po więcej fajnych postów!

    NetBSD

    mor(r)e .pl developers in NetBSD!

    Dzisiaj będzie nietypowo, ponieważ post nie będzie dotyczył mnie bezpośrednio a kogoś zupełnie innego. Rzadko zdarza się bowiem, że Polak zostaje developerem naszego ulubionego systemu Unixowego. Tym razem radość jest podwójna ponieważ tym Polakiem jest Daniel ’morrHorecki, którego znam „osobiście” z IRC’a i z którym nie jednego priva zapisałem uzyskując wartościowe informacje i pomoc z NetBSD czy pkgsrc.

    Gratulacje i nie obijaj się tam z tym pkgsrc i pl mirrorem ;)

    © odwiedź stronę http://maciejewski.org po więcej fajnych postów!

    Internet

    Update Baculi

    Wykonałem update baculi z wersji 2.4.4 do 3.0.2 z pkgsrc. Restart całości spowodował brak mozliwości podłączenia sie do konsoli zarówno na serwerze jak i z klienta. /etc/rc.d/bacula status pokazywała jedynie że file demon i storage demon działają natomiast director nie. Żadnych logów jednak nie ma. Reinstaluję ręcznie, taka sama sytuacja. Odinstalowuję i instaluję jeszcze raz od zera – taka sama sytuacja. Czytam wszystkie komunikaty, między innymi ten:

    If you’re upgrading to bacula-3.0.2 from 1.38.x or earlier, you MUST
    recreate your catalog database or upgrade your old database using the
    /usr/pkg/libexec/bacula/update_bacula_tables script. Later updates will
    not require upgrading the database again.

    Jak widać nie kwalifikuję się na update tabel. Na wszelki wypadek jednak odpalam ten skrypt po uprzednim lekkim poprawieniu z:

    #!/bin/sh
    #
    # This routine alters the appropriately configured
    # Bacula tables for PostgreSQL, MySQL, or SQLite.
    #
    if test xsqlite = xmysql -o xsqlite3 = xmysql ; then
    echo "Altering SQLite tables"
    /usr/pkg/libexec/bacula/update_mysql_tables $*
    fi
    if test xmysql = xmysql ; then
    echo "Altering MySQL tables"
    /usr/pkg/libexec/bacula/update_mysql_tables $*
    fi
    if test xpostgresql = xmysql ; then
    echo "Altering PostgreSQL tables"
    /usr/pkg/libexec/bacula/update_postgresql_tables $*
    fi

    aby nie było:

    Altering MySQL tables

    This script will update a Bacula MySQL database from version 10 to 11
    which is needed to convert from Bacula version 2.0.x to 3.0.x or higher

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    Update of Bacula MySQL tables failed.

    (Jak widać komunikat o konieczności udate’u nadal mnie nie dotyczy)

    na

    #!/bin/sh
    #
    # This routine alters the appropriately configured
    # Bacula tables for PostgreSQL, MySQL, or SQLite.
    #
    if test xsqlite = xmysql -o xsqlite3 = xmysql ; then
    echo "Altering SQLite tables"
    /usr/pkg/libexec/bacula/update_mysql_tables $*
    fi
    if test xmysql = xmysql ; then
    echo "Altering MySQL tables"
    /usr/pkg/libexec/bacula/update_mysql_tables -uroot -p bacula$*
    fi
    if test xpostgresql = xmysql ; then
    echo "Altering PostgreSQL tables"
    /usr/pkg/libexec/bacula/update_postgresql_tables $*
    fi

    i w końcu po chwili:

    Altering MySQL tables

    This script will update a Bacula MySQL database from version 10 to 11
    which is needed to convert from Bacula version 2.0.x to 3.0.x or higher


    Enter password:

    Update of Bacula MySQL tables succeeded.

    Następnie restart baculi i … tadam ! Wszystko ruszyło tak jakby sie nic nie działo!

    Wiadomo, że telewizja kłamie, ale żeby dokumentacja?

    © odwiedź stronę http://maciejewski.org po więcej fajnych postów!

    Internet

    Google Talk w Ekg2

    Od czasu kiedy chrome.pl przestało działać moim głównym jabberem został Google Talk. Dodanie go do ekg2 wymaga jedank drobnych zmian w konfigu o czym poniżej. Pamiętać trzeba, że musimy mieć doinstalowany gnutls aby zestawić połączenie szyfrowane. Dla użytkowników NetBSD szukajacych ekg2 w pkgsrc istotna informacja jest że znajduje się on w wip/ekg2 a nie w chat/ekg :) Dlatego trzeba dociągnąć pkgsrc-wip.

    Konfig ~/.ekg2/session-jabber (ważniejsze opcje wytłuszczone)

    [jid:cancerpl@gmail.com]
    status=avail
    password=*******
    __gpg_enabled=0
    allow_autoresponder=0
    allow_remote_control=0
    auto_auth=0
    auto_away=0
    auto_back=0
    auto_bookmark_sync=0
    auto_connect=0
    auto_find=0
    auto_privacylist_sync=0
    auto_reconnect=0
    auto_xa=0
    display_notify=0
    display_server_features=1
    gpg_active=0
    log_formats=xml,simple
    ping-server=0
    plaintext_passwd=1
    port=5222
    priority=5
    server=talk.google.com
    ssl_port=5223
    use_sasl=0
    use_ssl=1
    use_tls=0

    Po takim skonfigurowaniu i wydaniu polecenia /connect w sesji jabbera googlowego pojawią się nam ostatnie 20 maili i radosny komunikat:

    13:02:50 ::: (jid:cancerpl@gmail.com) Connecting to server
    13:02:51 ::: (jid:cancerpl@gmail.com) Connected

    Google Talk w EKG2/NetBSD
    Google Talk w EKG2/NetBSD




    © odwiedź stronę http://maciejewski.org po więcej fajnych postów!

    In English

    Dependencies madness

    Time to time comes need to update whole bunch of pkgs in NetBSD. Dealing with pkg_rolling-replace (which is very good script to update packages) I’ve found that sometimes it won’t update package when its dependencies are broken or missing. Unfortunettly I had some of this things like:

    WARNING: No devel/p5-Compress-Zlib/Makefile - package moved or obsolete?
    WARNING: No devel/p5-IO-Compress-Base/Makefile - package moved or obsolete?
    WARNING: No devel/p5-IO-Compress-Bzip2/Makefile - package moved or obsolete?
    WARNING: No devel/p5-IO-Compress-Zlib/Makefile - package moved or obsolete?
    WARNING: No net/p5-INET6/Makefile - package moved or obsolete?

    or:

    security/py-denyhosts - py25-denyhosts-2.6nb2 missing
    textproc/py-xml - py25-xml-0.8.4nb2 missing

    The simplest way to resolve this is pkg_delete it, but when package is depend of other package or other package depend on missing package it’s hard to tell what You can delete first.

    With help may come two packages:

    pkgtools/pkgdepgraph: Visual representation of installed NetBSD packages
    graphics/graphviz: Graph Drawing Programs from AT&T Research and Lucent Bell Labs

    First, You have to generate file with Your installed packages:

    pkgdepgraph > pkg

    Then plot nice graph in png format:

    dot pkg -Tpng -o graph.png

    And here it is, my personall dependencies hell ;) (You have to view it in full size, becouse it’s to detailed to gave nice thumbnail – 2,5 MB PNG:)

    NetBSD's packages dependencies graph
    NetBSD's packages dependencies graph




    © odwiedź stronę http://maciejewski.org po więcej fajnych postów!

    In English

    Tips & Tricks II

    Note to myself.

    Thanks to morr from #netbsd.pl who pointed me to this.

    How many times You forgot to notice after installing package what was in MESSAGE file?

    How many MESSAGES information You miss while upgreading lots of packages?

    Of course You can always revive it by pkg_info -D package_name, but there is simply yet brilliant way to have MESSAGE info in mail.

    Just add to /etc/mk.conf

    PKGSRC_MESSAGE_RECIPIENTS?=login or mail adress

    and when package have something to say in MESSAGE You have it on Your mail :)

    Read /usr/pkgsrc/mk/defaults/mk.conf for details.

    Related Posts with Thumbnails
    Add your widget here