Archive for June, 2010

Alert Notification script to warn you about low disk server space left on Linux / (Low Disk Space Notification via SMS and E-mail)

Thursday, June 10th, 2010

Once again I’ve encountered a problem with a non operational website on a CentOS Linux caused by a depleted disk space on the server.
The disk has been full with data to it’s maximum capacity because the last website SQL and file data backup.
To prevent future unexpected server outages caused by a filled up disk I’ve decided to implement a quick script to warn me when there is a low disk space left on the server system. I was lazy to write a disk monitoring script from scratch so I used the one present on Send an Email Alert When Your Disk Space Gets Low nice article.
I’ve done minor modifications to the script present on the article shown above to make it report on an email the exact system hostname from where it originates (helpful if you intend to run the script on more than one linux servers).
The script is also accustomed to send an SMS message to your mobile phone warning about the possible emerging disk full issues.

If you want to use my monitor_disk_space.sh script after the minor modifiations done to it to report server host and send sms to your mobile check here

Actually it seems too many old backups were just hanging there so I installed a tiny script on a crontab to periodically clear up the old backups.
Here is the script itself:

You can download the clear_old_log_backups.sh script here

Both the monitor_disk_space.sh and clear_old_backups scripts should be prepared to run on a crontab.
In case if you intend to run the aforementioned two scripts you would have to prepare a crontab records similar to the following:

# clear old data backups
30 2 2,20 * * /usr/sbin/clear_old_log_backups.sh
# monitor and report if disk space is low
05,30,59 4 * * * /usr/sbin/monitor_disk_space.sh

That two works fine for me hopefully they would be of use to somebody out there. Feel free to contact me here if you experience some problems in setting up the scripts.

Agni Parthene (Virgin Pure) a majestic and Truly notable Orthodox Christian song

Tuesday, June 8th, 2010

St. Nectarius (Wonderworker) has composed in the 19th century a truly God inspired and majestic Orthodox Song. In my opinion it’s one of the best composed Orthodox Songs ever.
The song is called Agni Parthene (Pure Virgin) and is a honoration song dedicated to the Theotokos (The Mother of God – Virgin Mary).
Enjoy this wonderful piece of pure and holy music!:

How to enable Godaddy Total DNS for a recent transferred domain to Godaddy from another registrar / Solve Godaddy “Total DNS (Not Hosted Here)”

Monday, June 7th, 2010

I’ve recently transferred a domain from servage.net to Godaddy. As usual when I had to deal with a tech supports they were lazy and unhelpful. I had to first request an authorization code for the transferred domain. Since some of the WHOIS domain information set for the transferred domain included the domains@servage.net email I have to contact servage for the authorization code. Servage’s tech support first tried to convince me it is not possible to provide me such a code because I have to receive it on my mail specified in the administrative data for the transferred domain, ofcourse that was a light lie. And it was necessary to contact them once again and request to send me the auth info for the domain the day after I received the domain and was able to complete the domain transfer. Anyways since I wanted to switch from Servage’s web DNS manager and use Godaddy’s total DNS control it was necessery that I enable Godaddy’s Total DNS which was disabled for some reason with a message Total DNS (Not Hosted Here)
Luckily the solution is really simple and the whole issue is well documented on here

In short to solve the issue all necessery I have to do was simply:

1. Under Nameservers, click the “Manage” link.

2 You will see that the “I host my domains with another provider” radio button is checked.
You will need to, instead, click on “I want to park my domain” and then click OK.

Now wait few minutes and then Total DNS Control will appear as a mean of domain management.
By the way it’s maybe worthy to mention that Servage’s web DNS doesn’t support the “TXT” DNS records, neither they allow a custom created SPF TXT records this is really ridiculous for a large scale domain registrar and hosting company ..

The Celebration of the day of All Bulgarian Church Saints in the Bulgarian Orthodox Church

Sunday, June 6th, 2010

All Bulgarian Saints Icon

Today it’s the Sunday in which we the Bulgarian Orthodox Christians celebrate The Day of All the Bulgarian Saints
We have plenty of saints in our Bulgarian Christian history, many known and even more unknown ones. That feast is actually one of the greatest local church commemoration of the Christian saints who gave their life for the building, growing and preventing of the orthodox bulgarian church and the orthodox christian faith througout Bulgaria’s lands.
An almost complete list of the orthodox bulgarian saints can be seen here
However many are not mentioned since there are no historical documents about the countless victims (martyrs) of Ottoman muslics who were beheaded or violently killed because of his refusal to accept the Islam.
Here I will just mention few of the saints that are mostly venerated in the realm of the bulgarian orthodox christian faith:

1. st. Enravota (Prince Boyan)
is considered the first Bulgarian Saint martyr who gave his life to show hthe truthfulness of the Christian Orthodox faith.
His most notable speak is also a prophecy concerning the bulgarian orthodox church which was made before his martyrdom for Christ.
The prophecy saint Enravota has made about the Christianity establishment in Bulgaria is as follows:

This faith, which I now die for, will spread and increase across the whole Bulgarian land, although you may wish to oppress it with my death. In any case, the Sign of Christ will establish itself and churches of God will be built everywhere and pure priests will serve the pure God and will deliver “sacrifice of praise and confession” to the invigorating Trinity. Idols, and priests as well, and their ungodly temples, will crumble and will turn into nothing, as if they had not existed. Besides, you alone (to Malamir), after many years, will cast away your ungodly soul without receiving anything in reward for your cruelty.

2. St. Jonh of Rila (wonderworker) was a hermit in the Rila mountain who is a patron saint of the Bulgarian Orthodox Church. He is notable for his great spiritual purity achievement in his anchoretic life. Many miracles and healing has been received by people who has prayed and asked the saint to intercede in their behalf to God. He is known as the first bulgarian monk, and as an initiator of the first bulgarian orthodox christian monastery.
His uncorruptable body is found for pilgrimage until this very day in the monastery he became a founder of Rila Monastery .

2. St. Brothers Cyril and Methodius Who were the saint brothers who venerated for enlightening the slavonic nations with writting letters. They’re actually the inventors of the old Bulgarian also known as Old Church Slavonic. They and their followers were the first to translate the holy bible into the newly created language – the Old Bulgarian.

3. st. Knyaz (King) Boris-Mihail (Boris-Michael) . He is known for his baptism of the Bulgarian Nation and the initiator of the creation of the Bulgarian Orthodox Church as well as a brilliant statesman.
After baptising most of the bulgarian intelligentia and rooting up the Orthodox Christian faith in Bulgaria, he abdicted voluntery from his throne, leaving his son (Vladimir) to rule Bulgaria and started a voluntery monastic life in poverty.
When his governing son tried to reinforce back the old pagan bulgarian Tengriism belief (e.g. the belief in Tangra (Tengri) he left the monastery took back the power (defeating his son) and blinded Vladimir.
Then he returned back to the monastery and spend his remaining life as a monk.

4. st. Clement of Ohrid was one of the Seven Bulgarian Apostles
Born in 840, a Slav from southern Macedonia, he established a monastery at Okhrida and a bishopric at Velica not far away. He is regarded as the founder of this primatial see and the first Slav to become a bishop.
His extensive apostolate took the form of education of the clergy and of the laity, to whom he preached a series of sermons in Slavonic, suitable for neophytes and explaining the principal feasts of the liturgical year. Clement died at Okhrida on 27 July 916.
5. St. Nahum ucceeded St. Clement of Ohrid as bishop. Converted in Moravia by Cyril and Methodius, he journeyed with them to Rome and helped them with their translations into the vernacular: he is venerated in Russia as well as Bulgaria. Other companions of Clement called Sava and Angelar are also venerated with him. In different times and different places they all contributed to the fulfilment of the missionary plans of Cyril and Methodius.
6. Saint Zlata of Meglen has endured a martyrdom for Christ. She refused to accept muslim faith and has firmly confessed her Orhtodox Christian faith.
She was given many chances to accept muslim faith by some Turks and therefore save her life but she refused and was cast into a prison for 3 months flogging until her blood soacked the ground.
Finally, they suspended her upside down and lit a fire, to suffocate her with the smoke; but God was with Zlata, and gave her strength in suffering.
At last they hanged her from a tree and cut her into small pieces. Thus, this brave virgin gave her soul up to God, and went to dwell in Paradise on October 13, 1796. Pieces of her relics were taken by Christians to their homes for a blessing.

7. 26 Martyrs of the Zographou Monastery on Mt. Athos at the hands of the Crusaders they have endured martyrdom for Christ, from the Roman Catholic Crusaders. Though the were warned that the enemies of Christ are coming to the Zograph Monastery they refused to leave the place and was burned alive by the unpious Crusaders.
There is many others to be mentioned but I neither have the knowledge nor I’m worthy to speak about them.
All Bulgarian Saints new icon representation

Let by their Holy Prayers God have mercy on us the sinners.

Substitute for the Gnome bluetooth / Or how to properly manage your bluetooth (obex) connections in Gnome

Saturday, June 5th, 2010

I connect my Nokia 9300i mobile phone over bluetooth every now and then. In that connection, everyoften I do experience problems with properly connecting the device to my notebook running Debian Squeeze/Sid Unstable on it’s Desktop.
Until recently it really annoyed me that I had to loose time restring the Linux system sometimes when an access to the mobiledevice was failing, without any good trackable error message.
The connection error I have experienced quite often when I was trying to browse my Nokia 9300i cellphone using the bluetooth protocolon Linux was:
“the name org.openobex.client was not provided”
You can read about a similar error to the one encountered by me when using bluetooth on my Debian Linux in debian bugs mailing list on osdir
The way I solved the issues with connecting over bluetooth on Linux until recently was by rebooting the whole Linux system (dumb)!.
Some other things I try to get arround the bluetooth connection errors was by trying to re-enable my bluetooth notebook embedded device on my Lenovo Thinkpad with command:

root@noah:~# echo disable > /proc/acpi/ibm/bluetooth
root@noah:~# echo enable > /proc/acpi/ibm/bluetooth

I alsy tried to physically remove the bluetooth module, rfcomm and a few other modules which were preventing the removal with rmmod of the bluetooth module.
However this solution did’t help either .. To solve the issues I tried few other stuff one of which was installing libobexftp0 and obexftp since my Nokia 9300i uses the obex protocol to communicate with the computer through bluetooth

I have to note that so far I have used the embedded general gnome application Gnome Bluetooth by using the bluetooth-applet .

Well all my worries came to end finally by simply using another piece of bluetooth communication software callde blueman
Since I have installed that handy software bluetooth is working perfectly fine everytime with my mobile. I warmly recommend to everybody out there to switch to the blueman which is a substitute for the old crappy gnome-bluetooth pack
check out the up-mentioned provided website.
It’s probably also worthy to say that the blueman app is written in python.
Well I’m pretty happy now whilst using blueman, hopefully you’ll enjoy it too as well as solve your bluetooth issues ! 🙂

check your food content additives on your Mobile Phone with e-additives (Etata)

Friday, June 4th, 2010

E-Additives J2ME application check your food contamination

In the present age it’s really modern for companies to cut costs and increase a foodproduct durabity and endurance using addition of specially crafted chemical compontents.
Most of which are starting with E and followed by a number for example E328 .
Though this is generally profitable for companies and is prolonging the food durability it’smaking the food less nourishing and more harmful or even sometimes toxic for us humans.
A good friend of mine Necroleak or as earlier known Pro-XeX has created a nice J2MEapplication for mobiles that has a database of most groups of E food chemical additives and is able to tell youif a certain E type like E329 for instance is belonging to which chemical additive group.
This is quite handy especially when you go for grocery to the city market and you have to buy a can of milk or some type ofcanned food.
In the european Union as well as in America, New Zealand, Australia and Israel the E number of the additives are encountered on every non-biological food label.
Hence it’s really helpful when you launch the E-additives application whileyou’re selecting your food and check the food additives E E labelling and therefore know what type of chemical you might swallow while eating the purchased food.
This type of behaviour is really smart and could have a positive impact on your physical health in a long term and help you select a food which is less chemical contaminated.More about the ETATA / E-Additives can be read on it’s official page
Some of the benefits of E-Additives as an application that it is really multi-platform oriented and is supposed to run on most mobile phones which include the J2ME Java Virtual machine
I decided to try the e-additives mobile software on my Nokia 9300i and I have to share the program installed and runs on the mobile quite nice, though the J2ME included with Nokia 9300i is currently quite outdated.

Here are some pictures of e-additives running my Nokia 9300i mobile:

E-additives logo screen Nokia 9300i
E-additives logo screen Nokia 9300i
The only downside of th e-additives on my nokia is that some pictures shown on the e-additives website are not appearing on my phone.
However since I can search in E-additives – E database the application is performing it’s original intention through enabling me to check how actually contaminated with chemical additives (preservative food additions) are my daily meals.

History of Christianity – Which is the True Holy Apostolic Church?

Thursday, June 3rd, 2010

I have many friends who are protestant evangelical Christians. I really feel sorry about them since,I myself had a period of confusion of which and where is the true Christian Church in the present age.
It took me few years and by God’s mercy I came home in the mother Church the (Orthodox Church).
I truly hope that videos on this post would help to somebody out there looking for the true Church of Christ, to find Orthodoxy and return to the Holy Apostolic Faith.
Here are a few videos that will give you some insight on Church History, what is the Orthodox Church, Where is it, Who created it and why it’s currently the only Church that teaches people on true Christianity.

What is the Old Cyrillic / Church Slavonic / Old Bulgarian – large fonts pack to enable writting in Old Cyrillic

Wednesday, June 2nd, 2010

Since some time. I’ve been interested into Bulgarian history as our history is mostly relatedto the Slavnic Church history. The Old Bulgarian letters (Old Slavonic) as Russians prefer to call itnowadays is a real interesting and unique type of letter system that our ancient ancestors used.
This typing letter and it’s books is still in use in Bulgarian, Serbia, Russia, Macedonia mostly in
the Monasteries or on places that has to do with old Slavonic history.
The Old Church Slavonic (Glagolhic Alphabet) as it’s also called by historians is actually a dead languagein a sense that it’s no longer used for everyday communication among anyone.
However it’s Church significanceis enormous, every Slavonic monastery’s in morning and evening services as well as in the Divine Liturgyhas a extensive readings from the old liturgical books which are written in Church Slavonic.
The Church Slavonic (Old Cyrillic language) is considered a God inspired language. The language was createdby the Saint brothers Cyril and Methodius
This days this two saints are as a patron saints of most of the Slavonic nationalities in the world,they’re also highly venerated in Bulgaria, Serbia, Macedonia, Russia, Ukraine etc. as enlighteners of the slavonic nations.
What is really interesting about Church Slavonic is that it’s maybe the only language in the world that doesn’t have anyprofane word in it. This is truly absolutely unique about the Old Cyrillic language.

Here you can see how the original Glagholic alphabet looks like:

Old Church Slavonic alphabet, Glagolhic alphabet, Old bulgarian alphabet, old cyrillic alphabet

At the present days the old cyrllic is of interest mostly to religious Eastern Orthodox Christian people with a known slavonic lineageor to history researchers and anthropologists.

When I was in Pomorie’s Monastery I tried reading from the liturgical books but I was having serious difficulties, making mistakes while reading on almost every word. So I have to tell you Old Bulgarian is not easy to be red or pronounce.
Some Christian Orthodox believers say that praying in Church Slavonic language has a higher prayer power since it is a language which was not touched by modern human profanity. This people claim that reading religious texts or the Holy Bible in Church Slavonic grants a person more grace than usually received by reading the Holy Scriptures, the Saint Livings or the Liturgical texts in modern languages like for instance modern bulgarian.
Many time among the clergy in the Bulgarian Orthodox Church Holy Synod disputes has emerged concerning the topic of language reformation in the Bulgarian Orthodox Church.
The risen dispute which is still pendant questions should the Bulgarian Orthodox Church keep part of it’s reading of the old slavonic book texts in the Churches or monasteries or the Old Church Slavonic should be completely abandoned and the Divine Liturgy service and the holy book readings in the church be in modern Bulgarian language.
My personal opinion is that part of the Church Slavonic readings should be kept as they’re are the present moment in the Church, since they have a direct relation to our history and traditions as a Bulgarian nation.
If the topic has already become interesting to you I advice you read a bit further About Old Church Slavonic here

Some of the prepared electronic documents like pdf or doc with a sacred old bulgarian texts are still in Church slavonic, some doesn’t have a complete translation in modern bulgarian. So every now and then I believe Orthodox Priests, clergy men layman as well as history researches need to open documents written in Church slavonic on their Personal Computers.
Since normally most of the operating systems like MS Windows and Linux, Mac OS X etc. doesn’t support Church Slavonic it’s really important that the necessery fonts are installed the respective computer architecture OS.
In my attempt to simplify the installation of the necessery FONT files for opening Church Slavonic (Old Cyrillic) documents I’ve looked online and downloaded a number of freeware .TTF as well as other fonts that allows visualization of Church Slavonic letters on your PC.
The old cyrillic fonts for your PC can be obtained font by font from here .
An archive of the Complete Large Old Cyrillic / Church Slavonic fonts can be obtained from here
To compile the above old cyrillic fonts pack I have used mostly the following online source:

irmologion.ru – here you can download many old slavonic fonts .
U+fonts Cyrillic OCS on (WAZU JAPAN’s Gallery of Unicode Fonts) .
David Zbiral’s free Old Cyrillic font for Windows and Mac Cyrillic page

You can find a complete list of the old church slavonic cyrillic fonts included with the up-mentioned pack here

I hope this fonts pack would be helpful to somebody out there. Any feedback suggestions for future improve of the pack are very welcome.

Tracking PHP Scripts execution time with (apd and xdebug) to tackle bottlenecks in website performance

Tuesday, June 1st, 2010

Yesterday while reading a book on PHP 5 I found a chapter which was talking about scripts performance.
The book included quite a lot information on tracking performance, however what was personally interesting for me wastwo of the suggested ways to track performance through APD (Advanced PHP Debugger) or alternatively using the xdebug .
Herein I include little information about apd:

APD is a full-featured PHP profiler/debugger that is loaded as a zend_extension. It aims to be an analog of C’s gprof or Perl’s Devel::DProf.
More information on how to install configure and use the advanced php debugger can be found here

Anyways for the impatient and lazy to read the apd docs, here is a few steps that would install and enable APD on your Linux or BSD powered system.

1. Install the apd using pecl (php extension community library)
debian:~# pecl install apd
you should see some debug here ....
Build process completed successfully
Installing '/usr/lib/php5/20060613/apd.so'

2. Edit your php.ini to include the newly installed apd.so library:
– In debian the php.ini would be located in /etc/php5/apache2/php.ini, so you will need to edit /etc/php5/apache2/php.ini , add in it:

zend_extension = "/usr/lib/php5/20060613/apd.so"
apd.dumpdir="/var/tmp/apd"

Afterwards execute the following commands:

debian:~# mkdir /var/tmp/apd
debian:~# chmod 1777 /var/tmp/apd
debian:~# /usr/sbin/apache2ctl restart

To enable a profile of the time required for a certain php script to execute, you will have to:

– include apd_set_pprof_trace(); in the beginning of the questionable script.

If you would like to enable the apd system wide you will have to put the apd_set_pprof_trace(); function into a new file and include in your php.ini the auto_prepend_file directive pointing to the newly created file containing the apd_set_pprof_trace()

To see some statistics concerning apd execution times execute the command:

debian:~# pprofp -O 9 -u /var/tmp/apd/pprof.25515

The above command is about to show you which php fucntions has consumed the maximum amount of server CPU time, so havind that in mind laters you can substitute the cpu heavy php functions with a less cpu intensive ones.
Note that the pprof.25515 is an example file you should check in your /var/tmp/apd/ to find out the pprof name that apd has created.

APD has plenty of other good function trace and general php time debug functions so for more check the manuals.

An alternative way to track your php functions cpu usage and execution times is using xdebug .Xdebug is available for both Linux and Windows OS platforms.
On Debian Linux xdebug is even available as a php 5 module in deb package.
The install of xdebug on Debian is directly through apt-get package manager:

debian:~# apt-get install php5-xdebug

If you’re not on Debian you can use the pecl system to install xdebug:
Issue:

shell:# pecl install xdebug

Next to the pecl install you will find some futher instructions on how to enable the newly installed xdebug module with the zend_extension variable

Note: You should ignore any prompts to add “extension=xdebug.so” to php.ini – this will cause problems.

Complete xdebug installation instructions are available on xdebug’s are here

To enable php scripts profiling with xdebug you will need to add in your php.ini:

xdebug.profiler_enable = 1
xdebug.profiler_output_dir=/var/log/php-profiler

Make sure your xdebug.profiler_output_dir is an existing directory, if you want to use the one shown in the example above, create the dir with command:

shell:# mkdir /var/log/php-profiler
shell:# chown www-data:www-data /var/log/php-profiler

Here I use the www-data user and group which are the user and group used on Debian Linux, if your apache user is different change it to the appropriate user.

Here I want get into details on more about xdebug php code profiling check here

Xdebug profile dumps can even be nicely analysed and visualized in X with Kcachegrind .

Probably there is much, much more left unsaid on the topic of php execution code profiling however I’ll stop here and leave the topic article for discussion and suggestions by my dear readers 🙂