Just a quick hint if anyone else has the same problem :)
I have moved to a new place and I was experiencing strange network issues on mu linux.
It seemed like internet was working but some websites just would not load. I noticed that it was especially bad on google products and other larger sites. Many sites would never load when on SSL!
Pecl extension does not compile with the version on rabbitmq-c library shipped with ubuntu so you will have to manually install the library. Here is step by step guide how to do it.
That is just a very quick tip how to get git branch name into the prompt. Friend of mine pointed me to this neat little trick just last week and i thought its pretty neat so i am sharing it.
It was very interesting as my cacti installation began failing today. For no apparent reason. I noticed CPU usage and CPU temperature going through the roof as PHP script ran by cacti was stuck in some infinite loop or active wait state. It seemed to query database non stop without sleeping or anything and it was not doing anything either.
I looked in error log and there was nothing, looked in access log of monitored server ... nothing again. Finally i looked into cacti log and found tons of messages like this:
I guess most of people have heard of address space randomization and linux kernel patches that provide that. PAX is a project that has been running for years and it is an awesome way to reduce risk of buffer overflow attacks on your linux server. The great thing about it is that it makes it harder to execute most common buffer overflows system-wide.
I am using new Ubuntu at home on my laptop for a while now and to be honest i still can not get used to it. There seems to be some friction wither i can not figure out there is the greatness or i am too old or it is just not that great. If you know answers to my questions please drop me a comment.
If you do a lot of funky stuff you may need to have a few virtual machines running different images of debian. Well at least i do that. It works great but once you suspend the image it looses the current time. It is not a big deal but causes nasty errors during software updates (timestamp in the future).
The bigger problem is that if your time is not synchronized you wont be able to use Web Services Security (WS-S) extension in JAX-WS as it will complain about requests from the future as well!
Java applications that use ssl to consume web services via jax-ws or use HTTP clients may check the SSL certificate of the server in runtime. In case if your certificate is self signed or Common Name of the certificate does not match the domain name you will get connection errors.
To be able to develop applications you may need to run them on dev/qa servers and then allow your Java application consume these services. To do it you will need to import their SSL certificates into your local Java keyring (the same way you add exception rules into your browser).
Building apache and PHP with all its extensions may be fun once or twice but it is a major pain in the neck. So to avoid that (and to have it before Debian Squeeze is released) you can use e special dotdeb repository of almost everything that you may need as a web dev. It is especially convenient if you have a few development servers to update with different configurations and you don't want to waste too much time on it.
Debian is my favorite linux system since 2001 or 2002. It is awesome.
The only thing that could be better is that packages are usually very old comparing to current versions. Well but at least everything works. I have used apt-get to upgrade distributions since potato release. So far it worked every time. I think i had some small issues with upgrading samba or cups once but simply going back to previous version worked of the package worked. But after all it always worked.
Monitoring of application and server health is an important task, while trying to maintain high availability. Without monitoring you dont know what goes wrong and you do not know when exactly does it happen. Some time ago i realized that the graphs i used to use were not perfect. I searched the web, read a bit of documentation and decided to put together a set of simple scripts gathering key server performance metrics.
This bundle includes gathering scripts and graph templates for Memcached, APC, Apache2, Linux file system, Linux memeory, CPU and Network. It should cover all the most important aspects for a typical web server. Graphs are designed to match my expectations and to make analysis easier.
I still dont have postgres, sphinx nor mysql stats included but .... who knows .... maybe in version 4! :- )
Mysql is so common that its good idea to have some command line scripts or tricks. Sometimes you need to execute some SQL queries on set of tables or all of them or get stats or fix tables etc.
Its good to be able quickly get list of tables and basic stats.
You can make bash script of it or just type in the command line:
Wget is a great and powerful tool but it does have some hidden features that are not really common in linux world.
For example it has set of default settings that can be altered via some misterious .wgetrc (good luck on mac!).
I guess its not easy to write an easy to read book about linux system programming but this one is not bad at all.
I have to admit that it is a bit 'dry', tons and tons of system calls explained with parameters and return values
and error codes going on and on and on :- ) But thats the point. You want to know how to write system apps on linux?
well you have to go through it and youd better enjoy!
After some more work on the weekend and playing around with cacti i have fixed up some of the previous scripts and joined input methods with data sources and graphs all together.
I have also added a host template so now adding servers will be much easier you just enter host name and click ccreate graphs ... job done.
Package includes graphs to monitor Linux system metrics, disk IO, network IO, apache status, APC op code cache, memcached.
Im still adding stuff to it so make sure to come back for an update : -)
You can see some of the graphs in earlier versions here: