Hot Plug
The kernel hot-plug core provides a method for the kernel to notify user space that something has happened. The CONFIG_HOTPLUG configuration item needs to be selected for this code to be enabled. The notification happens when the kernel calls the executable listed in the global variable hotplug_path. When the kernel starts, hotplug_path is set to /sbin/hotplug, but the user can modify the value at /proc/sys/kernel/hotplug to change this. The kernel function call_usermodehelper() executes /sbin/hotplug.
As of kernel 2.4.14, the /sbin/hotplug method is being used by the PCI, USB, IEEE1394 and Network core subsystems. As time goes on, more subsystems will be converted to use it. Patches are available for the PnP-BIOS (notification when a laptop is inserted and removed from a docking station), Hot-Plug CPU, SCSI and IDE kernel subsystems. These are expected to be merged into the main kernel over time.
When /sbin/hotplug is called, different environment variables are set, depending on what action has just occurred.
PCI devices call /sbin/hotplug with the following arguments:
argv [0] = hotplug_path argv [1] = "pci" argv [2] = 0
and the system environment is set to the following:
HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin PCI_CLASS=class_code PCI_ID=vendor:device PCI_SUBSYS_ID=subsystem_vendor:subsystem_device PCI_SLOT_NAME=slot_name ACTION=actionThe action setting is “add” or “remove” depending on whether the device is being inserted or removed from the system. The class_code, vendor, subsystem_vendor, subsystem_device and slot_name environment settings represent the numerical values for the PCI device's information.
USB devices call /sbin/hotplug with the following arguments:
argv [0] = hotplug_path argv [1] = "usb" argv [2] = 0
and the system environment is set to the following:
HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=action PRODUCT=idVendor/idProduct/bcdDevice TYPE=device_class/device_subclass/device_protocolThe action setting is “add” or “remove” depending on whether the device is being inserted or removed from the system, and idVendor, idProduct, bcdDevice, device_class, device_subclass and device_protocol are filled in with the information from the USB device's descriptors.
If the USB device's deviceClass is 0 then the environment variable INTERFACE is set to:
INTERFACE=class/subclass/protocol
This is because USB has a much more complex model for device configuration than PCI does.
If the USB subsystem is compiled with the usbdevfs filesystem enabled, the following environment variables also are set:
DEVFS=/proc/bus/usb DEVICE=/proc/bus/usb/bus_number/device_number
where bus_number and device_number are set to the bus number and device number that this specific USB device is assigned.
The network core code calls /sbin/hotplug whenever a network device is registered or unregistered with the network subsystem, and /sbin/hotplug is called with the following arguments when called from the network core:
argv [0] = hotplug_path argv [1] = "net" argv [2] = 0
and the system environment is set to the following:
HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin INTERFACE=interface ACTION=actionThe action setting is “register” or “unregister” depending on what happened in the network core, and interface is the name of the interface that just had the action applied to itself.
The Hot-Plug CPU patch (available at sourceforge.net/projects/lhcs) calls /sbin/hotplug after a CPU is removed or added to the system, and /sbin/hotplug is called with the following arguments:
argv [0] = hotplug_path argv [1] = "cpu" argv [2] = 0
and the system environment is set to the following:
HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin CPU=cpu_number ACTION=actionThe action setting is “add” or “remove” depending on what happened to the CPU, and cpu_number is the number of the CPU that just had the action applied to itself.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Speed Up Your Web Site with Varnish | Jun 19, 2013 |
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




13 min 2 sec ago
3 hours 44 min ago
6 hours 37 min ago
7 hours 3 min ago
9 hours 32 min ago
10 hours 5 min ago
10 hours 6 min ago
10 hours 7 min ago
10 hours 9 min ago
10 hours 10 min ago