Monday, August 31, 2009

Linux Format Wallpaper

You can find several nice Linux Format Wallpaper at TuxRadar. You will find resolution choice of 1920x1200 or 1600x1200

Happy changing wallpaper!

Sunday, August 30, 2009

Using XrandR to control video projector

This is the 2nd part of my entry of xrandr. I have written a previous entry Using xrandr to change screen resolution and orientation

This blog entry essentially is to how how we can control monitor and projector.


Note 1: Firstly do a query on the connected port (ie projector)
# xrandr --query (You should be able to get your graphics output status whether it is VGA, HDMI etc)


Note 2: Setting the best resolution for the connected port (ie projector)
# xrandr --output VGA --auto


Note 3: Cloning mode for both internal monitor (DVI) and external projector (VGA)
# xrandr --output VGA --mode 1024x768 --same-as DVI --output DVI --mode 1024x768


Note 4: Switching Off the Video Projector and turn off the Internal Monitor
# xrandr --output VGA --off
# xrandr --output DVI --auto


Further Readings:

Friday, August 28, 2009

Using Powertop to save Battery Power (Part 2)

Continuing from the entry Using Powertop to save Battery Power (Part 1)

How do we reinstate the optimised settings for ac-power? I suggest we put the settings that take advantage of AC-Power back into the /etc/acpi/ac.d

# cd /etc/acpi/ac.d # touch 16.optimsation.sh
# chmod 755 16.optimsation.sh
# vim 16-optimisation.sh

#------------------------------------------------------
echo 500 > /proc/sys/vm/dirty_writeback_centisecs
echo 0 > /proc/sys/vm/laptop_mode
hal-disable-polling --device /dev/scd0 --enable-polling
ifconfig eth0 up
iwpriv eth1 set_power 1
#-------------------------------------------------------


For more tips on the settings, do visit the Tip and Tricks session under LessWatts.org

Thursday, August 27, 2009

iotop - Identifying the process with the I/O

iotop is a cool tool to help identify process with the corrsponding I/O in a top-like UI.

This python program needs a Linux Kernel of > 2.6.20 with TASK_DELAY_ACCT and TASK_IO_ACCOUNTING options enabled. In addition, it requires python >= 2.5

To install on Linux Mint
# apt-get iotop

How to use iotop

Note 1: Show process that are causing I/O now
# iotop -o

Note 2: iotop in batch mode
# iotop -o -b -d20 -n30 > check-io.txt
  • -o (show process that are causing I/O only)
  • -b (Turn on interactive mode. Useful for logging I/O usage over time)
  • -d (delay or interval of 20 sec)
  • -n (number of iteration before quiting)

More information:

Wednesday, August 26, 2009

Mounting an ISO Image under Linux

To mount an ISO Image under Linux, you can do the following:

Step 1: Create the mount point
# mount -p /mnt/ISO

Step 2: Mount the iso file
# mount -o loop linux.iso /mnt/ISO

Step 3: List the file stored inside an ISO Disk
# cd /mnt/ISO
# ls -l

Tuesday, August 25, 2009

Thoughts on users-install software

Read an interesting FAQ writeup on user-installed software found on Linux Format Aug 09. I thought I summarise the article in my own words.

I think as most system administration will encounter this scenario quite frequently especially in a academic environment that users wants to install software of their own. How do we cope with this?

Suggestion 1: Building from Source
I think one of the easiest method is to simply allow users to install from source file. The users can unpack the source and configure, make and make install. For example:

$ ./configure --prefix=$HOME
$ make
$ make install

(which will install directories like bin, lib and share to the user's home directory)


Suggestion 2: If using RPM, you can use some prefix
$ rpm --prefix=/home/user/local --otheroptions
(and adding an entry to sudoers with sudo)

However, there are some issues as many packages are NOT relocatable and have to be installed to the path that was given when they are compiled.


Suggestion 3: Allowing restricted sudo access
If you allow users to install onto system directories, you can give them restricted rights like installing without removing.

Saturday, August 22, 2009

Tree - Displayng structure of Directory Hierachy

Tree is a utility which recursively displays the tree view of the contents of directories in a tree-like format

It comes default for CentOS Distribution

Note 1: How to use tree
For more information, you can use man tree. But some useful commands
# tree -D (List the date of the last modification time for the file listed)
# tree -a (List all the files to be printed including hidden files)
# tree -s (List the size of the file and name)
# tree -p (List the permission togethe with the file name)
# tree -H . -o index.html (Generate the output in html format)

lshw - Listing hardware specification on CentOS


ishw is a small but useful tool to help you list the hardware of your linux box. Alternatively you can use dmidecode to list hardware too. For more information, you can read blog entry dmidecode - Finding hardware details remotely


To install lshw on CentOS, first ensure you have RPMForge Repository installed. For more information on RPMForge, you can take a look at blog entry Installing RPMForge


Step 1: Install lshw
# yum install lshw


Step 2: Install the gui version of lshw
# yum install lshw-gui


Step 3: To have a quick look of your hardware specification
# lshw -short


Step 4: To view specific hardware, you have to use the class option
# lshw -class memory
(For more information on what class, you can find it from lshw -short)


Step 5: To launch the gui version of lshw
# lshw-gui


Notes:
  1. lshw Project Page

Friday, August 21, 2009

Singular Application

SINGULAR is a Computer Algebra System for polynomial computations with special emphasis on the needs of commutative algebra, algebraic geometry, and singularity theory.

# wget http://www.mathematik.uni-kl.de/%7emschulze/repo/RPMS/Singular-release.rpm
# rpm -Uvh Singular-release.rpm
# yum install Singular-icons Singular-help


For more information on the application, see http://www.singular.uni-kl.de/

Thursday, August 20, 2009

NTFSProgs to fix NTFS Issues (Part 3)

This is Part 3 of the the 2 Series of NTFSprogs
  1. NTFSProgs to fix NTFS Issues (Part 1)
  2. NTFSProgs to fix NTFS Issues (Part 2)

Note 1: To Clone Partition, you can use the commands
# ntfsclone --save-image /dev/sdc1 -output ntfs-image-file.img

Note 2: To overwrite the Partition, you can use the commands
# ntfsclone --save-image /dev/sdc1 --0verwrite ntfs-image-file.img

Note 3: To create an uncompress image with the option to mount using loopback
# ntfsclone /dev/sdc1 --output ntfs-image-file.img
(without the --save-image)
# mkdir /mnt/nfs-mount-point
# mount -0 rw,loop -t ntfs-image-file.img /mnt/nfs-mount-point
(You can edit, delete, move files)

Monday, August 17, 2009

NTFSProgs to fix NTFS Issues (Part 2)

This is a continuation of NTFSProgs to fix NTFS Issues (Part 1)

Note 1: Command line copying using ntfscp
# ntfscp /dev/sdc1 /home/user/new_test.ini test.ini
(Copy the new_test.ini from /home/user as test.ini to the root of /dev/sdc1 NTFS Volume


Note 2: Undeleting files at NTFS Volume

First do a scan for the deleted files
# ntfsundelete --scan /dev/sdc1 (where /dev/sdc1 is the NTFS volume)

Take note of the the number of recoverable files and inode number of the file you wish to recover
# ntfsundelete --undelete --inode 25 --output Documents/deleted.pdf /dev/sdc1
(The command undelete inode number of the file (25) and recovered to Documents directory at NTFS Volume /dev/sdc1)

Friday, August 14, 2009

Thursday, August 13, 2009

Display network bandwidth with iftop

Iftop is a niffty little tool to help in helping to monitor Network Bandwith. Similar to top, it display the local and external host(s) that are responsible for the most traffic activities.

There are some basic requirement first. Make sure you install
  1. libpcap and libpcap-devel
  2. ncurses and ncurses-devel

To install iftop on Linux Mint,
# apt-get install iftop

To install iftop on CentOS

# yum install iftop

(Make sure you have EPEL repository configured)

To run iftop, simply run
# iftop -i eth0

Wednesday, August 12, 2009

Installing FFTW

I have written an earlier Blog Entry regarding FFTW "Interesting Open-Source Application". This entry is how to compile FFTW to enable parallel computation.


We are assuming you have your intel Math Kernel Library installed. You can read this entry where to get the Free Non-commercial Intel Compiler Download


Step 1a: Configure for threads enablement and double-precision
# ./configure --enable-threads --enable-shared --prefix=/usr/local/fftw
# make
# make install
# make clean


Step 1b: Configure for threads enablement and single-precision
# ./configure --enable-threads --enable-shared --enable-float \
  --prefix=/usr/local/fftw
# make install 
# make clean


Step 1c: Long-Double precision
# ./configure --enable-threads --enable-shared --enable-long-double \
  --prefix=/usr/local/fftw
# make install 

* The configuration script is run 3 times because we need to build 3 sets of libraries is to create degree of floating point prevision.


Step 2: Make sure all your compute nodes have access to the FFTW and MKL.
If the compute nodes does not have access to the fftw library, there will be an error
"error while loading shared libraries: 
/opt/intel/mkl/10.0.4.023/lib/em64t/libmkl_intel_lp64.so: 
cannot open shared object file: No such file or directory"

MOAB Tutorial from Lawrence Livermore National Lab

There is a good article and tutorial for MOAB that can be found at Lawerence Livermore National Laboratory titled Using MOAB

Take a look

Tuesday, August 11, 2009

"No space left on device" for Gaussian when running HPC

For Gaussian software especially for a cluster, you might encounter

"PGFIO/stdio: No space left on devicePGFIO-F-/CLOSE/unit=11/error code returned by host stdio - 28. File name = /scratch/Gaussian-xxx.inp formatted, sequential access record = 57 In source file ml0.f, at line number 203"

As the error message obviously mentioned, it is due to no space available on the scratch file. Depending on how you design your scratch repository. You have to check your scratch directory at your local or shared file system on your Head and Compute Nodes and later issue a parallel script to clean up the files.

NTFSprogs to fix NTFS Issues (Part 1)

For most LINUX Distro, NTFS-3G driver is for reading and writing NTFS Partition. For more information on NTFS-3G, you can look at the NTFS-3G Stable Read and Write Driver for Linux Entry for more information.

NTFS-3G has been stable and popular, the utility is basically to do mounting NTFS file system, reading, writing but it you require create, resize, and clone Partition, you have to use ntfsprogs.

To install ntfsprogs on CentOS, RHEL derivative
# yum install ntfsprogs

To install ntfsprogs on Linux Mint,
# apt-get install ntfsprogs


Look forward for NTFSprogs to fix NTFS Issues (Part 2) for how to use ntfsprogs


For more reading information:
  1. Linux-NTFS Project

Monday, August 10, 2009

NTFS-3G Stable Read and Write Driver for Linux

The NTFS-3G driver is a freely available and supported read/write NTFS driver for Linux. NTFS-3G supports all Windows 2000 and later NTFS

To install on Linux Mint
#apt-get install ntfs-3g

To install on RHEL and Derivatives
# yum install ntfs-3g
(Make sure you include the RPMForge Respository. See Installing RPMForge)


Note: To use NTFS-3g
# mount -t ntfs-3g /dev/sda1 /mnt/windows

Using Gadmin-Rsync on Linux Mint


Beside using Grsync found in the Rsync GUI utility - Grsync , you can also use the utility like Gadmin-Rsync to rsync. To install simply type

# apt-get install gadmin-rsync




Sunday, August 9, 2009

Goldmine of GUI Admin Tools - GadminTools

For first timers to Linux, you may just want to start with some cool GUI Admin Tools, look no further, go to GadminTools (http://gadmintools.flippedweb.com/) and you can download stuff like Gadmin-ProFtpd to configure your Linux FTP

Friday, August 7, 2009

The Google PageRank Algorithm

Curious about how Google PageRank your website, there is an excellent writeup on
  1. What is Pagerank?
  2. The Algorithm
  3. How the Pagerank Calculator work
  4. And more.....
Read http://www.markhorrell.com/seo/pagerank.html

Wednesday, August 5, 2009

Simple Sudo on CentOS Linux (Part 1)

Sudo is generally considered a more secure way of controlling accessing to system commands. By default CentOS does not implement sudo by default


Note 1: To enable your userid to run any commands on CentOS,
# vim /etc/sudoers
youruserid ALL=(ALL) ALL (at /etc/sudoers)
(Youruserid can run any command)
#sudo -s (will prompt you for password before allowing you to have full admin rights)


Note 2: To enable users to use selected commands (at /etc/sudoers)
%users ALL=/sbin/mount/cdrecorder,/sbin/umount/cdrecorder


Note 3: Using the Cmnd_Alias at sudoers file
(Cmnd Alias helps to group a list of related commands)
youruserid ALL=(ALL) PROCESSES
$ sudo -l (Will list all the commands that youruserid have access to)


Note 4: Using User_Alias
User_Alias ADMIN = user1, user2, user3
ADMIN ALL=ALL

Nanyang Technological University in Top500 and Green500 List

Nanyang Technological University supercomputer cluster has broke into the the top500list and green500 list. At point of writing the NTU Cluster is

  1. 267th in the Top500 List with over 28 Teraflops
  2. 24th most energy efficient with 266.68 Mflops per watts
  3. Fastest in ASEAN (in term of Rmax)
  4. Deployed the latest iDataplex, DCS9900, GPFS, Voltaire QDR infiniband

Happy for the NTU HPC team in Singapore. First time we are in top 500 for an island state.

News Articles:

  1. NTU Unveils Green Supercomputer, Fastest in ASEAN
    NTU unveils green and fastest supercomputer in ASEAN

Tuesday, August 4, 2009

Return Code Error of 127 for Nagios

If launching the nagios web interface, you encountered error like "Return code of 127 for check of service 'HTTP' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists."

From the error itself, your installation of nagios-plugins has issues. To resolve the problems, make sure you install

# yum install nagios-plugins-all
(You should see 55+ plugin packages being installed)

For other readings on Nagios, see

  1. How to resolve unpingable host down status in Nagios
  2. Notes to remembers when Installing Nagios 3.x on CentOS 5
  3. Using Nagios 2.x/3.x on CentOS

How to resolve unpingable host down status in Nagios

After installing nagios, you may face some issues

Some hosts are not able to be ping due to firewall. By default, Nagios use the check_host_alive by default at /etc/nagios/objects/template.cfg. check_host_alive uses ping to check whether the host is alive. So your nagios web admin will see a host down status.

To use another commands to replace the check_host_alive with check_http which is more useful as a "check-alive-status", change it at the /etc/nagios/objects/hosts.cfg file. This will override the default at /etc/nagios/objects/templates.cfg

We assume that check_http is already define in the /etc/nagios/objects/command.cfg

define host{
use windows-server
host_name xxxx
alias xxxx web server
check_command check_http
address xxx.com.sg
contact_groups admin
}

Monday, August 3, 2009

Notes to remembers when Installing Nagios 3.x on CentOS 5

This is a follow-up of the article of Using Nagios 2.x & 3.x on CentOS 5. If you follow closely you should get it up and running.

Some Issues to note during configuration


Note 1: First install EPEL. You can follow the following Blog Entry Red Hat Enterprise Linux / CentOS Linux Enable EPEL Repository


Note 2: Yum install nagios and all the plugins # yum install nagios, nagios-plugins-all, nagios-nrpe
(You will see not only nagios 3.x installing but also 55+ plugins too)


Note 3: Configure Objects Configuration File
(Make sure you include all the configuration file you are using to be listed)

OBJECT CONFIGURATION FILE(S)
cfg_file=/etc/nagios/contactgroups.cfg
cfg_file=/etc/nagios/contacts.cfg
cfg_file=/etc/nagios/hostgroups.cfg
cfg_file=/etc/nagios/hosts.cfg
cfg_file=/etc/nagios/services.cfg
cfg_file=/etc/nagios/timeperiods.cfg


Note 4: Make hosts.cfg file and fill up the information
define host{
use windows-server
host_name xxxx
alias xxx Web Server
check_command check_http
address www.xxx.com.sg
contact_groups admins
}



Note 5: Make the hostgroups.cfg and fill up the information
define hostgroup{
hostgroup_name windows-servers
alias Windows Servers
members xxxxx
}


Note 6: Define services.cfg to command.cfg and hostgroup.cfg
(Look at http://wiki.centos.org/HowTos/Nagios for more information)
Remember to list the services you wish to implement for nagios. It will interact with command.cfg, hostgroups.cfg to enable the service. Thus command.cfg and hostgroups.cfg must be properly written

define service{
use generic-service
service_description HTTP
notification_options n
check_command check_http
contact_groups admins
hostgroup_name windows-servers,linux-servers
}


Note 7: Test the nagios configuration before updating the services
# cd /etc/nagios/nagios -v nagios.cfg

Saturday, August 1, 2009

EnFuzion3D 2009 enabling 3D Application in EC2 Cloud

EnFuzion® is the first commercial product on the market today to enable seamless rendering with major 3D applications in the Amazon® EC2 Cloud.

According to EnFuzion, it can supports major applications including Autodesk products, Adobe products vRay etc.

For more information read "EnFuzion3D 2009 Enables Resizable Image Rendering in the Amazon Cloud"

Cloud is In!