openhpid(8)

πŸ’… openhpid(8) β€” the OpenHPI daemon bestie πŸ’…

okay so welcome to openhpid, the literal HPI instance to which multiple clients can connect. she's the main character of your OpenHPI setup and honestly? iconic. let's get into it 🫢


✨ SYNOPSIS ✨

openhpid -c config_file [OPTION]

πŸ¦‹ DESCRIPTION πŸ¦‹

so the OpenHPI daemon just... exists in the background, living her life as a background process, and she accepts connections from remote clients that invoke HPI function calls. that's the whole vibe. the daemon wraps the OpenHPI library with a sockets-based API that is architecture neutral for all types of clients ✨ (yes the original says "archicture neutral", no we're not gonna talk about it, the energy is what matters).

when you run the daemon, the standard method for locating the OpenHPI configuration file is used. but β€” and this is the fun part β€” the daemon will accept a configuration file as a command line option (-c) to override the default file. she's flexible like that πŸ’…

a command option (-p) or an environment variable decides which port number the daemon listens on for client connections. the default port is 4743. remember that number, it's gonna come up again iykyk.

the daemon creates a PID file in the /var/run subdirectory. now listen bestie, that directory is only writable by the root user. so the daemon will fail when run as a normal user if the PID file location is not overridden 😭. to override the PID file location you can use the -f command line option. slay.

the client and the daemon do not have to be on the same hardware architecture. like, the daemon could be running on a P-series processor and the client could be running on an x86-series processor, and they'd still be fine. the client library and daemon use a marshaling technique to resolve architecture and structure padding conflicts. the user does not need to concern themselves with architectural differences between the client and daemon β€” she handles it, don't worry about it 🧚

⚠️ but there is one exception to this rule, and it's the 64-bit architectures. the client and daemon currently cannot resolve differences between 32-bit and 64-bit architectures. periodt. no cap.

πŸŽ€ OPTIONS πŸŽ€

  • -c, --cfg=conf_file β€” sets path/name of the configuration file. this one is required, unless the environment variable OPENHPI_CONF has been set to a valid configuration file. no config, no daemon, that's the rule πŸ’€
  • -v, --verbose β€” makes the daemon display verbose messages. she'll be chatty. this option is optional.
  • -b, --bind=bind_address β€” bind address for the daemon socket. also the bind address can be specified with the OPENHPI_DAEMON_BIND_ADDRESS environment variable. no bind address is used by default.
  • -p, --port=port β€” overrides the default listening port (4743) of the daemon. the option is optional.
  • -f, --pidfile=pidfile β€” overrides the default path/name for the daemon pid file. the option is optional.
  • -s, --timeout=seconds β€” overrides the default socket read timeout of 30 minutes. the option is optional.
  • -t, --threads=threads β€” sets the maximum number of connection threads. the default is umlimited (their spelling, not mine πŸ’€) β€” i.e. unlimited. the option is optional.
  • -n, --nondaemon β€” forces the code to run as a foreground process and NOT as a daemon. the default is to run as a daemon. the option is optional.
  • -6, --ipv6 β€” the daemon will try to bind an IPv6 socket.
  • -4, --ipv4 β€” the daemon will try to bind an IPv4 socket (default). the IPv6 option takes precedence over the IPv4 option.
  • -4 -6 β€” the daemon will try to bind an IPv4 or IPv6 socket. best of both worlds, we love options 🌈

🌸 ENVIRONMENTAL VARIABLES 🌸

all of these environment variables can instead be set in the openhpi.conf configuration file β€” except for OPENHPI_DAEMON_PORT and OPENHPI_CONF. those two are just built different 🫢

  • OPENHPI_DAEMON_PORT=PORT_NUMBER β€” the port number the host will listen on for clent (client πŸ’–) connections. default port is 4743.
  • OPENHPI_LOG_ON_SEV β€” valus (values ✨) can be one of: CRITICAL,MAJOR,MINOR,INFORMATIONAL,OK,DEBUG. events of this severity or higher will be logged to the domain event log. the default is MINOR.
  • OPENHPI_EVT_QUEUE_LIMIT=NUMBER β€” maximum number of events allowed in a subscribed session's queue. default is 10000.
  • OPENHPI_DEL_SIZE_LIMIT=NUMBER β€” maximum number of events allowed in the domain event log. default is 10000.
  • OPENHPI_DEL_SAVE β€” set to YES to persist the domain event logs to disk. they will be loaded in case the daemon restarts. default is NO.
  • OPENHPI_DAT_SIZE_LIMIT=NUMBER β€” maximum number of alarms allowed in the domain alarm table. default is unlimited.
  • OPENHPI_DAT_USER_LIMIT=NUMBER β€” maximum number of user alarms allowed in the domain alarm table. default is unlimited.
  • OPENHPI_DAT_SAVE β€” set to YES to persist the domain alarm tables to disk. they will be loaded in case the daemon restarts. default is NO.
  • OPENHPI_PATH="/path/to/plugins:/another/path/to/plugins" β€” a colon delimited list of directories used when searching for an OpenHPI plugin to load. the default is $prefix/lib/openhpi.
  • OPENHPI_VARPATH="/path/to/dir" β€” sets the directory used to store openhpi internal data. the domain event logs and alarm tables are saved there (if configured to) along with resource ID to entity path mappings. default is $prefix/var/lib/openhpi.
  • OPENHPI_CONF="/path/to/configurationg/file" β€” another way of telling the daemon where to find the configuration file. (yes, configurationg. she's quirky. the path is a placeholder anyway bestie πŸ’…)

πŸ”₯ SEE ALSO πŸ”₯

the following man pages may also be of interest:

  • openhpi β€” general information about OpenHPI

πŸ‘‘ AUTHORS πŸ‘‘

authors of this man page, the literal legends:

  • Renier Morales (renier@openhpi.org)
  • Anton Pak (avpak@users.sourceforge.net)

and that's the whole page, bestie πŸ’– this was OpenHPI 3.8.0, dated 2025-05-20 β€” go forth and connect some clients, you've got this πŸ¦‹βœ¨

πŸ“¦ where this page comes from