This function returns the peak number of seats that were checked out for each
license in an interval. Usage is only recorded when the server is started with
the -U/--usage-interval option, described in
Peak usage logging. Without it the server has nothing to
report and the usage list comes back empty.
Function: cmd_get_peak_usage Version: 20.5+
Argument Name |
Type Description | |
|---|---|---|
all |
boolean |
Return every interval the server is holding rather than only the most recent one. This is ignored when |
from |
string |
Only include intervals recorded at or after this UTC time. Requires 22.0 or newer, the first version to keep a usage history to select from. |
to |
string |
Only include intervals recorded at or before this UTC time. Same format and version requirement as |
from and to are UTC times in the same format the response uses, for example
Wed, 12 Aug 2026 14:00:00 GMT. Either bound can be given on its own, and both
bounds are inclusive.
Note
Only a closed interval is reported, and a server running workers reports it once the manager has written it to the log a few seconds later. Usage from the interval in progress is not there yet, so with the default hourly interval a license someone picked up a moment ago can take that long to appear.
Tip
Peak usage is kept for 30 days by default. The
--peak-usage-mem-retention and --peak-usage-disk-retention options
change how far back a request can reach.
response
{ "licenses": [ { "id": "", "prod_id": "", "prod_name": "" } ], "version": "", "usage": [ { "timestamp": "", "values": [ { "id": "", "peak": 0 } ] } ] }
Key |
Type |
Description |
|---|---|---|
licenses |
object array |
The licenses the usage entries refer to. This is every license the server has recorded usage for, not only the ones installed now, so expect it to be longer than the usage list. |
licenses.id |
string |
The id of the license, as eight hexadecimal digits. |
licenses.prod_id |
string |
The internal name of the product for the license. |
licenses.prod_name |
string |
The display name of the product for the license. This is equal to prod_id when the server does not know the product type. |
version |
string |
The version of the license server. |
usage |
object array |
The intervals of recorded usage, newest first. |
usage.timestamp |
string |
The UTC time the interval was recorded at. |
usage.values |
object array |
The peak usage of each license within the interval. A license nobody used in the interval is not listed. |
usage.values.id |
string |
The id of the license the peak belongs to. This matches licenses.id. |
usage.values.peak |
integer |
The highest number of seats that were checked out at once during the interval. |
Note
This function does not need a logged-in session. A server set up to
require authenticated access
(requireAuthenticatedAccess, off by default) is the exception: there it
answers 401 Unauthorized until the session logs in.