diff --git a/PyPI/setup.cfg b/PyPI/setup.cfg index 107a849..3c4b536 100644 --- a/PyPI/setup.cfg +++ b/PyPI/setup.cfg @@ -1,7 +1,7 @@ [metadata] # replace with your username: name = guan -version = 0.1.45 +version = 0.1.46 author = guanjihuan author_email = guanjihuan@163.com description = An open source python package diff --git a/PyPI/src/guan.egg-info/PKG-INFO b/PyPI/src/guan.egg-info/PKG-INFO index fc015a4..2ba2d9b 100644 --- a/PyPI/src/guan.egg-info/PKG-INFO +++ b/PyPI/src/guan.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: guan -Version: 0.1.45 +Version: 0.1.46 Summary: An open source python package Home-page: https://py.guanjihuan.com Author: guanjihuan diff --git a/PyPI/src/guan/others.py b/PyPI/src/guan/others.py index 6ed11c8..2425348 100644 --- a/PyPI/src/guan/others.py +++ b/PyPI/src/guan/others.py @@ -48,9 +48,9 @@ def get_cpu_usage(interval=1): def get_memory_info(): import psutil memory_info = psutil.virtual_memory() - total_memory = memory_info.total - used_memory = memory_info.used - available_memory = memory_info.available + total_memory = memory_info.total/(1024**2) + used_memory = memory_info.used/(1024**2) + available_memory = memory_info.available/(1024**2) used_memory_percent = memory_info.percent return total_memory, used_memory, available_memory, used_memory_percent