[Date Prev]   [Date Next] [Thread Prev]   [Thread Next] [Date Index]   [Thread Index]

 

     Re: [snips-users] ext3 partitions

Hi Russell,

I did that as a quick fix too for some servers under my care.

But I also did a C version of the hostmon client that uses portions of
codefrom the "df" command. It seems to work with other filesystems (I
tried with ext3 and reiserfs) too.

The source code may be found here.
http://home.pacific.net.sg/~shaoyi/snips/linux/hostmon-client.c

You might want to check out the above source code and modify it to fit
your needs. The output is very similar to the Perl version.

Regards,
Tan Shao Yi

On Wed, 14 Jan 2004, Russell Miller wrote:

> Long time listener, first time caller :)  Not really, just always wanted
> to say that...
>
> Hi, I just found a buglet.  in hostmon-client.linux, it only reads ext2
> partitions.  Ext3 is a journaling filesystem based on ext2.  Most of our
> filesystems are migrated to ext3.
>
> df -k -t ext2 -t ext3 is probably a better command line.
>
> However, I'm not really sure this is the way to do it.  There are so many
> different kinds of filesystems now, xfs, reiserfs, jfs, ext2, ext3, yada
> yada yada, perhaps a more generic way of doing it should be created.
> Perhaps read from /proc/filesystems and use any filesystem that does not
> have nodev on it?  On a system I run, that only leaves ext2, ext3, jfs,
> and iso9660.  if there are exclusions for cd based filesystems (iso9660,
> udf, etc) this should be workable.
>
> Otherwise you'll just leave some disks out of the loop with no warning.
>
> Thoughts?

Zyrion Traverse Network Monitoring & Network Management Software