Re: [SLUG] LSOF - is there a real-time GUI?
That (Internet socket) is lsof-specific definition. well, not really - sockets occupy a file descriptor like ordinary files do, so in effect it's seen as a file to a process - have a look in /proc/pid/fd/ to see what file descriptors sockets occupy How are you defining file? Would something that can be named using a UNIX path and can be opened with open(2) (i.e. not directories) satisfy you? I would say something that you read() and write() to UNIX-domain sockets, which are usually uninteresting, indeed occupy i-nodes on filesystems, but I'm not aware of a standard way to map network sockets ( e.g. TCP/UDP sockets) to filesystem names.Do you? (maybe there is some specialized linux filesystem which does this, but I don't see one on my system right now. already mentioned, but /proc/net/[tcp,udp] have this - you can use this file to translate the socket id from *the name of the file* /proc/pid/fd/socket[id] into a tcp/udp connection.. interestingly by using the inode field as the id :) The IPs and ports are written in hex, but you can decode them fairly easy -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] LSOF - is there a real-time GUI?
What I'm looking for - if it exists - is a GUI for LSOF that updates in real-time. Under Winblows ( some time ago now) I had such a tool - one that showed connected IP, port and program name. Don't remember what it was called. Is there such a program for Linux? I've googled and found many monitoring programs but haven't as yet found one that does what I want. I'm using Kubuntu 6.06 Dapper and Kubuntu 6.10 Edgy on a home LAN. Thanks in advance for URL's/program names etc. Bill -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] LSOF - is there a real-time GUI?
On 29/12/06, bill [EMAIL PROTECTED] wrote: What I'm looking for - if it exists - is a GUI for LSOF that updates in real-time. Under Winblows ( some time ago now) I had such a tool - one that showed connected IP, port and program name. Don't remember what it was called. I usually associate lsof with filesystem monitoring. What you are looking for sounds like netstat -p. Are you interested in filesystem or network connections? Whatever you want, I'm not aware of a GUI interface for such a tool off the top of my head. If you are after filesystem operations monitoring then maybe inotify-tools (http://inotify-tools.sourceforge.net/, also has a Debian package) could be something to start digging from. --P -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] LSOF - is there a real-time GUI?
On 12/29/06, Penedo [EMAIL PROTECTED] wrote: On 29/12/06, bill [EMAIL PROTECTED] wrote: What I'm looking for - if it exists - is a GUI for LSOF that updates in real-time. Under Winblows ( some time ago now) I had such a tool - one that showed connected IP, port and program name. Don't remember what it was called. I usually associate lsof with filesystem monitoring. What you are looking for sounds like netstat -p. Are you interested in filesystem or network connections? Whatever you want, I'm not aware of a GUI interface for such a tool off the top of my head. If you are after filesystem operations monitoring then maybe inotify-tools (http://inotify-tools.sourceforge.net/, also has a Debian package) could be something to start digging from. --P Under linux, sockets are files, so lsof does show sockets as well. If all you're interested in are the sockets and the processes holding them though, netstat -np will give you much faster response than using lsof. I've seen GUIs for netstat - I'm fairly sure Gnome comes with one as part of an app called Network Tools or something like that - but can't recall details offhand, and don't have a 'nix machine handy to look at. -- There is nothing more worthy of contempt than a man who quotes himself - Zhasper, 2004 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] LSOF - is there a real-time GUI?
On 29/12/06, Zhasper [EMAIL PROTECTED] wrote: Under linux, sockets are files, so lsof does show sockets as well. I know lsof can monitor also network connections but that's not because sockets are files. UNIX-domain sockets, which are usually uninteresting, indeed occupy i-nodes on filesystems, but I'm not aware of a standard way to map network sockets ( e.g. TCP/UDP sockets) to filesystem names. Do you? (maybe there is some specialized linux filesystem which does this, but I don't see one on my system right now. I think there used to be some attempts to map TCP and UDP ports under /dev/tcp and such but they died out on ages ago, at least on Linux. Maybe they still live on systems like Plan 9, Hurd and Ameoba). I've seen GUIs for netstat - I'm fairly sure Gnome comes with one as part of an app called Network Tools or something like that - but can't recall details offhand, and don't have a 'nix machine handy to look at. Looking at GNOME's Network Tools 2.14.2 (Debian Etch) it appears to be a simple interface to one-time execution of netstat, not even with an option to add the -p option. Cheers, --P -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] LSOF - is there a real-time GUI?
On Fri, Dec 29, 2006 at 11:24:23AM +1100, bill wrote: What I'm looking for - if it exists - is a GUI for LSOF that updates in real-time. Under Winblows ( some time ago now) I had such a tool - one that showed connected IP, port and program name. Don't remember what it was called. Is there such a program for Linux? The 'watch' command can turn simple text output commands into 'live' ones: watch netstat -nput works pretty well Or you could try ntop : http://www.ntop.org Matt -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] LSOF - is there a real-time GUI?
On 12/29/06, Penedo [EMAIL PROTECTED] wrote: On 29/12/06, Zhasper [EMAIL PROTECTED] wrote: Under linux, sockets are files, so lsof does show sockets as well. I know lsof can monitor also network connections but that's not because sockets are files. From the lsof man page: An open file may be a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream or a network file (Internet socket, NFS file or UNIX domain socket.) How are you defining file? UNIX-domain sockets, which are usually uninteresting, indeed occupy i-nodes on filesystems, but I'm not aware of a standard way to map network sockets ( e.g. TCP/UDP sockets) to filesystem names. Do you? (maybe there is some specialized linux filesystem which does this, but I don't see one on my system right now. I thought there might be something in /proc, but I can't see anything. -- There is nothing more worthy of contempt than a man who quotes himself - Zhasper, 2004 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] LSOF - is there a real-time GUI?
On 29/12/06, Zhasper [EMAIL PROTECTED] wrote: From the lsof man page: An open file may be a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream or a network file (Internet socket, NFS file or UNIX domain socket.) That (Internet socket) is lsof-specific definition. How are you defining file? Would something that can be named using a UNIX path and can be opened with open(2) (i.e. not directories) satisfy you? UNIX-domain sockets, which are usually uninteresting, indeed occupy i-nodes on filesystems, but I'm not aware of a standard way to map network sockets ( e.g. TCP/UDP sockets) to filesystem names. Do you? (maybe there is some specialized linux filesystem which does this, but I don't see one on my system right now. I thought there might be something in /proc, but I can't see anything. Me too. Tried to look around /proc, /dev and even /sys after your first reply but couldn't see anything except for /proc/net/{tcp,udp}, which don't really count do they (look like the source for netstat(8) output) ? Cheers, and Happy New Year --P -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] LSOF - is there a real-time GUI?
On 29/12/06, Matthew Hannigan [EMAIL PROTECTED] wrote: On Fri, Dec 29, 2006 at 11:24:23AM +1100, bill wrote: What I'm looking for - if it exists - is a GUI for LSOF that updates in real-time. Under Winblows ( some time ago now) I had such a tool - one that showed connected IP, port and program name. Don't remember what it was called. Is there such a program for Linux? The 'watch' command can turn simple text output commands into 'live' ones: watch netstat -nput works pretty well Indeed, though the original question was looking for a GUI solution for some reason :^). Or you could try ntop : http://www.ntop.org As far as I can see, ntop gives per-host statistics, it doesn't break things down to the local program names. Cheers, --P -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] LSOF - is there a real-time GUI?
On Fri, Dec 29, 2006 at 03:13:13PM +1100, Penedo wrote: On 29/12/06, Matthew Hannigan [EMAIL PROTECTED] wrote: On Fri, Dec 29, 2006 at 11:24:23AM +1100, bill wrote: What I'm looking for - if it exists - is a GUI for LSOF that updates in real-time. Under Winblows ( some time ago now) I had such a tool - one that showed connected IP, port and program name. Don't remember what it was called. Is there such a program for Linux? The 'watch' command can turn simple text output commands into 'live' ones: watch netstat -nput works pretty well Indeed, though the original question was looking for a GUI solution for some reason :^). I deem tuis to be guis :-) It all comes down to dots of light on a screen Or you could try ntop : http://www.ntop.org As far as I can see, ntop gives per-host statistics, it doesn't break things down to the local program names. Ah true nuff. Something based on inotify or similar must be around somewhere -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] LSOF - is there a real-time GUI?
On 29/12/06, Matthew Hannigan [EMAIL PROTECTED] wrote: Something based on inotify or similar must be around somewhere That was exactly what I though when I read Bill's original question (after all, Bill mentioned lsof) but it looks like Bill is interested in network traffic and inotify only handles, well, i-nodes (i.e. things that can be found on the file system hierarchy) and not network stuff. Cheers, --P -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] LSOF - is there a real-time GUI?
All in all, if you have Ruby installed, you can always use the builtin GUI for lsof. Just run: $ ruby -rtk -e 'r=TkRoot.new{titleLSOF GUI};t=TkText.new(r);t.pack;u=Thread.start{loop{t.value=`sudo lsof`;sleep 2}};Tk.mainloop' In a single line, of course. Happy new year. f/p On 12/29/06, Penedo [EMAIL PROTECTED] wrote: On 29/12/06, Matthew Hannigan [EMAIL PROTECTED] wrote: Something based on inotify or similar must be around somewhere That was exactly what I though when I read Bill's original question (after all, Bill mentioned lsof) but it looks like Bill is interested in network traffic and inotify only handles, well, i-nodes (i.e. things that can be found on the file system hierarchy) and not network stuff. Cheers, --P -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html -- Julio C. Ody http://rootshell.be/~julioody -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html