diff options
author | wiggin15 <wiggin15@yahoo.com> | 2017-09-26 14:52:42 +0300 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-09-26 19:52:42 +0800 |
commit | 1ebe625e5aa21b33e9de5652c305d1d0a2147059 (patch) | |
tree | 79448f6cc3df6d892c2fe22ead726b2a94a52111 /scripts/procinfo.py | |
parent | 730e0fbba6a2ef4a01a5a67759e15dad5613d3a9 (diff) | |
download | psutil-1ebe625e5aa21b33e9de5652c305d1d0a2147059.tar.gz |
AIX support (#1123)
* AIX support
* AIX support
* AIX support
* AIX support - use get_procfs_path() instead of /proc
* AIX support - group sections like in other modules
* AIX support
* AIX support
* AIX support
* AIX support - remove unnecessary dict copy
Diffstat (limited to 'scripts/procinfo.py')
-rwxr-xr-x | scripts/procinfo.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/procinfo.py b/scripts/procinfo.py index d8625560..54205de3 100755 --- a/scripts/procinfo.py +++ b/scripts/procinfo.py @@ -225,7 +225,8 @@ def run(pid, verbose=False): if 'io_counters' in pinfo: print_('I/O', str_ntuple(pinfo['io_counters'], bytes2human=True)) - print_("ctx-switches", str_ntuple(pinfo['num_ctx_switches'])) + if 'num_ctx_switches' in pinfo: + print_("ctx-switches", str_ntuple(pinfo['num_ctx_switches'])) if pinfo['children']: template = "%-6s %s" print_("children", template % ("PID", "NAME")) |