Umdsdmonmsgs.h  6.14
umdsd_dstat_msg_hdr_t_stct Struct Reference

Common message header structure included at the start of all messages. More...

#include <umdsdmonmsgs.h>

Data Fields

lbm_uint16_t magic
 "Magic" value set by sender to indicate to the receiver whether byte swapping is needed. Possible values: LBM_UMDS_DMON_MAGIC, LBM_UMDS_DMON_ANTIMAGIC.
 
lbm_uint16_t type
 Message type set by sender to indicate which kind of message this is. Possible values: one of the UMDSD_DSTATTYPE_* constants ( UMDS_DSTATTYPE_CFG, UMDS_DSTATTYPE_MALLINFO, etc. )
 
lbm_uint16_t version
 Version of the message definition. See Daemon Statistics Versioning for general information on versioning of these structures.
 
lbm_uint16_t length
 Total length of the message, including this header. Note that some message types do not have fixed lengths.
 
lbm_uint32_t tv_sec
 Approximate timestamp when the message was sent. Represents UTC wall clock time from the sending host's perspective. Value is "POSIX Time" (seconds since 1-Jan-1970, UTC).
 
lbm_uint32_t tv_usec
 Count of microseconds to be added to "tv_sec" to increase the precision of the timestamp. However, the accuracy of the timestamp is not guaranteed to be at the microsecond level.
 
lbm_uint32_t workerId
 The worker number or index associated with this message. More...
 
lbm_uint32_t connId
 The client connection index associated with this message. More...
 

Detailed Description

Common message header structure included at the start of all messages.

Except where indicated, all fields of type lbm_uintXX_t should be byte-swapped if hdr.magic is equal to LBM_UMDS_DMON_ANTIMAGIC.

Field Documentation

lbm_uint32_t umdsd_dstat_msg_hdr_t_stct::connId

The client connection index associated with this message.

Set to UMDS_DSTAT_CONN_NA when the message is not associated with a specific client connection.

Note that the connection index is zero-based 0..num_connections-1. The index is by worker. I.e. each worker's connections are numbered from 0 to the number of connections which that worker is handling.

lbm_uint32_t umdsd_dstat_msg_hdr_t_stct::workerId

The worker number or index associated with this message.

To maintain consistency with the Web Monitor, this field is presented differently under different circumstances, depending on the next field, "connId".

If "connId" is valid (not UMDS_DSTAT_CONN_NA), then "workerId" is zero-based 0..num_workers-1, to correspond with the web monitor's worker index, part of the web monitor's "x.y" connection ID (where "x" is the worker index, and "y" is the connection index).

If "connId" is not valid (set to UMDS_DSTAT_CONN_NA), then "workerId" is one-based 1..num_workers, corresponding to the web mon's worker number.

There are some statistics message (e.g. memory usage) which are not specific to any worker or connection, in which case '"workerId"' is set to UMDS_DSTAT_WORKER_NA.


The documentation for this struct was generated from the following file: