Tuesday, 17 July 2007

System logging explained in Linux

In linux, a variety of log files are maintained. And its understanding is often vital for troubleshooting system problems. The centralized logging is provided by two daemons :
  • syslogd
  • klogd
For example, running the 'ps' command on my system gives the following output ...
$ ps aux|grep [sk]*logd
root 2281 0.0 0.0 1624 612 ? Ss 13:12 0:00 /sbin/syslogd
root 2287 0.0 0.0 1576 380 ? Ss 13:12 0:00 /sbin/klogd -x

The log files generated by these daemons as well as the log files generated by the applications like apache, squid etc are stored under the /var/log directory.
Some of the more important log files that are a part of system administrator's forte are as follows:
/var/log/dmesg - This log file is written upon system boot. It contains messages from the kernel that were raised during the boot process. You can also view them using the command:
# dmesg
This log file can be viewed by any non-privileged user. But the next three log files are readable only by root.

/var/log/messages - This is the standard system log file, which contains messages from all your system software, non-kernel boot issues, and messages that go to 'dmesg'.

/var/log/maillog - This log file contains messages and errors from your sendmail.

/var/log/secure - This log file contains messages and errors from security related systems such as login, tcp_wrappers, and xinetd. This log file is very useful in detecting and investigating network abuse.
As I said earlier, syslogd and klogd daemons provide centralized logging in linux. The configuration file for syslogd is /etc/syslogd.conf
System logging is provided by syslogd and klogd intercepts kernel messages and provides them to syslogd daemon.

/etc/rc.d/init.d/syslog script controls both syslogd and klogd daemons.

Messages can be logged to files, broadcast to connected users, written to the console, or even transmitted to remote logging daemons across the network.

By default, the messages of emergency or higher (more severe) are broadcast to all users, and most other messages are written to /var/log/messages file, which is where you should look for non-kernel boot errors, error messages from most application-level services, such as automount, login services etc. After system boot, kernel messages are also written to this file.

Usually a system administrator will run the command :
# tail -f /var/log/messages
at the console, to get a running display of the messages logged by the syslogd daemon. Thus he will be able to keep track of any system wide errors that may be generated.

Sunday, 15 July 2007

Linux Help blog now has a new feature - Polls

Any blog hosted on blogger.com has its own share of advantages and disadvantages. But over the 4 years since this blog has been online, I can very well say that the advantages far outweigh the disadvantages.

At times I have felt a dire need for an easy way to clip posts on the front page by providing a "Read More" link. Yes there is a third party hack for this feature which is cleverly implemented using a combination of CSS and script. But nothing beats having a simple inbuilt solution as seen in Wordpress or Drupal CMS. That is not all, there are lots of other features that I feel could be incorporated in Blogger.com.

Having said that, Blogger development team is working hard to improve and better integrate many useful features. And Polls are its latest offering. If you check the right hand side of this blog, you will find a poll which you can participate in. Do try it out. You can also view the results of the poll which is implemented using Ajax so your page will not be reloaded.

And every two weeks, this blog will have a new poll which will try to mine the computing trends of different people. So keep an eye on the polls when you visit this blog and do take part in it. The very first poll asks you which is your favorite text editor.

Tuesday, 10 July 2007

OpenMoko Neo1973 - an open source Linux based iPhone killer in the making ?

OpenMoko is a GNU/Linux based open software development platform. What this means for the lay person is that using OpenMoko software development kit, phone manufacturers will be able to bring out mobile phones which have more or less the same features of the now widely known iPhone from Apple and much more - all this under an Open license powered by GNU. This also means that for the first time there is potential for you to be completely free from being tied up with one mobile carrier or even a single phone manufacturer (read Apple) for want of anything better.

Fig: Openmoko touch screen phone

Recently OpenMoko a project set up by "First International Computings" (FIC) released a developer version of a mobile device named Neo 1973 which is a completely open, Linux-based, GPS-equipped, quad-band GSM/GPRS phone and which has a touch screen equivalent to that in Apple iPhone but which additionally comes with a stylus. The Neo1973 is priced in the $300 to $450 range. Below I have included the rough specifications of both the Openmoko's Neo1973 and Apple's iPhone for comparison.

Openmoko Neo1973 cell phone specifications
  • 2.8" VGA TFT color display (640x480 resolution)
  • Touchscreen, usable with stylus or fingers
  • 266MHz Samsung System on a Chip (SOC) (ARM9 processor)
  • 128 MB RAM
  • 64 MB Flash memory
  • USB 1.1, switchable between Client and Host (un-powered)
  • Integrated AGPS
  • 2.5G GSM – quad band, voice, CSD, GPRS
  • Bluetooth 2.0
  • Micro SD slot
  • High Quality audio codec
  • 1200MA Lion cell battery which the openmoko team guarantees to provide a minimum of 4 hours of power when used continuously before a recharge. The battery can be easily replaced by the users.
Additional freebies thrown in with Neo1973 phone include...
  • 512 MB Sandisk SD card.
  • A good quality set of ear phones.
  • A USB connectivity cable.
  • Stylus
  • A very functional pouch to hold the phone and
  • A Lanyard to safely tether your phone.
Apple iPhone specifications are as follows :
  • Powered by ARM11 processor
  • 128 MB RAM
  • 4 or 8 GB flash memory
  • Screen resolution of 320x480
  • Bluetooth and WiFi enabled
  • Integrated 2 Megapixel camera and
  • an accelerometer
When compared to an iPhone, the Neo1973 from OpenMoko is a bit behind as it doesn't come with a camera, no accelerometer (Which is promised in the next version of the phone), no multi-touch, does not provide WiFi support and does not have gigabytes of storage space.

But in many respects, people buying this phone will have a decisive advantage that the phone runs on GNU/Linux which means that third parties can easily develop applications using openmoko software development platform and thus provide an enhanced end user experience.

Additionally Apple's iPhone has a number of drawbacks such as ...
  • The battery is soldered to the circuit. So it is not possible for the iPhone owners to replace the battery by themselves.
  • iPhone software development kit is proprietary to a fault so much that third parties will not be able to develop software to run on an iPhone.
  • There is no USB connectivity.
  • There is no GPS.
  • And you can't switch carriers.
Here is another interesting thing... you can charge the Neo1973 phone by merely connecting it to the USB port of your PC and you can browse the internet using the phone as a modem more specifically using its GPRS data connection. And it has GSM multiplexing capabilities provided via a custom patch to the Linux kernel (2.6.18) which means you can browse the net and at the same time receive a call too.

Tuesday, 3 July 2007

Slackware 12.0 released

So after nearly a year since Slackware 11.0 was released, Patrick Volkerding has finally deemed it fit to release the next major version of this very popular Linux distribution namely Slackware 12.0. I have always been a Slackware fan and I especially liked its BSD style ways of maintaining the scripts which made configuring Slackware really simple once you get the hang of it.

Some of the new features of Slackware 12.0 are as follows :
  • Use of Linux kernel 2.6.21.5 which is patched with Speakup to support speech synthesizers providing access to Linux for the visually impaired community.
  • X11 7.2.0
  • Support for fully encrypted network connections with OpenSSL,OpenSSH, OpenVPN, and GnuPG.
  • udev dynamic device management system for Linux 2.6.x. This means Slackware now can automatically mount a USB stick as you insert it.
  • New development tools for a wide variety of programming languages.
  • Latest versions of different web browsers - the list includes Sea Monkey, Konqueror, Firefox 2.0.0.4, and thunderbird email client.
  • KDE 3.5.7 - This is no surprise as Slackware is essentially a KDE centric Linux distribution.
  • A number of GTK+ programs such as pidgin Instant Messenger, Gimp, Pan news reader and so on.
  • Sun's Java runtime environment (JRE ver 6.0)
One thing I really wish to see included in Slackware and which has not (to my knowledge) been included in version 12.0 is a Personal Finance software such as GnuCash or KMyMoney. I personally would root for GNUCash as it is what I find most useful. And if Gimp, which is a GTK+ application can be included, it fails me why GNUCash couldn't be included too. But those are my inner ramblings.

And apart from that I find Slackware 12.0 to be a very robust, secure and user friendly Linux distribution. You can read the official announcement as well as check out the full package list to take a closer look at the packages that are included in Slackware 12.0. The preferred method of downloading Slackware is via torrents and a list of torrents for CD sized ISOs and DVD ISOs has been made available here.

Monday, 2 July 2007

15 extra ways to keep your brain healthy

As kids, each one of us were endowed with bountiful energy and we were raring to go and do things. Some of them which could have put us into trouble at one time or the other. But as we grow older, and reach our 30's, our high energy levels taper and hit a plateau and then from there by the time we hit 40's and 50's it is a steady decline....

... Unless we do something about it. Ririan a student in Bucharest, Romania has put together an article explaining simple ways by which you can maintain your level of brain activity and thus keep your brain healthy and save from deterioration. In short this is his list.

  1. Take 20-30 minutes time off everyday to empty your mind.
  2. Hit the streets - in one word exercise.
  3. Vary your exercise routines - try out multiple exercises and mix it up.
  4. Read a book - or a blog (Ps: You could make it a habit to daily read this blog for instance *wink* *wink*)
  5. Occasionally consume some caffeine drink (Coffee ??)
  6. Engage in a debate - Plain yakking will not do. It has to be serious thoughtful conversation.
  7. Play video games - Playing video games will help develop stronger visual skills and make decisions 85% faster. Ps. Pacman is still my favourate. You can also find a lot of games in Linux.
  8. Subscribe to a daily newsletter - You can find a box on the left side of this blog to enter your email and subscribe.
  9. Eat Curry - More specifically Indian curry. Make sure it is not Chicken Tikka Masala (The national curry dish of Great Britain) ;-). It's anything but healthy.
  10. Grab a cue and play pool - You could also play Chess which is sure to increase mental clarity.
  11. Learn an instrument - Now that is beyond me. But I do love listening to people play a wide variety of instruments.
  12. Eat lots of low fat dried fruits such as dates, apricots and so on.
  13. Fresh air golf playing - Those who can't afford to play golf can also try croquet.
  14. Less stressed with Yoga - This I like. Yoga is truly great to relieve stress.
  15. Build a miniature model - Time to buy Lego...
Do read Ririan's article which explains these 15 ways of keeping ones brain in shape in more detail.

LinuxWorld conference and expo 2007 in United Kingdom

LinuxWorld conference and expo 2007
LinuxWorld expo is a Linux and Open Source conference and exhibition which is held in 12 countries and there are 15 shows (2 per year in the US, Japan, and in China; 1 each in Canada, Singapore, Hong Kong, Malaysia, Germany, UK, Italy and Netherlands). By conducting these expos, LinuxWorld facilitates the meeting of diverse businesses and individuals who are involved in Linux and Open Source and are appealing to a cross section of industries including automotive, health, banking, retail, education and local government.

LinuxWorld 2007 is tipped to set the latest trends in Open Source and Linux technologies. The show, which is expected to attract IT decision makers, business professionals and Linux enthusiasts, will showcase the latest technology, debate the use of Open Source in the desktop environment, touch on the use of Linux in the data centre and discuss the development of a common Linux-based platform for mobile phones. LinuxWorld Conference & Expo will take place at Olympia 2 for two days namely - 23rd - 24th October 2007.

Participation has already been confirmed by some of the largest players in the Open Source world including ThoughtWorks, Linux International and Mozilla.

This is what Laura Tythcott the even director, Early Action Group who is organizing the event has to say (and I quote):
Many industry watchers thought that the recent launch of Microsoft Vista would have challenged the ever-increasing update of Linux and Open Source within the enterprise. But that is not the case, many corporations who would have shied away from Linux and Open Source, now see it as a viable alternative to Vista as it requires less training and is just as easy to use.
He goes on to say ...
LinuxWorld 2007 is set to be the biggest and best UK show ever. It will showcase the latest Open Source technology and have experts on hand to help IT Managers and Directors make the best choices when purchasing and deploying Open Source software.
So if you happen to live in U.K and more specifically near London then don't miss this chance to visit the LinuxWorld expo. The visit timings are as follows :

Tuesday 23 October 2007 - 10:00-17:00 (Timings)
Wednesday 24 October 2007 - 10:00-16:00
Location - Olympia 2, London, United Kingdom

The conference will also showcase free business briefing seminars, Masterclass and technical seminars. And you could also participate in The Great Linux Debate.

You can get more details at the LinuxWorld Expo website.

Sunday, 1 July 2007

Building a bittorrent box

Ross explains how to setup a bittorrent box which remotely downloads the files and serves it to ones local machine. This quite exhaustive article explores how to do it using a combination of a headless PC (ie a computer without a monitor) running Ubuntu, OpenSSH (openssh-server), a vnc server (tightvnc-server) , a VPN client, Samba and of course a bittorrent client.

The bittorrent client he has used to download the files to his headless server from the internet is Azureus which is a java based client and so I suppose you also have to install Java runtime environment in Ubuntu.

He also explains how to setup autofs to configure the machine so that drives or partitions can be mounted on the fly by Ubuntu when you try to connect to that partition from your laptop or another machine on your network.

As to why he has written this tutorial, this is what he has to say (and I quote) ...
While most of our time on the Internet is spent IM’ing, e-mail, or just browsing the Web, you may run in to situations when you need to do some powerful file transfers. If you use a laptop, you’re use to getting up, suspending your laptop, and running out the door all of the time. But, sometimes you know you just need something dedicated to get work done. You’ll need a solution to retrieve files and serve data when you need it.

In this guide, you’ll learn how to set a small headless Ubuntu server used to retrieve BitTorrent files, while even saving them to a external USB hard drive that can be disconnected on the go. You even discover how to remotely administer your server from the Web using SSH, VNC, and an inuitive HTML UI, while being able to retrieve files while you’re away from home.

This tutorial takes for granted you have a spare computer laying around. Building a computer is out of the scope of this article.
Do read this very informative article written by Ross to understand how to build a bittorrent box.