Wednesday, July 25, 2012

How to re-direct the data or logs directory in MySQL, Terracotta Cache, Job and Task Tracker logs


1) File : /etc/my.cnf
datadir=/mysql/data

2) In terracotta cache
file : tc-config.xml
, and tag

3) Hadoop logs (job tracker and task tracker)
file : /etc/hadoop/conf/mapred-site.xml
In property tag : mapred.local.dir

mapred.local.dir
/hadoop/tmplocal
Note : Restart task tracker and job tracker once you modified configuration.

Tuesday, July 17, 2012

Block and unblock wifi (wireless fidelity) in linux

rfkill list - This command will show whether hardware or software blocked the wifi in your system.

rfkill unblock wifi - This command will enable software wifi in your laptop.

Reboot your machine once you unblocked.

Sunday, July 15, 2012

Install vpnc in Ubuntu.

In Synatpic Manager install 'vpnc', NetworkManager-vpnc.

In Vpn connection load pcf file. Update the username and reboot the machine.

You can see the username for the vpn and connect into it.

Saturday, July 14, 2012

Too many open files error in linux

If the error is too many open files increase the ulimit in linux for that user whichever user you start the process.

Default open files allowed : 1024

To see current open files execute below command :
lsof | wc -l

Edit in below files and logout and login.
vi /etc/security/limits.d/99-hadoop.nofiles.conf
vi /etc/security/limits.d/hbase.nofiles.conf

To check ulimit
ulimit -Hn (Hard limit)
ulimit -Sn (Soft limit)

Logout and Login
None of the changes you have made above will have any effect until you logout and back in. You do not need to reboot your system or reinstall any software.

http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/

To see the list of listening port in linux :
lsof | grep LISTEN

To see the list of listening tcp in linux
lsof | grep TCP
// Below script tag for SyntaxHighLighter