metrics
Display miner metrics
metrics
Description
Displays hashrate, power and temperature metrics of the miner, in discrete buckets, aligned to clock.
When querying, you need to select one of the available buckets, using the bucket
parameter:
Bucket | Period | Max Retention |
---|---|---|
1m | One minute. | Six hours. |
5m | Five minutes. | One week. |
1h | One hour. | Thirty days. |
1d | One day. | Ninety days. |
Specifying just the bucket is enough, but it will return only the latest (most recent) value from that bucket. This means that querying for a "bigger" bucket, before the minimum time elapsed (e. g. 1h
bucket, before at least one hour of runtime) will return nothing, while on "smaller" buckets you will get slightly outdated data (e. g. the hashrate from the previous 5m
instead of "now"). You can force this command to return the partial data of the bucket (if available) by also passing the partial
parameter with the true
value. Note that doing this will return the timestamp of the request, to indicate that the metric entry is partial.
Last, but not least, you can return multiple results for a given bucket by using the window
parameter, with a value representing the size of the timespan that you want to query, like 1m
, 2h
, etc. The valid suffixes for this parameter are:
Suffix | Description | Examples |
---|---|---|
m | Value, in minutes. | 10m , 7m , 30m |
h | Value, in hours. | 1h , 10h |
d | Value, in days. | 2d , 5d , 20d |
w | Value, in weeks. | 1w , 4w |
latest | Default value. Returns only the most recent entry. | latest |
now | Alias for latest . | now |
You can query a period bigger than the retention, but you will get at most the data on the retention period. You can also use window
and partial
at the same time; the mechanics of each option remain the same.
Examples
Single value
The simplest possible example is querying a single bucket, in this case, the last minute:
As said earlier, querying a "big" bucket may return no results, if you have no data for that period:
Partial data
We can force the bucket to return the "partial" data collected so far, by using the partial
parameter:
Specific window
Multiple entries can be returned, depending on how large the window is, and the amount of collected data:
Parameters
Parameter | Notes |
---|---|
bucket | The bucket to query. See description for details. |
window | Optional. The time window to query. Defaults to latest . |
partial | Optional. When true , creates a "virtual" entry with the partial data collected so far for the next entry. |
Field details
For the METRICS
block:
Field | Notes |
---|---|
HashrateMHS | Hashrate, in MH/s. |
Power | Power consumption, in watts. |
Temperature | Highest temperature. |
Timestamp | UTC timestamp of this entry. |
For the METRICS_REQUEST
block:
Field | Notes |
---|---|
Bucket | The bucket requested. |
Partial | If the partial data is included or not. |
Window | The time window of the query. |