Ganglia HDD plugin

Hey hey,

Like I said, it was lot going on. One of things was my first ganglia plugin. Let’s cut to the meat! 🙂

Plugin is developed for Debian like and Red Hat like systems (deb and rpm package). It is for personal use on grid cluster. Private in sense I did not write all documentation for packages, like for example man pages.

How I did this? I have used gmetric ganglia set tool, for making my custom metrics. Main tool is of course binary made by HD Sentinel, for listing hard disk info, like temperature, health, hours of work etc. Part of the package is script that is extracting basic data from HD Sentinel output and sending it to gmetad by gmetric script. To be precise, I used extended gmetric script written in Python. Reason was I needed grouping option, which default gmetric tool doesn’t have. GmetricP (P from Python) does grouping and sends it to gmetad daemon on main node with ganglia web page, displaying it under custom metrics.

Ganglia HDD Plugin

This is not very clean and pretty way of doing it, but it does the job. Better way would be to write ganglia plugin in Python, like described in ganglia documentation.

Bye!

Advertisements

EGI Training for AEGIS Site Administrators

Attending EGI training at Scientific Computing Laboratory of the Institute of Physics Belgrade.

More about it here.

Parallel programing with MPI and OpenMP

Hey hey ppl!

In past couple of hours I have been writing some seminar about parallel programing. It would be correct to say dozen of hours, but I don’t know if that is grammatically correct? 😐 To be precise, I have been working on source codes couple of days, and it was very strong impression. Unforgettable! How could I forget it when I had just a little sleep 🙂 I’m afraid I’m getting hyperactive and very tired at the same time, so don’t mind if I write nonsense every now and then. Yey 😀 Let’s get to business, or sort of business :S

I wont bug you with the history of parallel programming… It’s just a yatty yatty bla bla big companies having a lot of money to spend on distributed computing research… And so, bla bla they developed tools for making programs execute at the same time on more than one processor… Yatty yatty there were a lot of different implementations with the almost same idea, and they had a deal to make some standards. MPI and OpenMP are well known. Boom, you think we are starting real job now! Wouw! Anyway, different tech for different purposes. MPI is Message Passing Interface. Programmers use it for parallel computing on distributed multicomputers. Distributed multicomputers!!! Now, I’m a smart guy? No, it is just a techy name for… lets say cluster! Wtf is cluster man? 🙂 Ok, lets say you have couple of computers and very fast interconnection between them. At that point you are on good way to have a cluster! All you need is right OSes, and very powerful processors on those computers. Yeah, not to forget a lot of RAM, if you are going to run some serious computations which are RAM expensive. On the other side, there is OpenMP. It is Open Multi Processing. Programmers use it to parallelize program codes on centralized processing machines. SMP if you like it! With it you have the power to fully utilize both processors of your computer, or how many you have them. Cool, I’ll try and run it on GPU. Not! I’m afraid you wont be able, coz OpenMP doesn’t run on GPU processors. Either way, you can make a practical use of it. I just can’t remember any right now. These examples which I’ll talk about are some of use, but not very practical. Hey, who needs to calculate list of prime numbers using Eratosthenes sieve on daily basis?? Not me! Lets explain ideas behind those examples.

So, I did some research on Eratosthenes sieve and sequential program codes, and I’m not nuclear physicist, but I did found some really useless things in some implementations found on net. Gosh, today everyone with Internet connection can write something and publish! Haha, me too! 😀 Tell me I’m goood. Pleaseee??!! Ah, forget it. Back to the subject. I did some research on OpenMP and I decided to try and parallelize Eratosthenes sieve with OpenMP, having already parallelized code with MPI. It was good thing to let programs calculate list and compare needed times for both of them. Since I’m going to give you link to archive containing all source code, I’m not going to get all dirty explaining code. Buuut! I’m going to share with you the results of testing. Those are:

OMP v1 and OMP v2 are two versions of OpenMP parallelized code. Word ukupno means time needed for whole program to finish. As you can see, OpenMP is little bit better in compare to MPI. Of course, MPI has some implicit barriers in collective communications and that is what is keeping it from working as fast as OpenMP.

Anyway, you can download source here, and you will find instructions for running programs.

Have a nice day! Bye!

Gnome terminal scroll doesn’t work

Hey hey, it’s me and I’m here to get you few hints on this problem.
So let us begin.
As serious Linux user, I always use terminal. Since I’m Gnome user, I use default terminal called gnome-terminal. Using it for administration and programming, makes me want to change it’s profile, to make it look relaxing for my eyes. So I did some changes and also removed scroll function from terminal when I’m in vim or viewing man pages. That was big mistake, and I did not realize what I’ve done that moment. So after a while, I was stuck in vim or man pages using keyboard up and down keys. Pain in the aaaday 🙂 I tried to find some answers on google knowing that someone was also having the same problem. But I guess not. Or I did not have patience to look for it long enough.
Then I realized I have to do some searching through options in gconf-editor. Handy little thing. After searching scroll, mouse, terminal I have found that Gnome keeps the default profile of terminal with a lot of options, and profiles that you make has few options. First of them is alternate screen scroll. That is our problem. If it is unchecked, then you can’t scroll when you are in VIM or viewing MAN pages. After you check it, you will be able to do that.
Now I can relax in chair scrolling up and down through my code in C never bothering to do up down navigation by keyboard. Yey!

Using Komodo Editor Symfony plugin

This would be the continuance of the PHP Symfony Editor post.

This time, I’m going to tell you something about this particular plugin for Komodo Editor. I think you can use it in Komodo IDE, but I’m not quite sure.

Anyway, you can download it here.

When you download file with the kpz extension, you have to open toolbox in Komodo Editor, and select import kpz package. You can import it from the URL also.

When you finish importing and open the menu in the toolbox, you’ll see shortcuts to symfony commands. There is a little problem here, or at least it was for me.

Since I use centralized Symfony installation, and also work on GNU/Linux, accessing symfony commands with symfony wont do the job. Also there is the problem with the configure->database shortcut.

First things first!

To work around first problem, I did next:

Created symfony.sh file in my home and typed next code: php5 /var/www/symfony-1.4/data/bin/symfony $*

With it, I’m sure that running the symfony.sh, I will be running script of centralized Symfony installation. $* is for all arguments that are passed to my symfony.sh. Then I make it executable with chmod u+x, but you can make it executable for all users on system. Then, you have to make soft link in /usr/bin pointing to the symfony.sh script. Basically, with this, you can be in any directory and still be able to run symfony command, which will run the symfony.sh script. This way, following any of komodo editor shortcuts, you will be accessing reall symfony commands.

Second thing is that, when you try to do configure->database you’ll get this output:

Task “configure:database” is not defined.

This is because, database command is not positioned in the project directory, and is trying to run symfony command, which is not available if you do not have created project. This thing is easy, you just right click on this shortcut, and type %p in Start in edit.

These are the problems I found, while testing this plugin. I did not test every command, so if you get some error, I’d be glad to hear the problem.

Bye!

PHP Symfony Editor ?

Hey hey! Fresh stuff again! 🙂 This time it is symfony again!

Lets cut the chatting and get straight to the point!

What IDE are you using? Is it fast, is it comfortable, does it have plugins for Symfony?

You are saying, yeess, NetBeans has it, though it is not very fast 😦 All that Java is eating my memory…

If you have it a lot, that that is not a prob, but what if you are short with that resource??? Lets say you have, oh I don’t know, a virtual machine, which you use for developing. You don’t want all that projects, files and junk to be in your sweet home and to look it every day in your spare time :D. So you make virtual machine and use it to do all the work, then shut it down, and the nightmare is forgotten. YEY! But in case you do not have a resource monster computer, or some kinda super computer, virtual machine will have less RAM than host on which you are running it. That is the main part, where you might have the problems with NetBeans or Eclipse. They are sooo sloow on virtual machines… Or I am not well informed, and I do not know some hints to make them faster. If you do, please inform me below 🙂

CUT THE RAMBLING 🙂 GET TO THE POINT!!! silly me 😀

I went some googling about php editor which has support for symfony. There were NetBeans (newest version), Eclipse (with its plugins), PHPEdit (which is shareware, and being a student, I don’t have too much money to spare on software), Komodo IDE (shareware), but WAIT! Komodo Editor!?

That is free, as in speech, dynamic languages editor. Mmmm nice? PHP, Python, Shell, Perl etc. Mmm nice!!! Built in C++!? Weeell, it is based on Mozzila Framework, which among all includes C++ libraries. Faster than NetBeans or Eclipse, which are Java based… Has some plugins for symfony… WOW! You must be dying from wish to try it! 🙂

Here you go http://www.openkomodo.com/ Komodo Edit

So you download it, and what? How, to use if for developing Symfony projects??? That is the right question! And, since this post took me some time, I’ll describe basic project generation in this post.

I’d be very interested in reading your comments, because I see some interest in symfony… Bye 🙂

Totally useless!

Today I did something totally useless.

You know when you start reading articles on various web sites and you get interested in one thing, another thing and before you notice, you spend hour or two on some useless things. I spent hour and a half today on one similar thing. There was and article about some application on Ubuntu, that can download flash videos from the URL you provide, or it can get URL from keyboard. So, I got interested in getting things from keyboard and I did some search in shell, with apropos keyboard. Then I found very nice command setleds.

Setleds can print out the current state of your 3 leds on keyboard, which are showing the states of caps, num and scroll lock. You can set those states with this command too. Having that in mind I got the idea of making leds do what I want ie. what I scripted. Having mixed it up with some nice bash commands too, I made this script which will make your keyboard leds flash nicely.

Just to mention, you have to be in console ie. no graphical surrounding. So, save it and type ctrl+alt+F1, log in and run it. I know this is stupid, but hey! script is useless so there is no use for adapting it for graphical surrounding.

So, there is no particular use for this bash script, but it is funny! Try it (script)!

Have a nice day! Bye!