From: lpc@dickens.com (Luis P Caamano)
Subject: Re: System Resource Controller (SRC) probelm
Date: Fri, 2 Oct 1992 13:49:49 GMT
Organization: Dickens Data Systems, Inc.
Keywords: SRC, subsystem, mkssys, startsrc

In article <22921@duke.cs.duke.edu> ingram@cs.duke.edu writes:
>I have been trying to use startsrc to run a locally-modified version
>of rwhod on an RS6000 under AIX 3.2. The source code, which was previously
>used on DEC (VAX & PDP-11), i386 & Sun platforms, compiled with
>minimal prodding. The problem is that the SRC refuses to recognize
>the executing rwhod process as an active subsystem. Here are the 
>commands that I give to (supposedly) start the subsystem:
>

First, does your modified rwhod supports SRC?  

>lem# mkssys -s in.rwhod -p /usr/local/etc/in.rwhod -u 0 -G tcpip

If not, then you need to add the -S option to specify that your
program is going to use signals as the communication method
with the srcmstr.  The default is -K which uses unix domain
sockets as the communication method.  In that mode, srcmstr sends
packets to the subsystem standard input (not necessarily, but
that's the default). Check the example in the mkssys info page
for adding a subsystem using signals (there are some other flags
in addition to -S).

When you issue a stopsrc command, if the communication method is
socket, the srcmstr daemon sends a STOP packet via a socket.  On
the other hand, if the communication method is signals, the
srcmstr will send the appropiate signal.  When srcmstr sees that
the subsystem communicates through signals, it knows that
some things will not be supported. 

>0513-071 The in.rwhod Subsystem has been added.
>lem# lssrc -s in.rwhod
>Subsystem         Group            PID     Status 
> in.rwhod         tcpip                    inoperative
>lem# startsrc -s in.rwhod -a "-b -t"
>0513-059 The in.rwhod Subsystem has been started. Subsystem PID is 16826.
>lem# lssrc -p 16826
>Subsystem         Group            PID     Status 
>lem# lssrc -l -s in.rwhod
>0513-036 The request could not be passed to the in.rwhod subsystem.
>Start the subsystem and try your command again.

The -l option only works if your subsystem (rwhod) supports the
long listing and use sockets.  Actually, it is your program who 
prints the long listing.

>lem# lssrc -s in.rwhod
>Subsystem         Group            PID     Status 
> in.rwhod         tcpip                    inoperative
>lem# ps g | grep in.rwhod
>12731      - S     0:00 /usr/local/etc/in.rwhod -b -t
>lem# 
>

That's because srcmstr timed out on the socket.

>Replies via e-mail and posting to comp.unix.aix both accepted. I hope that the
>only answer does not turn out to be "It is illegal to add your own subsystems
>under AIX." I have poured over the info pages related to the SRC, and everything
>it says to do, I have done; yet no subsystem! If there is enough interest
>in the SRC & useful answers come in, I will summarize.
>

Yes you can, but the information is not complete, and as you
said, it looks like it's supposed to be available to the user.
However, I have found that very few people know about SRC
including programmers in IBM. 

>--
>Department of Computer Science, Duke University, Durham, NC 27706
>Internet:	ingram@cs.duke.edu    (Robert Ingram)
>UUCP:		mcnc!duke!ingram


-- 
---------------------------------------------------------------------------
Luis P. Caamano                    |         lpc@dickens.com
Dickens Data Systems, Inc.         |         uunet!dickens.com!lpc
Atlanta, GA                        |         (404) 475-8860
---------------------------------------------------------------------------
If I think I know it all, I'll stop learning. -myself
The more I learn, the more I know I know nothing. -somebody else
Newsgroups: comp.unix.aix