Skip to content

Commit 41f84bd

Browse files
committed
dongjiang, fix zfs memory_available_bytes collector
1 parent 184a4e0 commit 41f84bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

collector/zfs_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const (
3535
// kstatDataChar = "0"
3636
// kstatDataInt32 = "1"
3737
// kstatDataUint32 = "2"
38-
// kstatDataInt64 = "3"
38+
kstatDataInt64 = "3"
3939
kstatDataUint64 = "4"
4040
// kstatDataLong = "5"
4141
// kstatDataUlong = "6"
@@ -163,7 +163,7 @@ func (c *zfsCollector) parseProcfsFile(reader io.Reader, fmtExt string, handler
163163

164164
// kstat data type (column 2) should be KSTAT_DATA_UINT64, otherwise ignore
165165
// TODO: when other KSTAT_DATA_* types arrive, much of this will need to be restructured
166-
if parts[1] == kstatDataUint64 {
166+
if parts[1] == kstatDataUint64 || parts[1] == kstatDataInt64 {
167167
key := fmt.Sprintf("kstat.zfs.misc.%s.%s", fmtExt, parts[0])
168168
value, err := strconv.ParseUint(parts[2], 10, 64)
169169
if err != nil {

0 commit comments

Comments
 (0)