We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4666795 + b729314 commit 99c0043Copy full SHA for 99c0043
spug_api/apps/host/utils.py
@@ -240,9 +240,9 @@ def fetch_host_extend(ssh):
240
else:
241
response['memory'] = round(int(size) / 1024, 0)
242
if 'memory' not in response:
243
- code, out = ssh.exec_command_raw("free -m | awk 'NR==2{print $2}'")
+ code, out = ssh.exec_command_raw("cat /proc/meminfo | grep 'MemTotal' | awk '{print $2}'")
244
if code == 0:
245
- response['memory'] = math.ceil(int(out) / 1024)
+ response['memory'] = math.ceil(int(out) / 1024 / 1024)
246
247
response['public_ip_address'] = list(public_ip_address)
248
response['private_ip_address'] = list(private_ip_address)
0 commit comments