From ceccf921442d56b1591ee98bc9ddc4d9286488cd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 30 Oct 2023 19:58:37 +0000 Subject: [PATCH] add java and tmux version and change ram to int --- lgsm/modules/info_distro.sh | 4 ++-- lgsm/modules/info_stats.sh | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index 70e1c23612..828946139e 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -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 diff --git a/lgsm/modules/info_stats.sh b/lgsm/modules/info_stats.sh index 9a0529f3a2..650dbef35c 100644 --- a/lgsm/modules/info_stats.sh +++ b/lgsm/modules/info_stats.sh @@ -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}\", @@ -83,7 +83,8 @@ payload="{ \"uuidinstance\": \"${uuidinstance}\", \"version\": \"${version}\", \"virtualenvironment\": \"${virtualenvironment}\", - \"tmuxversion\": \"${tmuxversion}\" + \"tmuxversion\": \"${tmuxversion}\", + \"java\": \"${javaversion}\" } } ]