## fsusage fsusage |

## Synopsis

    #include <glibtop/fsusage.h>

    #define             GLIBTOP_FSUSAGE_BLOCKS
    #define             GLIBTOP_FSUSAGE_BFREE
    #define             GLIBTOP_FSUSAGE_BAVAIL
    #define             GLIBTOP_FSUSAGE_FILES
    #define             GLIBTOP_FSUSAGE_FFREE
    #define             GLIBTOP_FSUSAGE_BLOCK_SIZE
    #define             GLIBTOP_FSUSAGE_READ
    #define             GLIBTOP_FSUSAGE_WRITE
    #define             GLIBTOP_MAX_FSUSAGE
    struct              glibtop_fsusage;
    void                glibtop_get_fsusage                 (glibtop_fsusage *buf,
                                                             const char *mount_dir);
    #define             glibtop_get_fsusage_r
    void                glibtop_get_fsusage_l               (glibtop *server,
                                                             glibtop_fsusage *buf,
                                                             const char *mount_dir);
    void                glibtop_get_fsusage_s               (glibtop *server,
                                                             glibtop_fsusage *buf,
                                                             const char *mount_dir);

## Description

## Details

### GLIBTOP_FSUSAGE_BLOCKS

    #define GLIBTOP_FSUSAGE_BLOCKS		0

### GLIBTOP_FSUSAGE_BFREE

    #define GLIBTOP_FSUSAGE_BFREE		1

### GLIBTOP_FSUSAGE_BAVAIL

    #define GLIBTOP_FSUSAGE_BAVAIL		2

### GLIBTOP_FSUSAGE_FILES

    #define GLIBTOP_FSUSAGE_FILES		3

### GLIBTOP_FSUSAGE_FFREE

    #define GLIBTOP_FSUSAGE_FFREE		4

### GLIBTOP_FSUSAGE_BLOCK_SIZE

    #define GLIBTOP_FSUSAGE_BLOCK_SIZE 5

### GLIBTOP_FSUSAGE_READ

    #define GLIBTOP_FSUSAGE_READ           6

### GLIBTOP_FSUSAGE_WRITE

    #define GLIBTOP_FSUSAGE_WRITE          7

### GLIBTOP_MAX_FSUSAGE

    #define GLIBTOP_MAX_FSUSAGE		8

### struct glibtop_fsusage

    struct glibtop_fsusage {
    	guint64 flags;
    	guint64 blocks;		/* Total number of blocks. */
    	guint64 bfree;		/* Free blocks available to superuser. */
    	guint64 bavail;		/* Free blocks available to non-superuser. */
    	guint64 files;		/* Total file nodes. */
    	guint64 ffree;		/* Free file nodes. */
    	guint32 block_size; /* Size of a block in bytes. */
    	guint64 read, write;    /* Total blocks read and written */
    };

### glibtop_get_fsusage ()

    void                glibtop_get_fsusage                 (glibtop_fsusage *buf,
                                                             const char *mount_dir);

Get the file system usage for an specific `mount_dir`.

`buf` : | A location to return the file system usage.
`mount_dir` : | mount dir where to get the information of usage.

### glibtop_get_fsusage_r

    #define glibtop_get_fsusage_r		glibtop_get_fsusage_s

### glibtop_get_fsusage_l ()

    void                glibtop_get_fsusage_l               (glibtop *server,
                                                             glibtop_fsusage *buf,
                                                             const char *mount_dir);

### glibtop_get_fsusage_s ()

    void                glibtop_get_fsusage_s               (glibtop *server,
                                                             glibtop_fsusage *buf,
                                                             const char *mount_dir);