cg_info(S)
cg_info --
get information about a CPU-Group
Synopsis
#include <sys/cguser.h>
int cg_info(
cgid_t cgid,
cginfo_t *infop);
Description
cg_info obtains information about a single CPU-Group
in the system. The cgid parameter specifies the
CPU-Group for which information is to be returned; the special value
CG_CURRENT may be used as shorthand for the caller's
current CPU-Group.
The information is returned in the cginfo_t structure pointed to
by infop. This structure contains the following fields:
int cg_state
-
Either CG_ONLINE or CG_OFFLINE. If the
CPU-Group is offline, the other fields are meaningless.
memsize_t cg_near_mem
-
Size of near memory in bytes.
Note that on some machines it may be possible for physical memory sizes
to be larger than the natural data sizes of the processor. A
memsize_t on such a machine may be a long long quantity.
memsize_t cg_far_cache
-
Size of any far memory cache on the CPU-Group. Some machines
will have hardware that is capable of cacheing the contents of far memory.
A large far memory cache can partially hide the costs of using far memory.
long cg_ncpus_config
-
The number of CPUs configured (the total of online and offline
CPUs for the CPU-Group). Note that
not all hardware configurations will have equal numbers of CPUs
on each CPU-Group.
long cg_ncpus_online
-
Number of CPUs online for the CPU-Group.
Return values
On success, cg_info returns 0.
On failure, cg_info returns -1 and sets
errno to indicate the error:
[EFAULT]-
the infop pointer points to an invalid memory address.
[EINVAL]-
cgid does not refer to an existing CPU-Group.
[ENOSYS]-
the cg_info call is not supported by the system.
References
cg_ids(S)
cg_info(S)
sysconf(S)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005