Popular Posts

Mar 20, 2017

Install curl in solaris 11


                        -   Upgrade or install curl in Solaris 11
                        -   The current available version is curl.7.57.0


1.    Download latest curl version from curl download site
2.    unzip the gz file
                 gzip -d curl-7.57.0.tar.gz

3.    Extract the tar file
                 tar -xvf curl-7.57.0.tar

4.    Configure and install the binary
                 cd curl-7.57.0
                 ./configure
                 make
                 make install 
                 mv /usr/bin/curl /usr/bin/_curl
                 curl -V



~Judi~
install curl in solaris 11
upgrade curl in solaris 11
curl-7.52.1.tar.gz
curl-7.53.0.tar.gz
curl-7.53.1.tar.gz
curl-7.54.0.tar.gz
curl-7.54.1.tar.gz
curl-7.55.0.tar.gz;
curl-7.55.1.tar.gz
curl-7.56.0.tar.gz
curl-7.56.1.tar.gz
curl-7.57.0.tar.gz
Compile curl in solaris;
configure curl in solaris;

make curl in solaris

Mar 15, 2017

Script - Find cpu - model / type / count / core / thread / speed - Solaris Sparc

           
           -  Purpose of this script - Find the CPU count, Model, Type, Physical Count, Core, Thread, Speed and vCPU mapping with Physical CPU
          -  Use the script in Solaris Sparc servers
          -  The output as below
                    CPU Model is : UltraSPARC-T2
                    CPU Type is : sparcv9
                    Total number of physical processors: 1
                    Number of virtual processors: 64
                    Total number of cores: 8
                    Number of cores per physical processor: 8
                    Number of hardware threads (strands or vCPUs) per core: 8
                    Processor speed: 1165 MHz (1.16 GHz)

#!/bin/bash

/usr/bin/kstat -m cpu_info | egrep "chip_id|core_id|module: cpu_info|brand|cpu_type" > /var/tmp/cpu_info.log

nproc=`(grep chip_id /var/tmp/cpu_info.log | awk '{ print $2 }' | sort -u | wc -l | tr -d ' ')`
ncore=`(grep core_id /var/tmp/cpu_info.log | awk '{ print $2 }' | sort -u | wc -l | tr -d ' ')`
vproc=`(grep 'module: cpu_info' /var/tmp/cpu_info.log | awk '{ print $4 }' | sort -u | wc -l | tr -d ' ')`
cpumodel=`grep brand /var/tmp/cpu_info.log | uniq | awk '{print $2}'`
cputype=`grep "cpu_type" /var/tmp/cpu_info.log | uniq | awk '{print $2}'`

nstrandspercore=$(($vproc/$ncore))
ncoresperproc=$(($ncore/$nproc))

speedinmhz=`(/usr/bin/kstat -m cpu_info | grep clock_MHz | awk '{ print $2 }' | sort -u)`
speedinghz=`echo "scale=2; $speedinmhz/1000" | bc`

echo "" ; echo "" 
echo "CPU Model is : $cpumodel"
echo "CPU Type is : $cputype"
echo "Total number of physical processors: $nproc"
echo "Number of virtual processors: $vproc"
echo "Total number of cores: $ncore"
echo "Number of cores per physical processor: $ncoresperproc"
echo "Number of hardware threads (strands or vCPUs) per core: $nstrandspercore"
echo "Processor speed: $speedinmhz MHz ($speedinghz GHz)"
echo "" ; echo "" 
# now derive the vcpu-to-core mapping based on above information #

echo -e "\n** Socket-Core-vCPU mapping **"
let linenum=2

for ((i = 1; i <= ${nproc}; ++i ))
do
        chipid=`sed -n ${linenum}p /var/tmp/cpu_info.log | awk '{ print $2 }'`
        echo -e "\nPhysical Processor $i (chip id: $chipid):"

        for ((j = 1; j <= ${ncoresperproc}; ++j ))
        do
                let linenum=($linenum + 1)
                coreid=`sed -n ${linenum}p /var/tmp/cpu_info.log | awk '{ print $2 }'`
                echo -e "\tCore $j (core id: $coreid):"

                let linenum=($linenum - 2)
                vcpustart=`sed -n ${linenum}p /var/tmp/cpu_info.log | awk '{ print $4 }'`

                let linenum=(3 * $nstrandspercore + $linenum - 3)
                vcpuend=`sed -n ${linenum}p /var/tmp/cpu_info.log | awk '{ print $4 }'`

                echo -e "\t\tvCPU ids: $vcpustart - $vcpuend"
                let linenum=($linenum + 4)
        done
done

rm /var/tmp/cpu_info.log







~Judi~
script to find cpu information
script to find cpu count
script to find cpu core
script to find cpu thread
script to find cpu model and type
find cpu details in sparc server
find cpu details in Solaris server
processor details in solaris server
processor information in sparc server
solaris cpu count

Mar 7, 2017

Solaris rsync and options

rsync and options

                 -  Rsync is a fast and extraordinarily versatile  file  copying tool.
                 -  It  can  copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon.
                 -  Rsync finds files that need to be transferred using a quick check algorithm that looks for files that have changed in size or in last-modified time.

               -v : verbose
               -r : copies data recursively (but don’t preserve timestamps and permission while transferring data
               -a : archive mode, archive mode allows copying files recursively and it also preserves symbolic links,permissions,user & group ownerships,timestamps
               -z : compress file data
               -h : human-readable, output numbers in a human-readable format

1.    Copy/Sync a File on a Local Computer
            rsync -zvh backup.tar.gz /var/tmp/backups/

2.    Copy/Sync a Directory on Local Computer
            rsync -avzh /root/rpmpkgs /var/tmp/backups/

3.    Copy/Sync a Remote Directory to a Local Machine
            rsync -avzh root@192.168.0.20:/home/tarunika/packages /var/tmp/packages

4.    Rsync Over SSH, Copy Files from Remote Server to Local Server with SSH
            rsync -avzhe ssh root@192.168.0.20:/var/adm/messages /tmp/

5.    Copy Files from Local Server to Remote Server with SSH
            rsync -avzhe ssh backup.tar.gz root@192.168.0.20:/var/tmp/backup

6.    Show the status of transfer While Transferring Data with rsync
            rsync -avzhe ssh --progress /var/packages root@192.168.0.20:/var/packages

7.    Use of –include and –exclude Options
       rsync command will include those files and directory only which starts with ‘I’ and exclude all other files and directory.
            rsync -avze ssh --include 'I*' --exclude '*' root@192.168.0.20:/var/tmp/packages/ /root/packages

8.    Use ‘–delete‘ option to delete files that is not available in source directory.
            rsync -avz --delete /var/tmp/packages root@192.168.0.20:/var/tmp/packages

9.    Automatically Delete source Files after successful Transfer
            rsync --remove-source-files -zvh backup.tar.gz /var/tmp/

10.  Do a Dry Run with rsync
       This option wont make any changes only shows what could be the result.
        If the output shows exactly what you looking for then remove ‘–dry-run‘ option run the command.
            rsync --dry-run --remove-source-files -zvh backup.tar.gz /var/tmp/



Mar 3, 2017

ISO file mounts and loopback Files Systems

ISO file mounts and loopback Files Systems

How to mount an ISO file :

1.    Add the ISO file as a normal loopback device
            lofiadm -a /export/home/judi/ISO/sol-10-u11-ga-sparc-dvd.iso /dev/lofi/1

2.    List the loopback device
            lofiadm

3.    Mount the loopback device now
            mount -F hsfs -o ro /dev/lofi/1 /mnt

4.    unmount the loopback device
            umount /mnt

5.    Delete / remove the loopback device
            lofiadm -d /dev/lofi/1

Popular Posts