Performanceprobleme bei der An und Abmeldung an einer Starfacegruppe mittels UCI

19. September 2015 Posted by Ralf Petter

Bei uns in der Firma verwenden wir im Verkauf das iQueue Feature der Starface, das eine automatische Verteilung von Anrufern an verschiedene Verkaufsmitarbeiter erlaubt. Eine wichtige Funktion bei einer solchen Lösung ist das An und Abmelden der Verkaufsagenten an den diversen iQueues. Um es unseren Benutzern so leicht wie möglich zu machen, haben wir die An und Abmeldung in unseren Notes basierten CTI Client integriert. Der Benutzer kann sich mit einem Mausklick in mehreren iQueues An und Abmelden. Prinzipiell funktioniert die Lösung auch ganz gut nur die Performance war sehr schlecht. Der An und Abmeldevorgang hat mehrere Sekunden gedauert und während der Vorgang lief, war die CPU Last auf der Telefonanlage extrem hoch, was zu Problemen beim Callhandling führen konnte.


Read more »

Herunterladen von Dateien von der Starface mittels Winscp

12. September 2015 Posted by Ralf Petter

Oft ist es ziemlich unpraktisch die oft recht umfangreichen Logdateien der Starface auf der Commandline zu analysieren, vor allem wenn man nicht der absolute Linux Crack ist. Da ist es natürlich praktisch, wenn man einen grafischen Client zur Hand hat mit dem man sich einfach Logfiles von der Starface herunterladen kann und diese dann bequem auf seinem Windows Client analysieren kann. Einen solchen möchte ich euch heute mit WinSCP vorstellen. WinSCP ist ein extrem mächtiges aber trotzdem kompaktes Programm, dass noch dazu völlig ohne Installation auskommt.

Ein kurzes Tutorial für die ersten Schritte:

Als erstens lädt man sich den WinSCP Client von der Download Seite auf https://winscp.net/eng/download.php herunter. Ich empfehle den "Portable Executable" download, da man damit ohne Installation auskommt.

Read more »

Herunterladen von Dateien von der Starface mittels Winscp

12. September 2015 Posted by Ralf Petter

Oft ist es ziemlich unpraktisch die oft recht umfangreichen Logdateien der Starface auf der Commandline zu analysieren, vor allem wenn man nicht der absolute Linux Crack ist. Da ist es natürlich praktisch, wenn man einen grafischen Client zur Hand hat mit dem man sich einfach Logfiles von der Starface herunterladen kann und diese dann bequem auf seinem Windows Client analysieren kann. Einen solchen möchte ich euch heute mit WinSCP vorstellen. WinSCP ist ein extrem mächtiges aber trotzdem kompaktes Programm, dass noch dazu völlig ohne Installation auskommt.

Ein kurzes Tutorial für die ersten Schritte:

Als erstens lädt man sich den WinSCP Client von der Download Seite auf https://winscp.net/eng/download.php herunter. Ich empfehle den "Portable Executable" download, da man damit ohne Installation auskommt.


Die Ausführbare Datei kann direkt aus dem Archiv gestartet werden, oder auch zur späteren Verwendung in ein Verzeichnis eurer Wahl kopiert werden. Es ist keine Installation notwendig und das Programm ist extrem kompakt für den Funktionsumfang.

Nach dem ersten Starten müsst Ihr eure Starfaceanlage auf die Ihr zugreifen wollt in WinSCP anlegen. Füllt dafür die Felder Hostname, User name und Password entsprechend aus. Der Hostname ist der Name eurer Starface, als Benutzername müsst ihr "root" nehmen und das Passwort ist die Seriennummer eurer Starface Appliance falls Ihr es noch nicht geändert habt. (Stark empfohlen, wenn ihr die Starface produktiv einsetzt.)


Nach dem Drücken von "Login" öffnet sich ein Explorer ähnliches Fenster in dem ihr Rechts den Inhalt des "root" Ordner auf eurer Starface sehrt und links habt ihr den Inhalt eines Ordners auf eurem lokalen Rechner. Wenn Ihr den kompletten Verzeichnisbaum der Starface "/" sehen wollt, müsst ihr aus dem "root" Ordner in das übergeordnete Verzeichnis wechseln.


Mit dem Downloadknopf lassen sich dann die gewünschten Dateien auf euren PC herunterladen. Natürlich ist es auch möglich Dateien auf die Starface hochzuladen, nur sollte man dabei genau wissen was man tut, damit man nicht mehr Schaden als Nutzen anrichtet.

Lohnende Ziele für die ersten Experimente für den Dateidownload sind z.B. "/var/lib/pgsql/data/pg_log" das die Postgresql Logs enthält, oder  "var/log/starface" mit den Protokollen die von der Starface Software erstellt werden.

Tips & Tricks für die Starface Postgresql Datenbank

12. September 2015 Posted by Ralf Petter

Da wir immer noch relativ große Probleme mit der Performance unserer Starface haben möchte ich mich mal ein wenig in die Postgresql Datenbank die von der Starface verwendet wird einarbeiten, deshalb habe ich mir hier einen Blogeintrag gemacht in dem ich die wichtigsten Commands und Tricks für die Arbeit mit der Postgresql Datenbank von Starface zusammentrage:

Alle Arbeiten mit der Datenbank kann man von der Command line von der Starface Telefonanlage ausführen.

Interaktives SQL starten:

psql asterisk

Im SQL kann man dann beliebige SQL Befehle eingeben. Achtung der SQL Befehl muss mit einem Strichpunkt enden. Den Befehlsinterpreter kann man mit "q" wieder verlassen.

Position der Postgresql Config Datei ermitteln

show config_file;

Reload der Postgresql Konfig nach Änderungen an der postgresql.conf

SELECT pg_reload_conf();

 Alle Tabellen in der Starfacedatenbank auflisten

SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' and table_type='BASE TABLE'

 SQL's mit langen Laufzeiten finden 

PostgreSQL hat einen Mechanismus mit dem sich lang laufende SQL Anweisungen aufspüren lassen.Diesen Mechanismus kann man sich auch auf der Starfacetelefonanlage zu Nutze machen. Prinzipiell ist das Logging auf der Starfaceanlage schon aktiviert, nur ist der Schwellenwert für schnellere Hardware etwas zu hoch gesetzt. Deshalb sollte man wenn man Performanceprobleme analysieren will, den Schwellenwert an seine Anforderungen anpassen. Dazu editiert man die "postgresql.conf". Diese befindet sich auf der Starface im Ordner "var/lib/pgsql/data". Falls man die Datei nicht findet, kann man sie wie oben stehend ermitteln.

nano /var/lib/pgsql/data/postgresql.conf

In Nano sucht man dann den Eintrag "log_min_duration_statement" Mit diesem Wert kann man steuern wieviele Millisekunden die Ausführung eines SQL Befehls dauern muss, damit der Befehl mit der Dauer in das Log geschrieben wird. Mit der Angabe von 0 kann man jeden Befehl protokollieren lassen. Achtung das sollte man natürlich nur auf eine Testmaschine machen, da sonst extrem viel protokolliert wird. Den geeigneten Wert für seine Umgebung muss man selbst herausfinden, da dies natürlich stark von der Hardware abhängig ist.

Nach dem Speichern der Änderung muss man mit

 SELECT pg_reload_conf();

die Konfiguration von Postgresql neu einlesen.

Danach wird jede Ausführung eines SQL Commands in die für den Tag passende Logdatei von Postgresql geschrieben. Die Logdateien befinden sich in "var/lib/pgsql/data/pg_log"

Entweder kopiert man sich das Logfile auf seinen PC oder man sieht es sich mit nano an. Eine Möglichkeit ist auch, die letzten 40 Einträge des Logfile mit

tail -n40 -f /var/lib/pgsql/data/pg_log/ postgresql-Sat.log

ausgeben zu lassen.

Das Log sieht dann ungefähr so aus und man sieht gleich, dass die Starfaceprogrammierer mehrere schwere Fehler machen:

[2015-09-12 10:31:53 CEST] LOG:  duration: 0.016 ms  execute <unnamed>: SELECT now()
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.352 ms  parse <unnamed>: SELECT accountid FROM account2voicemailuser WHERE voicemailuserid=2464
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.023 ms  bind <unnamed>: SELECT accountid FROM account2voicemailuser WHERE voicemailuserid=2464
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.039 ms  execute <unnamed>: SELECT accountid FROM account2voicemailuser WHERE voicemailuserid=2464
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.310 ms  parse <unnamed>: SELECT id, filename, description FROM account2voicemailannounce WHERE accountid=1000
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.022 ms  bind <unnamed>: SELECT id, filename, description FROM account2voicemailannounce WHERE accountid=1000
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.024 ms  execute <unnamed>: SELECT id, filename, description FROM account2voicemailannounce WHERE accountid=1000
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.106 ms  parse <unnamed>: SELECT id, filename, description FROM account2voicemailannounce WHERE accountid=2398
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.041 ms  bind <unnamed>: SELECT id, filename, description FROM account2voicemailannounce WHERE accountid=2398
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.017 ms  execute <unnamed>: SELECT id, filename, description FROM account2voicemailannounce WHERE accountid=2398
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.097 ms  parse <unnamed>: SELECT id, filename, description FROM account2voicemailannounce WHERE accountid=0
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.020 ms  bind <unnamed>: SELECT id, filename, description FROM account2voicemailannounce WHERE accountid=0
[2015-09-12 10:31:53 CEST] LOG:  duration: 0.025 ms  execute <unnamed>: SELECT id, filename, description FROM account2voicemailannounce WHERE accountid=0


Erstens werden sehr oft, keine PreparedStatements verwendet, was den Code anfällig für SQL-Injections macht und zweitens wenn PreparedStatements verwendet werden, dann werden diese nicht wieder verwendet, was sich natürlich sehr negativ auf die Performance auswirkt. Ich werde in einen späteren Post genauer auf das eingehen.

Tips & Tricks für die Starface Postgresql Datenbank

12. September 2015 Posted by Ralf Petter

Da wir immer noch relativ große Probleme mit der Performance unserer Starface haben möchte ich mich mal ein wenig in die Postgresql Datenbank die von der Starface verwendet wird einarbeiten, deshalb habe ich mir hier einen Blogeintrag gemacht in dem ich die wichtigsten Commands und Tricks für die Arbeit mit der Postgresql Datenbank von Starface zusammentrage:

Alle Arbeiten mit der Datenbank kann man von der Command line von der Starface Telefonanlage ausführen.

Read more »

Flüchtlinge wie kann man helfen, wenn man nicht selber direkt helfen kann.

5. September 2015 Posted by Ralf Petter

Nicht jeder ist in der Lage Flüchtlingen die derzeit in großer Not sind direkt zu helfen, sei es mit Sachspenden oder direkt vor Ort NGO's bei Ihrer Arbeit zu unterstützen. Eine Möglichkeit die aber jeder hat, ist die NGO's die derzeit selbst weit über Ihre Kapazitäten belastet werden, mit einer Geldspende bei Ihrer Hilfe zu unterstützen. Natürlich gibt es Unmengen an NGO's die man unterstützten kann, deshalb möchte ich hier mal die meiner Meinung nach Seriösesten anführen.Wenn jemand der Meinung ist, dass eine fehlt, bitte einen Kommentar posten und ich werde das gerne ergänzen.

Caritas Österreich Flüchtlingshilfe

Rotes Kreuz Flüchtlingshilfe

Ärzte ohne Grenzen

Überwinden wir Grenzen und zeigen unsere Menschlichkeit in dem wir den Helfern helfen.


Flüchtlinge wie kann man helfen, wenn man nicht selber direkt helfen kann.

5. September 2015 Posted by Ralf Petter

Nicht jeder ist in der Lage Flüchtlingen die derzeit in großer Not sind direkt zu helfen, sei es mit Sachspenden oder direkt vor Ort NGO's bei Ihrer Arbeit zu unterstützen. Eine Möglichkeit die aber jeder hat, ist die NGO's die derzeit selbst weit über Ihre Kapazitäten belastet werden, mit einer Geldspende bei Ihrer Hilfe zu unterstützen. Natürlich gibt es Unmengen an NGO's die man unterstützten kann, deshalb möchte ich hier mal die meiner Meinung nach Seriösesten anführen.Wenn jemand der Meinung ist, dass eine fehlt, bitte einen Kommentar posten und ich werde das gerne ergänzen.

Caritas Österreich Flüchtlingshilfe

Rotes Kreuz Flüchtlingshilfe

Ärzte ohne Grenzen

Überwinden wir Grenzen und zeigen unsere Menschlichkeit in dem wir den Helfern helfen.


Remove forward or copy protection of a mail with Document Spy

18. August 2015 Posted by Ralf Petter

Sometimes i get e-mails from very nice users which thinks that there mails are so super confidential, that the set the $KeepPrivate flag on their mail. Every time you want to do something like forward, print or even copy paste with such a mail you will get the error message that this is not allowed.

ou cannot forward or otherwise copy the contents of this document. This document is prohibit copying and duplcating

Fortunately with the mighty Document Spy this is very easy to solve.

Open the Document Spy in the sidebar and select the mail in the UI.
Search for the field "$KeepPrivate" in the Document Spy table and double click it.


Change the value from 1 to 0 and click OK.

And now the forward, copy, print protection is gone and you can do whatever you want with this e-mail.

Remove forward or copy protection of a mail with Document Spy

18. August 2015 Posted by Ralf Petter

Sometimes i get e-mails from very nice users which thinks that there mails are so super confidential, that the set the $KeepPrivate flag on their mail. Every time you want to do something like forward, print or even copy paste with such a mail you will get the error message that this is not allowed.

ou cannot forward or otherwise copy the contents of this document. This document is prohibit copying and duplcating

Fortunately with the mighty Document Spy this is very easy to solve.

Open the Document Spy in the sidebar and select the mail in the UI.
Search for the field "$KeepPrivate" in the Document Spy table and double click it.


Change the value from 1 to 0 and click OK.

And now the forward, copy, print protection is gone and you can do whatever you want with this e-mail.

Create a Heapdump of the JVM running the Notes standard client

18. August 2015 Posted by Ralf Petter

Normally the Garbage Collection of the JVM works without problems, but sometimes caused by programming mistakes the Garbage Collector can not free heap memory and the heap grows and grows till an OutOfMemory Exception is thrown. The best way to find such problems is to use a Heap Analyzer like Eclipse MAT. Before you can use the Heap Analyzer you have to get a heap dump from Notes with these simple steps.

  • Open a command line
  • Change the current directory to the frameworkrcp directory in your notes directory
  • Enter the command "rcplauncher.exe -com.ibm.rcp.core.logger#dump heap -dumps heapdump"


You can find the heap dump in the "..workspacelogs" directory in your Notes data directory.

Create a Heapdump of the JVM running the Notes standard client

18. August 2015 Posted by Ralf Petter

Normally the Garbage Collection of the JVM works without problems, but sometimes caused by programming mistakes the Garbage Collector can not free heap memory and the heap grows and grows till an OutOfMemory Exception is thrown. The best way to find such problems is to use a Heap Analyzer like Eclipse MAT. Before you can use the Heap Analyzer you have to get a heap dump from Notes with these simple steps.

  • Open a command line
  • Change the current directory to the framework\rcp directory in your notes directory
  • Enter the command "rcplauncher.exe -com.ibm.rcp.core.logger#dump heap -dumps heapdump"


You can find the heap dump in the "..\workspace\logs" directory in your Notes data directory.

How to determine which version of a plugin is active in a Notes installation

17. August 2015 Posted by Ralf Petter

Lazlo Nemes has asked me the question how to determine the version of the Document spy which is installed in the IBM Notes client. This is very easy. Simply go to Help->About IBM Notes.


Click Plug-in Details to open the list of all installed plugins.


You get an list of all installed plugins with detailed version information's. To find the plugins i have provided sort the list with a click on the provider column header and scroll down to "Ralf M Petter"



How to determine which version of a plugin is active in a Notes installation

17. August 2015 Posted by Ralf Petter

Lazlo Nemes has asked me the question how to determine the version of the Document spy which is installed in the IBM Notes client. This is very easy. Simply go to Help->About IBM Notes.


Read more »

How to use the new snapshot functionality in the document spy to reverse engineer features in Notes

16. August 2015 Posted by Ralf Petter

Today i want to show you how the new snapshot feature in the Document Spy can help you to understand how features in Notes works and how you can re implement such features in your own apps. As an example i show you which fields of an e-mail changes when you set a follow up flag on this particular mail.

The first step is open the Document Spy in the sidebar view and select the e-mail you want to use for your analysis. All fields of the e-mail will be shown in the document spy. Create a snapshot from the mail document with the snapshot action.


The snapshot of the current state of the mail document will be opened in a new window and is the baseline for our analysis.


Now set the follow up flag on the mail we have selected for our snapshot and then go to your snapshot tab and press the "Delta" shortcut to reload the document as a new column. The document spy will compare the old basevalue column to the new column and will mark all rows witch changes. Values which are new have a green, changes have a red and values which are removed have a blue cell background.



You can repeat the last steps for further changes to the document. For example we can remove the follow up flag again and create a new delta column in the snapshot, to see what happens to our document when the follow up status is removed.


I hope you find this new feature as helpful as i do. If you have some problems or suggestions please leave a comment.

How to use the new snapshot functionality in the document spy to reverse engineer features in Notes

16. August 2015 Posted by Ralf Petter

Today i want to show you how the new snapshot feature in the Document Spy can help you to understand how features in Notes works and how you can re implement such features in your own apps. As an example i show you which fields of an e-mail changes when you set a follow up flag on this particular mail.

The first step is open the Document Spy in the sidebar view and select the e-mail you want to use for your analysis. All fields of the e-mail will be shown in the document spy. Create a snapshot from the mail document with the snapshot action.


Read more »