Tuesday, December 20, 2011

Android OS Versions Comparision

Android OS chart: Comparing the major versions

Android-OS-Comparison-Guide-Nov

Ice Cream Sandwich: What to expect from Android 4.0

Why is it called Ice Cream Sandwich?
Google has named each version of Android after a dessert item, in alphabetical order. There was once a version of Android named Cupcake and later versions named Donut and Eclair. A few phones sold on the market today are still running Froyo, and Gingerbread is currently used on the majority of new Android phones. The version known as Honeycomb was designed for and is used on many new Android tablets.
Why would I want Ice Cream Sandwich?
Ice Cream Sandwich is a big deal, and it differs from every Android operating system before it. Ice Cream Sandwich blends parts of Gingerbread and parts of Honeycomb into a single version of Android that can be used on both tablets and smartphones.

Android owners have long been plagued by something called fragmentation. With fragmentation, software that is written for one version of Android might not look so hot or work the way you expect it to on a device running another version of the OS. With different manufacturers releasing phones with a wide range of specs and custom software, it can be hard for developers to create apps that work for all phones and for phone makers to create phones that can be easily updated to new versions of Android.
Ice Cream Sandwich is expected to unify Android as a whole and set a few norms that should make the updating and development processes a little easier. The OS also offers quite a few new innovative features that are well worth a look.
Visual updates: If you're already an Android user, then Ice Cream Sandwich is going to look a lot different than what you've become accustomed to over the years. Google has completely overhauled the OS to make it more user-friendly, giving the entire operating system a new modern font and a magazine-like feel.
Improved camera: The camera app in Ice Cream Sandwich comes with a number of built-in photo editing features, so you can adjust your pictures directly on your phone. Improvements include basic things like red-eye reduction, cropping and straightening, and Hipster filters that add Instagram-like effects to your photos. The camera also has a single-motion panoramic mode, allowing you to take panoramic shots quickly and easily.
Voice typing: Android has had voice recognition capabilities for a while now, but Ice Cream Sandwich takes things a bit further by allowing you to say what you want to type. The feature will likely come in handy when you need to send a message while driving or when you need to keep your hands elsewhere.
Improved contacts and voicemail: Ice Cream Sandwich improves how Android displays your contacts with the People app. The app lets you see at a glance how you're connected to someone, as well as check out that person's latest moves on social networking sites. The OS also integrates visual voicemail, which lets you view and play each of your voicemails individually rather than having to listen to all of your messages at once. Voicemail can be sped up or slowed down while you're listening.
Face unlock: More a parlor trick than an actual security feature, phones and tablets running Ice Cream Sandwich can be unlocked using your face rather than a secret code. Early tests of the feature have shown that a phone can be unlocked with a picture of you rather than your actual face, and your phone may have trouble recognizing you depending on the lighting where you are and whether or not you're wearing makeup. Still, it's a clever little trick to have up your smartphone sleeve.
Android Beam: Android Beam lets you "beam" content back and forth between two phones by holding them together. For instance, if you had pulled up directions to a restaurant and wanted to share them with a friend, you can hold your phone up to your friend's handset and use Android Beam to load the exact same map on your friend's phone.
Data usage graph: With the rising cost of data plans and the extinction of the unlimited plan, monitoring the amount of data you use on your phone has become more important. The data usage graph in Ice Cream Sandwich helps you track your data usage, as well as see what apps are using the biggest share of your monthly plan, so you can zero in on any problems you have. Set up alerts to let you know when you're reaching your monthly data allotment and disable the data hogs.
Other improvements: Ice Cream Sandwich adds a number of other small tweaks and improvements such as the ability to take screenshots, save web pages to view offline, and create folders for apps. There's also a new calendar app with pinch-to-zoom functionality.
Will all phones have Ice Cream Sandwich?
The first phone to be released running Ice Cream Sandwich was the Galaxy Nexus. Most Android phones and tablets released in 2012 will likely be running the operating system; however, we're still likely to see at least a few phones running Gingerbread and tablets running Honeycomb come to stores as well.
In order for a manufacturer to use Ice Cream Sandwich on a phone, the phone maker has to test the OS on the handset and make sure it works with any of its own software it wants to put on the phone. (In the phone world, the software a manufacturer puts on top of the operating system on its phones is called a skin.)
The Galaxy Nexus is pure Android in that it doesn't have any type of skin on top of Ice Cream Sandwich. Those phones that do have skins, such as handsets made by HTC, Motorola, and others by Samsung, will need to be tested running the OS and their software customized before they can be released. Depending how that process goes, some new devices may be released running an older version of Android, and your existing Android device may or may not wind up getting the update.

Monday, December 19, 2011

AIX Shell Scripts


 GETTING VG AND PV INFORMATION
THIS SCRIPT  COLLECTS VOLUME GROUP AND PHYSICAL VOLUME INFORMATION AND COLLECTS THEM IN A FILE 
THIS INFORMATION IS IMOPORTANT AS ONE SCRIPT ON A SERVER WILL PROVIDE ALL THE INFORMATION ABOUT ALL THE VG AND PV UNDER IT 

for x in $(lsvg) ;SELECT ALL THE VOLUME GROUPS
do
echo "************************************"  >> /tmp/lsvg.out ;PUT A START MARKER
echo VG INFORMATION FOR $x >> /tmp/lsvg.out
lsvg -p $x  >> /tmp/lsvg.out ;COLLECT INFO ABOUT DRIVES
lsvg -l $x >> /tmp/lsvg.out ;COLLECT INFO ABOUT LV 
lsvg $x >> /tmp/lsvg.out ;COLLECT DETAIL INFO ABOUT VG
echo "************************************" >> /tmp/lsvg.out
done
for x in $(lspv|awk ‘{print $1}’) ;SELECT ALL PHYSICAL VOLUME
do
echo"************************************" >>  /tmp/lspv.out
lspv $x >> /tmp/lspv.out   ;STORE THE PV INFORMATION
lspv –l $x >> /tmp/lspv.out
echo"************************************" >>  /tmp/lspv.out
done
TO CUT REQUIRED LOG FROM A LARGE LOG FILE
In the script “mm” “dd” “yy” is month date and year respectively , this script is useful if a logfile has large content of everyday logs and we have to fetch log of a specific date for a specific host or string
for x in hostname1 hostname2 hostname3 ...
do
cat |awk '/"mm"\/"dd"\/"yy""/,/END/'|awk /"$x"/,/"
done
TAKING VIO BACKUP TO A REMOTE FILESYSTEM
HN=`hostname`
LOGFILE="/home/padmin/bckvio.log"
EMAILADDR=xyz@abc.com
echo "GATHERING VIOS CONFIGURATION" > $LOGFILE
/home/padmin/gathervios.ksh >> $LOGFILE  2>&1
date >> $LOGFILE 2>&1
/usr/ios/cli/ioscli mount :/ / >> $LOGFILE 2>&1
/usr/ios/cli/ioscli backupios -file //${HN}_mksysb -mksysb >> $LOGFILE 2>&1
if [[ $? -ne 0 ]]
then
  mail -s "ERROR CREATING VIOS BACKUP" $EMAILADDR <
vio bachup for $HN has failed ! Please look into log /home/padmin/bckvio.log !
EOF
fi
/usr/ios/cli/ioscli unmount / >> $LOGFILE 2>&1
COLLECT ALL THE INFORMATION OF A CHILD DEVICE COMING FROM A FC ADAPTER

lsdev -l $1
echo "PARENT DEVICE FOR ** $1 ***"
lsdev -l $1 -F parent
a=$(lsdev -l $1 -F parent)
echo "PARENT DEVICE FOR ** $a ** IS"
lsdev -l $(lsdev -l $1 -F parent) -F parent
b=$(lsdev -l $(lsdev -l $1 -F parent) -F parent)
echo "ALL THE CHILD DEVICES CONNECTED TO DEVICE ** $a **"
lsdev -p $(lsdev -l $1 -F parent)
echo "ALL THE CHILD DEVICES CONNECTED TO DEVICE ** $b **"
lsdev -p $(lsdev -l $(lsdev -l $1 -F parent) -F parent)
fc=$(echo $b|grep -e fcs0 -e fcs1 -e fcs2 -e fcs4 -e fcs5)
ck=${#fc}
if [ $ck -eq 0 ]
then
echo "BACKUP ADAPTER IS NOT FC"
exit
else
echo "PLEASE WAIT WHILE COLLECTING FC COMMUNICATION"
for x in $fc
do
c=5
echo "DATA TRANSFER FOR ** $x ** "
while [ $c -gt 0 ]
do
fcstat $x|awk '/Transmit/,/Words/'
sleep 10
c=$(($c-1))
done
done
fi

COLLECTING MICROCODE INFORMATION
###### THIS SCRIPT COLLECTS INFORMATION ###########
############# AND HOST LISTS ARE IN FILE HOST.LST###########
exportfs –i /suptools
for x in $(cat /home/aixadmin/host.lst)
do
echo $x >> /suptools/coldata.out
ssh $x ls -lasd /suptools
if [ $? == 0 ]
then
ssh $x mount -o rw :/suptools /suptools
echo "************************************************8" >> /suptools/coldata.out
ssh $x /suptools/./coldata >> /suptools/coldata.out
ssh $x umount /suptools
echo "************************************************8" >> /suptools/coldata.out
else
ssh $x mkdir /suptools
ssh $x mount -o rw :/suptools /suptools
echo "************************************************8" >> /suptools/coldata.out
ssh $x /suptools/./coldata >> /suptools/coldata.out
ssh $x umount /suptools
echo "************************************************8" >> /suptools/coldata.out
fi
done
CONTENTS OF coldata
hostname >> /suptools/coldata.out
oslevel -s >> /suptools/coldata.out
lsmcode -r >> /suptools/coldata.out
for dv in $(lsdev -Cc adapter|awk '{print $1}'|grep -e ent -e fcs -e sisscsi)
do
echo $dv >> /suptools/coldata.out
lsmcode -r -d $dv >> /suptools/coldata.out
done
#
CREATING A USER
#############################################################
############ THIS WILL ASK UID AND USER NAME #################
############AND WILL CREATE USER NAME ON THE SERVERS #############
##### LISTED IN THE FILE  "xyz" ########

echo enter user-id followed by user name for eg 30 username
read uid usd
#echo enter password to reset for the user $usd
for x in $(cat xyz)
do

echo creating user $usd on host $x
ssh $x mkuser id=$uid $usd
done
exportfs -i /exportfilesystem
echo enter password to reset for the user $usd
read pas
echo "echo $usd:$pas|chpasswd" > /exportfilesystem/passet.sh
chmod +x /exportfilesystem/passet.sh
for x in $(cat xyz)
do
ssh $x mkdir /exportfilesystem
ssh $x mount current_server:/exportfilesystem /exportfilesystem
ssh $x /exportfilesystem/passet.sh
ssh $x umount /exportfilesystem
done

RESETTING A USER LOCKED PASSWD

echo enter user name to reset
read usd
echo this will reset user $usd locked password
chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s $usd
chuser "account_locked=false" $usdFINDS OUT FILE SYSTEM UTILIZATION
THIS SCRIPT FINDS AND TELLS YOU WHICH FILE SYSTEM ARE UTILIZING SPACE BOVE THAN THRESHOLD SET BY YOU

h=$(hostname)
df -gt |grep -v Filesystem|grep -v proc|while read out
do
fs=$(echo $out|awk '{print $5 }'|cut -f1 -d%)
if [ "$fs" -gt 90 ]; then
echo "***********************************"
echo FILE SYSTEM LARGER THAN 90% ON $h ARE
echo $out
echo "***********************************"
fi
done
GETTING PORT ADDRESS FOR SERVICES
THIS SCRIPT CALCULATES AND SHOWS WHICH PORT IS USED BY WHICH SERVICE ,VERY IMPORTANT SCRIPT  FOR ALL AIX ADMINISTRATORS

for x in $(netstat -Aan|grep LISTEN|awk '{print $1}')
do
a=$(netstat -Aan|grep LISTEN|grep $x|awk '{print $5}'|cut -f2 -d .)
b=$(rmsock $x tcpcb|awk '{print $9}')
echo PORT $a is used by
ps -ef |grep $b
done
SCRIPT 1 – FINDING USER’S PASSORD EXPIRE DATE
############################################################################
THIS SCRIPT WILL ASK A USER NAME AND TELL WHEN ITS PASSWORD WILL  EXPIRE
#I HAD NOT MADE IT VERY SMOOTH BUT STILL IT SOLVES A VERY BIG THING
################################################################################
echo enter user name  ; PROVIDE THE USER NAME
read uame
lstup=$(pwdadm -q $uame|grep -e lastupdate|cut -f2 -d=)
echo LAST PASSWORD UPDATED FOR USER $uame ON >> /tmp/pwexp.out
echo $lstup| perl -e 'print localtime(<>) . "\n";' >> /tmp/pwexp.out 
mxag=$(lsuser -a maxage $uame|cut -f2 -d=)
pwexp=$(expr 604800 \* $mxag)
pwexp=$(($lstup + $pwexp))
echo PASSWORD EXPIRE DATE FOR USER $uame >> /tmp/pwexp.out
echo $pwexp| perl -e 'print localtime(<>) . "\n";' >> /tmp/pwexp.out
cat /tmp/pwexp.out ;THE OUTPUT IS STORED IN pwexp.out FILE
echo $usd:test@1234|chpasspw

QUICK REFERENCE FOR LDAP CONFIGURATION IN AIX


1. Create the first ldap server

To create a ldap server type command

mksecldap -s -a cn=admin -p adminpwd -S rfc2307aix

2. Add/Create a new domain

To Add a new domain named dcmdata.com

mksecldap -s -a cn=admin -p adminpwd -S rfc2307aix -d "dc=dcmdata,dc=com"

2. If you want to create a container(OU -orgainization unit)

To add a OU in domain dcmdata.com

mksecldap -s -a cn=admin -p adminpwd -S rfc2307aix -d /

"ou=users,dc=dcmdata,dc=com"

4. Creating a ldap client in ldap server

To add a client in ldap server dcmdata.com

mksecldap -c -h 193.9.200.229 -a cn=admin -p adminpwd -d "dc=dcmdata,dc=com"

5. Create a user in ldap server

To add a user shivas in doman dcmdata.com

mksecldap -c -h 193.9.200.229 -a cn=admin -p adminpwd -d "dc=dcmdata,dc=com"

-u shivas

6. CReating the first user (type ldap) in Aix and add in ldap

To add a user in Aix

mkuser aswe

To add users entry in ldap

mksecldap -c -h 193.9.200.229 -a cn=admin -p adminpwd -d "dc=dcmdata,dc=com" -u aswe

 
To add a user after making ldap server is down

ldapcfg -u "cn=root" -p galaxy123

CREATING AIX MKSYSB ISO BOOTABLE IMAGE

Create a Mksysb image (Assuming that the system has two disk and rootvg contains 1 disk )

Create VG

mkvg -y datavg hdisk1

Create a File system in the new vg 

crfs -v jfs2 -g datavg -a size=10G -m /data

Mount the new file system 

mount /data 

now crete a exclude.rootvg in /etc

echo "/data/" >> /etc/exclude.rootvg

Run mksysb command

mksysb -X -i -e /data/root.mkisysb

Now Create a bootable iso image from mksysb image 

# mkdvd -S -m /root.mksysb

Initializing mkdvd log: /var/adm/ras/mkcd.log...
Verifying command parameters...
0512-054 mkdvd: File /root.mksysb does not exist or is empty.
# mkdvd -S -m /root.mkisysb
Initializing mkdvd log: /var/adm/ras/mkcd.log...
Verifying command parameters...
Creating temporary file system: /mkcd/cd_fs...
Populating the CD or DVD file system...
Building chrp boot image...
Copying backup to the CD or DVD file system...
......................................
Creating temporary file system: /mkcd/cd_images...
Creating Rock Ridge format image: /mkcd/cd_images/cd_image_163898
Running mkisofs ...
.......................................
mkrr_fs was successful.
Making the CD or DVD image bootable...

Removing temporary file system: /mkcd/cd_fs...
# pwd
/mkcd/cd_images
# ls -l
total 3236104
-rw-r--r--    1 root     sys      1656872960 Feb 25 01:50 cd_image_163898
drwxrwx---    2 root     system          512 Feb 25 01:44 lost+found
#