On Monday 26 September 2005 10.14, Darren J Moffat wrote:
> On Mon, 2005-09-26 at 08:59, Henrik Nordin wrote:
> > Hi
> >
> > I have been using KStat with great success to check memory status, swap
> > status and a whole bunch of other statistics. Now I am trying to
> > implement a mechanism that warns on low disk space. Much to my dismay I
> > haven't been able to use kstat to achieve this. I don't want to invoke df
> > from my program and so I wonder if anyone knows a way to do this check
> > from within my program?
>
> What about the standard interface statvfs(2).
>
> Glad to see you know that running df and parsing the output is the wrong
> solution though, I've seen too many programs do that recently.

statvfs seems to be exactly what I am looking for, thanks a lot.

How do I get hold of a list of all the partitions so that I can walk through 
them all with stavfs?

/Henrik Nordin
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to