---
name: "hpievents"
section: "1"
platform: "linux"
package: "openhpi-clients"
version: "3.8.0-2.3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/hpievents"
---

# hpievents(1)

An openhpi sample application that polls for events.

## NAME

hpievents - An openhpi sample application that polls for events.

## SYNOPSIS

```
 hpievents [ -D <value> ] [-N host[:port]] [-C <cfgfile>] [ -t BLOCK|SAHPI_TIMEOUT_BLOCK|n ] [ -d -X -h ]
 hpievents [--domain=nn] [--host=host[:port]] [--cfgfile=file]
           [--timeout=BLOCK|SAHPI_TIMEOUT_BLOCK|n ] [--discover] [--debug] [--help]
```

## DESCRIPTION

hpievents polls for events in an opened HPI session.  User can specify wait time for the event. User can also select the order between hpi resource (resource event) discovery and hpi event subscription.

If no domain or host is selected, hpievents polls for events in the default domain as specified in the openhpiclient.conf file.

## OPTIONS

### Help Options:

- **-h**, **--help**

  Show help options

### Application Options:

- **-t** *n\|BLOCK*, **--timeout**=*n\|BLOCK*

  Wait *n* seconds for event or infinite wait (*BLOCK*)

- **-d**, **--discover**

  Call **saHpiDiscover()** after **saHpiSubscribe()**

- **-D** *nn*, **--domain**=*nn*

  Select domain id *nn*

- **-X**, **--debug**

  Display debug messages

- **-N** *"host\[:port\]"*, **--host**=*"host\[:port\]"*

  Open session to the domain served by the daemon at the specified URL (host:port). This option overrides the OPENHPI\_DAEMON\_HOST and OPENHPI\_DAEMON\_PORT environment variables. If host contains ':' (for example IPv6 address) then enclose it in square brackets. For example: *"\[::1\]"* or *"\[::1\]:4743"*.

- **-C** *"file"*, **--cfgfile**=*"file"*

  Use passed file as client configuration file. This option overrides the OPENHPICLIENT\_CONF environment variable.

## HPI APIs uniquely used in this application

SaErrorT SAHPI\_API saHpiSubscribe (\
     SAHPI\_IN SaHpiSessionIdT      SessionId );

SaErrorT SAHPI\_API saHpiUnsubscribe (\
     SAHPI\_IN SaHpiSessionIdT  SessionId );

SaErrorT SAHPI\_API saHpiEventGet (\
     SAHPI\_IN SaHpiSessionIdT            SessionId,\
     SAHPI\_IN SaHpiTimeoutT              Timeout,\
     SAHPI\_OUT SaHpiEventT               \*Event,\
     SAHPI\_INOUT SaHpiRdrT               \*Rdr,\
     SAHPI\_INOUT SaHpiRptEntryT          \*RptEntry,\
     SAHPI\_INOUT SaHpiEvtQueueStatusT    \*EventQueueStatus );

## SEE ALSO

```
         hpi_shell
         hpialarms      hpigensimdata  hpireset       hpitop
         hpidomain      hpiinv         hpisensor      hpitree
         hpiel          hpionIBMblade  hpisettime     hpiwdt
         hpifan         hpipower       hpithres       hpixml
         ohdomainlist   ohhandler      ohparam
```

## AUTHORS

Authors of this man page:

```
 Peter D Phan (pdphan@users.sourceforge.net)
 Ulrich Kleber (ulikleber@users.sourceforge.net)
 Anton Pak (avpak@users.sourceforge.net)
```
