don@BRILLIG.UMD.EDU (Don Hopkins) (05/10/89)
Has anybody written a program to monitor NeWS network connections, that runs in the server? Sort of like newsmon, and sort of like Brett's security popup. A NeWS process could listen on socket 2001, created with "(%socketl2001) (r) file", and wait for connections. When it gets a connection, it calls "acceptconnection" and forks off another process to serve that connection. The 2001 server process would open *another* socket to regular old port 2000, with "(%socketc2000) (w) file", and copy data back and forth. (You'd have to fork a process for each direction. Note: don't depend on bytesavailable being right when it says 0.) Each server process could put up a control panel, with stuff like a scrolling, decoded (i.e. un-CPS-byte-encoded) log of the information passing in each direction, total byte counts, connection age, average bytes/second, remote host name, maybe optional scrolling graphs of various statistics over time, or a histogram showing the number of occurances of each character. Another nice feature would be a way to put a stopper in the stream in either direction (and a way to make new connections come up initially stopped), and a display of the buffered data behind the stopper. Press a button to drip one character through, or a certian number of characters, or to unstop the connection. Open the stopper just a little bit to drip characters through slowly. How about a way to insert strings and arbitrary bytes into the stream in either direction, in front of or behind the stopper? And a search feature where the stream would flow until a certain character (i.e. newline), or a pattern was encountered! If anybody has or makes such a beast, I sure hope they give it away free, because it could help solve a lot of problems! -Don
siegel@hc.DSPO.GOV (josh Siegel) (05/11/89)
I have something similer I use for debugging. It doesn't do All those tricks but I could add them. I will bring them to usenix and let you play with them. Also, who on this list is going to NeWSnix?! We need to get together and have a party. Who from sun is going to be there? Are all the big-wigs gonna come? Also, don, what machines are we going to have this time? Should I bring a "terminal"? --Josh -- Josh Siegel (siegel@hc.dspo.gov) "Oh well.. I guess I will just bury my guns... sigh.. " - Standard Gun Owner