# About changes in Node Stats API - reporting swap status

**URL:** <https://discuss.elastic.co/t/about-changes-in-node-stats-api-reporting-swap-status/7086>\
**Category:** Elasticsearch\
**Created:** [March 21, 2012, 5:02pm UTC](https://discuss.elastic.co/t/about-changes-in-node-stats-api-reporting-swap-status/7086 "2012-03-21T17:02:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [March 21, 2012, 5:02pm UTC](https://discuss.elastic.co/t/about-changes-in-node-stats-api-reporting-swap-status/7086/1 "2012-03-21T17:02:59Z")

</div>

Hi,

I noticed couple of changes in how SWAP is being reported in 0.19.x API now.

Node Stats in 0.18.x contained two values:

- swap / free[\_in\_bytes]
- swap / used[\_in\_bytes]

In 0.19.x Node Stats API contains only

- swap / free[\_in\_bytes]

and Node Info contains:

- swap / total[\_in\_bytes]

My understanding is that swap can grow but it does not mean it is all  
taken. Does it mean that if swap grows also value in Node info API can  
change now? And actually, amount of swap that is taken can be calculated as  
NodeInfo/swap/total - NodeStats/swap/free. Is that correct?

Regards,  
Lukas

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 22, 2012, 12:06pm UTC](https://discuss.elastic.co/t/about-changes-in-node-stats-api-reporting-swap-status/7086/2 "2012-03-22T12:06:19Z")

</div>

0.18 and 0.19 are the same when it comes to swap, total is reported in  
info, and used/free is reported in stats. Though, I agree, it might make  
sense to move total to stats if it can change dynamically, the idea is that  
info always hold data that can't be changed.

On Wed, Mar 21, 2012 at 7:02 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Hi,
> 
> I noticed couple of changes in how SWAP is being reported in 0.19.x API  
> now.
> 
> Node Stats in 0.18.x contained two values:
> 
> - swap / free[\_in\_bytes]
> - swap / used[\_in\_bytes]
> 
> In 0.19.x Node Stats API contains only
> 
> - swap / free[\_in\_bytes]
> 
> and Node Info contains:
> 
> - swap / total[\_in\_bytes]
> 
> My understanding is that swap can grow but it does not mean it is all  
> taken. Does it mean that if swap grows also value in Node info API can  
> change now? And actually, amount of swap that is taken can be calculated as  
> NodeInfo/swap/total - NodeStats/swap/free. Is that correct?
> 
> Regards,  
> Lukas

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [March 22, 2012, 12:19pm UTC](https://discuss.elastic.co/t/about-changes-in-node-stats-api-reporting-swap-status/7086/3 "2012-03-22T12:19:54Z")

</div>

Well, my point was that I did not see "used" in stats, just "free". (I said  
it too complicated)

On Thu, Mar 22, 2012 at 1:06 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> 0.18 and 0.19 are the same when it comes to swap, total is reported in  
> info, and used/free is reported in stats. Though, I agree, it might make  
> sense to move total to stats if it can change dynamically, the idea is that  
> info always hold data that can't be changed.
> 
> On Wed, Mar 21, 2012 at 7:02 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com)wrote:
> 
> > Hi,
> > 
> > I noticed couple of changes in how SWAP is being reported in 0.19.x API  
> > now.
> > 
> > Node Stats in 0.18.x contained two values:
> > 
> > - swap / free[\_in\_bytes]
> > - swap / used[\_in\_bytes]
> > 
> > In 0.19.x Node Stats API contains only
> > 
> > - swap / free[\_in\_bytes]
> > 
> > and Node Info contains:
> > 
> > - swap / total[\_in\_bytes]
> > 
> > My understanding is that swap can grow but it does not mean it is all  
> > taken. Does it mean that if swap grows also value in Node info API can  
> > change now? And actually, amount of swap that is taken can be calculated as  
> > NodeInfo/swap/total - NodeStats/swap/free. Is that correct?
> > 
> > Regards,  
> > Lukas

---

<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:** [July 6, 2017, 3:35am UTC](https://discuss.elastic.co/t/about-changes-in-node-stats-api-reporting-swap-status/7086/4 "2017-07-06T03:35:12Z")

</div>


