Monday, November 30, 2009

Installing Subversion on Fedora 11

I was installing Subversion on Fedora 11 using the "Subversion from CentOS" taken from CentOS Wiki and the instruction set work without a hitch. Just a few important commands to take note

Importing commands to take note:
  1. Initial repository layout for MyTestProject
    # svn import /tmp/mytestproject to file://var/www/svn/repos/mytestproject -m

  2. Checking Out
    $ svn co http://yoursvnserver/repos/mytestproject

  3. Edit and Commit
    $ svn co http://yoursvnserver/repos/mytestproject
    $ svn commit -m "Added a line to testconf1.cfg."

  4. Adding and Commit
    $ svn co http://yoursvnserver/repos/mytestproject
    $ svn add configurations/AnotherTestConf2.cfg
    $ svn commit -m "Added something else"

  5. Deleting
    $ svn co http://yoursvnserver/repos/mytestproject
    $ svn delete configurations/AnotherTestConf2.cfg
    $ svn commit -m "Delete something"

  6. Reverting to Previous Version
    $ svn log http://yoursvnserver/repos/mytestproject
    (You will see a complete list of revision numbers along with the comments)
    $ svn co -r (some number) http://yoursvnserver/repos/mytestproject

  7. To add back files to the current repository
    $ svn
    http://yoursvnserver/repos/mytestproject/oldversionfile@NNN ./oldversionfile (where NNN is the revision number)
For more informatio
  1. Version Control with Subversion (Free Online Documents and Ebook)

Sunday, November 29, 2009

Using read-edid to extract useful information on PnP Monitor on Ubuntu or Linux Mint

Read-edid utility is a useful tool to help you  extract useful information on PnP Monitor.

According to the read-edid website, if you can't find the data to set your monitor up under XFree86, then read-edid is for you; it should auto detect all necessary info and should even provide a few modes with better refresh rates/resolutions than the standard VESA ones. However, as of now it won't do everything for you; you'll have to edit XF86Config yourself.

To install read-edid utility in Ubuntu or Linux Mint, just do a
# aptitude install read-edid OR
# apt-get install read-edid

The  data obtained by get-edid is in a binary format, so the parse-edid command is available to interpret  it  and  generate  a  human-readable block  of  text  information  that  can  also be included in an XFree86 XF86Config file. It is customary  to  invoke  get-edid  and  parse-edid  together  in  a pipeline.
# get-edid | parse-edid

More information:
  1. Get-edid Website

Saturday, November 28, 2009

Webkit Open Source Project

According to the WebKit Open Source Project website, WebKit is an open source web browser engine. WebKit is also the name of the Mac OS X system framework version of the engine that's used by Safari, Dashboard, Mail, and many other OS X applications.
The lightweight browser midori is another example
# aptitude install midori

Monday, November 23, 2009

Using aptitude vs apt-get

Taken the Debian Wiki on Aptitude

Aptitude is an Ncurses based FrontEnd to Apt, the debian package manager. Since it is text based, it is run from a terminal or a CLI (command line interface). Aptitude has a number of useful features, including:
  1. a mutt-like syntax for matching packages in a flexible manner
  2. mark packages as "automatically installed" or "manually installed" so that packages can be auto-removed when no longer required
  3. colorful preview of actions about to be taken
  4. dselect-like persistence of user actions
  5. the ability to retrieve and display the Debian changelog of most packagesAptCLI-like (= apt-get + apt-cache) command line mode ("aptitude install foo")
  6. Score-based and (usually) smarter dependency resolver than apt-get 

For Linux Mint 6, it already come with Aptitude pre-installed. Some useful commands are

# aptitude (To run from the terminal)

After running it, use:
  • F10 to access the menu and use aptitude. This is the main key.
  • ? for help
  • The 'up', 'down', 'left', 'right' keys to navigate.
  • The 'Enter' key to select
  • The '+' or '-' key to install/update or remove a package
  • The 'g' key to preview/confirm actions
  • 'q' to quit 

 You can also commands simliar to apt-get like

# aptitude install mplayer
# aptitude update mplayer
# aptitude upgrade mplayer
# aptitude remove mplayer
# aptitude search mplayer
# aptitude --help (To get the rest of the options)

What is the advantages of using Aptitude versus apt-get? There are a lot similarities and overlap. From what I have gather from the forum and discussion, the advantages of Aptitude over Apt-get are as followed:
  1. Better Dependency Handling
  2. Better at removing obsolete packages from your system
  3. A different log presentation of the what packages have been affected during the installation / removal of package. On the other hands, apt-get tend to log what was present the information on the console during installation.
What's my verdict? I pretty neutral to both. But may stick to apt-get due to familiarity.... :)

Saturday, November 21, 2009

Using Gummi LateX editor for Linux

Gummi is a LaTeX editor for the Linux platform, written in Python and GTK. It was designed with simplicity in mind, but hopes to attract both novice and more advanced users.

It has received good reviews and is growing into an excellent tool for Latex users.

If you are using Fedora 11. Good news indeed. you can download the rpm to install. However, there is a lot of dependency from GTK and Python, you may want to use "yum localinstall" to resolve dependences

After downloading the rpm,
# yum localinstall gummi-0.4.2-1.noarch.rpm

Thursday, November 19, 2009

Dstat a versatile resource statistics tool

Taken from DAG

Dstat is a versatile replacement for vmstat, iostat, netstat, nfsstat and ifstat. Dstat overcomes some of their limitations and adds some extra features, more counters and flexibility. Dstat is handy for monitoring systems during performance tuning tests, benchmarks or troubleshooting.

Dstat allows you to view all of your system resources instantly, you can eg. compare disk usage in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval).

Some of the features includes:
  • Combines vmstat, iostat, ifstat, netstat information and more
  • Shows stats in exactly the same timeframe
  • Enable/order counters as they make most sense during analysis/troubleshooting
  • Modular design
  • Written in python so easily extendable for the task at hand
  • Easy to extend, add your own counters (please contribute those)
  • Includes about 10 external plugins to show how easy it is to add counters
  • Can summarize grouped block/network devices and give total numbers
  • Can show interrupts per device
  • Very accurate timeframes, no timeshifts when system is stressed
  • Shows exact units and limits conversion mistakes
  • Indicate different units with different colors
  • Show intermediate results when delay > 1
  • Allows to export CSV output, which can be imported in Gnumeric and Excel to make graphs

Make sure you have rpmforge repository installed.

# yum install dstat

Some of the useful commands are as followed:
# dstat --help 

# dstat --full 

# dstat --vmstat 

# dstat --mem 

# dstat --load

Wednesday, November 18, 2009

Turn off checking for signature during yum localinstall

yum localinstall is a wonderful utility where I can download and install an rpm package and let yum resolve all the dependencies issues for me. Occasionally, during installation, if I don't want to do a signature check. I can use this commands with a --nogpgcheck flag

# yum localinstall gummi-0.4.2-1.noarch.rpm --nogpgcheck

And it work wonderfully

Wednesday, November 11, 2009

Linux File System throughput performance

The articles from Linux Magazine
  1. I Feel the Need for Speed: Linux File System Throughput Performance, Part 1 and
  2. IOzone Performance Exploration, Part 2: The Rest of the Crowd (Almost)
are interesting writeup on throughput performance among the commonly and less-well known Linux file system. the benchmarking tool used is IOzone. IOzone is a filesystem benchmark tool. The benchmark generates and measures a variety of file operations. IOzone has been ported to many machines and runs under many operating systems.

Do take a look

Monday, November 9, 2009

Using glxinfo to diagnose 3D acceleration issues

glxinfo is a command-line tool that can help you diagnose problems with your 3D acceleration setup.

How do we check that our 3D Acclerlation are working, you can use the command.

# glxinfo |grep render

direct rendering: Yes
OpenGL renderer string: ATI MOBILITY RADEON 9600/9700 Series
The OpenGL rendering tells you what driver was used in the rendering. It distinuishes between software and hardware rendering. The article from titled glxinfo provides a good articles on how glxinfo  information canbe interpreted to understand on hardware / indirect / software rendering which will help to understand 3D Acceleration Issues. For 3D Acceleration performance hardware is the best. The slowest is software obviously.  If you are using Ubuntu, you can go to the Ubuntu X/Troubleshooting to take a look

Sunday, November 8, 2009

Limiting Latencies in the Cloud

This is a very good article on HPCwire that summarise on Limiting the Latencies in the Cloud by Dr. Casimer DeCusatis and Todd Bundy. A must-read on the convergence of the numerous protocol used in storage, HPC and Enterprise Computing

Saturday, November 7, 2009

Changing Default Editor for visudo

Instead of editing /etc/sudoers directly, it is better to edit /etc/sudoers by using visudo.

The beauty of visudo is  that visudo locks the sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks for parse errors. Look at man page for more information.

However, visudo uses nano as a default editor. How do I change the editor as I'm very used to vi or vim to do my editing. Here is a simple way of doing.

Put the following inside your .bashrc file
# vim .bashrc

export EDITOR=vim
sudo visudo

# source .bashrc

You should be able to use vim as the default editor for visudo

Friday, November 6, 2009

Ksplice - Install updates without Rebooting

Ksplice Uptrack and discover how you can:

  1. Keep your systems up to date and secure, without rebooting.
  2. Save time by updating in seconds, while your systems are running.
  3. Avoid disruptive downtime.
  4. Prevent costly security incidents by patching in a timely manner.
It is free for Ubuntu 9.04 and 9.10. For more technical details on how ksplice works, you can take a look at
ksplice technical paper

Wednesday, November 4, 2009

Cannot open/read repomd.xml file for repository: epel

If you encountering this error with yum, you may want to read the Blog Entry Yum error: Cannot find a valid baseurl for repo: with CentOS

Yum error: Cannot find a valid baseurl for repo: with CentOS

If you encounter the error " Error: Cannot find a valid baseurl for repo: ". There are a few possible steps which might fix as least for myself

Step 1: You may want to uncomment the baseurl for the repo
# cd /etc/yum.repos.d
# vim CentOS-Base.repo
(and all other repo you are using)
# yum clean all
# yum check-update

Step 2: If you are still getting error "Cannot open/read repomd.xml file for repository: epel", it could be due to the resolving of DNS or you have set the proxy wrongly at /etc/yum.conf
# wget the (or other url in the repo)
(If you encountered error information like "Name or Service not known". It is likely a DNS resolution issues)

# vim /etc/resolv.conf
(and resolve the error)

Step 3: If you are still encountering error, you may want to check /etc/yum.conf and comment out proxy
# vim /etc/yum.conf
# proxy=xxxxxxx
Finally do a unset to remove a http proxy  
# unset http_proxy
# echo $http_proxy (To check)

Step 4: If you are still encountering error, you may finally want to check /etc/profile.d/. Maybe there is a proxy script there.

Monday, November 2, 2009

Jobs submitted placed on the queue and not able to run on HPC

Sometimes, when out users submit job via MOAB using Torque as a resource manager, their jobs is just not able to run even though there are resources to accomdoate the run. Of course there are many ways to troubleshoot. Here is how I troubleshoot 1 of them.

Step 1: Use the command checkjob on the process ID of the job that is stuck.
# checkjob 100001
Partition List:      xxxxxxxx
Flags:                 RESTARTABLE
Attr:                   checkpoint
StartPriority:       94
rejected for CPU              - (null)
rejected for State              - (null)
NOTE: job req cannot run in partition xxxxx (available procs do not meet requirements : 0 of 32 procs found)
Here's the key hint under NOTE. There is no node suitable for this user. But why? Launch another command

# qstat -f 100001
euser = xxxxx
egroup = xxxxx
queue_rank = xxxxx
queue_type = xxxxx
etime = xxxxxxxx
submit_args = -1 nodes2:ppn=16 ./
Note the key issue is that users submitted a job requesting 2 nodes with 16 cores each. This does not exist in our cluster configuration. Hence it is not able to run....

Using MOAB and Torque Commands together to analyse the problem is useful indeed.

Mozilla Firefox losing its Title Bar

I was fiddling with my keyboard when I accidentally hide my firefox title bar. Quite a frustration as I cannot minimise my browser easily.

To restore the Firefox, I just need to type F11 and I got back the Titlebar....What a relief...

Sunday, November 1, 2009

Article on Red Hat Cloud Developments

A good article of Red Hat Cloud Developments. You can download some of the conference presentation slides from the Redhat Summit there as well.

Using find to locate files in Linux (Part 1)

Find is a useful command line to locate and search files easily. Some usage includes

Note 1: To find a file (For example *.mp3) and print it to your console
$ find ~ -name *.mp3 -print

Note 2: Finding files that have been modified

$ find $HOME -mtime 0
(-mtime refers to modification since the last 24 hr. The time when the file was modified is divided by 24hr with the remainder removed. )

Note 3: Finding files that have been modified with file name in leading directory removed
$ find ~ -type f -mtime 0

Note 4: To serve for files and make the match case-insensitve
$ find ~ -type f -mtime 0 -iname '*.mp3'

Note 5: Finding permission not owned by you
$ find ~ ! -user ${USER}