ArticleslgStudy

computer science

Envsys

Envsys is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Envsys rather than just read about it. In short: The envsys framework is a kernel-level hardware monitoring sensors framework in NetBSD. As of 4 March 2019, the framework is used by close to 85 device drivers to export various environmental monitoring sensors, as evidenced by references of the sysmon_envsys_register symbol within the sys path of NetBSD.

Key takeaways

  • Envsys belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Envsys to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Envsys from memory before moving on to harder problems.

Reference excerpt

The envsys framework is a kernel-level hardware monitoring sensors framework in NetBSD. As of 4 March 2019, the framework is used by close to 85 device drivers to export various environmental monitoring sensors, as evidenced by references of the sysmon_envsys_register symbol within the sys path of NetBSD. With temperature sensors, ENVSYS_STEMP, being the most likely type to be exported by any given driver. Sensors are registered with the kernel through sysmon_envsys(9) API. Consumption and monitoring of sensors from the userland is performed with the help of envstat utility through proplib(3) through ioctl(2) against the /dev/sysmon pseudo-device file, the powerd power management daemon that responds to kernel events by running scripts from /etc/powerd/scripts/, as well as third-party tools like symon and GKrellM from pkgsrc.

Features The framework allows the user to amend the monitoring limits specified by the driver, and for the driver to perform monitoring of the sensors in kernel space, or even to program a hardware chip to do the monitoring for the system automatically. Two levels of limits are defined: critical and warning, both of which additionally extend to an over and an under categorisation. If limit thresholds are crossed, a kernel event may be generated, which can be caught in the userland by powerd to execute a pre-defined user script. By comparison, in OpenBSD's hw.sensors, the monitoring of user-defined values is performed in userspace by sensorsd. As of 2019, the framework itself does not facilitate computer fan control, although the drivers could still implement interfacing with the fan-controlling capabilities of their chips through other means, for example, through a driver-specific sysctl interface, which is the approach taken by the dbcool(4) driver. However, the drivers for the most popular Super I/O chips like lm(4) and itesio(4) do not implement any fan control at all (in fact, historically, in all of OpenBSD, NetBSD and DragonFly, these drivers don't even report the duty cycle of the fans — only the actual RPM values are reported).

History The framework undergone two major revisions: the first version of envsys.h was committed on 15 December 1999 (1999-12-15); with envsys.4 man page following on 27 February 2000 (2000-02-27). Between 2000 and 2007, the manual page for envsys(4) in NetBSD stated that the "API is experimental", and that the "entire API should be replaced by a sysctl(8)", "should one be developed"; it can be noted that in 2003 this was the exact approach taken by OpenBSD with sysctl hw.sensors when some of the envsys(4) drivers were ported to OpenBSD. The second revision came about on 1 July 2007 (2007-07-01). The serialisation with userland was reimplemented using property lists with the help of NetBSD's new proplib(3) library (the underlying transport layer between the kernel and userland still being done through ioctl). The envsys framework was the precursor to OpenBSD's sysctl hw.sensors framework in 2003, and many drivers, as well as some sensor types, have been ported back and forth between NetBSD and OpenBSD. Support for sensors of drive type has been added to NetBSD on 1 May 2007, similar to drive type in OpenBSD, which was at the same time when bio(4) and bioctl were ported from OpenBSD to NetBSD.

See also

bioctl hw.sensors lm_sensors SpeedFan

References

External links /sys/sys/envsys.h

Worked examples

Example 1 — a first encounter with Envsys

Start with the simplest possible case. Write down what Envsys claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Envsys before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Envsys ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Envsys

In research
Envsys appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Envsys in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Envsys is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1999 software, 2007 software, BSD software, so understanding it makes those chapters shorter.
In everyday life
Look for Envsys outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Envsys in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Envsys means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Envsys out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Envsys in simple terms?

The envsys framework is a kernel-level hardware monitoring sensors framework in NetBSD. As of 4 March 2019, the framework is used by close to 85 device drivers to export various environmental monitoring sensors, as evidenced by references of the sysmon_envsys_register symbol within the sys path of…

Why does Envsys matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Envsys?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Envsys.

Tags

  • 1999 software
  • 2007 software
  • BSD software
  • Computer hardware tuning
  • Computer performance
  • Environmental data
  • Environmental monitoring
  • Free software programmed in C
  • Free system software
  • Motherboard
  • NetBSD
  • Software using the BSD license

Keep exploring