~ubuntu-branches/ubuntu/precise/nfs-utils/precise-updates

« back to all changes in this revision

Viewing changes to tools/nfs-iostat/nfs-iostat.py

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-07-23 17:54:36 UTC
  • mfrom: (14.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110723175436-mu7zaa6637prifpq
* Merge from Debian unstable (LP: #728586, LP: #789117), remaining
  changes:
  - debian/nfs-common.{statd,statd-mounting,gssd,idmapd}.upstart,
    debian/control, debian/nfs-common.{preinst,postinst,prerm,postrm},
    debian/rules: drop nfs-common init script in favor of upstart jobs,
    and build-depend on debhelper (>= 7.3.15ubuntu3) for correct upstart
    init handling.
  - Depend on rpcbind (>= 0.2.0-6ubuntu1) for upstart support.
  - debian/nfs-kernel-server.postinst: don't call "invoke-rc.d nfs-common"
    in the postinst, this is redundant anyway and the nfs-common init script
    is gone now.
  - nfs-kernel-server.default:  Add comment about how to disable nfs4.
  - debian/patches/multiarch-kerberos-paths: Search for kerberos libs
    in multiarch locations.
  - nfs-kernel-server.init: Unmount nfsd fs when init script stops
  - ubuntu-fix-kernel-version-handling: avoid segfaults from short kernel
    version numbers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
366
366
        sends = float(self.__rpc_data['rpcsends'])
367
367
        if sample_time == 0:
368
368
            sample_time = float(self.__nfs_data['age'])
 
369
        #  sample_time could still be zero if the export was just mounted.
 
370
        #  Set it to 1 to avoid divide by zero errors in this case since we'll
 
371
        #  likely still have relevant mount statistics to show.
 
372
        #
 
373
        if sample_time == 0:
 
374
            sample_time = 1;
369
375
        if sends != 0:
370
376
            backlog = (float(self.__rpc_data['backlogutil']) / sends) / sample_time
371
377
        else: