node_exporter icon indicating copy to clipboard operation
node_exporter copied to clipboard

filetem ntrices prompts that the string description is inaccurate

Open linuxgcc opened this issue 1 year ago • 0 comments

The following description is inaccurate

# HELP node_filesystem_avail_bytes Filesystem space available to non-root users in bytes. # TYPE node_filesystem_avail_bytes gauge node_filesystem_avail_bytes{device="/dev/loop0",device_error="",fstype="ext4",mountpoint="/mnt"} 1.916194816e+09 node_filesystem_avail_bytes{device="/dev/mapper/uos-home",device_error="",fstype="xfs",mountpoint="/home"} 2.1702529024e+10 node_filesystem_avail_bytes{device="/dev/mapper/uos-root",device_error="",fstype="xfs",mountpoint="/"} 6.729623552e+10 node_filesystem_avail_bytes{device="/dev/vda1",device_error="",fstype="vfat",mountpoint="/boot/efi"} 5.77241088e+08 node_filesystem_avail_bytes{device="/dev/vda2",device_error="",fstype="xfs",mountpoint="/boot"} 8.01288192e+08 node_filesystem_avail_bytes{device="gvfsd-fuse",device_error="",fstype="fuse.gvfsd-fuse",mountpoint="/run/user/0/gvfs"} 0 node_filesystem_avail_bytes{device="tmpfs",device_error="",fstype="tmpfs",mountpoint="/run"} 3.76717312e+09 node_filesystem_avail_bytes{device="tmpfs",device_error="",fstype="tmpfs",mountpoint="/run/user/0"} 7.54270208e+08 node_filesystem_avail_bytes{device="tmpfs",device_error="",fstype="tmpfs",mountpoint="/tmp"} 3.768139776e+09 # HELP node_filesystem_device_error Whether an error occurred while getting statistics for the given device. # TYPE node_filesystem_device_error gauge

The man manual describes this field as follows

DESCRIPTION The statfs() system call returns information about a mounted filesystem. path is the pathname of any file within the mounted filesystem. buf is a pointer to a statfs structure defined approximately as follows:

       struct statfs {
           __fsword_t f_type;    /* Type of filesystem (see below) */
           __fsword_t f_bsize;   /* Optimal transfer block size */
           fsblkcnt_t f_blocks;  /* Total data blocks in filesystem */
           fsblkcnt_t f_bfree;   /* Free blocks in filesystem */
           **fsblkcnt_t f_bavail;  /* Free blocks available to
                                    unprivileged user */**
           fsfilcnt_t f_files;   /* Total file nodes in filesystem */
           fsfilcnt_t f_ffree;   /* Free file nodes in filesystem */
           fsid_t     f_fsid;    /* Filesystem ID */
           __fsword_t f_namelen; /* Maximum length of filenames */
           __fsword_t f_frsize;  /* Fragment size (since Linux 2.6) */
           __fsword_t f_flags;   /* Mount flags of filesystem
                                    (since Linux 2.6.36) */
           __fsword_t f_spare[xxx];
                           /* Padding bytes reserved for future use */
       };

my suggestion

Modify description from: Filesystem space available to non-root users in bytes. to: Filesystem space available tounprivileged user in bytes.

linuxgcc avatar Mar 25 '24 03:03 linuxgcc