Operating System - HP-UX
1753480 Members
4965 Online
108794 Solutions
New Discussion юеВ

Re: swlist/swinstall has no output

 
SOLVED
Go to solution
Li Hao
Advisor

swlist/swinstall has no output

I have one HP UX 11.23 server which I would like to apply the Sep 2006 Quality pack patch. but when I try to run the swlist or swinstall command, it just return with no output, no error at all, I guess it was the hosts/dns lookup problem somewhere, but I just can not find what is the root cause.

I have check the /var/adm/sw/swagentd.log, it sometime shows a dns lookup error. but most of time is also don't have any error.
8 REPLIES 8
Berd
Trusted Contributor

Re: swlist/swinstall has no output

Li,

Try swlist -l bundle

Berd
Peter Godron
Honored Contributor

Re: swlist/swinstall has no output

HI,
and welcome to the forums.
Kill then Restart your swagent:
kill -15 $(UNIX95=1 ps -C swagentd -o pid=)
/usr/sbin/swagentd -r

Correct any network problems.
Check /etc/hosts, /etc/nsswitch.conf and others.
Ensure you are pointing to a correct software location.

Use SAM
Peter Godron
Honored Contributor

Re: swlist/swinstall has no output

Hi (again),
forgot to add the test:
swlist -R

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.

Li Hao
Advisor

Re: swlist/swinstall has no output

I have clean up /etc/hosts file, I can look up my host name correctly, verified using ping.

try to stop the swagentd using /sbin/init.d/swagentd stop, then start it again, same result, no output, just return.

I try to kill the swagentd pid, then restart using /usr/sbin/swagentd -r, same result.

all command swlist -l bundle, or swlist -R or swlist, swinstall has no ouput. using SAM to check installed software also just fresh the screen with no result.

nsswitch.conf point to DNS as first, /etc/hosts as secondary.
Peter Godron
Honored Contributor

Re: swlist/swinstall has no output

Hi,
thanks for the feedback.
Can you please check the /var/adm/sw/products directory for products/patches etc.

Especially the index file
ll /var/adm/sw/products | grep -i index

Ensure you are running:
/usr/sbin/swlist

our nsswitch.conf:
# cat /etc/nsswitch.conf
hosts: files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]

As long as you have a continue if the dns is not found.
Ermin Borovac
Honored Contributor
Solution

Re: swlist/swinstall has no output

Since commands are returning no output can you verify that their size is not zero?

# ll /usr/sbin/sw*

Most of the SD-UX commands (swlist, swinstall) are hard linked to each other and setuid to root.
Bill Hassell
Honored Contributor

Re: swlist/swinstall has no output

Make sure your nsswitch.conf file has the hosts line looking at files first, then DNS (as mentioned above). Verify that your resolver is looking at the /etc/hosts file first with this command:

nsquery hosts $(hostname)

Then, did a well-meaning root user 'cleanup' the /var directory by removing some /var/adm/sw directories? If so, your system is damaged and the missing directories must be restored from your backup.


Bill Hassell, sysadmin
Li Hao
Advisor

Re: swlist/swinstall has no output

It turn out the /usr/sbin/sw* files are size 0. the files are somehow damaged during my last install of a package. I restored the file from another server, now it works.