Thursday, January 31, 2013

Kabir das ji ka Doha

SAI ITNA DIJIYE JAAME KUTUMBH SAMAYE,
MAIN BHI BHUKHA NA RAHU, SAADHU BHI BHUKHA NA JAYE...


Radhe Radhe
Amit Chopra

""DENHAAR KOI AUR HAI JO BAANTAT DIN RAEN""

Wednesday, January 30, 2013

how to list software installed + LINUX and HP UX

Hi Friends,

We always require softwares, packages or rpm in our systems or servers to be installed. but before installing any sfotware. we have to list or check also that the software does exist or already installed. and If yes then with which version. some times all related files also we have to see. so for the same, we need to use below command on HP UX on HP servers and RHEL linux.

on HP UX

#swlist |grep -i "name of the software"

it will show the name of the software installed with a very small detail.

#swlist -l fileset "name of the software"

Here the same command will bring  complete set of file related to the specfic software of enquiry or getting enquired.

#swlist -l product "name of the software"

yes for installation of package, we can use

#swinstall -s "complete depot path"

in HP UX directory can can be made with keeping all software or patch in one directory and by running ./create_depot executeble file.depot creation will be donw. then in a single go the installation of all software inside dpot will install.

yes one more thing before instaling any software in HP UX, check the software/Patch/Kernel patch/SS patch/CO command patches, they need a reboot of system or not. it can be checked before download as well from HP side.

an exapmple is below

#swlist |grep -i fault
  ProviderDefault                       B.11.31.0803   Select WBEM Providers
  SysFaultMgmt                          C.07.02.01.02  HPUX System Fault Management
  SFM-CORE                              C.03.00.06     HPUX System Fault Management
#
#
#swlist -l product SysFaultMgmt
# Initializing...
# Contacting target ""...
#
# Target:  :/
#
# SysFaultMgmt                  C.07.02.01.02  HPUX System Fault Management
  SysFaultMgmt.SFM-CORE         C.07.02.01     HPUX System Fault Management
#swlist -l fileset SysFaultMgmt
# Initializing...
# Contacting target ""...
#
# Target:  :/
#
# SysFaultMgmt                          C.07.02.01.02  HPUX System Fault Management
# SysFaultMgmt.SFM-CORE                 C.07.02.01     HPUX System Fault Management
  SysFaultMgmt.SFM-CORE.CTR_PRO_COMM    C.07.02.01     Control Provider Common Fileset
  SysFaultMgmt.SFM-CORE.CTR_PRO_COREIA  C.07.02.01     Control Provider Platform Specific Fileset
  SysFaultMgmt.SFM-CORE.EMT_DOC         C.07.02.01     EMT Online help fileset
  SysFaultMgmt.SFM-CORE.EMT_MAN         C.07.02.01     EMT Man pages fileset
  SysFaultMgmt.SFM-CORE.EVM_PRO_COMM    C.07.02.01     EVM CIM Indication Provider Common Fileset
  SysFaultMgmt.SFM-CORE.EVM_PRO_COREIA  C.07.02.01     EVM CIM Indication Provider Platform Specific Fileset
  SysFaultMgmt.SFM-CORE.EVWEB_COREIA    C.07.02.01     EvWEB core platform specific fileset
  SysFaultMgmt.SFM-CORE.EVWEB_DOC       C.07.02.01     EvWEB Online help fileset
  SysFaultMgmt.SFM-CORE.EVWEB_GUI_COMM  C.07.02.01     EvWEB GUI common fileset
  SysFaultMgmt.SFM-CORE.EVWEB_GUI_IA    C.07.02.01     EvWEB GUI platform specific fileset
  SysFaultMgmt.SFM-CORE.EVWEB_MAN       C.07.02.01     EvWEB Man pages fileset
  SysFaultMgmt.SFM-CORE.FMD_PRO_COMM    C.07.02.01     Filter Metadata Instance Provider Common Fileset
  SysFaultMgmt.SFM-CORE.FMD_PRO_COREIA  C.07.02.01     Filter Metadata Instance Provider Platform Specific Fileset
  SysFaultMgmt.SFM-CORE.GS_COMM         C.07.02.01     General Services Common Fileset
  SysFaultMgmt.SFM-CORE.HAS-IA          C.07.02.01     Hardware Access Services IA
  SysFaultMgmt.SFM-CORE.HS_PRO_COMM     C.07.02.01     HealthState Instance Provider Common Fileset
  SysFaultMgmt.SFM-CORE.HS_PRO_COREIA   C.07.02.01     HealthState Instance Provider Platform Specific Fileset
  SysFaultMgmt.SFM-CORE.MISC_COMM       C.07.02.01     MISC Common Fileset
  SysFaultMgmt.SFM-CORE.MISC_COREIA     C.07.02.01     MISC Platform Specific Fileset
  SysFaultMgmt.SFM-CORE.MISC_TOOLS      C.07.02.01     MISC Tools Fileset
  SysFaultMgmt.SFM-CORE.SFMUI-PROPPAGE  C.07.02.01     SFM property pages fileset
  SysFaultMgmt.SFM-CORE.SFM_MAN         C.07.02.01     SFM Man pages fileset
  SysFaultMgmt.SFM-CORE.SFM_PRO_COMM    C.07.02.01     SysFaultMgmt Provider Module COMMON
  SysFaultMgmt.SFM-CORE.SFM_PRO_IA      C.07.02.01     SysFaultMgmt Provider Module IA
#

It will show the version.

on LINUX

#rpm -qa |grep -i "name of the package"

it will list the packages and libraried installed with.

rpm -qal |grep -i gnome

it will list the complete path and location of packages installed. "Thanks Ritu and Kundan for telling me this"

[root@localhost ~]# rpm -qal |grep -i gnome |more
/usr/share/gtk-2.0/demo/gnome-applets.png
/usr/share/gtk-2.0/demo/gnome-calendar.png
/usr/share/gtk-2.0/demo/gnome-foot.png
/usr/share/gtk-2.0/demo/gnome-fs-directory.png
/usr/share/gtk-2.0/demo/gnome-fs-regular.png
/usr/share/gtk-2.0/demo/gnome-gimp.png
/usr/share/gtk-2.0/demo/gnome-gmush.png
/usr/share/gtk-2.0/demo/gnome-gsame.png
/usr/lib64/libgnome-menu.so.2
/usr/lib64/libgnome-menu.so.2.1.3
/usr/share/gnome-menus/glade/gmenu-simple-editor.glade
/usr/share/locale/ar/LC_MESSAGES/gnome-menus.mo
/usr/share/locale/be/LC_MESSAGES/gnome-menus.mo
/usr/share/locale/bg/LC_MESSAGES/gnome-menus.mo
/usr/share/locale/bn/LC_MESSAGES/gnome-menus.mo
/usr/share/locale/bn_IN/LC_MESSAGES/gnome-menus.mo

#rpm -ivh "name of the package with complete path"

thos will install the package with verbose and details, but it always asks for dependant files. so we should go with yum.

or we can go local installation of RPMs.

http://manywaystosuccess.blogspot.in/2013/01/command-to-locally-install-rpm-rhel.html


Love sharing
Amit Chopra


 

Tuesday, January 29, 2013

How to Verify and Install patches on HP UX

Hi Friends,

To remove bugs or to keep the system up to date, we have to apply patches. These patches are very useful, helpful at application level too, Hardware level, to upgrade the Kernel, to keep in track.

the command we can use to verify the patch status or current status of the server is :-

#swverify \*

this command will verify complete system patch level and also check the warning and error at patch level.

before applying any patch, we should have full backup of server Ignite backup, File system backup through fbackup. then we should plan for the patch application.
Every patch at download time from HP can be checked that, if it needs a reboot of server or not. If yes then go with complete palnning. sometimes the patch can cause some issue also ad then the system will not boot up.
you can have backup of kernel also with :-

#kconfig command, keeping your current kernel config.

yes do remember that Kernel patch application needs a reboot.

to verify and install the patches we can use below command :-

#swinstall -px  autoselect_dependencies=true -s /tmp/depot

to simply install the patch or software, you can use :-

#swinstall -s /tmp/hhdsghsd.depot

you can create a directory called depot and then use that directory to complete all patch upgrade in one time or in one go. e other options too. which can be used for other purpose.

you have o use tab and arrow keys, in action tab, select install. or there ar

after this, the server will reboot and you can check the state or warning or error with

#swverify \*



Thanks for the time. Its nice to see your visit again.

Love Sharing
Amit Chopra


 

Gateway not pinging + LINUX

HI Friends,

Today, My collegue Kundan helped me in resolving an issue of Network. we have configured th IP of linux server properly.
# service network restart

was alos giving proper output, NO DHCP was eanble. firewall was also off.  the file :-

# cat /etc/sysconfig/network-script/ifcfg-eth0 was also giving proper o/p.

the ONBOOT was YES,
GATEWAY was proper,
IP was there.
but GATEWAY was not responding, when we were pinging it or when we were trying to reach it.

We were remotely supporting, we later thought and Kundan suggested that may be the cable is not plugged in. we checked with the physical team there. They said, yes we have only connected one cable to ILO port only and not network or other cable is connected. so due to this only, the Gateway was not reachable. it s a good learning, i have today.
we should check physically also. later when wire got connected properly. the same server was pinging from outside also and was accessible through putty too.

Friends, please share your experience of Network not reachable in LINUX or HP UX.



Love Sharing
Amit Chopra

Monday, January 28, 2013

How to change VG state HP UX & LINUX

Hi Friends,

Below are some options which we can use for changing Volume Group in HP UX or LINUX.

# vgchange -a n /dev/vg03 # Deactivate volume group
# vgchange -c y /dev/vg03 # Enable volume group for HA cluster
# vgchange -c y -S y /dev/vg03 # Enable volume group for HA cluster and mark as sharable
# vgchange -a e /dev/vg03 # Activate volume group in exclusive mode
# vgchange -a s /dev/vg03 # Activate volume group in shared mode
Activate all volume groups; activate marked for membership in a HA cluster in exclusive mode:
# vgchange -a y
Activate all volumes, marked for membership in a HA cluster in exclusive mode:
# vgchange -a e


Love Sharing
Amit Chopra