зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1212502 - revert _pslinux.py file to initially vendored state r=ahal
Changes: - reverts the changes made to a vendored psutil file to a prior state Differential Revision: https://phabricator.services.mozilla.com/D51667 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
815d827202
Коммит
9666fe15f4
|
@ -1051,6 +1051,8 @@ def disk_io_counters():
|
|||
# ...unless (Linux 2.6) the line refers to a partition instead
|
||||
# of a disk, in which case the line has less fields (7):
|
||||
# "3 1 hda1 8 8 8 8"
|
||||
# 4.18+ has 4 fields added:
|
||||
# "3 0 hda 8 8 8 8 8 8 8 8 8 8 8 0 0 0 0"
|
||||
# See:
|
||||
# https://www.kernel.org/doc/Documentation/iostats.txt
|
||||
# https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats
|
||||
|
@ -1062,7 +1064,7 @@ def disk_io_counters():
|
|||
reads = int(fields[2])
|
||||
(reads_merged, rbytes, rtime, writes, writes_merged,
|
||||
wbytes, wtime, _, busy_time, _) = map(int, fields[4:14])
|
||||
elif fields_len == 14:
|
||||
elif fields_len == 14 or fields_len == 18:
|
||||
# Linux 2.6+, line referring to a disk
|
||||
name = fields[2]
|
||||
(reads, reads_merged, rbytes, rtime, writes, writes_merged,
|
||||
|
|
Загрузка…
Ссылка в новой задаче