1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
.\"
.\" This file and its contents are supplied under the terms of the
.\" Common Development and Distribution License ("CDDL"), version 1.0.
.\" You may only use this file in accordance with the terms of version
.\" 1.0 of the CDDL.
.\"
.\" A full copy of the text of the CDDL should have accompanied this
.\" source. A copy of the CDDL is also available via the Internet at
.\" http://www.illumos.org/license/CDDL.
.\"
.\"
.\" Copyright 2019 Joyent, Inc.
.\"
.Dd August 28, 2021
.Dt SYSEVENTS 3SYSEVENT
.Os
.Sh NAME
.Nm sysevents
.Nd list of system events generated by the platform
.Sh SYNOPSIS
.In sys/sysevent/eventdefs.h
.Sh DESCRIPTION
System events are events that are generated by the operating system to
indicate that something has occurred that may be of interest to user
land.
These notifications are asynchronous from the event themselves and
depending on the event, may be lossy.
That is, the kernel may opt not to generate an event in the face of
memory pressure.
Currently, every generated event should make it to consumers.
.Pp
Events are broken into classes such as ZFS, FMA, PCIe, and others.
Classes are further broken down into subclasses.
Specific events may also have more detailed payload which is available
as name-value pairs.
For more information on subscribing to events, classes, and payloads,
please see
.Xr sysevent_subscribe_event 3SYSEVENT ,
.Xr sysevent_get_attr_list 3SYSEVENT ,
and
.Xr libnvpair 3LIB .
.Pp
Most system events are currently logged to the FMA information log which
can be retrieved with the
.Ar -I
option to the
.Xr fmdump 1M
command.
.Sh EVENTS
This section contains a list of some of the events that are generated by
the system, but it is not exhaustive.
The names of events are macros that the system provides.
The payload member name is generally a macro and its corresponding type
is provided, along with a brief description.
Unless otherwise noted, it should be assumed that the event and its
payload is private to the system and may change at any time.
.Pp
The following events belong to the class
.Dv EC_DATALINK :
.Bl -tag -width Dv
.It Dv ESC_DATALINK_LINK_STATE
This event fires any time a data link
.Pq see Xr dladm 1M
changes its state.
This may occur because a physical cable was inserted or removed from a
network adapter or because something has changed on a virtual adapter
such as a VNIC.
The event has the following payload:
.Bl -tag -width Dv
.It Dv DATALINK_EV_LINK_NAME - String
Indicates the name of the data link that had the event.
.It Dv DATALINK_EV_LINK_ID - int32
Indicates the data link's logical ID that is used by the kernel.
.It Dv DATALINK_EV_ZONE_ID - int32
Indicates the ID of the zone that the data link belongs to.
.El
.El
.Sh INTERFACE STABILITY
While the library interface in
.Xr libsysevent 3LIB
is committed, unless otherwise indicated the events, classes, their
payloads, are private and subject to change at any time.
.Sh SEE ALSO
.Xr libnvpair 3LIB ,
.Xr libsysevent 3LIB ,
.Xr sysevent_get_attr_list 3SYSEVENT ,
.Xr sysevent_subscribe_event 3SYSEVENT
|