Skip to content

Commit df40ce1

Browse files
authored
fix(mysql): make memory size an integer output. (#493)
* 372199950 Make memory size an integer output.
1 parent c305e33 commit df40ce1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/collector/postgres/db-machine-specs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ coreScript=$(cat <<'EOF'
4747
hostName=$(hostname)
4848
physicalCpuCount=$(cat /proc/cpuinfo | grep -i '\s*core id\s*:' | sort | uniq | wc -l)
4949
logicalCpuCount=$(cat /proc/cpuinfo | grep -c -i '\s*processor\s*:')
50-
memoryMB=$(free -b | awk '/^Mem/{print ($2+0) / (1024*1024)}')
50+
memoryMB=$(free -b | awk '/^Mem/{printf("%d\n", ($2+0) / (1024*1024))}')
5151
totalSizeBytes=$(df --total / | awk '/total/{printf("%.0f\n", ($2+0) * 1024)}')
5252
usedSizeBytes=$(df --output=used -B1 / | awk 'NR==2{printf("%.0f\n", ($1+0))}')
5353
ipAddresses=$(ip -4 addr show scope global | awk '/inet / {gsub(/\/.*$/, "", $2); print $2}' | tr '\n' ',')

0 commit comments

Comments
 (0)