Dariusz on Software Quality & Performance


Przeczytaj zanim wyślesz – zwłaszcza do tysięcy klientów

Filed under: pl — Tags: , — dariusz.cieslak @

To jest chyba zaraźliwe (e-mail od Freeconet, wzorowali się na STMicro):

Szanowny Użytkowniku!

Do poprzedniej wiadomości, dotyczącej niższych stawek za połączenia komórkowe, wkradł się błąd związany z datą wprowadzenia obniżki. Zmiana cennika obowiązuje od 10 kwietnia br. (a nie od 10 marca, jak podane było we wcześniejszej wiadomości).

Przepraszamy za pomyłkę,


1) Czytamy e-maile dwa razy przed wysłaniem, żeby nie musieć potem prostować. Zwłaszcza dotyczy to komunikatów marketingowych do tysięcy klientów.

2) Czytając pierwszy e-mail nawet nie zwróciłem uwagi na błędną datę. Pomyłka raczej oczywista (nie zmienia się zwykle stawek z poprzedniego okresu rozliczeniowego). Ktoś zadecydował, że muszę się o tym fakcie koniecznie dowiedzieć. Kolejny e-mail do przeczytania. Dlaczego? Teraz Freeconet ma na moim blogu darmowa reklamę :-P


Mutt: jump to next marked e-mail

Filed under: en — Tags: , — dariusz.cieslak @

I'm big mutt fan. Mutt is console-based e-mail client that is very customisable. You can redefine almost everything!

Here's very useful macro that allows you to search for next e-mail in TODO state (marked with "F", "N"ew or "O"ld state). It's working in pager and index mode:

macro index . <search>~F|~N|~O<Enter><Enter>
macro pager . i<search>~F|~N|~O<Enter><Enter>
macro index , <search-reverse>~F|~N|~O<Enter><Enter>
macro pager , i<search-reverse>~F|~N|~O<Enter><Enter>

I assigned this macro to "." and "," keys that is normally not used in default mutt configuration. It allows me to reach not-yet-processed e-mails easily (".": next, "," for previous e-mail).


Maildir -> mbox conversion

Filed under: en — Tags: , — dariusz.cieslak @

Maildir and mbox are two formats for storing e-mails locally. Both have strengths and disadvantages. If you want to convert all your mail from Maildir format to old, good mbox just issue the following script:

for a in .??*; do
    echo $a
    for msg in $a/new/* $a/cur/*; do
        formail <$msg >>$mbs 


You may ask: why revert to older, less flexible format? The answer is: speed (mbox is faster for many small messages).


Sendmail in chroot-ed environment for CI purposes

Filed under: en — Tags: , , — dariusz.cieslak @

Recently I've been working on simple continuous integration tool that builds fresh checkouts from Perforce and uploads binary artifacts to external FTP server for testing purposes. I'm using chrooted Debian Squeeze 32 bit environment inside 64 bit host based on RPM distro (basic chroot, a simpler form of BSD's chroot jail).

The frequent problem was failing builds caused by partial commits from different teams (client was not comfortable with shared codebase ownership idea). We decided to replace rule "before every commit check if all suite is building" to "minimize failed build time as possible".  How to minize the problem if it cannot be avoided at all?



Simplest Linux Administrator Measure/Notification Toolset

Filed under: en — Tags: , , — dariusz.cieslak @

It's very important to know about server problems before they have impart on overall system performance and stability. Typical problem with server that may occur:

  • missing disk space
  • high server load (caused by CPU/IO)

In past I had problems with web applications failing to operate because lack of free disk space used for session storage. From this time I used to install monitoring on every resource that may be a problem for system.

The easiest way (Keep It Simple Stupid) to be monitored is to redirect email from root@localhost and install checks on root's crontab. Output written to stdout/stderr (if present) is send to crontab owner after script execution. Our srcipts will only generate output when problem is found. For example:

Notify high (>4) load on server:

*/5 * * * *  cat /proc/loadavg | awk '$2 > 4 { print "High 5-minute load", $2 }'

Notify when used disk space is above 90%:

00 21 * * *  df | awk '/^\// && $5 > 90 { print $0 }'

Many additional checks could be configured that way.

In addition I used to install munin. It produces graphs that shows various resources levels (day, week, month and year perspective). You can see in one place your overall system. It's sample graph showing month VPS instance load:


Do you have similar tools to monitor your server performance?

Older Posts »

Powered by WordPress