• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Linux OS Service ‘acpid’

by admin

The acpid daemon supports the Advanced Configuration and Power Interface (ACPI) to allow intelligent power management on your system and to query battery and configuration status. It listens on a file (/proc/acpi/event) and when an event occurs, executes programs to handle the event. Rules are defined by simple configuration files. acpid will look in a configuration directory (/etc/acpi/events by default), and parse all files that do not begin with a period (‘.’). Each file must define two things: an event and also a corresponding action.

This service is provided by acpid RPM package.

# yum install acpid

Service Control

To control the acpid service after the next system boot, use the chkconfig utility:

# chkconfig acpid on
# chkconfig --list acpid
acpid           0:off   1:off   2:on    3:on    4:on    5:on    6:off

To control the acpid service immediately, use the service utility:

# service  acpid
Usage: /etc/init.d/acpid {start|stop|status|restart|condrestart|reload}

Start the service as follows:

# service acpid start
Starting acpi daemon:                                      [  OK  ]

Stop the service as follows:

# service acpid stop
Stopping acpi daemon:                                      [  OK  ]

Check if the serivce is started or stopped:

# service acpid status
acpid is stopped

If the service is started, then restart it, otherwise do nothing.

# service acpid condrestart
Stopping acpi daemon:                                      [  OK  ]
Starting acpi daemon:                                      [  OK  ]

Determine which system run levels the service is active:

# chkconfig --list acpid
acpid           0:off   1:off   2:off   3:on    4:on    5:on    6:off

Configuration

The acpid daemon listens on a file (/proc/acpi/event) and when an event occurs, executes programs to handle the event. Rules are defined by simple configuration files. acpid will look in a configuration directory (/etc/acpi/events by default), and parse all files that do not begin with a period (‘.’). Each file must define two things: an event and also an corresponding action.

# ll /etc/acpi/events
total 8
-rw-r--r-- 1 root root 168 Nov 12  2015 power.conf
-rw-r--r-- 1 root root 236 Nov 12  2015 video.conf
# cat /etc/acpi/events/power.conf
# ACPID config to power down machine if powerbutton is pressed, but only if
# no gnome-power-manager is running

event=button/power.*
action=/etc/acpi/actions/power.sh
# cat /etc/acpi/events/video.conf
# Configuration to turn on DPMS again on video activity, needed for some
# laptops. Disabled by default, uncomment if your laptop display stays blank
# after you close and open the lid.

#event=video.*
#action=/usr/sbin/vbetool dpms on

Filed Under: Linux, Linux Services

Some more articles you might also be interested in …

  1. Understanding the nfsiostat command output (Examples Included)
  2. aptitude: command not found
  3. traceroute Command Examples in Linux
  4. How to run a cron job on specific days of the week
  5. fprintd-enroll Command Examples in Linux
  6. Understanding dm-Multipath Identifiers in Linux
  7. iperf: command not found
  8. How To Add New Disk to An Existing Diskgroup on RAC Cluster or Standalone ASM Configuration
  9. 18 Practical tcpdump Command Examples – A Network Sniffer Tool Primer
  10. How to Install apt-utils with apt-get?

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright