os.statvfs on FreeBSD
Tom Messmer
t_messmer at yahoo.com
Sat Jun 16 23:51:12 EDT 2001
Thanks for looking at this, I took some time and noticed that there
was really no statvfs system call in FreeBSD (stable) and thought it
might be possible to use the statfs call and map it to the same tuple
returned by python's os.statvfs routine. Er, but thats as far as I got
with it so far because I'm new at Python and not much of a programmer
anyway. I looked at the os module itself and saw that it calls posix
for unix-like systems, but from there I couldnt tell how it accesses
system calls. If someone would care to explain this I'd love to hear
about it, my eyes crossed after staring at all these classes and
subclasses and sub sub...well you get the picture. All I really need
is to write some code to grab system disk statistics so my servers
don't get all full up, and i dont want to use some huge thing like big
brother or spong.
Thanks for the posts.
Tom Messmer
charles at aspen.sweetshade.net (Charles Allen) wrote in message news:<slrn9incpf.feg.charles at aspen.sweetshade.net>...
> To follow up to my own followup a bit:
>
> >>>> os.statvfs("/")
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in ?
> > AttributeError: 'os' module has no attribute 'statvfs'
>
> I should have explained that FreeBSD has no statvfs library routine
> (at least 4-STABLE, I don't know about 5-CURRENT). If the original
> poster would explain the specific info he's looking for, perhaps an
> alternative can be found.
More information about the Python-list
mailing list