[patch] added "df" method to "mount" module

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

 



Included a patch that will add support for a "df" method to the "mount" minion module. It does what its name suggests :D

Return data is a dict: { 'mountpoint': [total_space, free_space, device, fs_type] }

I found out the hard way that XML-RPC doesn't like integers bigger than 32bit, so the space is reported in 1KiB units. This gives us a maximum fs size of 4TiB, which is rather small.

I never used XML-RPC directly nor touched func's implementation, but I suspect there's a way to use 64bit values. At least it's there in the C library xmlrpc-c, which I found out using it with rtorrent :D

vm1 ~ # func vm2 call mount df
{'vm2': {'/': [8256952, 6511760, '/dev/root', 'ext3'],
         '/dev': [10240, 10188, 'udev', 'tmpfs'],
         '/dev/shm': [262200, 262200, 'shm', 'tmpfs']}}

Attachment: func-mount_df.diff
Description: Binary data


PS, anyone knows why I get single characters if I do "for line in openedfile.readline()" ?
I had to use file.readlines() [notice the last 's'].

--
Luca Lesinigo
_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux