dg_csfctl(2) SDK R4.11 dg_csfctl(2)
NAME
dgcsfctl - control class scheduling on the current node
SYNOPSIS
#include <sys/dgcsfctl.h>
int dgcsfctl (unsigned int cmd, void *arg);
where:
cmd Specifies a particular operation for dgcsfctl to perform.
arg The address of an information packet by cmd.
DESCRIPTION
Use dgcsfctl to modify/enable/disable node class scheduling on the
current node. The class scheduling operation is determined by cmd.
Additional information needed to support the command is pointed to by
arg. Operations done on one node will not affect any other nodes.
The various commands and and the types of their corresponding
arguments packets are described in <sys/dgcsfctl.h>.
The commands you can specify are as follows:
DG_CSFCTL_UPDATE_CIB
Use this command to update the node's class scheduling
database. Arg will point to a dgcsfcontrolblocktype (see
<sys/dgcsfctl.h>). The version of the new database,
specified in the cibversion field of the
dgcsfcontrolblocktype structure, must be the successive
value of the current database version [see dgcsfinfo(2) to
get the current database version].
DG_CSFCTL_ENABLE_NODE_CSF
Use this command to enable class scheduling. Arg is not used.
DG_CSFCTL_DISABLE_NODE_CSF
Use this command to disable class scheduling. Arg is not
used.
DG_CSFCTL_REHASH
Use this command to rehash the class scheduling database.
Arg is not used. Rehashing the database will re-evaluate the
program pathname component for any class instance. The
pathname is converted to a unique file identifier that allows
any path to the program to result in the same unique file
identifier. If the program is modified or replaced, the
unique file identifier will change and cause any instances
that contained the old unique file identifier to become stale
(the replaced/modified program will no longer satisfy the
pathname component of the instance). Rehashing the database
will update the unique file identifier to its latest value.
DG_CSFCTL_RESYNC
Use this command to remove all class scheduling classes and
instances. Arg points to an unsigned integer to
resynchronize the class scheduling database version number
to.
DG_CSFCTL_SET_GMT_OFFSET
Use this command to set the Greenwich Mean Time offset used
to evaluate class constraints. Arg points to a signed
integer that represents the number of seconds to adjust the
system GMT by when evaluating class constraints [see
dgcsfinfo(2) to get the current GMT offset].
DG_CSFCTL_SET_LOCAL_EXEC_DEPTH
Use this command to set the local execution depth for the
current process. Arg points to an unsigned integer that will
be the new local execution depth. A local execution depth
greater than one will prevent class scheduling from
redirecting an exec(2) done by the process to another node.
The local execution depth of a process is decremented by one
(provided it is greater than zero) each time the process does
a successful exec(2). A new process inherits its local
execution depth from its parent at fork(1) time [see
dgprocessinfo(2) to get the local execution depth for a
process].
ACCESS CONTROL
Any user may execute the DGCSFCTLSETLOCALEXECDEPTH command.
To do the DGCSFCTLUPDATECIB, DGCSFCTLENABLENODECSF,
DGCSFCTLDISABLENODECSF, DGCSFCTLREHASH, DGCSFCTLRESYNC, or
DGCSFCTLSETGMTOFFSET commands you must have appropriate
privilege. On a generic DG/UX system, appropriate privilege is
granted by having an effective UID of 0 (root). See the
appropriateprivilege(5) man page for more information.
On a system with DG/UX information security, appropriate privilege is
granted by having one or more specific capabilities enabled in the
effective capability set of the user. See capdefaults(5) for the
default capabilities for this command.
RETURN VALUE
0 Successful completion.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EPERM The caller does not have appropriate privilege.
EINVAL Cmd is not one of the valid commands.
EINVAL For the DGCSFCTLUPDATECIB command a component of the
packet pointed to by arg is invalid.
ENOMEM There was insufficient kernel memory to execute cmd.
EFAULT Arg or a pointer in the packet points to an invalid address.
EAGAIN The node could not be enabled because resources are
temporarily unavailable.
ENOPKG Clusters is not configured for the node.
SEE ALSO
dgcsfinfo(2), dgcsfclassinfo(2), dgcsfclassinfo(2),
dgprocessinfo(2), exec(2), fork(2).
Licensed material--property of copyright holder(s)