The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

apmd (8)
  • apmd (1) ( Русские man: Команды и прикладные программы пользовательского уровня )
  • >> apmd (8) ( FreeBSD man: Команды системного администрирования )
  • apmd (8) ( Русские man: Команды системного администрирования )
  • apmd (8) ( Linux man: Команды системного администрирования )

  • BSD mandoc
     

    NAME

    
    
    apmd
    
     - Advanced Power Management monitor daemon
    
     
    

    SYNOPSIS

    [-d ] [-f file ] [-s ] [-v ]  

    DESCRIPTION

    The utility monitors the occurrence of the specified Advanced Power Management (APM ) events and, if one of the events occurs, it executes the sequence of commands corresponding to the event. Only the events specified in the configuration file are notified to ; all other events are ignored. For each event posted by the APM BIOS, invokes the sequence of commands specified in the configuration file. When is running with monitoring suspend/standby requests, the kernel will not process those requests. Therefore, if you wish action to be taken when these events occur, you need to explicitly configure the appropriate commands or built-in functions in the configuration file.

    The utility recognizes the following runtime options:

    -d
    Starts in debug mode. This causes to execute in the foreground instead of in daemon mode.
    -f file
    Specifies a different configuration file file to be used in place of the default /etc/apmd.conf
    -s
    Causes to simulate a POWERSTATECHANGE event when a power state change is detected (AC_POWER_STATE) but the bios of the laptop does not report it. This enables you to do things like dimming the LCD backlight when you unplug the power cord.
    -v
    Verbose mode.

    When starts, it reads the configuration file ( /etc/apmd.conf as default) and notifies the set of events to be monitored to the APM device driver. When it terminates, the APM device driver automatically cancels monitored events.

    If the process receives a SIGHUP, it will reread its configuration file and notify the APM device driver of any changes to its configuration.

    The utility uses the device /dev/apmctl to issue ioctl(2) requests for monitoring events and for controlling the APM system. This device file is opened exclusively, so only a single process can be running at any time.

    When receives an APM event, it forks a child process to execute the commands specified in the configuration file and then continues listening for more events. The child process executes the commands specified, one at a time and in the order that they are listed.

    While is processing the command list for SUSPEND/STANDBY requests, the APM kernel device driver issues notifications to APM BIOS once per second so that the BIOS knows that there are still some commands pending, and that it should not complete the request just yet.

    The utility creates the file /var/run/apmd.pid and stores its process id there. This can be used to kill or reconfigure .  

    CONFIGURATION FILE

    The structure of the configuration file is quite simple. For example:

    apm_event SUSPENDREQ {
           exec "sync && sync && sync";
           exec "sleep 1";
           exec "zzz";
    }
    

    will cause to receive the APM event `SUSPENDREQ' (which may be posted by an LCD close), run the `sync' command 3 times and wait for a while, then execute zzz ( apm -z to put the system in the suspend state.

     

    FILES

    /etc/apmd.conf
    /dev/apmctl
    /var/run/apmd.pid

     

    EXAMPLES

    Sample configuration commands include:
    apm_event SUSPENDREQ {
            exec "/etc/rc.suspend apm suspend";
    }
    
    apm_event USERSUSPENDREQ {
            exec "sync && sync && sync";
            exec "sleep 1";
            exec "apm -z";
    }
    
    apm_event NORMRESUME {
            exec "/etc/rc.resume apm suspend";
    }
    
    apm_event STANDBYRESUME {
            exec "/etc/rc.resume apm standby";
    }
    
    # resume event configuration for serial mouse users by
    # reinitializing a moused(8) connected to a serial port.
    #
    #apm_event NORMRESUME {
    #       exec "kill -HUP `cat /var/run/moused.pid`";
    #}
    #
    # suspend request event configuration for ATA HDD users:
    # execute standby instead of suspend.
    #
    #apm_event SUSPENDREQ {
    #       reject;
    #       exec "sync && sync && sync";
    #       exec "sleep 1";
    #       exec "apm -Z";
    #}
    
     

    SEE ALSO

    apm(4), apm(8)  

    HISTORY

    The utility appeared in Fx 3.3 .  

    AUTHORS

    An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org An KOIE Hidetaka Aq koie@suri.co.jp

    An -nosplit Some contributions made by An Warner Losh Aq imp@FreeBSD.org , An Hiroshi Yamashita Aq bluemoon@msj.biglobe.ne.jp , An Yoshihiko SARUMARU Aq mistral@imasy.or.jp , An Norihiro Kumagai Aq kuma@nk.rim.or.jp , An NAKAGAWA Yoshihisa Aq nakagawa@jp.FreeBSD.org , and An Nick Hilliard Aq nick@foobar.org .


     

    Index

    NAME
    SYNOPSIS
    DESCRIPTION
    CONFIGURATION FILE
    FILES
    EXAMPLES
    SEE ALSO
    HISTORY
    AUTHORS


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру