X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=tools%2Fmountstats%2Fmountstats.py;h=b95b71d27ef3f43ff9d47bac3753e6b82ad08e90;hp=c475c9efde12bed74abb8205619d2e04d7b46a3a;hb=dbf4e0cb138e07700975f77d74c077ee11f2766a;hpb=191d129672dacdc3ae3ac165cd1f2a877529d0ad diff --git a/tools/mountstats/mountstats.py b/tools/mountstats/mountstats.py index c475c9e..b95b71d 100644 --- a/tools/mountstats/mountstats.py +++ b/tools/mountstats/mountstats.py @@ -17,7 +17,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +MA 02110-1301 USA """ import sys, os, time @@ -45,6 +46,12 @@ class DeviceData: self.__nfs_data['fstype'] = words[7] if words[7].find('nfs') != -1: self.__nfs_data['statvers'] = words[8] + elif 'nfs' in words or 'nfs4' in words: + self.__nfs_data['export'] = words[0] + self.__nfs_data['mountpoint'] = words[3] + self.__nfs_data['fstype'] = words[6] + if words[6].find('nfs') != -1: + self.__nfs_data['statvers'] = words[7] elif words[0] == 'age:': self.__nfs_data['age'] = long(words[1]) elif words[0] == 'opts:': @@ -370,6 +377,9 @@ def parse_stats_file(filename): if words[0] == 'device': key = words[4] new = [ line.strip() ] + elif 'nfs' in words or 'nfs4' in words: + key = words[3] + new = [ line.strip() ] else: new += [ line.strip() ] ms_dict[key] = new