UnixPedia : HPUX / LINUX / SOLARIS: January 2014

Tuesday, January 28, 2014

HPUX : SWAP CALCULATION

The formula for maximum usable swap is maxswapchunks * swchunk * 1024 bytes 
 
maxswapchunks =16384 (maximum Value)
swchunk =2048 (which is default)
 
Since maxswapchunk value is set to the max you can increase the swchunk value, the total configured swap can be increased.
The maximum can be increased to 65536. But your we recommend that will be too high, so you can tune it to 4096 or 6144 (multiples of 4096).  

man swchunk 



Jackal /.root# kmtune |grep -i swchunk
swchunk                  4096  -  2048
Jackal /.root# uptime
  2:24am  up 1 day,  6:52,  4 users,  load average: 0.03, 0.05, 0.06
Jackal /.root# uname -a
HP-UX Jackal B.11.11 U 9000/800 3256426090 unlimited-user license
Jackal /.root# kmtune |grep -i maxswapchunks
maxswapchunks           16384  -  16384
Jackal /.root# kmtune |grep -i swchunk
swchunk                  4096  -  2048
Jackal /.root#

Jackal /.root# swapinfo -tam
             Mb      Mb      Mb   PCT  START/      Mb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev        4000       0    4000    0%       0       -    1  /dev/vg00/lvol2
dev        5008       0    5008    0%       0       -    1  /dev/vg00/lv_swap1
dev       32704       0   32704    0%       0       -    1  /dev/vgswap/lv_swap2
reserve       -    7972   -7972
memory    13304    1856   11448   14%
total     55016    9828   45188   18%       -       0    -

Friday, January 10, 2014

HPUX : DELETING THE GHOST DEVICE FILE STUCK IN VG


Deleting the ghost device file stuck in Vg ,verify device are read to e remove.

vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c10t0d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c10t0d1":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c10t0d2":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c10t0d3":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c10t0d4":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c10t0d5":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
   PV Name                     /dev/dsk/c74t0d3    Alternate Link
   PV Status                   available               
   Total PE                    3472   
   Free PE                     0      
   Autoswitch                  On       
   Proactive Polling           On              
[root@mickey:/home/sons]#
#-> vgreduce /dev/vg_jjcshrp2 /dev/dsk/c10t0d0
vgreduce: Couldn't query physical volume "/dev/dsk/c10t0d0":
The specified path does not correspond to physical volume attached to
this volume group

[root@mickey:/home/sons]#
#-> vgreduce -l /dev/vg_jjcshrp2 /dev/dsk/c10t0d0
Volume group "/dev/vg_jjcshrp2" has been successfully reduced.

[root@mickey:/home/sons]#
#-> vgreduce -l /dev/vg_jjcshrp2 /dev/dsk/c10t0d1
Volume group "/dev/vg_jjcshrp2" has been successfully reduced.

repeat the same step on rest of device file.

Saturday, January 4, 2014

HPUX : DEFAULT GATEWAY NOT REACHABLE

After hardware replacement on the server , server came up with the network issue (default gateway is not reachable)
On checking it was found that primary lan cable is connected loosely. HP engineer was asked to re-plugg the cable .
After that server came into the Network

[root@mickey:/etc/rc.config.d]#
#-> lanscan 3
Hardware Station        Crd Hdw   Net-Interface  NM  MAC       HP-DLPI DLPI
Path     Address        In# State NamePPA        ID  Type      Support Mjr#
0/0/0/1/0 0x00180E28230B 0   UP    lan0 snap0     1   ETHER     Yes     119
0/0/6/1/0/6/0 0x0010353E02C2 3   UP    lan3 snap3     2   ETHER     Yes     119
0/0/14/1/0/6/0 0x0014029CF72F 4   UP    lan4 snap4     3   ETHER     Yes     119
0/0/4/1/0 0x0017A4510D9E 1   UP    lan1 snap1     4   ETHER     Yes     119
0/0/4/1/1 0x0017A4510D9F 2   UP    lan2 snap2     5   ETHER     Yes     119
[root@mickey:/etc/rc.config.d]#
#-> lanadmin -x 3
Speed = 1000 Full-Duplex.
Autonegotiation = On.

[root@mickey:/etc/rc.config.d]#
#-> lanadmin -x 0
The link is down. The speed and other link state information
are undefined. The configuration specified for this card is:
Speed = 1000 or 100 or 10 Mbps.
Autonegotiation = On.

[root@mickey:/etc/rc.config.d]#
#-> lanadmin -x 3
Speed = 1000 Full-Duplex.
Autonegotiation = On.

[root@mickey:/etc/rc.config.d]#
#-> lanadmin -x 4
The link is down. The speed and other link state information
are undefined. The configuration specified for this card is:
Speed = 1000 or 100 or 10 Mbps.
Autonegotiation = On.

Friday, January 3, 2014

HPUX : SERVER DOWNTIME PRE AND POST CHECKS

DATA COLLECTOR :

PRE IMPLEMENTION


Make a executable file :
#cat >Data_pre.sh
Loggin=`logname`
export  DIR=/home/$Loggin/ 
cd $DIR
mkdir $DIR/todayaction2;cd todayaction2;parstatus >parstatus.pre_output;setboot -v >setboot.pre_output; \
bdf >bdf.pre_output;vparstatus >vparstatus.pre_output; \
sysdef > sysdef.pre_output; \
vgdisplay  -v >vgdisplay.pre_output; \
tail /var/adm/syslog/syslog.log > syslog.pre_output; \
ioscan >ioscan.pre_output;netstat -in >netstat.pre_output; \
cmviewcl -v >cmviewcl.pre_output;lanscan >lanscan.pre_output; \
ps -ef |grep -i pmon >oracle.pre_output;netstat -rn >netrpre_outpute.pre_output; \
swapinfo -tam >swap.pre_output; \
ps -efx >Porcess.pre_output; \
mount  -v   >mount-v-pre_output ; mount  -p >mount-p-pre_output ; \
lvlnboot -v >lvlnboot.pre_output ;ps -ef |grep -i horc > horc.pre_output; \
showmount -e >showmount-e-pre_output ; showmount -a >showmount-a-pre_output; \
uptime >uptime-pre_output ; vgdisplay -v >vgdisplay_pre_output; \
cp -p /etc/lvmtab /etc/lvmtab.`logname`.`date +%d-%m-%Y`.pre_output

tar -cvf  /home/$Loggin/Data_collectoin_`uname -n`_Before.tar /home/$Loggin/todayaction2
uuencode  /home/$Loggin/Data_collectoin_`uname -n`_Before.tar Data_collectoin_`uname -n`_Before.tar | mailx -m -s " Data_collectoin_`uname -n`_Before.tar " $Loggin@its.njn.com

put the correct domain


POST IMPLEMENTATION.
Make a executable file :
#cat >Data_Post.sh       

Loggin=`logname`
export DIR=/home/$Loggin/ 
cd $DIR
mkdir $DIR/todayaction2;cd todayaction2;parstatus >parstatus.post_output;setboot -v >setboot.post_output; \
sysdef > sysdef.post_output; \
bdf >bdf.post_output;vparstatus >vparstatus.post_output; \
vgdisplay  -v >vgdisplay. post_output; \
tail /var/adm/syslog/syslog.log > syslog.post_output; \
ioscan >ioscan.post_output;netstat -in >netstat.post_output; \
cmviewcl -v >cmviewcl.post_output;lanscan >lanscan.post_output; \
ps -ef |grep -i pmon >oracle.post_output;netstat -rn >netrpre_outpute.post_output; \
swapinfo -tam >swap.posst_output; \
ps -efx >Porcess.post_output; \
mount  -v   >mount-v-post_output ; mount  -p >mount-p-post_output ; \
lvlnboot -v >lvlnboot.post_output ;ps -ef |grep -i horc > horc.post_output; \
showmount -e >showmount-e-post_output ; showmount -a >showmount-a-post_output; \
uptime >uptime-post_output ; vgdisplay -v >vgdisplay_post_output; \
cp -p /etc/lvmtab /etc/lvmtab.`logname`.`date +%d-%m-%Y`.post_output
tar -cvf  /home/$Loggin/Data_collectoin_`uname -n`_After.tar /home/$Loggin/todayaction2
uuencode /home/$Loggin/Data_collectoin_`uname -n`_After.tar Data_collectoin_`uname –n`_After.tar | mailx -m -s " Data_collectoin_`uname -n`_After.tar " $Loggin@its.njn.com

put the correct domain