n27051538 / solaris_exporter

SPARC solaris exporter for Prometheus
MIT License
21 stars 8 forks source link

For python3 #8

Closed n27051538 closed 2 years ago

n27051538 commented 2 years ago

The old version of psutil fails due to changes in swap -l command output.

New variant:

# swap -l
swapfile                      dev            swaplo      blocks        free encrypted
/dev/zvol/dsk/bercutroot/swap 248,4               0     8388608     8388608       yes

Old variant:

$ swap -l
swapfile                    dev            swaplo      blocks        free
/dev/zvol/dsk/swapdump/swap 259,1              16   136314864   136314864

The latest version of psutil library 5.9.0 is adapted to this behavior, but the latest version of psutil not supports Python 2.7. That is why I copied psutil code to local function psutil_local_swap_memory and adapted it.

Also I added support for Python3.7 and updated installation documentation for Python3.