Getting mount stats for filesystems

"Martin v. Löwis" martin at v.loewis.de
Tue Jun 5 15:32:21 EDT 2007


Mitko Haralanov schrieb:
> On Tue, 05 Jun 2007 20:14:01 +0200
> "Martin v. Löwis" <martin at v.loewis.de> wrote:
> 
>> Ah, ok. I recommend to parse /proc/mounts.
> 
> I was looking for something that reminded me less of Perl and more of C
> but haven't been able to find such a method.

You could try to invoke getmntent(3). I'm not aware of a Python wrapper
for it, so you either try to write one yourself in C, or use ctypes to
write it in Python.

Regards,
Martin



More information about the Python-list mailing list