CPU hotplug (user space notification)

Взгляд изнутри

Модератор: Модераторы разделов

Аватара пользователя
deadhead
Сообщения: 1913
Статус: zzz..z

CPU hotplug

Сообщение deadhead »

Выдержка из Documents/cpu-hotplug.txt

Код: Выделить всё

User Space Notification

Hotplug support for devices is common in Linux today. Its being used today to
support automatic configuration of network, usb and pci devices. A hotplug
event can be used to invoke an agent script to perform the configuration task.

You can add /etc/hotplug/cpu.agent to handle hotplug notification user space
scripts.

    #!/bin/bash
    # $Id: cpu.agent
    # Kernel hotplug params include:
    #ACTION=%s [online or offline]
    #DEVPATH=%s
    #
    cd /etc/hotplug
    . ./hotplug.functions

    case $ACTION in
        online)
            echo `date` ":cpu.agent" add cpu >> /tmp/hotplug.txt
        ;;
        offline)
            echo `date` ":cpu.agent" remove cpu >>/tmp/hotplug.txt
        ;;
        *)
            debug_mesg CPU $ACTION event not supported
        exit 1
       ;;
    esac

Поскольку hotplug был успешно выпелен и заменен udev данный подход к уведомлению является не актуальным. Может кто из уважаемых форумчан подскажет каким образом сейчас осуществляется уведомление о событии cpu hotplug?
Спасибо.
[x] close
Спасибо сказали: