# kvm_getswapinfo equivalent sysctl



## hsn (Apr 7, 2012)

Hi, 

*I* need to be able to get the number of free swap bytes from a java program. I can execute *sysctl* but can*'*t find the correct variable with free or used swap space. I see only total swap space.

Does anybody know which sysctl it is?


----------



## Harikrishnan (Apr 10, 2012)

Hi hsn,

Try this


```
]# swapinfo 
Device          1K-blocks     Used    Avail Capacity
/dev/ad1s1b       2061280        0  2061280     0%
```


----------

