Thursday, January 27, 2011

Ubuntu Developers Day-2011,Bangalore


"Ubuntu is Humanity", and I have come a long way since knowing Ubuntu in September,2008. That is when I first came across Ubuntu and started using it, right away. Since then, I have almost perennially been on Ubuntu, with a very small percentage of all the 'lot' of technical and non-technical work I do, on anything apart from Ubuntu.


Although, I am no 'Developer', I proudly call myself an Evangelist and better a 'tweaker'( even hacker is a term too big for my C and bash aptitude). To be part of the the meet up was a warm homecoming kind of a feeling.

To have immense passion towards  ' a piece of software' is not regular in the regular world, but amonsgt the FOSS'ers it is a denominating trait. My passion about FOSS and in particular Ubuntu is very explicitly shown by me,for, in 'any' discussion you'd have with me, chances that I do not bring Ubuntu into it would be a rarity!


So, today's Ubuntu Developers Day was something I was looking forward to for quite sometime. And, it did leave me all happy by the end of the day. Today's meet was impeccable- organizationally and pleasantly intuitive - content-wise (except for one sponsored firm's blah blah;)

Firstly, I was a little apprehensive about Unity becoming the default GUI starting Natty Narhwal ( Ubuntu 11.04), but today's sessions have gotten me all excited like rest of the Ubuntu community. Ubuntu will be the first Operating System to ship with full multi-touch abilities, and it was really nice to have had it heard from Chase Douglas.


Secondly, IBM's Linux Technology Center made its presence felt, by very aptly showing off the team behind the ext4 filesystem, and its own contributions to Linux, as a whole.One pleasant surprise in IBM's keynote though was, they mentioning the two Kernel workshops which was conducted along with FSMK,with due attribution to FSMK :)

If I were to call today, a day of de-apprehensions, it would fit perfectly. For, the other major apprehension "The Obscure Cloud" got elucidated in Ubuntu terms. Although, my disassociation with the Public Cloud would still go on, the idea of Private Clouds within enterprises on enterprise owned servers has got me all excited. And, the two great talks by Nick Barcet , did bring a better insight about 'Ubuntu on Cloud' and 'Cloud on Ubuntu'.


The lunch was complex, for we were at the Leela Palace. Nevertheless, I did enjoy the salads and the Shepherd Pie (excellent  minced mutton, baked and garnished like a pie:), with a climactic relishing of the yummy chocolate dessert.

Post lunch, apart from Nick and Chase's second talks the other talk was boring, can't complain, for I know the terms of sponsorship. As, i was running late for another commitment, couldn't stay for the two other sessions post tea.
And in exchange for our feedback, the goody bag given was awesome, with a cool Maverick Meerkat T-shirt, Ubuntu stickers, Ubuntu branded Diary and pen, stuffed in an uber cool bag.


The exhibition rooms, where Ubuntu and variants of Ubuntu were displayed took me by awe. The cutest was Spark's smart book powered by an ARM Cortex and running Ubuntu. Another cool product was the one which would only play media, connect to the net and do some simple things, running Ubuntu Netbook on a Freescale chip,with SD memory! Then the muti-touch demo with the finger painting application was simply stunning.


Looking forward to more of Ubuntu Developers Day, and will try to increase my karmas on Launchpad, before the next UDD!

Saturday, January 15, 2011

A decade of Wikipedia

Knowledge Commons, Community Wisdom, Distributed and decentralized collaboration, Creative Commons and most importantly Free Knowledge (via digital means) are the most radical terminologies which have emanated in the past decade, and have revolutionized the World and the World Wide Web.


Imagine a world in which every single person on the planet is given free access to the sum of all human knowledge. That's what we're doing. 
Jimmy Wales 


Wikipedia has been the mascot and the supreme manifestation of all these ideologies which were presumed to be infeasible. Wikipedia has become synonymous to the term Encyclopaedia, and more so to Free and Community churned knowledge.

Bangalore Wikipedians celebrated Ten years of Wikipedia by organizing a day full of talks,events and Wiki evangelism. The celebration was at the National Institute of Advanced Studies (NIAS), IISc in Bangalore.
As, I was not present the entire day, I'm not in a position to chronicle the entire event. Here are few pictures from the event depicting the overall spirit of the celebration.

A tech talk on API's for Wiki

One of the best ideas ever

Wiki Jerseys

Happy birthday Wikipedia
Jimmy Wales in his live address from London

Lawrence Liang giving his encrypted talk!

Wikipedians :)

Monday, December 20, 2010

NCAR-2010, Hyderabad by FSMI

FOSS has been the mantra.


Whilst a lot of emphasis was laid on the inclusion of FOSS into Academia and Research. An evident lag did surface up in the audience present at the National Convention for Academics and Research in FOSS, Hyderabad-2010. The important aspect intended by the Convention was not to empower the audience in FOSS, which is unlikely to be accomplished within a couple of days, but to instill the idea of enabling themselves to pursue and propagate FOSS.
This being the primary objective of the Convention, numerous talks and discussions were organized by Free Software Movement-India, hosted by Swecha


After having missed the first day of the Convention, which had the highlight inaugural speech by the Former President of India, the charismatic Dr. APJ Abdul Kalam, I had to rely on everbody else's reactions to know that day's proceedings.


When inquired about Dr.Kalam's views, I realized that his talk had created a wave of euphoria amongst the Free and Open Source enthusiasts, as he had endorsed the views of going Open Source, while insisting the adpotion of FOSS in India. But, his stand on Intellectual Property Rights and Patents, seemed to contradicit his recent views presented in an appearance at the Private company which employs me. This did come as a surprise that his stand has been this volatile. Nevertheless, his stature and the support to FOSS he rendered defintiely adds value to the Free Software Movement.

The  usual dilemma of the parallel sessions in Conventions, yet again haunted me. As a result, I was able to attend only half the number of sessions which were arranged.

Talking about the sessions, the first session I could participate in was about GNU's statistical plotter simply called 'R' and its rich feature and application set. I might be able to include it in some of the prospective work I would be doing,and the session did give me some idea of using it. Another tool, which I got acquainted to was GRDSS based on GRASS, now maintained by IISc. This is another tool which I have been looking for. Now that the maintainers are at IISc, I am hoping for some breakthroughs with my work related to Image Processing.


One of the best sessions organized was about "FOSS in Teaching", which emphasized on the disconnect between Academia and Industry.  Four speakers tackled this topic in different perspectives, ultimately emphasizing on the role and responsibility of FOSS in Teaching, and FOSS teaching in itself.

Later, the end of the second day witnessed a conforming panel discussion, which strongly brainstormed on the ways and methods through which FOSS can be spread, more so, converging to the points I had made in the minDebConf : Deficits of Propagation, Percolation and Perpetuation of Free and Open Source Software. A correlation to Indian culture which has been emphasizing on the principle of 'Sharing and Growing' was accentuated, relating it to the driving motto of the Free Software Movement.

On the third and final day of the Convention, I took part in three excellent sessions.
First session was about Contributing to FOSS. The speakers outlined the role of Consumer-producer model in the FOSS. Tools like 'git'and other basics were presented. 'git' did give the audience an idea into version controls of packages and contribution mechanism.


Second session was the crucial one: Open Standard Policy and e-Governance. This session had speakers from the National Informatics Centre, and other board members on the drafting body of the Open Standards Policy. The policy by itslef was discussed, debated and analyzed. The positive impacts, as well as the uncertainties in the policy were openly debated. Yet, again the unanimous struggle by the FOSS entities across India have accomplished in getting this landmark policy made. Now, it is also our responsibility to see it is well implemented.



Of the technical sessions, personally the best was "Scientific Visualization tools", where the developers of Matplotlib and Mayavi2 demonstrated these amazing tools. This is one other reason, I am convinced that Python is the language I definitely am going to learn. These tools have excellent abilities to facilitate research, and not as a surprise NASA,Indian Meteorlogical Dept use them.


In the end, when all three days are cumulatively analyzed, there were a few usual flaws which are inevitable in any major event. But, ultimately I am left with an increased awe and amplified urge to pursue and propagate more of Free and Open Source Software.

Saturday, October 30, 2010

Installing and configuring Cacti

Cacti is a comprehensive monitoring tool for network
equipment resource utilization. We can view utilization graphs of incoming and outgoing traffic on the ports of any networking equipment which supports SNMP ( any of the three versions).

In this post, I shall mention the steps involved in installing and getting Cacti run on a Debian based machine.


1. Prerequisite packages : Apache, Mysql, PHP, Basically if the LAMP package is installed it would suffice. Installing LAMP is very straightforward using tasksel. Run the command and select the LAMP server option as shown


root@fossphosis:~# tasksel 





2. Package dependecies to install Cacti: cacti, cacti-cacid, spine, rrdtool
The dependecies are taken care of by APT. So, just type in apt command as shown.

3. While the packages are being installed, certain essential configurations have to be performed.
 i) Configuring the MYSQL database entry for Cacti. This can be performed using dbconfig. To do this select the option as shown

 ii) Enter the adminsitrative password for MYSQL and also for the user 'cacti'


 iii)Select the webserver for running Cacti. Choose Apache2

4. If things have gone fine, without any errors,  check the following URL to reach the Cacti Screen

http://localhost/cacti
Congrats :)

5. Now, that we have installed Cacti, some simple basic configurations have to be performed




Finally, click on graphs to see if Cacti is working fine. 
After about 30 minutes the resource utilization of the local host can be observed 


Tuesday, October 19, 2010

Resetting mysql root password

As I had mentioned in my previous post, I was composing a post about installing and configuring Cacti. It so happened that I had forgotten my mysql root password on my system. And, as mysql is an essential back-end application for Cacti to run, I had to retrieve it. But, even after multiple attempts I didn't seem to be able to recollect it!

So, I had to reset the root password. After reading a couple of forums I was able to do it. As it seemed non-trivial, I decided to put it up here.

Follow these steps to reset the mysql root password in a GNU/Linux machine.

1. Log into the GNU/Linux machine where the mysql is running.

2. Stop the mysql daemon

raghu@fossphosis:~$ sudo service mysql stop 
mysql stop/waiting

3. After stopping the mysql daemon, create a text file with the following content

UPDATE mysql.user SET Password=PASSWORD('$new_password') WHERE User='root';
FLUSH PRIVILEGES;

The UPDATE statement resets the password for all root accounts, and the FLUSH statement tells the server to reload the grant tables into memory so that it notices the password change.

4. Save this text file which now has the new password, call it maybe mysql-reset.

5. Start mysql with --init-file option:

raghu@fossphosis:$ sudo mysqld_safe --init-file=/home/raghu/mysql-reset &

By doing this we are getting the mysql server to execute the contents of the mysql-reset text file, wherein the root passwords will be reset and assigned with the new value specified in the text file i.e., $new_password.

6. After the server starts successfully, delete the mysql-reset text file, for it has the new password in plain text.

7. You should be now able to log in to mysql as root with the new password.

raghu@fossphosis:~$ sudo mysql -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 82
Server version: 5.1.41-3ubuntu12.6 (Ubuntu)


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> 


This is a very helpful procedure for someone like me, who keeps forgetting the paswwords ;-)

Saturday, October 9, 2010

SNMP based Network monitoring

This is an introductory post to the SNMP based network management series of posts. In this post I would want to elaborate on the Network monitoring tools, which use SNMP(Simple Network Management Protocol)  to poll and map network devices with statistics and graphs.

Before delving into tools such as net-snmp, mrtg, cacti and nagios, a brief insight into the concepts and terminologies of SNMP in this post would help us appreciate the tools better.

Simple Network Management Protocol (SNMP) is a UDP-based network protocol. It is used mostly in network management systems to monitor network-attached devices for conditions that warrant administrative attention. (wiki)

Simple Network Management Protocol is highly useful in monitoring the health, statistics and graphing resource utilization of network devices like switches, routers, data-multiplexers,  Ethernet-access devices, modems, servers and most of the other electronic devices which are part of the network.

In GNU/Linux machines, by default the ports 161 and 162 are used for SNMP.



An SNMP-managed network consists of three key components:
  • Managed device, the device to be monitored/managed like a switch/router
  • Agent — software which runs on managed devices, like snmpd on Linux machines
  • Network management system (NMS) — software which runs on the manager, like nagios, cacti
To enhance the functionality of the snmp tools to incorporate additional features like configuration of specific devices, the concept of MIB is very helpful. MIB stands for Management Information Base, which increases the feature accessibility of devices being managed by SNMP.

SNMP protocol has had its growth with three versions until now.


SNMPv1: This is the first version of the protocol

SNMPv2c: This is the revised protocol, which includes enhancements of SNMPv1 in the areas of protocol packet types, transport mappings, MIB structure elements but using the existing SNMPv1 administration structure ("community based" and hence SNMPv2c).

SNMPv3: SNMPv3 defines the secure version of the SNMP. SNMPv3 also facilitates remote configuration of the SNMP entities.

In the posts to follow, we shall take a look at each of the important GNU/Linux utilities pertaining to SNMP

Monday, October 4, 2010

Mausezahn: The Versatile Packet Crafter

What do you resort to when you want to bombard a network interface with a Broadcast packet storm, in a controlled manner? Get to
Mausezahn!


Does it sound like a title of a monarch from the medievals? Actually it is one of the most versatile packet crafter available today.

Mausezahn, literally means Mause (mouse) Zahn( Tooth)! Well, if you get to use the tool and have observed mice, you might understand the peculiarity in the name :)

mausezahn (mz) is one of the most versatile and robust packet generator around. It is used in various special scenarios:

  • Versatile and fully customizable packet generation
  • Penetration testing of firewalls and IDS
  • Finding weaknesses in network software or appliances
  • Creation of malformed packets to verify whether a system processes a given protocol correctly, i.e, to create the "impossible packets"!
  • Didactical demonstrations as lab utility
  • Performing stress tests on the network equipments
Packets can be crafted with absolute flexibility, by simple options to customize
  • Type of packet
  • Source and destination ports
  • Source and Destination MAC addresses
  • Source and Destination IP addresses
  • Delay between packets
  • Number of packets
  • ASCII Payload for packets
  • Length of the payload
  • VLAN's, QOS (Quality of Service) and COS ( Cost of Service) of packets
  • Setting flags in the packets
  • And other advanced packets, like the CDP(Cisco Discovery Packets)
You can install mz in Debian machines from the Universe repositories, by apt'ing for the package.


raghu@fossphosis$ sudo apt-get install mz 
(It has a couple of library dependencies which will be satisfied automatically by APT)


Examples 
(All instances of mz must be run as root, or in a Debian based machine for a non-root user sudo'ed):

  1. Broadcast storm at maximum rate
raghu@fossphosis$ sudo mz eth0 -c 0 -b bcast
( It generates packets at a rate limited by the system clock!)

2. Send BPDU packets with $VLAN (2-4096)  every 2 second to announcing the Root Bridge status in a STP (Scanning Tree Protocol) scenario,

raghu@fossphosis$ sudo mz eth0 -c 0 -d 2s -t bpdu vlan=$VLAN

3. Send  IP  multicast  packets to the multicast group 230.1.1.1 using a UDP header with destination port 32000, at a rate of one frame every 10 msec:


raghu@fossphosis$ sudo mz eth0 -c 0 -d 10msec -B 230.1.1.1 -t udp dp=32000 -P "Multicast test packet"

Many more varieties of diverse packets, resulting from all the permutation and combination of all the fields in a packet can be easily created, in manners as shown above. 
Malformed Broadcast storm packet generated by mausezahn
Reference:  http://www.perihel.at/sec/mz/mzguide.html