![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| killing the process | arthi | UNIX for Dummies Questions & Answers | 3 | 06-03-2008 05:57 AM |
| Killing of a process and send a mail if the process doesnot come up within 2 minutes | Prince89 | Shell Programming and Scripting | 1 | 02-15-2008 04:10 PM |
| Killing specific process | benefactr | Shell Programming and Scripting | 6 | 10-25-2007 09:23 AM |
| killing a process | bbhayana | UNIX for Dummies Questions & Answers | 6 | 06-02-2007 04:58 AM |
| killing a process pid | jo calamine | UNIX for Advanced & Expert Users | 16 | 12-04-2006 04:43 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Reg process of killing
Dear All,
I have one doubt - when u use netstat -na | grep 8080 to know the status of 8080 ports.when it is listed someone is accessing the 8080 ports like this *.8080 *.* 0 0 64000 0 LISTEN 172.19.69.39.8080 172.19.50.20.1929 65535 0 64260 0 ESTABLISHED Please can anyone say how to kill the process of that particular ip who is accessing 8080 ports. Appreciate if anyone helps me. Regards, Shanmuga |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
netstat won't show you which processes have those connections open but lsof does.
The commandline you'll probably want is Code:
for pid in `lsof -i:8080 | grep '(ESTABLISHED)' | awk '{ print $2 }'` ; do kill $pid
lsof -i:8080 on it's own should be very informative too [edit]Oh, you want to target a given IP... I missed that bit on the first run through. For a particular IP, replace the '(ESTABLISHED)' bit with '->172.19.50.20' (for example) |
|
#3
|
|||
|
|||
|
can i get lsof manual entry and patch
|
|
#4
|
|||
|
|||
|
lsof isn't part of Solaris. You need to download it from freeware repositories or recompile it from the source.
Alternatively, you can use pfiles to figure out which process is using this port, eg: Code:
pfiles `ptree | awk '{print $1}'` | egrep '^[0-9]|port:' | grep -v "AF_INET6"
|
|
#5
|
||||
|
||||
|
pfiles can sometimes be a little hard on the system, I've seen it impact performance considerably. Might be better on later versions of solaris but it was pretty nasty on 8.
|
|
#6
|
|||
|
|||
|
I believe pfiles is suspending the target process for a short period of time. Isn't lsof doing the same ?
|
|
#7
|
||||
|
||||
|
Quote:
|
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|