hosts. I wasn't sure about the naming, so feel free to make suggestions.
I can't off the top of my head think of something to add as an additional
command for the module, but figured that having the module as disk with
usage as just a function left room for growth.
Here is some example usage:
[root@overlord modules]# func "minion" call disk usage
{'minion': {'/': {'available': 22596344,
'device': '/dev/hda2',
'percentage': 8,
'total': 25822364,
'used': 1914316},
'/boot': {'available': 176701,
'device': '/dev/hda1',
'percentage': 8,
'total': 202220,
'used': 15079},
'/dev/shm': {'available': 1027736,
'device': 'none',
'percentage': 0,
'total': 1027736,
'used': 0},
'/tmp': {'available': 3785508,
'device': '/dev/hda5',
'percentage': 2,
'total': 4032092,
'used': 41760},
'/var': {'available': 3487956,
'device': '/dev/hda3',
'percentage': 9,
'total': 4032124,
'used': 339340}}}
[root@overlord modules]# func "minion" call disk usage /boot
{'minion': {'/boot': {'available': 176701,
'device': '/dev/hda1',
'percentage': 8,
'total': 202220,
'used': 15079}}}
The optional partition argument accepts the same arguments as the cli df's. I also checked and standard cli regexp like * and [abc] also work for the partition name.
-greg
Attachment:
disk.py
Description: Binary data
_______________________________________________ Func-list mailing list Func-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/func-list