05-15-2009 01:19 AM - last edited on 03-28-2013 08:28 PM by Maiko-I
In my application running on HP-UX 11.11 PA RISC a listening socket is being used. I know lsof can be used to kill the socket. Unfortunately I'm not able to install lsof program.
When I do
swinstall -s lsof-4.82-hppa-11.11.depot
I'm getting an error as below
Could not contact host "lsof-4.82-hppa-11.11.depot". Make sure the │ │
│┌──│ hostname is correct and an absolute pathname is specified (beginning │─┐ │
││ │ with "/").
Then I do a
Source Depot Type: [ Local Directory
[ Source Host Name... ] lsof-4.82-hppa-11.11.depot
[ Source Depot Path /var/spool/sw.
It lookslike the Source Host Name is not correct but the field is not editable. Is it
that the host name entry should be in /var/adm/sw/defaults.hosts. I do not see defaults.hosts under that path. Please advice.
Also is there any way to detach the socket being used.
P.S. This thread has been moved from HP-UX > HP-UX Technical Documentation to HP-UX > patches - HP Forums Moderator
05-15-2009 01:34 AM
# swinstall -s /tmp/lsof-4.82-hppa-11.11.depot /*
======= 05/15/09 05:25:22 EDT BEGIN swinstall SESSION
* Session started for user "root@lrme025".
* Beginning Selection
* Target connection succeeded for "lrme025:/".
ERROR: There is currently no depot software on host "lrme025" at
location "/tmp/lsof-4.82-hppa-11.11.depot". Make sure that an
absolute pathname is specified for location (beginning with
* Source connection failed for
WARNING: More information may be found in the daemon logfile on this
target (default location is lrme025:/var/adm/sw/swagentd.log).
* Selection had errors.
======= 05/15/09 05:25:23 EDT END swinstall SESSION (non-interactive)
05-15-2009 01:46 AM
1. hostname and ip resolution. is host anme resolving to correct ip and is ip resolving to correct host name?
2. restart swagentd.
3. swlist -d @ /xyz_path/xyz.depot
4. If all ok, then
swinstall -s /xyz_path/xyz.depot \*
(installs all from depot.)
05-15-2009 12:19 PM
/var/adm/sw/ is the IPD, the registry where installed SD products are kept. (Don't fiddle with it.)
Your executable is elsewhere, most likely /usr/local/bin/lsof as mikap said.
You can also check this with:
swlist -l file -s /tmp/lsof-4.82-hppa-11.11.depot | grep /lsof
05-15-2009 12:28 PM
lsof can't kill anything directly. It just lists open files.
If you want to kill something, you will have to use lsof to determine the process id of the process to kill, then use the 'kill' command to kill it.