[users at i-scream] Cannot read file system stats
Tim Bishop
tim at bishnet.net
Thu Feb 7 11:12:09 GMT 2013
On Thu, Feb 07, 2013 at 11:37:45AM +0100, Patrick Nowak wrote:
> Am 07.02.2013 11:28, schrieb Tim Bishop:
> > On Thu, Feb 07, 2013 at 09:33:50AM +0100, Patrick Nowak wrote:
> >> as I said before, it works with the newest version from the repo.
> >> Unfortunately the requirement is to use the version provided by Ubuntu
> >> 12.04 ( 0.17-0ubuntu1) or even 10.04 (0.16-0.1).
> >> Can anybody tell me what changed between this versions and is there a
> >> way to get this working with the older version?
> > I expect it's the filesystem type. Are the ones it's not seeing ext4? A
> > good way to test is to use the statgrab command:
> >
> > statgrab fs.
> >
> > I suspect with the provided Ubuntu version it doesn't show them, but
> > with the newest one it does.
> >
> > There's no workaround I'm afraid. The list of filesystems is burnt in to
> > the library in the older versions.
>
> It shows no file systems at all when calling sg_get_fs_stats(). There
> should be different file systems mounted when I call the function (ext4,
> tmpfs, proc, ...).
It filters the filesystems against a list of types:
#define VALID_FS_TYPES {"adfs", "affs", "befs", "bfs", "efs", "ext2", \
"ext3", "vxfs", "hfs", "hfsplus", "hpfs", "jffs", \
"jffs2", "minix", "msdos", "ntfs", "qnx4", "ramfs", \
"rootfs", "reiserfs", "sysv", "v7", "udf", "ufs", \
"umsdos", "vfat", "xfs", "jfs", "nfs"}
> 'statgrab fs' returns 'Unknown stat fs'. Are you sure that's the right
> command? --help doesn't show any option like that.
The dot on the end was intentional:
statgrab fs.
Although it'll only return what sg_get_fs_stats() does. It's just a bit
easier to test different versions of libstatgrba than writing your own
code.
Tim.
--
Tim Bishop
http://www.bishnet.net/tim/
PGP Key: 0x5AE7D984
More information about the users
mailing list