• 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. How to manage File and Directory Permissions/Ownerships in Linux
  2. CentOS / RHEL : How to create and host yum repository over httpd
  3. MySQL Fails to Start Using systemctl On systemd Linux Distributions
  4. How To Open A Port In CentOS / RHEL 7
  5. iSCSI troubleshooting : Targets Not Detected After Reboot
  6. rpm: error while loading shared libraries: invalid ELF header
  7. Basic “ls” Command examples in Linux
  8. How to Update the hostname in Shell Prompt Once it is Changed in the Linux OS
  9. How to fix the error “host key verification failed”
  10. LVM VG Metadata Corruption with ‘Checksum error’

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright