Skip to content

Commit fbf5674

Browse files
committed
dependencies bump + show resources
1 parent 3223736 commit fbf5674

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

mobsf/MobSF/utils.py

+13
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,17 @@ def upstream_proxy(flaw_type):
9898
return proxies, verify
9999

100100

101+
def get_system_resources():
102+
"""Get CPU and Memory Available."""
103+
# Get number of physical cores
104+
physical_cores = psutil.cpu_count(logical=False)
105+
# Get number of logical processors (threads)
106+
logical_processors = psutil.cpu_count(logical=True)
107+
# Get total RAM
108+
total_ram = psutil.virtual_memory().total / (1024 ** 3) # Convert bytes to GB
109+
return physical_cores, logical_processors, total_ram
110+
111+
101112
def print_version():
102113
"""Print MobSF Version."""
103114
logger.info(settings.BANNER)
@@ -122,6 +133,8 @@ def print_version():
122133
dst_str = f' ({dist}) '
123134
env_str = f'OS Environment: {os}{dst_str}{pltfm}'
124135
logger.info(env_str)
136+
cores, threads, ram = get_system_resources()
137+
logger.info('CPU Cores: %s, Threads: %s, RAM: %.2f GB', cores, threads, ram)
125138
find_java_binary()
126139
check_basic_env()
127140
thread = threading.Thread(target=check_update, name='check_update')

poetry.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)