1sg_get_fs_stats(3)         Library Functions Manual         sg_get_fs_stats(3)
2
3
4

NAME

6       sg_get_fs_stats - get filesystem statistics
7

SYNOPSIS

9       #include <statgrab.h>
10
11
12       sg_fs_stats *sg_get_fs_stats(int *entries);
13

DESCRIPTION

15       The sg_get_fs_stats takes a pointer to an int, entries, which is filled
16       with the number of mounted file systems the  machine  has.  The  return
17       value  is  a  pointer  to  the  first member of an array of sg_fs_stats
18       structures; the number of entries in the array is returned in entries.
19
20       The function returns statistics about  mounted  filesystems,  including
21       free space and inode usage.
22

RETURN VALUES

24       sg_get_fs_stats returns a pointer to a structure of type sg_fs_stats.
25
26       typedef struct {
27               char *device_name;
28               char *fs_type;
29               char *mnt_point;
30               long long size;
31               long long used;
32               long long avail;
33               long long total_inodes;
34               long long used_inodes;
35               long long free_inodes;
36               long long avail_inodes;
37               long long io_size;
38               long long block_size;
39               long long total_blocks;
40               long long free_blocks;
41               long long used_blocks;
42               long long avail_blocks;
43       } sg_fs_stats;
44
45
46       device_name
47              The  name known to the operating system.  (eg. on linux it might
48              be hda)
49
50       fs_type
51              The type of the filesystem.
52
53       mnt_point
54              The mount point of the file system.
55
56       size   The size, in bytes, of the file system.
57
58       used   The amount of space, in bytes, used on the filesystem.
59
60       avail  The amount of space, in bytes, available on the filesystem.
61
62       total_inodes
63              The total number of inodes in the filesystem.
64
65       used_inodes
66              The number of used inodes in the filesystem.
67
68       free_inodes
69              The number of free inodes in the filesystem.
70
71       avail_inodes
72              The number of free inodes available to non-privileged processes.
73
74       io_size
75              A suggested optimal block size for IO operations  --  if  you're
76              reading or writing lots of data, do it in chunks of this size.
77
78       block_size
79              How  big blocks actually are on the underlying filesystem (typi‐
80              cally for purposes of stats reporting).
81
82       total_blocks
83              The total number of blocks in the filesystem.
84
85       free_blocks
86              The number of free blocks in the filesystem.
87
88       used_blocks
89              The number of used blocks in the filesystem.
90
91       avail_blocks
92              The number of free blocks available to non-privileged processes.
93

SEE ALSO

95       statgrab(3)
96

WEBSITE

98       http://www.i-scream.org/libstatgrab/
99
100
101
102i-scream                 $Date: 2005/07/13 13:01:23 $       sg_get_fs_stats(3)
Impressum