<s>
The	O
envsys	B-Device
framework	O
is	O
a	O
kernel-level	O
hardware	B-Application
monitoring	I-Application
sensors	O
framework	O
in	O
NetBSD	B-Device
.	O
</s>
<s>
,	O
the	O
framework	O
is	O
used	O
by	O
close	O
to	O
85	O
device	B-Application
drivers	I-Application
to	O
export	O
various	O
environmental	O
monitoring	O
sensors	O
,	O
as	O
evidenced	O
by	O
references	O
of	O
the	O
sysmon_envsys_register	O
symbol	O
within	O
the	O
sys	O
path	O
of	O
NetBSD	B-Device
;	O
with	O
temperature	O
sensors	O
,	O
ENVSYS_STEMP	O
,	O
being	O
the	O
most	O
likely	O
type	O
to	O
be	O
exported	O
by	O
any	O
given	O
driver	O
.	O
</s>
<s>
Sensors	O
are	O
registered	O
with	O
the	O
kernel	B-Operating_System
through	O
sysmon_envsys(9 )	O
API	O
.	O
</s>
<s>
Consumption	O
and	O
monitoring	O
of	O
sensors	O
from	O
the	O
userland	O
is	O
performed	O
with	O
the	O
help	O
of	O
envstat	B-Device
utility	O
through	O
proplib(3 )	O
through	O
ioctl(2 )	O
against	O
the	O
/dev/sysmon	B-Device
pseudo-device	B-Application
file	O
,	O
the	O
powerd	O
power	O
management	O
daemon	B-Operating_System
that	O
responds	O
to	O
kernel	B-Operating_System
events	O
by	O
running	O
scripts	O
from	O
/etc/powerd/scripts/	O
,	O
as	O
well	O
as	O
third-party	B-General_Concept
tools	O
like	O
symon	O
and	O
GKrellM	B-Language
from	O
pkgsrc	B-Application
.	O
</s>
<s>
The	O
framework	O
allows	O
the	O
user	O
to	O
amend	O
the	O
monitoring	O
limits	O
specified	O
by	O
the	O
driver	O
,	O
and	O
for	O
the	O
driver	O
to	O
perform	O
monitoring	O
of	O
the	O
sensors	O
in	O
kernel	B-Operating_System
space	O
,	O
or	O
even	O
to	O
programme	O
a	O
hardware	O
chip	O
to	O
do	O
the	O
monitoring	O
for	O
the	O
system	O
automatically	O
.	O
</s>
<s>
If	O
limit	O
thresholds	O
are	O
crossed	O
,	O
a	O
kernel	B-Operating_System
event	O
may	O
be	O
generated	O
,	O
which	O
can	O
be	O
caught	O
in	O
the	O
userland	O
by	O
powerd	O
to	O
execute	O
a	O
pre-defined	O
user	O
script	O
.	O
</s>
<s>
By	O
comparison	O
,	O
in	O
OpenBSD	B-Operating_System
's	O
hw.sensors	B-Application
,	O
the	O
monitoring	O
of	O
user-defined	O
values	O
is	O
performed	O
in	O
userspace	O
by	O
sensorsd	B-Application
.	O
</s>
<s>
,	O
the	O
framework	O
itself	O
does	O
not	O
facilitate	O
computer	B-Device
fan	I-Device
control	I-Device
,	O
although	O
the	O
drivers	O
could	O
still	O
implement	O
interfacing	O
with	O
the	O
fan-controlling	O
capabilities	O
of	O
their	O
chips	O
through	O
other	O
means	O
,	O
for	O
example	O
,	O
through	O
a	O
driver-specific	O
sysctl	B-Application
interface	O
,	O
which	O
is	O
the	O
approach	O
taken	O
by	O
the	O
dbcool(4 )	O
driver	O
.	O
</s>
<s>
However	O
,	O
the	O
drivers	O
for	O
the	O
most	O
popular	O
Super	B-Device
I/O	I-Device
chips	O
like	O
lm(4 )	O
and	O
itesio(4 )	O
do	O
not	O
implement	O
any	O
fan	B-Device
control	I-Device
at	O
all	O
(	O
in	O
fact	O
,	O
historically	O
,	O
in	O
all	O
of	O
OpenBSD	B-Operating_System
,	O
NetBSD	B-Device
and	O
DragonFly	O
,	O
these	O
drivers	O
do	O
n't	O
even	O
report	O
the	O
duty	O
cycle	O
of	O
the	O
fans	O
—	O
only	O
the	O
actual	O
RPM	O
values	O
are	O
reported	O
)	O
.	O
</s>
<s>
The	O
framework	O
undergone	O
two	O
major	O
revisions	O
:	O
the	O
first	O
version	O
of	O
envsys.h	O
was	O
committed	O
on	O
;	O
with	O
envsys.4	O
man	B-Protocol
page	I-Protocol
following	O
on	O
.	O
</s>
<s>
Between	O
2000	O
and	O
2007	O
,	O
the	O
manual	B-Protocol
page	I-Protocol
for	O
envsys(4 )	O
in	O
NetBSD	B-Device
stated	O
that	O
the	O
"	O
API	O
is	O
experimental	O
"	O
,	O
and	O
that	O
the	O
"	O
entire	O
API	O
should	O
be	O
replaced	O
by	O
a	O
sysctl(8 )	O
"	O
,	O
"	O
should	O
one	O
be	O
developed	O
"	O
;	O
it	O
can	O
be	O
noted	O
that	O
in	O
2003	O
this	O
was	O
the	O
exact	O
approach	O
taken	O
by	O
OpenBSD	B-Operating_System
with	O
sysctl	B-Application
hw.sensors	B-Application
when	O
some	O
of	O
the	O
envsys(4 )	O
drivers	O
were	O
ported	O
to	O
OpenBSD	B-Operating_System
.	O
</s>
<s>
The	O
serialisation	O
with	O
userland	O
was	O
reimplemented	O
using	O
property	B-Application
lists	I-Application
with	O
the	O
help	O
of	O
NetBSD	B-Device
's	O
new	O
proplib(3 )	O
library	O
(	O
the	O
underlying	O
transport	O
layer	O
between	O
the	O
kernel	B-Operating_System
and	O
userland	O
still	O
being	O
done	O
through	O
ioctl	B-Operating_System
)	O
.	O
</s>
<s>
The	O
envsys	B-Device
framework	O
was	O
the	O
precursor	O
to	O
OpenBSD	B-Operating_System
's	O
sysctl	B-Application
hw.sensors	B-Application
framework	O
in	O
2003	O
,	O
and	O
many	O
drivers	O
,	O
as	O
well	O
as	O
some	O
sensor	O
types	O
,	O
have	O
been	O
ported	O
back	O
and	O
forth	O
between	O
NetBSD	B-Device
and	O
OpenBSD	B-Operating_System
.	O
</s>
<s>
Support	O
for	O
sensors	O
of	O
drive	O
type	O
has	O
been	O
added	O
to	O
NetBSD	B-Device
on	O
,	O
similar	O
to	O
drive	O
type	O
in	O
OpenBSD	B-Operating_System
,	O
which	O
was	O
at	O
the	O
same	O
time	O
when	O
bio(4 )	O
and	O
bioctl	B-Device
were	O
ported	O
from	O
OpenBSD	B-Operating_System
to	O
NetBSD	B-Device
.	O
</s>
