H's Blog A good shell is the best user interface.

19Apr/120

SNMP Warnings in Debian Squeeze

The default installation of snmpd in Debian Squeeze will put several warnings into the daemon.log.

The reason is the licensing of the MIB files, that is not compatible with Debian.

If you are not satisfied with errors on each restart of the snmpd, here are the steps, that solved this problem in my case:

  • Edit /etc/apt/sources.list and append contrib and non-free to the standard repositories.
  • apt-get update
  • apt-get install snmpd snmp-mibs-downloader
  • Edit /etc/default/snmpd:
    export MIBS=/usr/share/mibs/netsnmp/UCD-SNMP-MIB

Commenting the original line export MIBS= did not help, also the definition export MIBS=/usr/share/mibs/netsnmp did not work, so I will leave the MIBS reference in the configuration on UCD-SNMP_MIB.

11Apr/120

MySQL Query Log

If you need details about whats going on within your MySQL instance, the query log is still very useful, even though it's not good for permanent use, since it costs performance and disk space.

But with some luck you already have release 5.1 or later and you can activate the query log on the fly:

  • Log in to your MySQL instance, e.g. mysql --defaults-file=/etc/mysql/debian.cnf, if you are using a standard MySQL installation on Debian/Ubuntu.
  • Set the log target: set global general_log_file='/var/tmp/mysql.log'
  • Activate the log file: set global general_log=1
  • You can end the logging (and you should really restrict the logging on production systems) with: set global general_log=0
Tagged as: , No Comments
11Mar/120

Alfresco eats Memory – Yum, Yum

I recently tried to optimize an Alfresco 4 installation in a 1GB Ubuntu VM and reduction of the default 512m for MaxPermSize was too much, the Tomcat instance goes down after startup and first call to /alfresco.

Considering the remaining memory for the PostgreSQL database, OpenOffice and the operating system, I thought about reduction of Heap and PermSize limits for the Tomcat instance included in the Alfresco installation. Setting the Heap Maximum to 512m instead of 1024m was not the problem, but using 128m for MaxPermSize instead of the 512m killed the instance after the first call to /alfresco.

So better don't touch MaxPermSize in tomcat/scripts/ctl.sh.

Also 1GB of RAM is not recommended for an Afresco VM, better start with 2GB of RAM. The startup of Alfresco currently takes up to 4-5 minutes, shutdown is not faster, which makes reboots of the VM taking 10 minutes even though the VM is restarted within seconds, it's the Alfresco that gives the delay.

19Jan/120

“bestfit” is back

I recently recycled an old script I wrote several years ago to automatically generate an ISO image from selected subfolders. The idea is, that these folders are written to an archive CD/DVD if the total capacity passes the media's limit.
The script calls bestfit (release 0.2.0 by Oskar Liljeblad) and that tool was no longer installed on my current workstation. But now it's back...

Please visit http://nerdbynature.de/bits/bestfit/ for a 32 Bit Debian package or an archive of the sources (tar.gz).
I used the sources to build an AMD64 package just by a call to

fakeroot debian/rules binary

within the source folder.

Usage of bestfit was simple in my case:

bestfit --quiet --invert --space="$((700*1024*1024/2048))" candidates/*

That will give me a list of folders I have to move away from the parent folder candidates, so the remaining folders will fit perfectly on the 700MBs of a Data CD.

19Jan/120

Open-iSCSI Interface by libvirt

While I was introducing an iSCSI pool to libvirt/kvm, a new interface was introduced to Open-iSCSI called libvirt-iface-*, with the effect that LUNs were no longer detected after target login.

It took nearly an hour to detect the reason for this failure, but since the initiator ID changed and the default CHAP login was not set for this interface, the iSCSI LUNs failed.

The following steps solved the problem on each KVM host:

  • Remove the interface definition from /etc/iscsi.
  • Remove all node and target definitions containing the libvirt device name from /etc/iscsi.
  • Reboot
  • Introduce the iSCSI targets before binding them to a pool in libvirt.
Tagged as: , , No Comments