[Previous]
[Contents]
[Next]

qnx_osstat()

get the status of the node with the given ID

Synopsis:

#include <sys/osstat.h>
int qnx_osstat( nid_t nid, 
                struct _osstat *osdata );

Description:

The qnx_osstat() function returns status information of the node indicated by nid. This information can be used to determine how busy a node is at each priority level.

The _osstat structure contains at the least the following members:

short unsigned cpu_ready[32]
The number of processes ready to execute at each priority level.
short unsigned cpu_load[32]
The average processor load at each priority level.

The period over which the cpu_load is averaged is set by the sac utility. The numbers are relative to each other (see the example).

Returns:

0
Success
-1
An error occurred; errno is set to indicate the error.

Errors:

Any errno value that can be set by qnx_vc_attach() may be set, as well as the following:

ESRCH
Unable to connect to the indicated node.

Examples:

See /usr/free/qnx4/os/utils/misc/os_info.tgz.


Note: This file is provided as a sample implementation for reference purposes only.

Classification:

QNX

Safety:
Interrupt handler No
Signal handler Yes, but modifies errno
Thread Yes

See also:

errno, qnx_osinfo(), qnx_psinfo()


[Previous]
[Contents]
[Next]