Bug 908296 - Upgrade psutil to version 1.0.1; rs=glandium

Archive obtained from
https://psutil.googlecode.com/files/psutil-1.0.1.tar.gz and extracted
over existing source code without modifications.
This commit is contained in:
Gregory Szorc
2013-08-22 23:36:57 -07:00
parent 94e359dda6
commit 9fb86d2ef8
53 changed files with 3201 additions and 669 deletions

View File

@@ -2,7 +2,7 @@
#
# $Id: iotop.py 1160 2011-10-14 18:50:36Z g.rodola@gmail.com $
#
# Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -72,12 +72,12 @@ def bytes2human(n):
def poll(interval):
"""Retrieve raw stats within an interval window."""
tot_before = psutil.network_io_counters()
pnic_before = psutil.network_io_counters(pernic=True)
tot_before = psutil.net_io_counters()
pnic_before = psutil.net_io_counters(pernic=True)
# sleep some time
time.sleep(interval)
tot_after = psutil.network_io_counters()
pnic_after = psutil.network_io_counters(pernic=True)
tot_after = psutil.net_io_counters()
pnic_after = psutil.net_io_counters(pernic=True)
return (tot_before, tot_after, pnic_before, pnic_after)