Friday, July 10, 2015

NFS Setup and Performance Tunning on RHEL 6.5 / CentOS 6.5

Install nfs in Server and Client

# yum install nfs-utils nfs-utils-lib nfs-common
# yum install portmap

At Server(192.168.1.1)

Edit /etc/exports file for which directory to export
# cat /etc/exports
/nfsfs 192.168.1.2(rw,sync,no_root_squash)

# chkconfig nfs on
# service rpcbind stop
# service nfs stop

# chkconfig nfs on
# service rpcbind start
# service nfs start

# exportfs -a


At Client(192.168.1.2)

# chkconfig nfs on
# service rpcbind stop
# service nfs stop

# chkconfig nfs on
# service rpcbind start
# service nfs start

# mkdir -p /nfsfs

# cat /etc/fstab
192.168.1.1:/nfsfs  /nfsfs   nfs      auto,soft,noatime,nolock,bg,intr,tcp,actimeo=1800 0 0
# mount -a

# df -kh
192.168.1.1:/nfsfs   44G  5.7G   36G  14% /nfsfs

VIM Editor Tips and Tricks (Linux and UNIX)

To replace ctrl M charter from a file.

:%s/^M//g

To make the above ^M to appear inside VIM command press ctrl +v then ctrl + m.

To Make the file format to UNIX.

When you open the file VIM reports file format as — DOS or Unix:

To modify the file format to UNIX use the below commands inside VIM

:set filetype=unix

:set fileformat=unix

The file will be written back without carriage return (CR, ^M) characters.

Remember to save.

:wq

In case you have to overwrite by force

:wq!

X11 GUI via SSH in CentOS 6 / RHEL 6

Enable X11 forward in Putty in local machine.


Install Cygwin in local machine and Open Xlaunch. use the following settings. Click all Next and close.



Launch the Putty session and connect to remote linux machine.

[root@test ~]# echo $DISPLAY
localhost:10.0
[root@test ~]#  xclock

Now gui Open a XWindow in your local machine.






CPU Clock Speed Monitoring in Linux

Shell command to Monitor CPU Clock speed in Linux

bash#  watch grep \"cpu MHz\" /proc/cpuinfo

Every 2.0s: grep "cpu MHz" /proc/cpuinfo                                                                                          
cpu MHz         : 2792.990
cpu MHz         : 2792.990

Sunday, January 11, 2015

DIY Table LAMP with LED Lightings

Materials Needed

LED LIGHT fixture + LED Driver
1/4 inch thick wood
Small 3/4 inch Plywood rectangular piece
3/4 inch screws
Small nails
Fevicol
Screws and Nuts
120MM diameter PVC pipe.
Driller + Multiple drill bits

The Basic Frames. Front side.

Back Side.



 Finished Product at Work. Lot of LUMENs.





DIY Power UPS/Inverter Cabinet

Materials Needed

3/4 inch Hard Plywood
2.5 inch Plywood sharp nails
Hammer
Hack saw
Circular saw
Glass + Handle + Hinges
Door Hinges
Primer Paint + Glossy Paint
Fevicol

This cabinet has two compartments. Upper one has a glass door containing POWER unit. Lower one has a Plywood door containing 60Kg Tubular Battery.

First we need a sturdy frame. Be generous on Fevicol + Nails on the wood joints.




 Door with the Hinges (120 degree one)
 More Bushes to take the load of the heavy battery.
 Plywood doors are fixed.

Glass doors are fixed. 
The finished product after the primer coat + Glossy coat of Paint.


DIY My Own Music Docking Station(AUX IN)

Materials Needed

Thin Plywood
Hack Saw
Mica sheet for the plywood
2 * Small Speakers ( I got mine from Old Sony W810i Mobile Walkman  Speakers)
2 * Amplifier circuit (You can make one too)
AUX IN cable with MALE PIN.
Wood Adhesive/ General Adhesive (fevicol)

Cut the Plywood.
 Join it with Nails and Fevicol.
 Mica Sheet.
Adding the under hood things (circuit boards).
 Finished Product.