Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for new platform (IBM i) #1564

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4ac4b34
initial addition of new module for IBM i
ThePrez Mar 1, 2019
6440229
cpu counts, disk/net counters (zero for now)
ThePrez Mar 1, 2019
c8cfe4d
check for missing pid
ThePrez Mar 1, 2019
066edf8
misc bugfixes
ThePrez Mar 1, 2019
3990433
Add process state, disk partitions, get_creds
ThePrez Mar 4, 2019
1a9a1cd
Clean up disk_partitions()
ThePrez Mar 4, 2019
d4118d5
add threads()
ThePrez Mar 4, 2019
0ec3ce6
Added boot_time()
ThePrez Mar 4, 2019
b4bc505
misc
ThePrez Mar 4, 2019
3b5b2f3
add disk_usage()
ThePrez Mar 4, 2019
4099225
fix return type of disk_partitions()
ThePrez Mar 4, 2019
1dd844f
Implement terminal() and users()
ThePrez Mar 6, 2019
5ce30fa
rss tweak
ThePrez Mar 6, 2019
28645a2
implement cmdline()
ThePrez Mar 6, 2019
bdcabc8
fix test failures with terminal(), disk_partitions()
ThePrez Mar 6, 2019
36f6c28
fix test_fetch_all() failure
ThePrez Mar 6, 2019
8d3ddf6
Remove all references to procfs
ThePrez Mar 6, 2019
f904e58
Add vscode settings to .gitignore
ThePrez Mar 14, 2019
e9e6669
Implement net_connections(), move psutil_get_proc() util
ThePrez Mar 14, 2019
dabc072
Remove AIX parts from build
ThePrez Mar 14, 2019
f04097c
Gut out AIX dead native code
ThePrez Mar 14, 2019
a38d26c
simple newline add
ThePrez Mar 14, 2019
1716d59
simple newline
ThePrez Mar 14, 2019
8631ba6
Add pid gathering to net_connections()
ThePrez Mar 14, 2019
8e43931
net_if_stats() and misc cleanup/dummy-returns
ThePrez Mar 14, 2019
39c7e38
Revert now-unused arch/aix parts
ThePrez Mar 17, 2019
271007e
Use Qp2getifaddrs() instead of getifaddrs()
ThePrez Mar 18, 2019
70bf3f8
net_connections() tweaks
ThePrez Mar 18, 2019
83bf101
minor cleanup
ThePrez Mar 18, 2019
1b53266
remove file_to_struct unused func
ThePrez Mar 26, 2019
9fb8eb2
Remove extraneous print statements
ThePrez Mar 26, 2019
f372a93
add _psibmi.AF_LINK
ThePrez Apr 1, 2019
f99e329
fix flake8 failures
Aug 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ syntax: glob
.tox/
build/
dist/
.vscode/
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ include psutil/__init__.py
include psutil/_common.py
include psutil/_compat.py
include psutil/_psaix.py
include psutil/_psibmi.py
include psutil/_psbsd.py
include psutil/_pslinux.py
include psutil/_psosx.py
include psutil/_psposix.py
include psutil/_pssunos.py
include psutil/_psutil_aix.c
include psutil/_psutil_ibmi.c
include psutil/_psutil_bsd.c
include psutil/_psutil_common.c
include psutil/_psutil_common.h
Expand Down
7 changes: 5 additions & 2 deletions psutil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@
PROCFS_PATH = "/proc"

elif AIX:
from . import _psaix as _psplatform
if os.uname().sysname == 'OS400':
giampaolo marked this conversation as resolved.
Show resolved Hide resolved
from . import _psibmi as _psplatform
else:
from . import _psaix as _psplatform

# This is public API and it will be retrieved from _pslinux.py
# via sys.modules.
Expand Down Expand Up @@ -1675,7 +1678,7 @@ def cpu_count(logical=True):
ret = _psplatform.cpu_count_logical()
else:
ret = _psplatform.cpu_count_physical()
if ret is not None and ret < 1:
if ret is not None and ret < 1 and os.uname().sysname != 'OS400':
ret = None
return ret

Expand Down
Loading