[users at i-scream] Missing information/fields in sg_fs_stats
Jens Rehsack
rehsack at googlemail.com
Wed Sep 8 15:29:40 BST 2010
2010/9/8 Jens Rehsack <rehsack at googlemail.com>:
> Hi *,
>
> after the port for AIX/HPUX is (more or less) finished, we moved forward to
> design and implement our Agent++ snmp daemon (our intension to port
> libstatgrap).
> I will not add this prologue to each "missing ...." mailing, butt I
> though for the first
> one it could be a good idea. Probably these discussions belongs to
> developers at i-scream.org, but I read it as "closed" (I understood it as
> "committers
> only" as it's in other projects, too).
>
> Back to the first issue:
>
> sg_fs_stats needs for us 2 additional pieces of information:
> 1) a field what contains the mount options
> 2) a field containing some kind of state/type:
> typedef enum {
> SG_FS_UNKNOWN = 0,
> SG_FS_REGULAR,
> SG_FS_SPECIAL,
> SG_FS_REMOTE,
> SG_FS_LOOPBACK,
> } sg_fs_some_kind_of_type_flag; /* could need a better name */
We discussed this a bit more internally and came to the conclusion, that
we need other values here:
typedef enum {
SG_FS_UNKNOWN = 0,
SG_FS_REGULAR = 1 << 0,
SG_FS_SPECIAL = 1 << 1,
SG_FS_REMOTE = 1 << 2,
SG_FS_LOOPBACK = 1 << 3,
SG_FS_ALL = ( 1 << 4 ) - 1,
} sg_fs_some_kind_of_type_flag; /* could need a better name */
> Special should be any OS-related filesystem, as sysfs, procfs, kernfs, Solaris
> systable access via e.g. /etc/mnttab etc. Remote filesystems should be any
> known fs which is mount over network (smbfs, cifs, afs, nfs, nfs4, ...).
> Loopback is for those mount which are mounted via "mount -o bind ..." on Linux
> or "mount -t namefs .." on AIX etc.
Further, we need an enhanced interface to sg_get_fs_stats:
sg_fs_stats *sg_get_fs_stats(int *entries){
return sg_get_fs_stats_filter(entries, sg_fs_alltypes);
}
sg_fs_stats *sg_get_fs_stats_filter(int *entries, int mask){
... /* deliver only those which match e.g. SG_FS_REGULAR */
}
/Jens
More information about the users
mailing list