<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "EndpointSecurity",
  "identifier" : "/documentation/EndpointSecurity/es_message_t/global_seq_num",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Endpoint Security"
    ],
    "preciseIdentifier" : "c:@SA@es_message_t@FI@global_seq_num"
  },
  "title" : "global_seq_num"
}
-->

# global_seq_num

The global sequence number of the message.

```
var global_seq_num: UInt64
```

## Discussion

Inspect the global sequence number per-client to detect whether the kernel had to drop events for this client. If the kernel doesn’t drop any events for this client, `global_seq_num` increments by 1 for every message.

To determine whether the kernel dropped events, compare the previous value of `global_seq_num` to the value received in the latest message. When the kernel drops no events, the difference is 1, since the current message increments the counter. You can therefore calculate the number of dropped messages as follows:

```c
numberOfDroppedEvents = thisMessage.global_seq_num - (prevMessage.global_seq_num + 1)
```

Dropped events generally indicate that the kernel generated more events than the client could handle.

This field is available if the message version is greater than `4`.

> Tip:
> For an equivalent counter that filters by client and event type, see ``doc://com.apple.endpointsecurity/documentation/EndpointSecurity/es_message_t/seq_num``.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)