Computer Science
KERNELD(8) Linux Extensions KERNELD(8)
NAME
kerneld - perform kernel action in user space (such as on-
demand loading of modules)
SYNOPSIS
kerneld [ debug ] [ keep ] [ delay=<seconds> ] [
type=<message number> ]
DESCRIPTION
Apart from automatically removing unused modules, kerneld
also performs specific kernel tasks in user space by
responding to requests from the kernel via a dedicated IPC
message queue. Access to this queue can be made from user
space by opening the queue with:
qid = msgget(IPC_PRIVATE, 0600 | IPC_KERNELD);
A specific task is requested with the message type, as
specified in <linux/kerneld.h>.
The structure of a kerneld message is:
struct kerneld_msg {
long mtype;
long id;
char text[1];
};
where the id field is used as the number of the response
message from kerneld back to the kernel. If the id field
is zero, there will be no response from kerneld.
(Note that a new structure is proposed that will include
the pid of the requestor into the protocol header.)
If a response was requested, the exit status of the ker-
neld action will be stored in the id field.
The text field us used to hold the parameters from the
kernel to the specified kerneld action. In return mes-
sages, this field can contain the output from the action,
to be used (if wanted) by the kernel.
The options are as follows:
debug Whith debugging enabled, you will be able to see
the current status of kerneld as it performs its
tasks. Note that you can control debugging, as
well as all the other parameters via the utility
kdstat.
keep The keep option makes kerneld ignore all requests
for unloading modules. This option might be
usable for systems where the modules should never
be unloaded at all (for some reason or other).
This option also inhibits the automatic removal of
unused modules that kerneld performs every minute
(or <delay> seconds).
delay=<seconds>
The delay option will change the timeout in ker-
neld for delayed removal of modules from the
default 60 seconds to whatever the choice was.
type=<message type>
The default type is -255, which means that kerneld
will listen for all messages where the type is
less than or equal to 255. If a positive number
is given, kerneld will only listen for that mes-
sage type.
kerneld sends error messages to the syslog facility
LOG_DAEMON.
SEE ALSO
insmod(1), rmmod(1), modprobe(1), depmod(1), syslogd(8)
HISTORY
The kerneld support was inspired by discussions with
Jacques Gelinas <jack@solucorp.qc.ca>
Linux May 14, 1995 1
Back to the index