Konferencja I3 – internet – infrastruktury - innowacje SMOA Devices Power usage monitoring and control infrastructure Bartek Bosak, Krzysztof Kurowski, Bogdan Ludwiczak, Ariel Oleksiak, MichaĆ Witkowski Motivation – Green Computing SMOA Devices was created as a response to the following challenges: •Increased interest in performance-per-watt metrics •Rising awareness of computing's impact on environment •Rising prices of electrical power •Realisation of the fact that idling machine = wasted power •Lack of means to measure the power consumption of computations •Lack of an on-demand power-cycling infrastructure Problems The following problems arise when thinking about net power management: •Functionality spread among different points and levels: – Graceful shutdown/suspend – machine's OS – Wake up from shutdown/suspend – another machine via network – Measuring power consumption – dedicated hardware solution monitored by another machine •Network administrators frown upon the need to open additional ports on machines •Providing an integrated view of the power states What is SMOA Devices? SMOA Devices is a distributed system for managing and monitoring power usage of networked computers. Main characteristics: • Management of machine power state • Usage of XMPP for communication • Distributed machine wakeup solution using Wake-on-LAN or IPMI (Intelligent Platform Management Interface) • Support for Linux and Windows platforms • Hooks for power measurement hardware • Easily extensible • Open source and available today for testing! Why XMPP? The Extensible Message and Presence Protocol (XMPP) was chosen as a main communication protocol in SMOA Devices because of the following properties: • Client-server connection-based – does not require open ports and additional firewall rules on the machines • Provides information about presence – ideal for detecting the availability of a machine • Easy and secure - authentication of JIDs is already handled by the XMPP server using SASL, all traffic can be encrypted using SSL or TLS •XML-based – ideal for transporting other XML-based protocols SMOA Devices Architecture SMOA Devices Nodes On each node there is an efficient software component deployed (written in Python). Each node in the system can play a role of: •Device Node – Handles OS callbacks (like shutdown), gathers powersaving and work-load information. Windows service and Linux/Mac OS X daemon versions are available. •Waker Node – Dispatches Wake-on-LAN calls (or needs to be present in each network segment) or uses IPMI management infrastructure to wake up sleeping Device Nodes. •Meter Node – Interacts with hardware solutions like intelligent power strips to provide information about power consumption and control power at outlet level. SMOA Devices Architecture SMOA Devices Service The SMOA Device Service plays a set of crucial roles in the system: •Coupling information from Nodes, Wakers and Meters •Pairing Wakers with Nodes for complete power-cycling capabilities •Providing an easy-to-use REST API for gathered data •Authorization of users •Providing statistics for the system SMOA Devices Pidgin Plugin A Pidgin IM plugin was developped as an example client for power management and administration. Thus, users can interact with networked computers and control their status in the intuitive way (computers are listed as IM buddies). The current release supports: •Tracing machine states like normal IM buddies •Automatic addition of entries for all machines managed by the Service •Managing power states of machines via the right-click menu Distributed Wake-on-LAN Though IPMI is the prefered solution for large-scale systems, it's not always available. Wake-on-LAN was chosen as an alternative because it's the most widespread remote wake up solution available. Unfortunately WoL is limited to a local network, as it relies on network broadcasts to carry the magic packet. Thus, a distributed solution was adopted: •Wakers inform the Service of Nodes they can wake up •The Service chooses which Waker should be used to Wake up the Node Distributed Wake-on-LAN Current state SMOA Devices is under heavy development, but alpha release is available on request (open source license). •Service – Aggregating information from Wakers and Nodes – Simple authorization – REST-like API •Device Nodes – Power state management: shutdown, suspend, hibernate on Windows, Linux and Mac OS X – CPU load information •Waker Nodes – Distributed Wake-on-LAN The existing infrastructure was tested in both desktop/notebook and server environments. Please contact us if you want to test our solution in your environment! Current state SMOA Devices is under heavy development, but alpha release is available on request (open source license). •Service – Aggregating information from Wakers and Nodes – Simple authorization – REST-like API •Device Nodes – Power state management: shutdown, suspend, hibernate on Windows, Linux and Mac OS X – CPU load information •Waker Nodes – Distributed Wake-on-LAN The existing infrastructure was tested in both desktop/notebook and server environments. Future work The following features are planned for the near future: • Meter Nodes – controlling power outlets and monitoring power usage using intelligent power strips or other embedded devices • IPMI wake up mechanism for Waker Nodes • Statistics module for the Service, providing historical data for analysis. • Further development of the Pidgin plugin Example usage scenarios SMOA Devices can be used in many scenarios: •Server environment – Administration tool for power consumption monitoring and power-cycling – Power management infrastructure for use by other applications, for example job schedulres •Company computers – Means of monitoring the power usage and managing unused desktop machines. •Domestic power usage – Monitoring and managementof home appliances' power consumption – Fine grained power consumption information for power companies