# CMS.INFO

> Show a Count-min sketch's width, depth and total count.

URL: https://docs.hotkv.com/commands/cms-info/

```
CMS.INFO key
```

- Group: Count-min sketch
- Complexity: O(1)
- HotKV Cloud: all plans
- On-Premise: no license needed

`CMS.INFO` returns the dimensions of the Count-min sketch at `key` and the
total of all increments it has counted.

## Fields

| Field | Meaning |
| --- | --- |
| `width` | Counters per row. |
| `depth` | Number of rows. |
| `count` | Sum of all increments (after a [CMS.MERGE](https://docs.hotkv.com/commands/cms-merge/index.md), the weighted sum of the sources' counts). |

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Sketch exists | Flat array of field names and integer values | Map |

Error replies: `CMS: key does not exist`, and `WRONGTYPE`.

## Examples

```
127.0.0.1:6379> CMS.INITBYDIM pageviews 2000 5
OK
127.0.0.1:6379> CMS.INCRBY pageviews /home 3 /pricing 1
1) (integer) 3
2) (integer) 1
127.0.0.1:6379> CMS.INFO pageviews
1) width
2) (integer) 2000
3) depth
4) (integer) 5
5) count
6) (integer) 4
```

## Compatibility

Same as `CMS.INFO` in RedisBloom.

## See also

[CMS.INITBYDIM](https://docs.hotkv.com/commands/cms-initbydim/index.md), [CMS.INITBYPROB](https://docs.hotkv.com/commands/cms-initbyprob/index.md), [CMS.QUERY](https://docs.hotkv.com/commands/cms-query/index.md)