Archive

Archive for the ‘programming’ Category

Munin Cherokee plugin

December 7th, 2008

Looked around to find out if there is one already and I couldn’t find any.

I’ve created a multifunctional plugin for Munin for monitoring Cherokee server.

DOWNLOAD HERE

It’s written in Ruby. So far I can confirm that it’s compatible with Munin 1.3.4 and Cherokee 0.11.3 on Gentoo.

It gets data from the server_info module available under /about , which has to be set to at least normal.

Plugin graphs will appear under cherokee category and I believe it allows you to monitor multiple servers from single munin-node as it uses the host field.

Plugin can monitor :

  • Number of connections, Active, Open and Reusable
  • Number of modules Loaded
  • Data Transferred by the Server
  • Data Transfer rate, but this is just a concept as it doesn’t yield usable data after a while.

How to use it

Place it in directory like

/usr/local/lib/munin/plugins

add executable bit

 chmod +x /usr/local/lib/munin/plugins/cherokee__type_.rb

link from /etc/munin/plugins

cd /etc/munin/plugins
ln -s /usr/local/lib/munin/plugins/cherokee__type_.rb cherokee_hostname_type_conn
ln -s /usr/local/lib/munin/plugins/cherokee__type_.rb cherokee_hostname_type_mod
ln -s /usr/local/lib/munin/plugins/cherokee__type_.rb cherokee_hostname_type_data
ln -s /usr/local/lib/munin/plugins/cherokee__type_.rb cherokee_hostname_type_rate

restart munin-node

/etc/init.d/munin-node restart

cherokee, geek, gentoo, hacking, munin, programming

Ruby on Rails on Maemo 2008 N810

November 16th, 2008

I’ve been looking to be able to code a bit of RoR while on the go. From a few devices which I have, N810 has the longest battery run time.

So… Google gave me a nice How To from Jon Forrent, it talks about N800 but it’s the same.

I was trying to do all the steps but I just managed to install ruby and sqlite3 packages. After that Gems package installed well but it wasn’t too useful, any attempt at

gem install

or

gem update

nothing worked, left it over the night, nothing happen.

So…

Uninstalled the gem package, downloaded Real Ruby Gems in a zip file ( you will need the unzip package ).

Unzipped the file, went inside the directory. then:

ruby setup.rb --no-ri --no-rdoc

wow it installed something, now doing :

gem update

told me nothing requires update, great, now lets go with rails:

gem install rails

Amazing, installed really quick ( I would recommend not installing the ri and rdoc as well here )

Just created some test rails app and it works!
Now it’s time to find a decent text editor for it and client for Mercurial.

gadget, hacking, programming, ruby, website

Xeons, Rails and some DVDs

June 26th, 2006

So new Xeons are almost out. Can not wait until more price drops, as I need a server.

I have obtained Agile Web Development with Rails β version as a PDF and now spending most of my time swallowing it… almost last weekend I have spent on CSI: Miami and a History of violence, both great.

book, movie, news, programming, ruby

Ruby on Rails

May 24th, 2006

Heard about it for a while, I have even used some of its components, with some of my small projects, which never went out of half-working stage. Recently decided, that I will give it a try. What I have done after reading a tutorial, which had more info how to install ruby and IDE, than actually coding.

And after installation ( much strait forward, than what was in tutorial ) I have created simple database with one table. To create RoR project I have used one command, which has created nice skeleton of folders with some files inside. Then I have configured database access for my project. The last step was to ‘scaffold’ a projects. And that was it. After scaffolding I was able to do CRUD on my db. I can bet, that even MS VS.net freaks spend more time to achieve what I have done in few seconds ( ok , it was more, because I couldn’t believe that it was SO! Rapid application development, and I was investigating what has been done for me ).

I am really impressed by that. I will spend more time on RoR now, and already I have big plans for it… more to be seen in time.

programming, ruby

Cairo and Evolution

April 5th, 2006

Evolution, my Email Client, PIM of choice, got Cairo as 2D graphics engine, what might make it beautiful.

cairo, evolution, programming

Saturday

March 26th, 2006

So, this Saturday was kind of OK. In the morning I’ve went to the Mall and bought some food, and DVDs ( The Score - medium , Fight Club - really interesting , KungFu Hustle - really entertaining ) and watched afternoon all of ‘em.
After movies session got something to eat ( some Italian pasta ) and started to play with FontForge, which is really impressive piece of software to design Fonts.
Night was spent on trying to get to know Cairo and Mono ;) at least now I assume that I know how to draw a circle ;). And I can start to work on my concept analog face for Internet Time watch. I always wanted to check it that concept will render useful.

cairo, food, idea, mono, movie, programming, weekend

SSH

March 11th, 2006

For a long while I have a lot of ssh connections trying to login with common user names. They all fail as I have secured my ssh quite well, but there is one annoying thing about that failed connections … logs , they grow like crazy! filled with ssh messages …

Today I’ve tried some grep on my logs , to count these connections, for present week it makes around 11600 dump entries from 17 hosts… so why not block that hosts.

I’ve wrote some few liner which is run from cron, it checks for new entries in my logs , and if it finds any new hosts, this guys are added to iptables with a -j DROP

I don’t have a problem about blocking any legitimate hosts, I can always wait or just turn around to remove my self from iptables -j DROP :)

So if you are one of that idiots, remember , you have just one bullet for each of your colts ;)

linux, programming

evolution-sharp

January 27th, 2006

does it implement access to Tasks ? I don’t know … if not , there is more to do than I expected …

evolution, idea, mono, programming

Today

January 26th, 2006

Done some research on Evolution with Mono marriage , found something called evolution-sharp , it’s a part of Beagle project. But it doesn’t have any documentation!

I think that I prefer undocumented piece of code , over my backup plan: to use a Webdav protocol to exchange data between evo and my tool. webdav just smells of chunky code, not suitable for my 770, or I just don’t know it… and appears that I don’t care :) at least now …

evolution, idea, mono, programming

Last weekend

November 22nd, 2005

Had a longer weekend , started on Thursday afternoon by picking Ann from Airport.
Good relaxing weekend, not good that it was short… but time passes fast when you enjoy it.

Today busy… with leftovers from Gareth , with out notice … sorted, and after that got to code some stuff in c#/mono: stuck with badly designed database and DataSets … hopefully tomorrow will have some time to finish that ! :)

job, mono, programming, weekend