# Error fetching data for metricset linux.pageinfo: error reading pagetypeinfo

**URL:** https://discuss.elastic.co/t/error-fetching-data-for-metricset-linux-pageinfo-error-reading-pagetypeinfo/305104
**Category:** Beats
**Tags:** metricbeat
**Created:** [May 18, 2022, 8:50pm UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-linux-pageinfo-error-reading-pagetypeinfo/305104 "2022-05-18T20:50:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jplindquist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jplindquist/32/94945_2.png) [@jplindquist](https://discuss.elastic.co/u/jplindquist)
#### Post date: [May 18, 2022, 8:50pm UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-linux-pageinfo-error-reading-pagetypeinfo/305104/1 "2022-05-18T20:50:38Z")

</div>

We are using metricbeat 7.17.3 as of this post, and are receiving an error on several systems which are configured to use the linux.pageinfo metricset, also reported [here](https://discuss.elastic.co/t/error-fetching-data-for-metricset-linux-pageinfo/297049), but has since auto closed.

```auto
May 17 15:38:58 example.host metricbeat[12345]: 2022-05-17T15:38:58.783-0700 ERROR module/wrapper.go:259 Error fetching data for metricset linux.pageinfo: error reading pagetypeinfo: error parsing zone: : strconv.ParseInt: parsing "": invalid syntax

```

This _appears_ to be due to the way pagetypeinfo is displayed when over 100000, and the way the module parses each column expecting integers, as seen roughly [here](https://github.com/elastic/beats/blob/v7.17.3/metricbeat/module/linux/pageinfo/reader.go#L50-L101) in the regex expresion and subsequent parsing of an expected integer.

Example:  
`>100000` is reported by pagetypeinfo, but is more accurately represented as the total count of `213501` as seen below.

```auto
$ cat /proc/pagetypeinfo

Page block order: 9
Pages per block: 512

Free pages count per migrate type at order 0 1 2 3 4 5 6 7 8 9 10
Node 0, zone DMA, type Unmovable 1 0 0 0 2 1 1 0 1 0 0
Node 0, zone DMA, type Reclaimable 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone DMA, type Movable 0 0 0 0 0 0 0 0 0 1 3
Node 0, zone DMA, type Reserve 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone DMA, type CMA 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone DMA, type Isolate 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone DMA32, type Unmovable 45 490 2125 1535 908 429 139 10 0 0 0
Node 0, zone DMA32, type Reclaimable 554 760 1801 1748 1184 671 239 17 3 0 0
Node 0, zone DMA32, type Movable 206 33222 18654 4021 946 186 80 34 6 0 0
Node 0, zone DMA32, type Reserve 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone DMA32, type CMA 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone DMA32, type Isolate 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone Normal, type Unmovable 1687 31115 18021 11061 3504 614 31 1 0 0 0
Node 0, zone Normal, type Reclaimable 15289 16293 13341 10028 4203 909 71 13 3 0 0
Node 0, zone Normal, type Movable 9 >100000 88777 13664 2611 818 240 14 5 0 0
Node 0, zone Normal, type Reserve 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone Normal, type CMA 0 0 0 0 0 0 0 0 0 0 0
Node 0, zone Normal, type Isolate 0 0 0 0 0 0 0 0 0 0 0

Number of blocks type Unmovable Reclaimable Movable Reserve CMA Isolate
Node 0, zone DMA 1 0 7 0 0 0
Node 0, zone DMA32 165 190 1173 0 0 0
Node 0, zone Normal 1093 724 4839 0 0 0
Your password will expire in 13 days

$ cat /proc/buddyinfo
Node 0, zone DMA 1 0 0 0 2 1 1 0 1 1 3
Node 0, zone DMA32 668 34432 22579 7304 3038 1286 458 61 9 0 0
Node 0, zone Normal 17254 213501 120140 34753 10318 2341 342 28 8 0 0
```

---

<div class="post-metadata">

### Author: ![Infraded](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/infraded/32/105882_2.png) [@Infraded](https://discuss.elastic.co/u/Infraded)
#### Post date: [May 24, 2022, 6:07pm UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-linux-pageinfo-error-reading-pagetypeinfo/305104/2 "2022-05-24T18:07:13Z")

</div>

I'm also seeing this issue. As mentioned, `pagetypeinfo` returns more info on page migration types, but less accurate totals than `buddyinfo` for large quantities. From the kernel code [here](https://github.com/torvalds/linux/blob/master/mm/vmstat.c#L1501-L1515), you can see `pageinfotype` truncates any count over 100k and just displays `>100000`.

The regex for this should be corrected for the `pagetypeinfo` stats to at least handle the `>` indication and instead of _emulating_ the stats for `buddyinfo`, it should be called directly to get proper totals.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 21, 2022, 8:07pm UTC](https://discuss.elastic.co/t/error-fetching-data-for-metricset-linux-pageinfo-error-reading-pagetypeinfo/305104/3 "2022-06-21T20:07:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
