The OpenHPI Daemon v2.1.0

The OpenHPI Daemon is provided in the distribution so that it is possible to run a program on a machine that does not have the OpenHPI libraries installed on it. This is accomplished by providing a daemon to run on a machine which does have the OpenHPI libraries installed on it and a client library to which you link your application.

The Daemon Functional Description

The daemon is designed as a standard Linux daemon. It can be set up to start automatically using the standard Linux methodology for daemons.

Although the daemon is designed to run under the root user security settings, it can also be run by a standard user as long as the proper command line options are provided. This mainly has to do with the placement of the daemon's pid file.

The daemon listens on a TCP/IP network port for incoming connections. When a client connects to the daemon a thread is spawned to handle that connection and the daemon then waits for new connections on the main thread. This architecture limits the number of useful connections that can be handled simultaneously, but it is unlikely that the number of clients will be high enough to seriously impair the performance of the daemon or the machine it is running on. The default listening port for the daemon is 4743, but this can be overridden via a command line option. Currently the daemon only supports TCP connections.

The network protocol the daemon uses is embedded in the marshaling library. The marshaling library forms a platform and hardware architecture independent protocol for passing the HPI API parameters to the daemon from the client and returning arguments. The client library also embeds the marshaling library and this forms a code/decode mechanism for the client and the daemon to use to pass parameter API information.

The marshal library encodes binary information in a hardware independent format for transmission over the connection. This means that the client can be running on an x86 architecture and be able to successfully connect and communicate with a daemon that is running on a p-series or other hardware architecture. The only limitation to the successful communication between a client and a daemon is that the marshal library does not yet support any 64-bit architecture on either the client or the daemon.

Compiling and Linking the Daemon

The daemon code is compiled and linked by default. It does not need to be enabled via the configure script.

The daemon can be installed using the standard

make install

command. This includes adding the daemon executable (openhpid) to the machine's PATH.

Running the Daemon

The daemon is built with the expectation that it will be run by the root user. However, it can be run by a standard user if the user overrides the pid file location via the command line. There are also additional command line options to modify the behavior of the daemon. Here is the complete list.

-c conf_file


-p port

-f pidfile


-s secs

-t threads

The daemon can also be run using the standard init.d init script mechanism. The shell script is provided to help you enabled this capability.

The Client Library Functional Description

The client library should be used in place of the standard OpenHPI library for linking your application. It supplies all of the HPI APIs plus some oHpi APIs to provide for dynamic configuration of OpenHPI.

Compiling and Linking Your Application

The client library is compiled and linked by default.

The client library can be installed using the standard

make install

command. This includes adding the client library (openhpiclient) to the machine's PATH.

Running Your Application

Your application may require two environment variables in order to work correctly.



All HPI APIs used in the client library return the standard HPI error codes.

OpenHPI/Manual/OpenHPIDaemon (last edited 2014-02-21 23:08:48 by localhost)

Related Sites:  SA Forum, OpenIPMI, Net-SNMP,