Friday, July 27, 2012

Prechecks.sh shell script example for sysadmin

Someone from my team asked me to write something which will create a report before any SAN uplift and one for post checks also.

and I started adding bits to it as below,


# cat prechecks.sh
#!/usr/bin/ksh
clear
echo "\n"
chk(){
if [ $1 -ne 0 ]
then
echo "$clstr cluster is not installed here\n"
else
echo "$clstr cluster is installed here,Please consider"
fi
}

echo " Script to run before going for SAN uplift just to understand all configuration"

echo "\tSERVER NAME :\t`uname -n`\n\n"
echo "\t\t\tTOTAL VG's  :\t\n`lsvg`\n\n"
echo "\t\t\tTATAL ACTIVE VG's:\t\n`lsvg -o`\n\n"
for i in `lsvg -o`
do
echo "\t\t\tDETAILED INFO OF $i:\n `lsvg $i`\n\n"
for j in `lsvg -p $i|grep hdisk|awk '{print $1}'`
do
#echo "\t\t\tDETAILED INFO OF $i:\n `lsvg $i`\n\n"
echo "\t\t\tATTRIBUTES OF $j:\n"
lsattr -El $j|egrep -e 'queue_depth|reserve_policy'|awk '{print $1": " $2}'
echo "\n\n"
done
done
clstr="HACMP"
/usr/es/sbin/cluster/utilities/clRGinfo 2>/dev/null
ar=`echo $?`
chk $ar
#echo "\n"
clstr="GPFS"
/usr/lpp/mmfs/bin/mmlscluster 2>/dev/null
ar=`echo $?`
chk $ar
exit 0

Hope this will help you!

Wednesday, July 18, 2012

Script to list permission of all directories in given path

I got a task to list all permissions of all directories in the give path , there were arround ( very long )80 paths.
wrote below for loop and it's become very easy :)

Script to list permission of all directories in given path.

# cat perm.sh
cd /
for i in `echo $1|sed "s/\// /g"`
do
ls -ld $i
cd $i
done

# ./perm.sh /opt/Tivoli/DM/slam
drwxr-xr-x   26 root     system         4096 Aug 18 2011  opt
drwxr-xr-x    9 root     system          256 Mar 19 2010  Tivoli
drwxr-xr-x   11 root     system         4096 Aug  5 2010  DM
drwxr-xr-x    2 root     system          256 Nov 24 2009  slam
#
 

Thursday, July 5, 2012

Transform into IT - Jobs for MCA,BE and BPO guys!


Does my Degree and Marks matters?

Best way to reduce all extra effort to the get job is college campus placement but if you missed it then it will be the biggest pain to get a good job in market even if you hold good degree and marks.

Very few (Indian) companies will ask you about your marks others want there work done, so in simple word if you know how to work they will take you in even if you are a graduates of any stream they don’t care (why should they?).
Very practical approach towards hiring they don’t want very intelligent guys too as intelligent guys will not obey instructions from (sometimes foolish) Managers and they may not stay longer in the same organization with small salaries so they want someone who don’t have capability to fly but just to do the same work again and again.

Entering into IT is not big thing if one knows how to do it?

Unfortunately all guys who have completed their BE/MCA/BCS or any computer course they want to become developer (either a java or .net).
Where as IT does not mean development only there are many roles and positions in support functions too.
And it’s easy to enter in support function if you compare with development.
Industry is still looking for 1000s of expert support guys to support huge infrastructure.
Now what are the titles of support jobs?
It’s nothing but infra analyst OR system engineer, sound  general position but roles may vary like DBA, System administrator, Storage administrator, etc.
You must be having a question in your mind - How to enter in to support functions?

It’s pretty easy just learn something like UNIX, Linux, Oracle, Storage, Shell scripting, Perl scripting and you will get a good consideration and response from IT industry.

There are thousands of guys who are working with BPO’s with degree in computer science

Yes I have seen guys they will hide their education (master degree) to get job in BPO as they don’t hire PG / BE guys.

BPO is good to support initially just for survival in a metro cities so at least you can search for good job in IT.
Unfortunately more than 70% of BPO joiners would not succeed to transform them in to IT once they have joined BPO (as BPO can pay your bills and gives you comfort).
BPO guys can communicate well as this is what they do whole day.
So if one try to acquire any support skill there are hug chances of getting job in IT definitely they would need someone to guide them.
But this comfort zone becomes a weakness and they start accepting things.

I am sure I can help if you want to transform your life and role! Please send a mail to unix4you.com@gmail.com and I will try to help you in all possible ways.

Thanks,
Dipak
(This article is about how to switch job from BPO to IT? and Jobs for MCA? jobs for BE?)
(I love teaching I am thinking of starting shell scripting , basic unix classes for free. soon I will update once I have server and other setup  )

Wednesday, July 4, 2012

How to become master in HACMP ?


When I asked this question to the most senior guy in my organization, he simply said it’s not something which not written somewhere we have everything given we don’t use it and just try to find out the shortcut to become a master.
Mastery will never come using shortcuts.
You may get an offer or pass an interview but you would not be able to get the satisfaction of doing it truly.
If you want to become a master of any technology just read all given publication by them so here I would suggest you to go through below all guides to become HACMP guy and after that you will never come to me asking for something for HACMP (in this case).
And he gave all below references

HACMP for AIX: Administration Guide, SC23-4862
HACMP for AIX: Concepts and Facilities Guide, SC23-4864
HACMP for AIX: Installation Guide, SC23-5209
HACMP for AIX: Master Glossary, SC23-4867
HACMP for AIX: Planning Guide, SC23-4861
HACMP for AIX: Programming Client Applications, SC23-4865
HACMP for AIX: Troubleshooting Guide, SC23-5177
HACMP on Linux: Installation and Administration Guide, SC23-5211
HACMP for AIX: Smart Assist Developer's Guide, SC23-5210

It’s guilt in my heart that I am not at all using the power I have. Do you think so?
Just start doing what you understand now, I too started it! 
                                                                  - Dipak Warade

Popular Posts

Is this site helping you ?