- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- lsof version 4.81 for HPUX 11.31
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2009 04:36 AM
тАО03-02-2009 04:36 AM
Have Installed the lsof lsof version 4.81 for HPUX 11.31
But normal user id "coll" and "root" id lsof outputs are different.?
Example :-
# ll -l /usr/local/bin/
total 1632
-r-sr-xr-x 1 root bin 413096 Nov 6 00:16 lsof
-rwxr-xr-x 1 root bin 413096 Nov 6 00:16 lsof.bk
ROOT USER ID output
====================
# lsof -nP -i -C
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 549 beaadm 28u IPv4 0xe0000001b8ade700 0t0 TCP *:8686 (LISTEN)
java 549 beaadm 29u IPv4 0xe0000001b6e98680 0t0 TCP *:64514->127.0.0.1:64513 (CLOSING)
java 549 beaadm 31u IPv4 0xe00000017a94c400 0t0 TCP *:8009 (LISTEN)
java 549 beaadm 33u IPv4 0xe0000004078b3100 0t0 TCP 127.0.0.1:8886 (LISTEN)
syslogd 934 root 6u IPv6 0xe000000153055400 0t0 UDP *:514 (Idle)
sshd 1383 root 4u IPv6 0xe000000153323c80 0t0 TCP *:22 (LISTEN)
sshd 1383 root 5u IPv4 0xe000000153330100 0t0 TCP *:22 (LISTEN)
inetd 1431 root 5u IPv4 0xe000000142c70c80 0t0 TCP *:5555 (LISTEN)
kuxagent 1514 itm 5u IPv4 0xe0000001b8775400 0t0 TCP *:56959 (LISTEN)
kuxagent 1514 itm 6u IPv6 0xe0000001b8775700 0t0 TCP *:56960 (LISTEN)
kuxagent 1514 itm 7u IPv4 0xe0000001a02a8980 0t0 TCP *:56961 (LISTEN)
kuxagent 1514 itm 8u IPv6 0xe0000001b8ade400 0t0 TCP *:56962 (LISTEN)
kuxagent 1514 itm 9u IPv4 0xe0000001a02a8c80 0t0 TCP 127.0.0.1:56963 (LISTEN)
kuxagent 1514 itm 10u IPv4 0xe0000001a02a8080 0t0 TCP *:1920 (LISTEN)
kuxagent 1514 itm 11u IPv6 0xe0000001840e4680 0t0 TCP *:1920 (LISTEN)
kuxagent 1514 itm 12u IPv4 0xe0000001b8775d00 0t0 TCP *:3661 (LISTEN)
kuxagent 1514 itm 13u IPv6 0xe0000001a02a8380 0t0 TCP *:3661 (LISTEN)
kuxagent 1514 itm 14u IPv4 0xe0000001840e4380 0t0 TCP 127.0.0.1:56964->127.0.0.1:56963 (ESTABLISHED)
Normal user "Coll" ID ouput
============================
$ lsof -nP -i -C
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 3062 coll 5u IPv4 0xe0000001a02b6400 0t3452 TCP 10.8.63.30:22->10.8.86.10:1449 (ESTABLISHED)
Thanks,
Johnson
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2009 04:42 AM
тАО03-02-2009 04:42 AM
SolutionI have found large Quality Assurance issues with this software.
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.81/
You may find the best route is to compile it yourself. Be sure to have all pre-requisites installed.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2009 04:48 AM
тАО03-02-2009 04:48 AM
Re: lsof version 4.81 for HPUX 11.31
SEP,
>>Be sure to have all pre-requisites installed.<<
Can please let me know the "pre-requisites installed" "I am lost " have keep trying many methods by changing the chmod 4555 /usr/local/bin/lsof still no help ..:(
Bunch of Thanks for you Quick concern and reply
Rgds,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2009 05:04 AM
тАО03-02-2009 05:04 AM
Re: lsof version 4.81 for HPUX 11.31
> SEP: I have found large Quality Assurance issues with this software
I hope then that you have emailed the author and/or the Porting Centre. Bugs are a part of life even in the highest quality software. Would you mind sharing what it is you have found?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2009 05:29 AM
тАО03-02-2009 05:29 AM
Re: lsof version 4.81 for HPUX 11.31
I suspect you might be having more than one version of lsof on your server.
root and normal user may use different version depending upon the path they have assigned.
Can you use full path of lsof utililty for root and normal user and see how it gives the result?
Also check this..
#find / -name lsof -print
#whereis lsof --> for root as well as normal user
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2009 05:36 AM
тАО03-02-2009 05:36 AM
Re: lsof version 4.81 for HPUX 11.31
As requested,
# find / -name lsof -print
/usr/local/bin/lsof
/usr/local/doc/lsof
/var/adm/sw/products/lsof
[/home/root]
# whereis lsof
lsof: /usr/local/bin/lsof /usr/local/bin/lsof.bk /usr/local/man/man8/lsof.8
[/home/root]
# id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)
[/home/root]
#
$ whereis lsof
lsof: /usr/local/bin/lsof /usr/local/bin/lsof.bk /usr/local/man/man8/lsof.8
$ id
uid=113(coll) gid=20(users)
Thanks,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2009 06:46 AM
тАО03-02-2009 06:46 AM
Re: lsof version 4.81 for HPUX 11.31
The lsof command must read kernel data structures to produce its output. These are readable only by root. Therefore lsof must be installed with "SUID root" permissions, if you want non-root users to be able to use it.
But lsof can detect the difference between running lsof as root and non-root user running lsof with SUID root permissions.
For a non-root user, lsof displays only data on the user's own processes.
To see all users' open files, you must be root.
If this behaviour is not acceptable for your situation, there are several ways to fix that:
a) allow the users to run lsof through sudo
or
b) download the lsof source package and recompile it on your own: the "configure" script in the source code package allows you to enable/disable this security feature.
The Porting Archive's lsof source package can be compiled using HP-UX's bundled cc compiler.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 10:53 PM
тАО03-03-2009 10:53 PM
Re: lsof version 4.81 for HPUX 11.31
Thanks for all , you who have contributed their valueable time and Knowledge,
Special Thanks for <
>>But lsof can detect the difference between running lsof as root and non-root user running lsof with SUID root permissions.<<
Solution :-
=========
allow the users to run lsof through sudo
In this Case my "perferred solution" was run lsof through sudo for normal user
Thanks,
Johnson