1828621 Members
7093 Online
109983 Solutions
New Discussion

Linux Vs HP Commands

 
SOLVED
Go to solution
Vinayak_HPUX
Frequent Advisor

Linux Vs HP Commands

[ /root ]rpm -qf /bin/ls
coreutils-6.9-9.fc8
will return rpm name from where ls commad came.
What is a command to know the same in HP-UX?
[NO rpm in hp only package & pathces]
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
14 REPLIES 14
Pete Randall
Outstanding Contributor
Solution

Re: Linux Vs HP Commands

# what /usr/bin/ls
/usr/bin/ls:
$Revision: B.11.11_LR
Wed Nov 8 19:15:12 PST 2000 $
#


Pete

Pete
Matti_Kurkela
Honored Contributor

Re: Linux Vs HP Commands

This is from HP-UX 11.11:

# swlist -l file |grep /bin/ls
OS-Core.CMDS-MIN: /usr/bin/lsacl
OS-Core.UX-CORE: /usr/bin/ls
OS-Core.UX-CORE: /usr/bin/lsf
OS-Core.UX-CORE: /usr/bin/lsr
OS-Core.UX-CORE: /usr/bin/lsx
PHCO_27415.UX-CORE: /usr/bin/ls
PHCO_27415.UX-CORE: /usr/bin/lsf
PHCO_27415.UX-CORE: /usr/bin/lsr
PHCO_27415.UX-CORE: /usr/bin/lsx

The output indicates that the ls command (the actual path is /usr/bin/ls in HP-UX) belongs to fileset "UX-CORE" within package "OS-Core". In addition, the patch PHCO_27415 contains some changes that apply to the ls command.

MK
MK
Vinayak_HPUX
Frequent Advisor

Re: Linux Vs HP Commands

Thanx lot ...!

Is there any site having link for packages/paches to install OS-core pkg and other PATCHES ?
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
Dennis Handly
Acclaimed Contributor

Re: Linux Vs HP Commands

>MK: # swlist -l file | grep /bin/ls

Note this is very slow. You can speed this up if you are root:
# find /var/adm/sw/products -name INFO -exec grep -l /bin/ls {} +
Vinayak_HPUX
Frequent Advisor

Re: Linux Vs HP Commands


As per ur Help I can have a name of Package and
patches too but
[root@sfqaia31][/var/adm/sw/products]which machinfo
/usr/contrib/bin/machinfo
[root@sfqaia31][/var/adm/sw/products]swlist -l file | grep /usr/contrib/bin/machinfo
OS-Core.USRCONTRB: /usr/contrib/bin/machinfo
PHCO_34710.USRCONTRB: /usr/contrib/bin/machinfo
[root@sfqaia31][/var/adm/sw/products]ll | grep OS-Core.USRCONTRB
[root@sfqaia31][/var/adm/sw/products]ll | grep OS-Core

OK its workng but ERROR :
root@sfqaia31][/var/adm/sw/products]swinstall -s /var/adm/sw/products/ PHCO_34710

======= 03/19/08 10:53:22 IST BEGIN swinstall SESSION
(non-interactive) (jobid=sfqaia31-0112)

* Session started for user "root@sfqaia31".

* Beginning Selection
* Target connection succeeded for "sfqaia31:/".
ERROR: There is currently no depot software on host "sfqaia31" at
location "/var/adm/sw/products/". Make sure that an absolute
pathname is specified for location (beginning with "/").
* Source connection failed for "sfqaia31:/var/adm/sw/products/".
WARNING: More information may be found in the daemon logfile on this
target (default location is
sfqaia31:/var/adm/sw/swagentd.log).
* Selection had errors.



======= 03/19/08 10:53:22 IST END swinstall SESSION (non-interactive)
(jobid=sfqaia31-0112)

============LET ME KNOW HOW TO INSTALL THE PATCH OR Packages from /var/adm/sw/products/ ??????
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
Yogeeraj_1
Honored Contributor

Re: Linux Vs HP Commands

hi,

It is much easier to launch the swinstall in interactive mode to do this *simple* patch installation.

i.e.
#swinstall

Also, have you already downloaded the patch that you are trying to install?
i.e. PHCO_34710


revert

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Matti_Kurkela
Honored Contributor

Re: Linux Vs HP Commands

/var/adm/sw/products is the location where swinstall and the other sw* tools store the information about _already installed_ packages and patches.

There is no full package, just the metadata. You cannot use /var/adm/sw/products as an installation source.

In your example, PHCO_34710 is already installed: you should not be trying to install it again on sfqaia31 unless there is a special reason to re-install the patch.

MK
MK
Dennis Handly
Acclaimed Contributor

Re: Linux Vs HP Commands

>Is there any site having link for packages/patches to install OS-core pkg and other PATCHES?

The site that's on the bottom of the HP-UX forum:
http://www.itrc.hp.com/service/patch/search.do?BC=main|&pageOsid=hpux

>Yogeeraj: It is much easier to launch the swinstall in interactive mode to do this *simple* patch installation.

I would say the opposite. Patches are simple to install from the command line since there are no choices.
# swinstall -s $PWD/PHCO_34710.depot \*

>have you already downloaded the patch that you are trying to install?

As MK points out, if swlist finds it in the IPD, the patch is already installed.

>MK: you should not be trying to install it again unless there is a special reason to re-install the patch.

And if so, you need to download the patch and reinstall with -x reinstall=true.
Vinayak_HPUX
Frequent Advisor

Re: Linux Vs HP Commands

THANKS LOT FOR UR KIND OF HELP

Q 1> I have some proceess was running on console before few minutes I have checked by
$ ps -ealf | grep console // now showing State as S means sleep no logs generating at all its like hung. How to wake up those proceess initiated by me without killing and restarting those process ...??????
[HINT : like top we can use ps -ealf process is not running in backgnd ]
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
OldSchool
Honored Contributor

Re: Linux Vs HP Commands

"'ps -ealf | grep console' now showing State as S means sleep. No logs generating at all its like hung."

Insufficient information. Sleep is normal if it's waiting on another process or for its time slice. It could well be hung, or it have been put in the background, could have been suspended...can't tell from your description.
Dennis Handly
Acclaimed Contributor

Re: Linux Vs HP Commands

>How to wake up those process initiated by me without killing and restarting those process ...??????

Well, you may not be able to wake it up but you can use tusc to see what system calls are being made. It won't help if it is still sleeping. You would have to catch it sooner.

You can also use gdb to attach and see what's going on.
Bob E Campbell
Honored Contributor

Re: Linux Vs HP Commands

Once you have a system running HP-UX you can use Software Assistant to maintain it. Use the command:

# swa report -a SEC -a CRIT -a PW -a QPK

to review the list of recommended changes and follow with:

# swa get -t /path-to-depot

to download the recommended patches. These can then be installed using:

# swinstall -s /path-to-depot -x autoreboot=true -x patch_match_target=true

Be sure to review the manual actions listed in the initial report as many security bulletins are not resolved by a patch.

SWA is found at https://www.hp.com/go/swa
Vinayak_HPUX
Frequent Advisor

Re: Linux Vs HP Commands

I have found a solution to this question
"Success is matter of law not luck, Make ur own & follow them -Shivkhera[You Can Win] "
Dennis Handly
Acclaimed Contributor

Re: Linux Vs HP Commands

You haven't assigned any points to any of your threads yet. Please see the following about reopening threads and assigning points:
http://forums.itrc.hp.com/service/forums/helptips.do?#41
http://forums.itrc.hp.com/service/forums/helptips.do?#33