Skip to content

Commit

Permalink
add java and tmux version and change ram to int
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Oct 30, 2023
1 parent 9a525fe commit ceccf92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lgsm/modules/info_distro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ if [ "$(command -v numfmt 2> /dev/null)" ]; then
fi

# Available RAM and swap.
physmemtotalmb="$(((physmemtotalkb + 512) / 1024))" # integer
physmemtotalgb="$(((physmemtotalmb + 512) / 1024))" # integer
physmemtotalmb="$(((physmemtotalkb + 512) / 1024))" # integer # integer
physmemtotalgb="$(((physmemtotalmb + 512) / 1024))" # integer # integer
physmemtotal="$(numfmt --to=iec --from=iec --suffix=B "${physmemtotalkb}K")" # string
physmemfree="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" # string
physmemused="$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb - physmemfreekb - physmembufferskb - physmemcachedkb - physmemreclaimablekb))K")" # string
Expand Down
9 changes: 5 additions & 4 deletions lgsm/modules/info_stats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ payload="{
{
\"name\": \"LinuxGSM\",
\"params\": {
\"cpuusedmhzroundup\": \"${cpuusedmhzroundup}MHz\",
\"cpuusedmhzroundup\": \"${cpuusedmhzroundup}\",
\"diskused\": \"${serverfilesdu}\",
\"distro\": \"${distroname}\",
\"game\": \"${gamename}\",
\"memusedmbroundup\": \"${memusedmbroundup}MB\",
\"ramused\": \"${memusedmbroundup}MB\",
\"memusedmbroundup\": \"${memusedmbroundup}\",
\"ramused\": \"${memusedmbroundup}\",
\"servercpu\": \"${cpumodel} ${cpucores} cores\",
\"servercpufreq\": \"${cpufreqency} x${cpucores}\",
\"serverdisk\": \"${totalspace}\",
Expand All @@ -83,7 +83,8 @@ payload="{
\"uuidinstance\": \"${uuidinstance}\",
\"version\": \"${version}\",
\"virtualenvironment\": \"${virtualenvironment}\",
\"tmuxversion\": \"${tmuxversion}\"
\"tmuxversion\": \"${tmuxversion}\",
\"java\": \"${javaversion}\"
}
}
]
Expand Down

0 comments on commit ceccf92

Please sign in to comment.