Command line utilities against a resource manager...

Hi!

I am wondering if some of you have an example of how to get a resource
manager respond via an ASCII text dump to the console if for example a
command like this were executed: “cat /proc/asistat”.

In the QNX documentation it says that this is possible, but there are no
examples of this usage. What kind of message shall the resource manager
respond to when a request is performed on the /proc/asistat file.

asistat is only an example in this case.

Regards,
Oystein Solvberg

Oystein Solvberg <oystein.solvberg@telenor.com> wrote:

Hi!

I am wondering if some of you have an example of how to get a resource
manager respond via an ASCII text dump to the console if for example a
command like this were executed: “cat /proc/asistat”.

In the QNX documentation it says that this is possible, but there are no
examples of this usage. What kind of message shall the resource manager
respond to when a request is performed on the /proc/asistat file.

asistat is only an example in this case.

Are you asking the general question of “what happens to a resource manager
when ‘cat’ asks it for output” ?

cat basically does open()/read()/read()…/close()

So, your resource manager will get _IO_CONNECT (open()) message, followed by
_IO_READ (read()) messages, followed by a close message.

you will therefore need to set up a handler for the _IO_READ message.

Check out www.parse.com/books/download.html for some sample code from the
QNX/Neutrino 2 book…

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.

Oystein Solvberg <oystein.solvberg@telenor.com> wrote in article <ae4esb$mt2$1@inn.qnx.com>…

respond to when a request is performed on the /proc/asistat file.

Why did you have chosen the /proc directory for resmgr’s path?

Eduard.
ed1k at ukr dot net

Thanks, but it’s not the way the cat program opens and then reads from a
file I want to know. I know that under Unix systems for example, the /proc
filesystem is a special filesystem where the kernel updates special files?
with information, for example version, time, pci listings etc. /proc is a
pseudo filesystem used as an interface to kernel data structures.

Qnx microkernel seems to do the same? So if the resource manager that I
write can register itself the with the kernel /proc functionality and
respond with an ascii dump of internal resource manager status that would be
great.

It’s called command line utility at page 3 in “Writing a resource manager”
in the QNX documentation.

Regards,
Oystein Solvberg

Robert Krten <nospam88@parse.com> wrote in message
news:ae4ul8$4d0$1@inn.qnx.com

Oystein Solvberg <> oystein.solvberg@telenor.com> > wrote:
Hi!

I am wondering if some of you have an example of how to get a resource
manager respond via an ASCII text dump to the console if for example a
command like this were executed: “cat /proc/asistat”.

In the QNX documentation it says that this is possible, but there are no
examples of this usage. What kind of message shall the resource manager
respond to when a request is performed on the /proc/asistat file.

asistat is only an example in this case.

Are you asking the general question of “what happens to a resource manager
when ‘cat’ asks it for output” ?

cat basically does open()/read()/read()…/close()

So, your resource manager will get _IO_CONNECT (open()) message, followed
by
_IO_READ (read()) messages, followed by a close message.

you will therefore need to set up a handler for the _IO_READ message.

Check out > www.parse.com/books/download.html > for some sample code from the
QNX/Neutrino 2 book…

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.

Well, I though that on a QNX system process information (via the
microkernel) are stored in this directory.

All processes has their own mapping to this directory. I would like to
register maybe via the microkernel a name under the /proc, /proc is a pseudo
filesystem used as an interface to kernel data structures and have the
resource manager update the content in this special file file.

I think this is possible?

Regards,
Oystein Solvberg

ed1k <ed1k@spamerstrap.com> wrote in message
news:01c21151$2d063580$106fa8c0@ED1K…

Oystein Solvberg <> oystein.solvberg@telenor.com> > wrote in article
ae4esb$mt2$> 1@inn.qnx.com> >…
respond to when a request is performed on the /proc/asistat file.

Why did you have chosen the /proc directory for resmgr’s path?

Eduard.
ed1k at ukr dot net