1754412 Members
3182 Online
108813 Solutions
New Discussion юеВ

lsof

 
SOLVED
Go to solution
j773303
Super Advisor

lsof

Does lsof support 64 bit os?
I have installed the lsof 4.67, but while I run the lsof, the error message as below,
# ./lsof
lsof: FATAL: lsof was built for a 32 bit kernel, but this
is a 64 bit kernel.
Hero
7 REPLIES 7
T G Manikandan
Honored Contributor
Solution

Re: lsof

j773303
Super Advisor

Re: lsof

Thanks, but it is just a binary file, I also want to know to how to use is, for example: man lsof
Hero
T G Manikandan
Honored Contributor

Re: lsof

Yogeeraj_1
Honored Contributor

Re: lsof

hi,

NB. List open files (remember in unix everything is a file)

Here is some simple uses:
To see all open files of a paricular process (via its pid):

# lsof -p

To see all open files associated with a command:

# lsof -c cron

...or by a logon name:

# lsof -u
# lsof -u

...or what process is using a TCP socket:

# lsof -i tcp:161
# lsof -i udp:161


Also
a. suppose a process has a port which is hanging,
you can grep on the port no.,
know which process owned that port no.,
kill that process to free that port. Generally helpful in web applications.
b. when you want to find out whos creating the /tmp/log that is building rappidly,
c. when you want to unmount a filesystem but it's busy, find out who's using it.


hope this helps!
regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Ravi_8
Honored Contributor

Re: lsof

Hi,

lsof for 64 bit hp-ux doesn't built it so for,
anyway lsof will work on 64 bit hp-ux, ref the link given by TG
never give up
Abdul Majeed Lardhi
Regular Advisor

Re: lsof

Hi

Download the source code
lsof-4.64-ss-11.00.tar.gz
uncompress and untar it.

go to lsof-4.64 directory and run ./configure hpux
it will ask few questions keep answering and (don't do inventory check) select default for ease.

then run "make" this process will create a file called lsof in the same directory.
Use this file it will definately work.

I tried this on 64 bit kernel on 11.11


regards
Majeed
Tom Danzig
Honored Contributor

Re: lsof

Although it would be preferable for you to get the source and compile locally, I have attached a 64 bit lsof binary if you would prefer that.