Source – UNIX, Destination – Windows Cygwin (SSH Password-less Authentication)

On Windows Server In windows cygwin create user, say MyUser, locally and also create user in cygwin cd C:\cygwin Cygwin.bat   Administrator@MYWINDOWSHOST ~ $ /bin/mkpasswd -l -u MyUser >>/etc/passwd MyUser@MYWINDOWSHOST ~ $ ls MyUser@MYWINDOWSHOST ~ $ ls -al total 24 drwxr-xr-x+ 1 MyUser        None    0 Mar 17 12:54 . drwxrwxrwt+ 1 Administrator None    0 Mar 17 12:54 .. -rwxr-xr-x  1 MyUser        None 1494 Oct 29 15:34 .bash_profile -rwxr-xr-x  1 MyUser        None 6054 Oct 29 15:34 .bashrc -rwxr-xr-x  1 MyUser        None 1919 Oct 29 15:34 .inputrc -rwxr-xr-x  1 MyUser        None 1236 Oct 29 15:34 .profile MyUser@MYWINDOWSHOST ~ $ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/MyUser/.ssh/id_rsa): Created directory ‘/home/MyUser/.ssh’. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/MyUser/.ssh/id_rsa. Your public key has been saved in /home/MyUser/.ssh/ The key fingerprint is: 7d:40:12:1c:7b:c1:7f:39:ac:f5:1a:c5:73:ae:81:34 MyUser@MYWINDOWSHOST The key’s randomart image is: +–[ RSA 2048]—-+ |       .++o      | |       

read more Source – UNIX, Destination – Windows Cygwin (SSH Password-less Authentication)

Hack #1 -> Define CD Base Directory Using CDPATH

If you are frequently performing cd to subdirectories of a specific parent directory, you can set the CDPATH to the parent directory and perform cd to the subdirectories without giving the parent directory path as explained below. # pwd /home/ramesh # cd mail -bash: cd: mail: No such file or directory [Note: The above cd is looking for mail directory under current directory] # export CDPATH=/etc # cd mail /etc/mail [Note: The above cd is looking for mail under /etc and not under current directory] # pwd /etc/mail To make this change permanent, add export CDPATH=/etc  to your ~/.bash_profile Similar to the PATH variable, you can add more than one directory entry in the CDPATH variable, separating them with : , as shown below. export CDPATH=.:~:/etc:/var This hack can be very helpful under the following situations: • Oracle DBAs frequently working under $ORACLE_HOME, can set the CDPATH variable to the oracle home • Unix sysadmins frequently working under /etc, can set

read more Hack #1 -> Define CD Base Directory Using CDPATH

MySQL – Enterprise – Installation – Linux

Phase #1 –  PreRequisites MAKE SURE A MOUNT POINT /MySql IS CREATED BEFORE RUNNING THIS SCRIPT………………………… Creating the symbolic soft link for parallel database updations ln -s /data /MySql/mysqldb ln -s /data /MySql/mysql_db Soft Links Created. User and Group Adding. groupadd -g27 mysql echo ‘System Group mysql created with GID 27.’ useradd -m -d /var/lib/mysql -g mysql -G mysql -p root123 -u 27 mysql echo ‘System User mysql created with UID 27 home dir=/var/lib/mysql.’ echo ‘root’ >>cron.allow echo ‘mysql’ >>cron.allow service crond restart echo ‘added the user mysql to the cron’ DIRECTORY STRUCTURE CREATION mkdir -p /MySql/mysqldb/configfiles mkdir -p /MySql/mysqldb/datadump mkdir -p /MySql/mysqldb/software_depot mkdir -p /MySql/mysqldb/dbbackup mkdir -p /MySql/mysqldb/archival echo ‘DIRECTORY STRUCTURE COMPLETE’ CONTAINER CREATION mkdir -p /MySql/mysql_db/mysql/2345/var/lib/mysql mkdir -p /MySql/mysql_db/mysql/2345/tmp mkdir -p /MySql/mysql_db/mysql/2345/var/log/binlogs echo ‘CONTAINER STRUCTURE COMPLETE.’ SOFTWARE DEPOT PRE-REQUISITES mkdir -p /MySql/mysqldb/software_depot/meb cp /tmp/meb/bin /MySql/mysqldb/software_depot/meb/bin mkdir -p /opt/product/meb ln -s /MySql/mysqldb/software_depot/meb/bin /opt/product/meb sh mysqlbackup –help echo ‘SUCCESSFULL LINKED MEB’ chown -R mysql:mysql /opt/ /MySql/mysqldb/ /MySql/mysql_db/ echo ‘PRE-REQUISITES COMPLETED

read more MySQL – Enterprise – Installation – Linux

Process Affinity – Linux

Contents 1. Introduction 2. Types of Thread Scheduling 2.1. Compact Scheduling 2.2. Round-Robin Scheduling 2.3. Stupid Scheduling 3. Defining Affinity 3.1. The Linux-Portable Way (taskset) 3.2. The Other Linux-Portable Way (numactl) 3.3. Using OpenMP Runtime Extensions 3.4. getfreesocket 1. Introduction Although a compute node or workstation may appear to have 16 cores and 64 GB of DRAM, these resources are not uniformly accessible to your applications. The best application performance is usually obtained by keeping your code’s parallel workers (e.g., threads or MPI processes) as close to the memory on which they are operating as possible. While you might like to think that the Linux thread scheduler would do this automatically for you, the reality is that most HPC applications benefit greatly from a little bit of help in manually placing threads on different processor cores. To get an idea of what your multithreaded application is doing while it is running, you can use the pscommand. Assuming your executable is

read more Process Affinity – Linux