Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (10) AWS (5) numerology (5)

Thursday, July 31, 2014

How to Display server serial number + HPUX

How to get Server serial number

When we call HP support for logging a case they ask us serial number to check contract etc...Here is how you can display HP-UX 11i system serial number from command line:

1. Using cstm, if we have cstm installed :
#echo "sc product system;info;wait;il" | cstm | grep -i "system serial"

2.If there is no cstm istalled, try running print_manifest:

#/opt/ignite/bin/print_manifest |grep –i ‘serial number’

Running print_manifest displays HP-UX system serial number along with othe system properties

3. On HP-UX (integrity) severs you can run machinfo to display serial number,this command available only on Itanium based HP-UX

#machinfo |grep serial

4. # getconf MACHINE_SERIAL


Thanks...
Kalyanjit

SCHEDLOCK process is using more CPU + HPUX

When "SCHEDLOCK" process is using more CPU:

1. The SCHEDLOCK file will get create by the lpsched program in order to prevent a second copy of lpsched from running.

   It will be removed when we run #lpshut command.

2. when a lpscheduler starts, it creates the SCHEDLOCK file. If the file is already present, it assumes that the scheduler is already running and will abort and hence prevent two scheduler processes running on the same system.

   If lpsched does not shut down normally and the SCHEDLOCK file remains preventing you from restarting lpsched or allowing other lpsched prog to run then remove the file

   #cd /usr/spool/lp
   #rm SCHEDLOCK  {imp to remove}
   #rm FIFO
   #rm CLD_FIFO

 OR do #lpshut it will automatically remove the SCHEDLOCk, if not then manually remove above file

3. check schedular #lpstat -r


4. then #lpsched , to run the schedular



Thanks...
Kiran Jadhav

**Let's Share our knowledge and keep visiting here**


Wednesday, July 30, 2014

How to remove large log files + HPUX

How to remove large log files:

Assume the present working directory (PWD) is /var and we want to delete all log files generated on Apr 30:

#cd /var
#for i in `ls -lrt | grep -i "Apr 30" | awk 'print {$9}'`
do
rm -rf  $i
done






Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**

Monday, July 28, 2014

How to check disk/array status on HP physical server

How to check disk/array status on HP physical servers:

[root@redhat5]# hpacucli
HP Array Configuration Utility CLI 7.61-2.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.

=> ctrl all show config

Smart Array 6400 in Slot 2    (sn: P57820R9SS70FO)

   array A (Parallel SCSI, Unused Space: 0 MB)

      logicaldrive 1 (273.5 GB, RAID 6 (ADG), OK)

      physicaldrive 1:0   (port 1:id 0 , Parallel SCSI, 146.8 GB, OK)
      physicaldrive 1:1   (port 1:id 1 , Parallel SCSI, 146.8 GB, OK)
      physicaldrive 1:2   (port 1:id 2 , Parallel SCSI, 146.8 GB, OK)
      physicaldrive 1:3   (port 1:id 3 , Parallel SCSI, 146.8 GB, OK)


Smart Array 6i in Slot 0      ()

   array A (Parallel SCSI, Unused Space: 0 MB)

      logicaldrive 1 (410.2 GB, RAID 5, OK)

      physicaldrive 1:2   (port 1:id 2 , Parallel SCSI, 146.8 GB, OK)
      physicaldrive 1:3   (port 1:id 3 , Parallel SCSI, 146.8 GB, OK)
      physicaldrive 2:0   (port 2:id 0 , Parallel SCSI, 146.8 GB, OK)
      physicaldrive 2:1   (port 2:id 1 , Parallel SCSI, 146.8 GB, OK)

#############################################

=> ctrl all show status

Smart Array 6400 in Slot 2
   Controller Status: OK
   Cache Status: OK
   Battery Status: OK

################################################

=> controller slot=2 logicaldrive all show

#################################################

=> controller slot=2 array A show

=> controller slot=2 array B show

##################################################

=> controller slot=2 physicaldrive all show

####################################################

How to generate HP Array Diagnostic Report (ADU Report) in Linux for OS:

# hpaducli -f OutputFileName.zip





Thanks...
Kiran Jadhav

**Let's Share our knowledge and keep visiting here**

Thursday, July 24, 2014

सकाळी कशी नीजतात ही फुलं...

**सकाळी कशी नीजतात ही फुलं...**

इथं फुलांचा बाजार मांडला जातो,  
नेहमीच फुलं विकली जातात
काही बिछान्यात सजली जातात
काही बिछान्यातच कुस्करली जातात...

फ़ुलांच वागणं वेगळं - दिसणं नीराळं,
काही दिसायला लाल-लाल, काही मस्त पिवळी 
मध्येच एखादी कळी कोवळी, निळी-निळी...

काही हातोहात संपणारी फुलं,
काही चंद्राचे चटके सोसणारी फुलं
काही उगाच सजणारी - लाजणारी फुलं
काही नशीब फ़ाटके लपवणारी फुलं...

ऐकलयं, रात्रीचीच फुलतात ही फुलं,
बिछान्यात अलगद सजतात ही फुलं
पण रात्रभर बिछान्यात असूनही
सकाळी कशी नीजतात ही फुलं...
सकाळी कशी नीजतात ही फुलं..!!
  

किरण जाधव... [ एका फुलात मला इतकं दिसतं..!! ]

Adding disk space to a cluster + HPUX

Adding disk space to a cluster:

1.1           On the primary node


#ioscan –fnC disk | more

You will find some disks which won’t have the drivers installed. Install the drivers for these newly added disks

#insf

1.2          Extending the volume group

Check the VG configuration using the following command

#vgdisplay –v vgxx

If it contains disks with alternate links then you need to add the new disk in a similar fashion.

Check the device files of the new LUN added in /dev/dsk directory

#ls –ltr /dev/dsk

After identifying the device files select any one device file to create a physical volume

#pvcreate /dev/rdsk/cxtxdx

The remaining device files will act as alternate links to the disk.
Extend the volume group

#vgextend /dev/vgxx /dev/dsk/cxtxdx /dev/dsk/cxtxdx ……….. /dev/dsk/cxtxdx
                                  primary                 alternate                         alternate

Check with vgdisplay –v vgxx if the free PEs are increased.

1.3          Extending the file system

Extend the logical volume as required.

#lvextend –L   

Extend the file system

#fsadm –F vxfs –b

Check if the file system has been extended

#bdf /export/ftpexp


1.4          Creating a VG mapfile and transferring to other nodes 

Export the volume group and create a map file in a preview mode.

#vgexport –p –v –s –m /tmp/vg01.map /dev/vg01

Copy the map file to the other nodes in the cluster

#scp –p /tmp/vg01.map :/tmp/

1.5          Creating the device files on another node

Check with ioscan if the new disks are detected by the operating system

#ioscan –fnC disk | more

Install the drivers for the newly added disks

#insf

1.6          Exporting the volume group on another node

Before exporting the volume group note down the minor number of the device file of the volume group

#ll /dev/*/group

Export the volume group (removing the volume group configuration keeping the data on disks intact)

#vgexport /dev/vg01

#mkdir /dev/vg01

Create the device file for the volume group. Use the same minor number as it was used before

#mknod /dev/vg01/group c 64 0x010000


1.7          Import the volume group

Import the volume group in the preview mode first and see if there are any errors.
If there are no errors then proceed with vgimport

#vgimport –p –v –s  –m /tmp/vg01.map /dev/vg01

#vgimport  –v –s –m /tmp/vg01.map /dev/vg01


1.8          Check the cluster configuration for consistency

#cmcheckconf –k –C /etc/cmcluster/

There should not be any errors in the output of this command

1.9          Apply the changes to the cluster


#cmapplyconf 





Thanks...
Kiran Jadhav


**Let's Share our knowledge and keep visiting here**

Friday, July 18, 2014

Lord Gautama Buddha's Quotes


Lord Gautama Buddha's Quotes

“Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense.”


“All that we are is the result of what we have thought. The mind is everything. What we think we become.”


“Peace comes from within. Do not seek it without.”
“Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Happiness never decreases by being shared.”
 
“You will not be punished for your anger, you will be punished by your anger.”
“The mind is everything. What you think you become.”
“You yourself, as much as anybody in the entire universe, deserve your love and affection.”
 
“Three things cannot be long hidden: the sun, the moon, and the truth.”
 
“Those who are free of resentful thoughts surely find peace.”
 
“To understand everything is to forgive everything”
 
“We are shaped by our thoughts; we become what we think. When the mind is pure, joy follows like a shadow that never leaves.”



“The only real failure in life is not to be true to the best one knows.”
 
“You cannot travel the path until you have become the path itself”
 
“An idea that is developed and put into action is more important than an idea that exists only as an idea.”
 
“When you realize how perfect everything is you will tilt your head back and laugh at the sky”

 
“However many holy words you read,However many you speak,What good will they do you If you do not act on upon them?”
 
“The tongue like a sharp knife... Kills without drawing blood.”
“Even death is not to be feared by one who has lived wisely.”

“A dog is not considered a good dog because he is a good barker. A man is not considered a good man because he is a good talker.”


“What we think, we become.”
 
“To conquer oneself is a greater task than conquering others”
 
“Better than a thousand hollow words, is one word that brings peace.”
 
“To keep the body in good health is a duty...otherwise we shall not be able to keep our mind strong and clear.”
 
“There has to be evil so that good can prove its purity above it.”
 
“Hatred does not cease through hatred at any time. Hatred ceases through love. This is an unalterable law.”
 
“Whatever words we utter should be chosen with care for people will hear them and be influenced by them for good or ill.”

“Every human being is the author of his own health or disease.”


Thanks...
Kiran Jadhav

**Let's Share our knowledge and keep visiting here**

Package Failover in MCSG + HPUX

Package Fail-over in MCSG.


There are several ways to perform a failover test. The most rigorous way is to shutdown the primary node and see if all packages fail over nicely to the other node. But most of the time we only want to check if all volume groups fail over correct with all their (perhaps newly) assigned luns. This kind of failover test is described below.

  1. Logon to the primary node, which owns the running package.

  1. Execute the following command to find the failover node and confirm the package you want to failover is running on the primary node.
# cmviewcl

3.   You could have a parallel session active to the same node and keep a watch on the package control log file, as you issue the cmhaltpkg command

# tail -f /etc/cmcluster//*.log | grep –i error

4. Halt the package which needs to be tested for failover

# cmhaltpkg –v

If there are no error messages reported in the package control log file, proceed..

5. Start the package on the failover node.

# cmrunpkg –n -v

we are using the –n option of the cmrunpkg command to be 100% sure that we are starting the package on the failover node.

6. Once the package has started on the failover node without any errors, /etc/lvmtab on both the primary and secondary node are in sync. If there do appear errors, try to solve them. Check the package log file or even the syslog for more information. Most of the time they are about missing luns or incorrect volume group information. If no errors were found or the errors are solved, please proceed with the next step.

7. Halt the package.

# cmhaltpkg –v
           
Check the log file if any errors messages are shown by the cmhaltpkg command. Do not try to start the package back on the primary node unless you have cleared the errors in step 7.

 8. Logon to the primary node and execute the following steps.

# cmrunpkg –n -v < pkgname >

If no error message reported by the cmrunpkg command, the startup was successful.

9.The package AUTORUN will be shown disabled. It should be enabled.

# cmviewcl

# cmmodpkg –e < pkgname >   


Thanks...
Kiran Jadhav

**Let's Share our knowledge and keep visiting here**

Wednesday, July 16, 2014

Vpar Commands +HPUX

Vpar Commands:

vparcreate
vparcreate is used to create a new virtual partition.

# vparcreate -p vpar1
-a cpu::3 -a cpu:::2:4 -a cpu:41 -a cpu:45 (Can be done a LIVE system)
–a mem::1280 (Cannot be done on a LIVE system)
–a io:0/8 -a io:1/10 -a io:0/8/0/0.5.0:boot

vparboot
The vparboot command is used to boot a second vPar from a running vPar.

Boot vpar2 partition from running vpar1 partition:

# vparboot -p vpar2

Boot vpar2 partition to single user mode from running vpar1 partition:

# vparboot -p vpar2 –o “-is”

vparmodify
With vparmodify we can change the resources and attributes of an existing vPar.

Modify the primary boot path to vpar1:

# vparmodify -p vpar1 -m io:0/8/0/0.5.0:BOOT

Set the alternate boot path:

# vparmodify -p vpar1 -a io:0/8/0/0.2.0:ALTBOOT



vparremove
The vparremove command deletes a virtual partition previously created using the vparcreate
command. All resources associated with the virtual partition are made available for allocation
to other partitions.


# vparremove -p vpar1
Remove virtual partition vpar1? [n]: y


vparstatus
Display information about one or more virtual partitions on a system. If Monitor is not loaded
the vparstatus shows this with an message. The output shows also the state of a vPar.


# vparstatus
[Virtual Partition]
                                                                          Boot
Virtual Partition Name         State Attributes Kernel Path               Opts
============================== ===== ========== ========================= =====
test0                       Up    Dyn,Auto   /stand/vmunix             -lq
test2                       Up    Dyn,Auto   /stand/vmunix             -lq

[Virtual Partition Resource Summary]
                                           CPU    Num        Memory (MB)
                                  CPU     Bound/   IO   # Ranges/
Virtual Partition Name          Min/Max  Unbound  devs  Total MB    Total MB
==============================  ================  ====  ====================
test0                          6/  8    6   1     7    0/  0        28544
test2                          7/ 12    7   1     7    0/  0        20480

You can change only Unbound CPUs, for bound CPUs we have to recreate vpar.

# vparstatus -v -test0
[Virtual Partition Details]
Name:         test0
State:        Up
Attributes:   Dynamic,Autoboot
Kernel Path:  /stand/vmunix
Boot Opts:    -lq

[CPU Details]
Min/Max:  6/8
Bound by User [Path]:
Bound by Monitor [Path]:  0.10
                          0.11
                          0.12
                          0.13
                          1.10
                          1.11
Unbound [Path]:  3.13

[IO Details]
   0.0.0
   0.0.0.2.0.6.0.0.0.0.0  BOOT
   0.0.6
   0.0.14
   0.0.10
   0.0.12
   0.0.0.3.0.6.0  ALTBOOT

[Memory Details]
Specified [Base  /Range]:
          (bytes) (MB)

Total Memory (MB):  28544




Thanks...
Kiran Jadhav

**Let's Share our knowledge and keep visiting here**

Data Protector commands

Data Protector commands
S.No.
Commands
Meaning




omnicellinfo
omnicellinfo - displays configuration information about the Data Protector cell
1
omnicellinfo -cell
to list the client information & components installed on each client
2
omnicellinfo -version
To print the version of data Protector
3
omnicellinfo -dev -detail
list the device details
4
omnicellinfo -object schedule
to list the next schedule of backup
5
omnisv -status
to list the status of daemons of data protector
6
omnimm -list_pool
to list the media pools and their health.
7
omnimm -list_pool
to see the medias available in a particular media pool
8
omnisv -stop
to stop the dataprotector daemons
9
omnisv -start
to start the dataprotector daemons
10
omnicellinfo -dlinfo
to list the backup specifications available
11
omnicellinfo -mm
Displays information about the media and media pools in the cell. The report shows for each pool: the Pool Name, Media Class, Media Usage Policy, Media Allocation Policy, and Amount of Free Space in the pool.

Pool name                Media Type         Policy         # of media    Free
===============================================================================
Archivelogs                LTO-Ultrium        App+Loose       14        4797651
Daily_backups           LTO-Ultrium        App+Loose        60       4863912
Final_archives_2006   LTO-Ultrium        App+Loose         4           0
Free_LTO-Ultrium       LTO-Ultrium        Loose                32      10511056
Weekly_backups       LTO-Ultrium        App+Loose         25      3953213
rteapod_dlt8000         DLT                   App+Loose         14       286720



12
omnicellinfo -dev
Displays information about the backup devices in the cell. The report shows for each device: the Device Name, Client Name, Device Type and Media Pool.
Device name       Host             Device type             Pool
==============================================================================
rteapod_dlt8000   rteapod          Standalone              rteapod_dlt8000
rteapoy_dlt8000   rteapoy          Standalone              rteapoy_dlt8000
rtebwd_ultrium2   rtebwd           Standalone              rtebwd_ultrium2
robot                   rtebwp           SCSI-II Library
rtebwp_drive_1    rtebwp           LTO-Ultriu (in library)  Daily_backups
rtebwp_drive_2    rtebwp           LTO-Ultriu (in library)  Daily_backups
rtebwt_ultrium2   rtebwt           Standalone                rtebwt_ultrium2

13
omnicellinfo -dev -detail
to see a more detailed output



14
omnimm -list_pool
to list the medias available in a given pool

rter3p:/> omnimm -list_pool Archivelogs

Status  Medium Label                Location                 Full   Protected
===============================================================================
Good    [DC5274L1] DC5274                                    No     07/25/07 08:44:38
Good    [DC5243L1] DC5243                                    No     07/24/07 08:41:28
Good    [DC5240L1] DC5240                                    No     07/23/07 08:42:10
Good    [DC5229L1] DC5229                                    No     07/20/07 08:42:21
Good    [DC5213L1] DC5213                                    No     07/19/07 08:49:16
Good    [DC5198L1] DC5198                                    No     07/18/07 23:49:44
Good    [DC5266L1] DC5266                                    No     07/18/07 08:48:05













15
omnimm -list_pool
to list the configured pools
test:/> omnimm -list_pool

Status  Pool name                 Media Type   MS     # of media   Free [MB]
===============================================================================
Good    Archivelogs               LTO-Ultrium  No          13           4489888
Good    Daily_backups          LTO-Ultrium  No          58           4543472
Good    Final_archives_2006  LTO-Ultrium  No           4               0
Poor     Free_LTO-Ultrium      LTO-Ultrium  No          37          11754975
Good    Weekly_backups      LTO-Ultrium  No          25          3953213
16
omnidb -session -media
To list the medias used by a particular session
test:/> omnidb -session 2007/07/12-11 -media
Medium Label                   Medium ID                                       Free Blocks
===============================================================================
[DC5193L1] DC5193         ac1c1020:436b71bb:0e9a:0001             20942464
How to format a media

a.)
First recycle the media if it is under protection
omnimm -recycle ( Medium )
b.)
Export the media
omnimm -export ( Medium )
c.)
Format the media
omniminit -init -force "use this for formatting DLT medias"
Format the media
omniminit -init -force -slot "use this for formatting ultrium tapes"
rter3p:/tmp/test2> omniminit -init rtebwp_drive_1 DC5257L1 -force -slot 35
[Normal] From: MMA@rtebwp "rtebwp_drive_1"  Time: 07/19/07 11:20:28
        STARTING Media Agent "rtebwp_drive_1"

[Normal] From: MMA@rtebwp "rtebwp_drive_1"  Time: 07/19/07 11:20:36
        Loading medium from slot 35 to device /dev/rmt/2m

[Normal] From: MSM@rter3p "rtebwp_drive_1"  Time: 07/19/07 11:21:19
        Data Protector medium "[DC5257L1] DC5257" found.
        Initialization allowed.

[Normal] From: MMA@rtebwp "rtebwp_drive_1"  Time: 07/19/07 11:21:19
        /dev/rmt/2m
        Initializing new medium: "[DC5257L1] DC5257L1"

[Normal] From: MSM@rter3p "rtebwp_drive_1"  Time: 07/19/07 11:21:27
        New medium added to pool: Daily_backups
            MediumID: ac1c1020:469f3b1f:2854:0001
            Label:    [DC5257L1] DC5257L1
            Location:

[Normal] From: MMA@rtebwp "rtebwp_drive_1"  Time: 07/19/07 11:21:47
        Unloading medium to slot 35 from device /dev/rmt/2m

[Normal] From: MMA@rtebwp "rtebwp_drive_1"  Time: 07/19/07 11:22:05
        COMPLETED Media Agent "rtebwp_drive_1"
d.)
Note* be sure that you format the ultrium tape throgh ultrium drive and dlt tapes throught DLT drive
e.)
Note* After formatting is done media will be moved to the pool to which drive is assigned.  You can see this is my omnicellinfo -dev
f.)
omnimm -move_medium
to move the media to a specific pool
omnimm -media_info < media ID> -detail
 to see the pool name to which the media belongs to
test:/> omnimm -media_info DC5231L1

Medium Label        Medium ID                           Pool          Library
===============================================================================
[DC5231L1] DC5231   ac1c1020:44898289:73e5:0001         Free_LTO-Ultrium robot
Restoration
omnir -session
To restore a particular session
omnir -sap : -session -overwrite -tree <> into
  to restore SAP filesystem
what to do when a mount request comes
1
omnidb -session -report
see the session report to find out for which medium the mount request is coming.  Verify that the tape is inside the library "if it is an ultrum medium this can be verified by omniscan command".   Call andover opps if medium is not available
2
omnimnt -device<> -session
satisfy the mount request ..device can be seen from session report by issuing the above command
3
omnimnt -device<> -session -cancel
To cancel the device request
What to do when completed with error ticket comes
omnidb -session
Check all the object status.  If all the objects have completed successfully close the ticket. Else monitor the next session.
How to change the drive path using omnidownload & omniupload
omnidownload -device -file
first download the attibutes of drive in an asc11 file
rter3p:/tmp/test2> omnidownload -device rtesand_dlt8000 -file file.txt
rter3p:/tmp/test2> l
file.txt
rter3p:/tmp/test2> cat file.txt
NAME "rtesand_dlt8000"
DESCRIPTION "DLT8000 drive on rtesand"
HOST rtesand
POLICY Standalone
TYPE DLT
POOL "rtesand_dlt8000"
DRIVES
        "/dev/rmt/1m"
modify the attibutes that you wish to change
omniupload modify_device -file
modify the changes done as above using this command
To abort a backup session
omniabort -session

To restart the backup










omnib -restart {session id }