Subject: Re: closing Script MIB issues

From: Frank Strauss <[email-masked]>
Date: 06 Apr 2000 16:08:04 +0200

JQ> Anyway, I also like the idea of just adding a PID (smRunPID)
JQ> to the run table. This is leaner and easier to implement, and
JQ> it still provides sufficient means to retrieve the
JQ> performance information as long as you also have support of
JQ> the Host Resources MIB or another suited MIB.

JS> Fine. What do others think? Making the PID of the runntime system
JS> accessible is IMHO relatively easy to implement (and may actually be
JS> useful for debugging purposes) and it allows us to use the
JS> HOST-RESOURCES-MIB or the APPLICATION-MIB to obtain performance
JS> statistics without having to reinvent the wheel.

I assume you suggest to use the PID of that process that reflects
`best' the identity of the running script, hence a thread's PID if
it's available, otherwise the RTE's PID, only if the running scripts
cannot be distinguished.

Is this really easy to implement? Just some questions:

- Should the agent try to find out what the `right' PID seems to be? or

- Should SMX be enhanced to report a PID back in the 231 response on
  the start command?

- How can a Java RTE detect whether green threads are used?

- If green threads are used, how can we determine the `right' PID?

- How can PIDs be retrieved in Java at all?

- What is the `right' PID if a script spawns more threads, when we think
  about using a PID to identify resource consumption?

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 6 Apr 2000 16:59:27 +0200

>>>>> Frank Strauss writes:

Frank> I assume you suggest to use the PID of that process that
Frank> reflects `best' the identity of the running script, hence a
Frank> thread's PID if it's available, otherwise the RTE's PID, only
Frank> if the running scripts cannot be distinguished.

No, I was thinking about exporting the PID of the runtime system
process only. That is, all threads running in the same runtime system
will return the same PID (regardless on which thread implementation
you are executing).

Sure, this means that you only get resource usage statistics per
runtime engine. Depending on your OS, these numbers may be what you
are looking for. However, on things like linux, these numbers are
probably not really what you expect since CPU usage is I think not
accumulated in the PID of the main thread. If we return the thread's
PID where it is available, then you are correct that this requires an
updated to the SMX protocol and more or less tricky code in the
runtime engine and it is possible to hide resource consumption by
creating new threads. The only answer to this would be to return the
list of PIDs for all threads created from a thread executing a script,
which gets a bit too complicated for my taste.

/js

-- 
Juergen Schoenwaelder      Technical University Braunschweig
<[email-masked]>  Dept. Operating Systems & Computer Networks
Phone: +49 531 391 3289    Bueltenweg 74/75, 38106 Braunschweig, Germany
Fax:   +49 531 391 5936    <URL:http://www.ibr.cs.tu-bs.de/~schoenw/>