In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to understand Linux APM power management, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
In the officially released kernel, Linux APM is a more mature way of power management, which can accomplish most of the functions that ACPI can accomplish under Windows. Due to the limited functionality of ACPI in the official kernel, it is still in the development version.
So most current distribution, such as Red Hat, use apm as power management by default. However, it is worth noting that ACPI in linux is actually maintained by a separate project team module, and the current version of kernel ACPI actually lags far behind the version of *. Because linux stable is very cautious about any new features, we may have to wait for the 2.6.x version of linux to see a stable, full-featured version of ACPI. However, we can also get these features by patching ACPI to the kernel ourselves.
The following introduction to power management is based on Linux APM.
User mode Daemon
In order to make better use of the power management function in the linux kernel, we also need the cooperation of user-mode daemon programs. For Linux APM and ACPI, there are two different softwares: apmd and acpid. They implement similar functions, allowing users to define certain policies in advance, then track the power status and perform specific operations. There is also a tool Linux APM in the apmd package that allows users to actively enter the machine into standby and suspend state, as well as query the apm version number of bios. The same function can be accomplished by directly manipulating the proc file system when using acpi.
KernelSpace
APMdriver (including providing user space with apm_bios_fopsSystemCall, mainly apm_read,apm_poll,apm_ioctl,apm_open,apm_release).
With regard to battery power detection, we mainly use the ADC sampling of MCU platform (how often to read ADC), and the detection of DC power supply and power supply.
With regard to body sleep and recovery, this is mainly what ioctl needs to accomplish, for example, user space uses Linux APM-s for sleep operations, platform-related sleep functions are called, and recovery is similar. It is important to note that APM has a set of sham sleep and recovery, which requires real platform-related sleep and recovery.
For more information, please refer to my blog: 2410 Linux APM Power Management Analysis.
UserSpace
GTK/Qt/C---- > openAPM_PROC--- > SystemCall (read () mainly)-> KernelVFS--- > apm_driver-- > apm_read
Read syslog to get information about battery charge and power supply detection.
The above is how to understand Linux APM power management, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.