Category Archives: combjuta

More performance for Roundcube/SquirrelMail webmailer with imapproxy

There is an easy way out there to improve performance on webmail clients like SquirrelMail and Rouncube.
Roundcube and similar clients opens a new IMAP connection on each request, e.g. opening the next e-Mail.
A caching proxy like imapproxy is reported to increase performance from 0.5 seconds up to 3 seconds per Action.

Installation on debian is very simple.
Just install the imapproxy package via aptitude install imapproxy.
In our setup the webmail client and imap server is running on different servers.

in /etc/imapproxy.conf we just change the configuration of our IMAP Server
server_hostname mail.myhostname.com

the following important options could stay default but are worth mentioning:

listen_port 1143 - Port imapproxy is listening on
server_port 143 - Port of the imap server host)

After starting imapproxy we only have to change roundcube configuration in config/main.inc.php:

$rcmail_config['default_host'] = 'localhost';
$rcmail_config['default_port'] = 1143;

and that’s it.
Happy proxying :)

Sources:
http://trac.roundcube.net/wiki/Howto_Performance
https://maze.io/2011/03/25/speed-up-roundcube-webmail/

Related Posts:

Harddisk SMART Status auslesen bei 3ware RAID

Bei einem unserer Hetzner Server ist eine Platte defekt. Der Hetzner Support möchte nun vor dem Tausch einen S.M.A.R.T. Status Output der Festplatte haben.
Normalerweise geht das einfach mit smartctl -l error -d ata /dev/sda.

Da das Device aber ein Hardware RAID ist, verstecken sich hinter /dev/sda eben zwei oder mehr physikalische Disks.

Über einen Umweg kann man aber trotzdem mit smartctl die S.M.A.R.T. Daten der Disk auslesen:

smartctl -a /dev/twa0 -d 3ware,1

/dev/twa0 steht hier für den Controller selbst
-d 3ware,1 gibt die Infos der Disk ID 1 aus (siehe auch tw_cli /c0 show)

Ein Output sieht im Fehlerfall dann beispielsweise so aus:

smartctl 5.41 2011-06-09 r3365 [x86_64-linux-2.6.32-5-xen-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.11
Device Model: ST31500341AS
Serial Number: 9VS256GQ
LU WWN Device Id: 5 000c50 0150484fb
Firmware Version: CC1H
User Capacity: 1,500,301,910,016 bytes [1.50 TB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4
Local Time is: Tue Jan 8 19:34:32 2013 CET
SMART support is: Available – device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
See vendor-specific Attribute list for failed Attributes.

General SMART Values:
Offline data collection status: (0×82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 617) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0×0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0×01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 255) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x103f) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 119 099 006 Pre-fail Always – 209614914
3 Spin_Up_Time 0×0003 100 100 000 Pre-fail Always – 0
4 Start_Stop_Count 0×0032 100 100 020 Old_age Always – 9
5 Reallocated_Sector_Ct 0×0033 001 001 036 Pre-fail Always FAILING_NOW 4095
7 Seek_Error_Rate 0x000f 091 060 030 Pre-fail Always – 1398653228
9 Power_On_Hours 0×0032 068 068 000 Old_age Always – 28546
10 Spin_Retry_Count 0×0013 100 100 097 Pre-fail Always – 0
12 Power_Cycle_Count 0×0032 100 100 020 Old_age Always – 9
184 End-to-End_Error 0×0032 100 100 099 Old_age Always – 0
187 Reported_Uncorrect 0×0032 042 042 000 Old_age Always – 58
188 Command_Timeout 0×0032 100 099 000 Old_age Always – 12885098499
189 High_Fly_Writes 0x003a 001 001 000 Old_age Always – 274
190 Airflow_Temperature_Cel 0×0022 048 033 045 Old_age Always In_the_past 52 (0 188 54 47)
194 Temperature_Celsius 0×0022 052 067 000 Old_age Always – 52 (0 20 0 0)
195 Hardware_ECC_Recovered 0x001a 042 025 000 Old_age Always – 209614914
197 Current_Pending_Sector 0×0012 100 100 000 Old_age Always – 0
198 Offline_Uncorrectable 0×0010 100 100 000 Old_age Offline – 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always – 0
240 Head_Flying_Hours 0×0000 100 253 000 Old_age Offline – 12652973682562
241 Total_LBAs_Written 0×0000 100 253 000 Old_age Offline – 1787571001
242 Total_LBAs_Read 0×0000 100 253 000 Old_age Offline – 2802815673

SMART Error Log Version: 1
ATA Error Count: 58 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It “wraps” after 49.710 days.

Error 58 occurred at disk power-on lifetime: 28298 hours (1179 days + 2 hours)
When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:
ER ST SC SN CL CH DH
— – — – — – –
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
— – — – — – — – —————- ——————–
60 00 80 ff ff ff 4f 00 48d+22:29:37.025 READ FPDMA QUEUED
61 00 80 80 6e 0b 45 00 48d+22:29:36.732 WRITE FPDMA QUEUED
61 00 80 00 6e 0b 45 00 48d+22:29:36.731 WRITE FPDMA QUEUED
61 00 80 80 6d 0b 45 00 48d+22:29:36.731 WRITE FPDMA QUEUED
61 00 80 00 6d 0b 45 00 48d+22:29:36.730 WRITE FPDMA QUEUED

Error 57 occurred at disk power-on lifetime: 28298 hours (1179 days + 2 hours)
When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:
ER ST SC SN CL CH DH
— – — – — – –
40 51 00 ff ff ff 0f Error: WP at LBA = 0x0fffffff = 268435455

Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
— – — – — – — – —————- ——————–
61 00 80 80 7c fa 44 00 48d+22:29:14.883 WRITE FPDMA QUEUED
61 00 80 00 7c fa 44 00 48d+22:29:14.882 WRITE FPDMA QUEUED
61 00 80 80 7b fa 44 00 48d+22:29:14.882 WRITE FPDMA QUEUED
61 00 80 00 7b fa 44 00 48d+22:29:14.880 WRITE FPDMA QUEUED
61 00 80 80 7a fa 44 00 48d+22:29:14.879 WRITE FPDMA QUEUED

Error 56 occurred at disk power-on lifetime: 28298 hours (1179 days + 2 hours)
When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:
ER ST SC SN CL CH DH
— – — – — – –
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
— – — – — – — – —————- ——————–
60 00 80 ff ff ff 4f 00 48d+22:28:52.552 READ FPDMA QUEUED
60 00 80 ff ff ff 4f 00 48d+22:28:52.552 READ FPDMA QUEUED
60 00 80 ff ff ff 4f 00 48d+22:28:52.541 READ FPDMA QUEUED
60 00 80 ff ff ff 4f 00 48d+22:28:52.539 READ FPDMA QUEUED
60 00 80 ff ff ff 4f 00 48d+22:28:52.538 READ FPDMA QUEUED

Error 55 occurred at disk power-on lifetime: 28298 hours (1179 days + 2 hours)
When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:
ER ST SC SN CL CH DH
— – — – — – –
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
— – — – — – — – —————- ——————–
60 00 80 ff ff ff 4f 00 48d+22:28:20.253 READ FPDMA QUEUED
61 00 18 ff ff ff 4f 00 48d+22:28:20.252 WRITE FPDMA QUEUED
61 00 08 61 18 8c 44 00 48d+22:28:20.252 WRITE FPDMA QUEUED
61 00 10 11 36 48 44 00 48d+22:28:20.252 WRITE FPDMA QUEUED
61 00 01 80 35 48 44 00 48d+22:28:20.252 WRITE FPDMA QUEUED

Error 54 occurred at disk power-on lifetime: 28298 hours (1179 days + 2 hours)
When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:
ER ST SC SN CL CH DH
— – — – — – –
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
— – — – — – — – —————- ——————–
60 00 01 ff ff ff 4f 00 48d+22:27:27.107 READ FPDMA QUEUED
60 00 01 ff ff ff 4f 00 48d+22:27:27.094 READ FPDMA QUEUED
e7 00 00 00 00 00 00 00 48d+22:27:26.248 FLUSH CACHE
61 00 08 f1 9b 7d 40 00 48d+22:27:26.237 WRITE FPDMA QUEUED
61 00 01 00 9a 7d 40 00 48d+22:27:26.236 WRITE FPDMA QUEUED

SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0×0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

Nach dem Plattentausch kann man das Raid dann mittels tw_cli maint rebuild c0 u0 p1 neu aufbauen.
c0 steht für Controller 0, u0 für Unit 0 und p1 für das physical drive 1.

Related Posts:

Google Nexus 4 Induktionsladegerät Alternative von Philips

Da das offizielle Induktionsladegerät für das neue Google Nexus 4 noch nirgends erhältlich ist, habe ich mir nach dem Hinweis von Caschy die Alternative von Philips (Philips DLP7210B/10) bestellt.

Philips Qi Induktionsladegerät

Das Laden funktioniert problemlos und ist total entspannt. Irgendwelche Kabel fummeleien zu später Stunde entfallen. Man legt das Gerät einfach drauf und fertig. Absolut empfehlenswert. Das Ladegerät funktioniert übrigens auch Problemlos mit dem Nokia Lumia 920 und mit Hilfe eines Covers auch mit dem iPhone.

ADAC Mitglieder können das Philips Induktionsladegerät bei Pearl dank einem 10€ Gutschein günstiger bestellen als auf Amazon.

Related Posts:

images

Support Unsinn bei KabelBW

Ich bin schon seit geraumer Zeit Kunde von KabelBW und sehr froh, dass ich den Support nicht so oft nutzen muss. Nun habe ich meinen Vertrag online umgestellt und 3 E-Mails bekommen.
Alle haben mehr oder weniger den selben Inhalt:

Sehr geehrter Herr Lehr,

anbei erhalten Sie eine Information von Kabel BW.
Falls der Anhang verschlüsselt ist, geben Sie bitte Ihre Kundennummer als Passwort ein (die ersten 9 Stellen ohne Leer- bzw. Sonderzeichen).

Mit freundlichen Grüßen,
Ihr Kundenservice von Kabel BW

PS: Zum Öffnen des Anschreibens benötigen Sie die aktuelle Version des Adobe Readers, den Sie sich hier kostenlos herunterladen können:

http://www.adobe.de/products/acrobat/readstep2.html

Hier finden Sie weitere Unterlagen:

https://www.kabelbw.de/static/dokumente/AGB_gesamt.pdf

Dokumenten-ID: blablabla
….

Ihr ahnt schon, was jetzt kommt, oder?
Es gibt immer einen Anhang, der die eigentliche Kundenkommunikation enthält.
Dieser Inhalt ist manchmal verschlüsselt, manchmal auch nicht.
Wenn er verschlüsselt ist, dann mit den ersten 9 Stellen der Kundennummer.
Blöd ist, dass die Kundennummer (zumindest in meinem Fall) 10 Stellen hat.
Also muss ich eine Ziffer streichen, um den geschützten PDF Anhang zu öffnen.
Hallo liebes KabelBW Team: Ich glaube es hackt!(tm).
Derjenige der sich das ausgedacht hat, kann zumindest kein Kunde bei euch sein, denn ansonsten würde ihm auffallen, wie bescheuert das eigentlich ist.
Bitte so fixen, dass man das auch benutzen/durchsuchen/verwenden kann. So ist das wirklich unbrauchbar.
Und “Einfach clever” ist es auch nicht.

Related Posts:

Jira with SSL and Apache as proxy

If you want to run your installation of Atlassian Jira completely over SSL proxied by Apache please note the following:

Apache configuration example (apache is running not on same machine as jira, jira url is jira.example.com)

ServerAdmin [email protected]
ServerName jira.example.com

ErrorLog /var/log/apache2/jira.example.com/ssl-error.log
LogLevel warn
CustomLog /var/log/apache2/jira.example.com/ssl-access.log combined
ServerSignature On

SSLEngine On
SSLCertificateFile jira.example.crt
SSLCertificateKeyFile jira.example.key
SSLCertificateChainFile CA.crt
SSLProxyEngine on

ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://jirahost:8080/
ProxyPassReverse / http://jirahost:8080/


Jira Standalone Tomcat configuration
Besides the usual apache proxy configuration you have to extend the server.xml file of your jira tomcat standalone server (the 3 bold lines at the end are new):

Connector port="8080"
maxThreadv="150"
minSpareThreads="25"
maxSpareThreads="75"
connectionTimeout="20000"
enableLookups="false"
maxHttpHeaderSize="8192"
protocol="HTTP/1.1"
useBodyEncodingForURI="true"
redirectPort="8443"
acceptCount="100"
disableUploadTimeout="true"
scheme="https"
proxyName="jira.example.com"
proxyPort="443" />

Finally, you have to set the Base URL of your Jira Installation accordingly, in the example above to https://jira.example.com

Related Posts:

graylog2 logo

Upgrading Graylog2 from 0.9.5p2 to 0.9.6 with data migration

graylog2 logoThe Graylog2 “party-gorilla” team around Lennart Koopmann just released the final version of graylog2 0.9.6. It includes major changes and new features, such as:

  • ElasticSearch as new message store
  • new analytics shell, a terminal like browser gui for running queries
  • faster long term graphs
  • internal message queing systems to absorb and resist load spikes
  • new stream rules and filters
  • a lot of small improvements and bugfixes

The following migration guide describes the manual upgrade process on debian in detail:

Download new 0.9.6 release, for example into /opt and unpack it
https://github.com/downloads/Graylog2/graylog2-server/graylog2-server-0.9.6.tar.gz
tar xzfv graylog2-server-0.9.6.tar.gz

Download elasticsearch, most recent version from here and unpack it, for example:
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.6.tar.gz
tar xzfv elasticsearch-0.18.6.tar.gz

configure basic elasticsearch values, see elasticsearch configuration for details, for example:
network.host: 192.168.164.100
path:
logs: /var/log/elasticsearch
data: /var/data/elasticsearch
cluster:
name: graylog2

Download elasticsearch-servicewrapper (tanuki-wrapper) into your elasticserach/bin installation directory and unpack it there
wget https://github.com/elasticsearch/elasticsearch-servicewrapper/zipball/master
mv master elasticsearch-servicewrapper.zip && unzip elasticsearch-servicewrapper.zip
mv elasticsearch-elasticsearch-servicewrapper-*/* . && rm -rf elasticsearch-elasticsearch-servicewrapper-*

Start elasticsearch instance bia servicewrapper in /bin/service
./elasticsearch start
Starting ElasticSearch...
Waiting for ElasticSearch.......
running: PID:14816

Check if your elasticsearch instance started successfully. The logfile (defaut here in /var/log/elasticsearch/graylog2.log) should show something like this:
[2011-12-23 22:21:03,711][INFO ][node ] [Celestial Madonna] {0.18.6}[14818]: initializing ...
[2011-12-23 22:21:03,716][INFO ][plugins ] [Celestial Madonna] loaded [], sites []
[2011-12-23 22:21:05,299][INFO ][node ] [Celestial Madonna] {0.18.6}[14818]: initialized
[2011-12-23 22:21:05,299][INFO ][node ] [Celestial Madonna] {0.18.6}[14818]: starting ...
[2011-12-23 22:21:05,352][INFO ][transport ] [Celestial Madonna] bound_address {inet[/192.168.164.100:9300]}, publish_address {inet[/192.168.164.100:9300]}
[2011-12-23 22:21:08,385][INFO ][cluster.service ] [Celestial Madonna] new_master [Celestial Madonna][WiNh0iYwQyeipER3PuXZSg][inet[/192.168.164.100:9300]], reason: zen-disco-join (elected_as_master)
[2011-12-23 22:21:08,408][INFO ][discovery ] [Celestial Madonna] graylog2/WiNh0iYwQyeipER3PuXZSg
[2011-12-23 22:21:08,415][INFO ][http ] [Celestial Madonna] bound_address {inet[/192.168.164.100:9200]}, publish_address {inet[/192.168.164.100:9200]}
[2011-12-23 22:21:08,416][INFO ][node ] [Celestial Madonna] {0.18.6}[14818]: started
[2011-12-23 22:21:08,419][INFO ][gateway ] [Celestial Madonna] recovered [0] indices into cluster_state

Get the MongoDB to ElasticSearch migrator script from joschi
git clone https://github.com/joschi/graylog2-mongo-es-migrator.git

you need at least to adapt to config/migrator.yml with your mongodb username, password and host, usage:
After you've downloaded the script you should edit the configuration file in config/migrator.yml. If the ElasticSearch and MongoDB servers are running on the same system (on localhost) and MongoDB doesn't need authentication you can keep the file as is.

Get required dependencies with Bundler:
bundle install

prepare a new graylog2.conf in /tmp/graylog2.conf with new settings (or just copy the new config and adapt your settings). The new default configuration settings are:
elasticsearch_url = http://localhost:9200/
elasticsearch_index_name = graylog2
force_syslog_rdns = false
mq_batch_size = 4000
mq_poll_freq = 1
mq_max_size = 0

be brave and do a “hole-in-one” migration from the migrator directory (the following line works depending from where your graylog2 servers resides):
ps aux | grep graylog2-server.jar | awk {'print $2'} | xargs kill; ruby migrator.rb;cp /tmp/graylog2.conf /etc/graylog2.conf/; cd ../graylog2-server-0.9.6/bin/;./graylog2ctl start

Get the new web interface from github
git clone https://github.com/Graylog2/graylog2-web-interface.git

get required dependencies for the graylog2 web-interface
cd graylog2-web-interface; bundle install

Configure new web-interface (copy old configs, adapt new parameters, create new indexer.yml file with correct elasticsearch settings), be sure to check
indexer.yml
mongoid.yml
general.yml
email.yml

Start the bundled server or adapt your apache/passenger settings

Login to your web-interface, check if latest events are dropping in.

Write a “thank you party-gorilla” tweet to the @graylog2 twitter account

Related Posts:

Screenshot erstellen mit Android 4.0 ICS und Google Nexus S

Ein Krüppel von Android war schon immer, dass man ohne Root und sonstige Fummelei keinen Screenshot erstellen konnte. Mit Android 4.0 (Ice Cream Sandwich) ist das nun endlich möglich.

Man muss dazu (unter meinem Google Nexus S zumindest) einfach den Volume Down und Power Button gleichzeitig drücken und schon erstellt das Endgerät einen Screenshot des aktuellen Desktops.
Ganz so zuverlässig wie unter iOS funktioniert es allerdings noch nicht, man muss die Knöpfe schon exakt zur selben Zeit drücken, dann erscheint in der Notification Bar ein “Screenshot wird gespeichert” und eine Sekunde später findet man das Bild in der Gallery App im eigenen Ordner “Screenshots“.

So schaut das dann aus:

Ice Cream Sandwich Screenshot

Was eine Geburt. Ice Cream Sandwich finde ich übrigens sehr gelungen, aber darüber berichte ich noch etwas ausführlicher.

Related Posts: