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
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:':
else:
print '\t0.00'
- # reads: ops/s, Kb/s, avg rtt, and avg exe
+ # reads: ops/s, kB/s, avg rtt, and avg exe
# XXX: include avg xfer size and retransmits?
read_rpc_stats = self.__rpc_data['READ']
ops = float(read_rpc_stats[0])
rtt = float(read_rpc_stats[6])
exe = float(read_rpc_stats[7])
- print '\treads:\tops/s\t\tKb/s\t\tavg RTT (ms)\tavg exe (ms)'
+ print '\treads:\tops/s\t\tkB/s\t\tavg RTT (ms)\tavg exe (ms)'
print '\t\t%.2f' % (ops / sample_time),
print '\t\t%.2f' % (kilobytes / sample_time),
if ops != 0:
print '\t\t0.00',
print '\t\t0.00'
- # writes: ops/s, Kb/s, avg rtt, and avg exe
+ # writes: ops/s, kB/s, avg rtt, and avg exe
# XXX: include avg xfer size and retransmits?
write_rpc_stats = self.__rpc_data['WRITE']
ops = float(write_rpc_stats[0])
rtt = float(write_rpc_stats[6])
exe = float(write_rpc_stats[7])
- print '\twrites:\tops/s\t\tKb/s\t\tavg RTT (ms)\tavg exe (ms)'
+ print '\twrites:\tops/s\t\tkB/s\t\tavg RTT (ms)\tavg exe (ms)'
print '\t\t%.2f' % (ops / sample_time),
print '\t\t%.2f' % (kilobytes / sample_time),
if ops != 0:
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