Monday, August 31, 2009
Linux Format Wallpaper
Happy changing wallpaper!
Sunday, August 30, 2009
Using XrandR to control video 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)
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
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
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
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
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
# yum install lshw
# yum install lshw-gui
# lshw -short
# lshw -class memory
# lshw-gui
Notes:
Friday, August 21, 2009
Singular Application
# 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)
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)
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
Resources on Gnuplot
Some interesting sites on gnuplot
Thursday, August 13, 2009
Display network bandwidth with iftop
There are some basic requirement first. Make sure you install
- libpcap and libpcap-devel
- 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
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
Take a look
Tuesday, August 11, 2009
"No space left on device" for Gaussian when running HPC
"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)
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:
Monday, August 10, 2009
NTFS-3G Stable Read and Write Driver for Linux
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
Friday, August 7, 2009
The Google PageRank Algorithm
- What is Pagerank?
- The Algorithm
- How the Pagerank Calculator work
- And more.....
Wednesday, August 5, 2009
Simple Sudo on CentOS Linux (Part 1)
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
- 267th in the Top500 List with over 28 Teraflops
- 24th most energy efficient with 266.68 Mflops per watts
- Fastest in ASEAN (in term of Rmax)
- 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:
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
How to resolve unpingable host down status in Nagios
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
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
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!