Download this video: [
Ogg Theora]
Video by Colby Hoke. Produced by Jim Haverkamp.
We bring the advice of experts straight from San Diego to your desktop.
Red Hat Summit 2007 collected hundreds of Linux users all in one place–many of them experienced Red Hat Certified Engineers® (RHCE). And somewhere between all those smart people walking around–and our video crew shooting footage–the idea for some video tips was born.
This first tip is from Chad Lucas. Look for more in the coming weeks.
The information provided in this article is for your information only. The origin of this information may be internal or external to Red Hat. While Red Hat attempts to verify the validity of this information before it is posted, Red Hat makes no express or implied claims to its validity.
This entry was posted by the editorial team
on Tuesday, June 12th, 2007 at 5:33 pm and is filed under tips and tricks, multimedia.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
June 14th, 2007 at 5:03 am
lsof - old school ??, what other tool would one use to list open files. I think Chad should re-read the lsof man page. He would discover that lsof can filter the file type for socket connections (and even a particular socket type and port) and can provide the pid (or ppid).
The output of this can then be sent to kill by way of backquotes (as in the example in the lsof man page.
In short Chad has made a simple problem complicated.
June 15th, 2007 at 8:29 am
You can also add -p to netstat (eg. “netstat -nap”).
June 15th, 2007 at 7:51 pm
Smitty:
maybe you could provide us an example of your simplified process. You know, for us K-12 schoolers that are still RHCTs.
Thanks!
John
June 17th, 2007 at 6:17 pm
John - as a trivial example:
imagine you want to kill anything listening on TCP port 80
kill -HUP `lsof -t -i TCP:80`
I won’t be wiping your nose for you, though.
RTFMP
June 22nd, 2007 at 1:34 pm
Nice tip… I rebooted last time… I didn’t think of lsof off the top of my head… live and learn…
Thanks,
dm
June 23rd, 2007 at 8:14 am
A great command with many features .
[root@homepc ~]# ss -h
Display the listening sockets including process and its PID in numeric format :
[root@homepc ~]# ss -n -p -l
Then use kill -HUP [PID] to stop the service .
Regards