cyamamot@castor.usc.edu (Cliff Yamamoto) (06/16/89)
Hello
I'm trying to write a program which can monitor the values of the
numerical variables of another program in "almost" real-time. I've looked
into 'ptrace' and shared memory but I think I'd like to use sockets.
My problem is just trying to get a darn socket-demo program to
work. I'm using an example from "The Design of the Unix Operating System"
by Maurice J. Bach - AT&T press pp. 383.
Some questions :
Is the 'server' supposed to run in background/foreground?
Is the 'client' supposed to run in background/foreground?
(In general, how are what needs to be done to run the 'server' and 'client'?)
>>>> Can someone *please* send my any kind of working 'socket' demo between
two processes? (we're using BSD 4.3 on Sun 3/260s - Sun OS 4.0) <<<<
I'm not sure if my programs are faulty or if the way I'm trying to execute
them is faulty. If someone thinks there is a better way to go than using
sockets, please let my know. But is must be portable, so I can't use Sun's
dbx or dbxtools and ptrace can't handle forks within a program and shared
memory seems to imply shared variable types, which my monitor program and
target program obviously won't have.
Thanks again!!
Cliff Yamamoto
libes@cme.nbs.gov (Don Libes) (06/20/89)
In article <4107@merlin.usc.edu> cyamamot@castor.usc.edu (Cliff Yamamoto) writes: > I'm trying to write a program which can monitor the values of the >numerical variables of another program in "almost" real-time. I've looked >into 'ptrace' and shared memory but I think I'd like to use sockets. I wrote a shared-variable interface which uses the BSD socket stuff underneath. It was designed to do exactly the stuff you describe. It was written up in the USENIX Winter '85 proceedings. If you are interested, you can ftp it from durer.cme.nist.gov. Retrieve the directory ~ftp/pub/cm. The paper is included along with lots of examples. Even if you don't use it, the code includes a nice library for making client/server modules a snap. All public-domain. Don Libes libes@cme.nbs.gov ...!uunet!cme-durer!libes