Hi !
Using netstat -a there can be seen all sockets currently made. Is there
any way to get PID of the process, who had opened (created, whatever)
specified socket ?
Using netstat -a there can be seen all sockets currently made. Is there
any way to get PID of the process, who had opened (created, whatever)
specified socket ?
> > Hi !
> > Using netstat -a there can be seen all sockets currently made. Is there
> > any way to get PID of the process, who had opened (created, whatever)
> > specified socket ?
> Not from netstat. Use lsof available from the 'usual places'.
>> > Hi !
>> > Using netstat -a there can be seen all sockets currently made. Is
>> > there any way to get PID of the process, who had opened (created,
>> > whatever) specified socket ?
>> Not from netstat. Use lsof available from the 'usual places'.
> I would prefer not using any application which is not in Solaris inst.
> package
rich
> >> > Hi !
> >> > Using netstat -a there can be seen all sockets currently made. Is
> >> > there any way to get PID of the process, who had opened (created,
> >> > whatever) specified socket ?
> >> Not from netstat. Use lsof available from the 'usual places'.
> > I would prefer not using any application which is not in Solaris inst.
> > package
> You must like crippling yourself. I don't know how anyone can survive
> without 3rd party software on any OS.
> rich
If you're running similar hardware and OS levels than "installing" onQuote:> I have over 30 Enterprises, and coming even more and more each month,
> and would really go crazy installing all 3rd party application to all of
> the servers, that's why I first ask for pure Solaris solution. Perhaps
> some /usr/proc/bin/p... util would give what I want....
> Installing 3rd party would be the last solution.
mike
Only *s would manually install a 3rd party utility on 30+ hosts.
That's why they created rdist and rsync. rsync is the new kid on the block,
and probably the future of remote file distribution.
> > I have over 30 Enterprises, and coming even more and more each month,
> > and would really go crazy installing all 3rd party application to all of
> > the servers, that's why I first ask for pure Solaris solution. Perhaps
> > some /usr/proc/bin/p... util would give what I want....
> > Installing 3rd party would be the last solution.
> How much you have left to learn, young grasshopper...
> Only *s would manually install a 3rd party utility on 30+ hosts.
> That's why they created rdist and rsync. rsync is the new kid on the block,
> and probably the future of remote file distribution.
Put the special libraries on the same mounted partition as the tools, andQuote:> Installing 3rd party software no matter which way (manually, rcp, rdist
> etc..) would be a bad solution. I would prefer then exported partition
> with such software via NFS, but some software needs special libraries to
> run, and in that case, mounted partition would not help either.
run /usr/sbin/crash
type in 'proc'
For each process in the list, type in 'user' followed by the process SLOT
number. This will give you a breakdown of the user address space of the
process, within which is a list of open files.
Now for each of those open files, type in 'file' followed by the address
listed above. This will give you some information on what type of file it
is.
Since we are interested in just sockets only files with a TYPE of SOCK are
for
us.
Now type in 'socket -l' followed by the address from the file command above
and you will get the details of this socket. In there you will find the
source
and destination ports.
btw, I use lsof.......
Cheers
Steve
*********************
*********************
> run /usr/sbin/crash
> type in 'proc'
> For each process in the list, type in 'user' followed by the process SLOT
> number. This will give you a breakdown of the user address space of the
> process, within which is a list of open files.
> Now for each of those open files, type in 'file' followed by the address
> listed above. This will give you some information on what type of file it
> is.
> Since we are interested in just sockets only files with a TYPE of SOCK are
> for
> us.
> Now type in 'socket -l' followed by the address from the file command above
> and you will get the details of this socket. In there you will find the
> source
> and destination ports.
> btw, I use lsof.......
> Cheers
> Steve
> *********************
> *********************
> > I know there is thousands of software to help you investigating things.
> > But from my practice, it is wise to know how to do something manually,
> > and after that use appropriate software to help you. After all, you
> > increase your knowledge how things works, not to left them just to work.
> lsof wouldn't exist if there were a native tool, or some manual way to do what
> it does. UNIX programmers aren't known for constantly reinventing the wheel,
> and frankly I don't see the point of digging a hole with your fingernails when
> there's a perfectly good shovel sitting there.
> > Installing 3rd party software no matter which way (manually, rcp, rdist
> > etc..) would be a bad solution. I would prefer then exported partition
> > with such software via NFS, but some software needs special libraries to
> > run, and in that case, mounted partition would not help either.
> Put the special libraries on the same mounted partition as the tools, and
> build the tools properly so they know where to look. What's so difficult about
> that?
lsof does something you CAN'T do with regular OS commands. Either you get the
information with lsof, or you don't get the information.
lsof comes with source code, if you want to know how it works.
>> lsof wouldn't exist if there were a native tool, or some manual way to do what
>> it does. UNIX programmers aren't known for constantly reinventing the wheel,
>> and frankly I don't see the point of digging a hole with your fingernails when
>> there's a perfectly good shovel sitting there.
>> > Installing 3rd party software no matter which way (manually, rcp, rdist
>> > etc..) would be a bad solution. I would prefer then exported partition
>> > with such software via NFS, but some software needs special libraries to
>> > run, and in that case, mounted partition would not help either.
>> Put the special libraries on the same mounted partition as the tools, and
>> build the tools properly so they know where to look. What's so difficult about
>> that?
>It's just you don't have a clue what I want. Isnt satisfyable to extend
>your knowledge knowing such things ? Or you prefer to be "I don't know,
>but there is a program..." kind of guy ...
There's a command called "fusers" which will tell you what processes
have a *file* open, but that doesn't extend to network connections.
-george william herbert
Hello!
How to find out to what process belongs to, with what socket?
I attempt find dead processes bshell (Baan).
#netstat -na
tcp4 0 0 172.21.0.9.512 172.21.100.12.1031 ESTABLISHED
tcp4 0 0 172.21.0.9.512 172.21.100.6.1026 ESTABLISHED
#ps ax|grep bsh
There are 3 processes and only two socket, one process is necessary
for killing.
How to define with what?
??
Thanks.
3. Print tracer PID in /proc/<pid>/status
4. PEXExtensionInit error when startx
5. kill -STOP <PID#> -> "child process has been stopped, restarting." ?
6. Jumpstart
9. <><><> MOUNTING EXTENDED PARTITION <><><>
10. Wanted: <><><> Unix Specialist <><><>
12. >>---> Software Jobs! >>--->
13. Help: New kernel -> socket problems -> No X