Archive for February, 2015


Uptime command with awk

Pretty much trick to get nice output via awk utility. Here is what I did with uptime 🙂

uptime | awk -F’,’ ‘{print “last 1min” $4 “\n” “last 5min load average:” $5 “\n” “last 15min load average:”$6}’

Output:

last 1min 0.00
last 5min load average: 0.00
last 15min load average:0.00

Try it out 🙂

Try installing GCC library using zypper:

zypper install libgcc_s1-4.7.2_20130108-0.17.2.x86_64.rpm
zypper install libstdc++6-4.7.2_20130108-0.17.2.x86_64.rpm
rpm -qa |grep gcc (For querying, if installation is done)

 

Zypper is the native command-line interface of the ZYpp package manager for installing, removing, updating and querying software packages of local or remote (networked) media. Its graphical equivalent is the YaST package manager module. (From Wiki)

 

Try it out 🙂

Passwordless Authentication:

Password Less Authentication using SSH:

1. PuttyGen: generate both public and private keys

2. Save the private key on your PC

3. Go to server, create .SSH directory

4. Under this create a file named authorized_keys

5. paste public key in here and save it

6. Go to your Superputty, Tools, putty config, in SSH Tab in left corner, then Auth… browse your Private key here.

You’re good to go 🙂

Below query will let you know the current heap memory being used by the HANA:

hana

 

 

 

 

 

 

select round ((sum(heap_memory_used_size)/sum(heap_memory_allocated_size))*100,2) “HEAP_MEMORY_USED_PERC” from m_service_memory

Try it 🙂

Below commands will let you create a workspace in HANA.

 

hana

 

 

 

 

 

 

Command 1:
hdbuserstore set sidkey vadbsid.rot.od.sap.biz:30215 SYSTEM ********

Command 2:

regi create workspace sidwsp –key=sidkey

Eg:

hdbuserstore set zttkey vadbztt.rot.od.sap.biz:30215 SYSTEM hUToLp

regi create workspace zttwsp –key=zttkey

 

 

Enjoy 🙂

Here’s the command by which you can clear up HANA logs or other logs which are older than the numbered days(value you put).

 

hana

 

 

 

 

 

 

find /hdb/ZTT/backup/log -type f -name “log_backup*” -mtime +50 -exec /bin/rm -f {} \;

You might want to set this as a cronjob and get over the manual deletion of logs.

Try it out 🙂

Here’s the one line command by which you can recover HANA system with specified backup:

 

hana

 

 

 

 

 

 

HDBSettings.sh recoverSys.py –command “RECOVER DATA USING FILE (‘/hdb/ZTT/backup/data/ZTT-20141029-092054’) CLEAR LOG”

Note: here we are recovering the system with the backup: /hdb/ZTT/backup/data/ZTT-20141029-092054

Try it out 🙂

If you want to install HANA server in just one go, execute the command as root mentioned below:

./hdbinst –sid= –number=XX –hostname=vadbsid –datapath=/hdb/SID/data –logpath=/hdb/SID/log

 

hana

 

 

 

 

 

 

SID= System Identification Eg: ZBB

XX= Instance ID ( 00 to 99)

Enjoy 🙂