Browse Source

feat(stats): provide more accurate server numbers (#2864)

pull/2878/head
Daniel Gibbs 5 years ago
committed by GitHub
parent
commit
30bb11bb94
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 108
      lgsm/data/name-left.csv
  2. 237
      lgsm/data/name-right.csv
  3. 137
      lgsm/functions/info_stats.sh

108
lgsm/data/name-left.csv

@ -0,0 +1,108 @@
admiring
adoring
affectionate
agitated
amazing
angry
awesome
beautiful
blissful
bold
boring
brave
busy
charming
clever
cool
compassionate
competent
condescending
confident
cranky
crazy
dazzling
determined
distracted
dreamy
eager
ecstatic
elastic
elated
elegant
eloquent
epic
exciting
fervent
festive
flamboyant
focused
friendly
frosty
funny
gallant
gifted
goofy
gracious
great
happy
hardcore
heuristic
hopeful
hungry
infallible
inspiring
interesting
intelligent
jolly
jovial
keen
kind
laughing
loving
lucid
magical
mystifying
modest
musing
naughty
nervous
nice
nifty
nostalgic
objective
optimistic
peaceful
pedantic
pensive
practical
priceless
quirky
quizzical
recursing
relaxed
reverent
romantic
sad
serene
sharp
silly
sleepy
stoic
strange
stupefied
suspicious
sweet
tender
thirsty
trusting
unruffled
upbeat
vibrant
vigilant
vigorous
wizardly
wonderful
xenodochial
youthful
zealous
zen
1 admiring
2 adoring
3 affectionate
4 agitated
5 amazing
6 angry
7 awesome
8 beautiful
9 blissful
10 bold
11 boring
12 brave
13 busy
14 charming
15 clever
16 cool
17 compassionate
18 competent
19 condescending
20 confident
21 cranky
22 crazy
23 dazzling
24 determined
25 distracted
26 dreamy
27 eager
28 ecstatic
29 elastic
30 elated
31 elegant
32 eloquent
33 epic
34 exciting
35 fervent
36 festive
37 flamboyant
38 focused
39 friendly
40 frosty
41 funny
42 gallant
43 gifted
44 goofy
45 gracious
46 great
47 happy
48 hardcore
49 heuristic
50 hopeful
51 hungry
52 infallible
53 inspiring
54 interesting
55 intelligent
56 jolly
57 jovial
58 keen
59 kind
60 laughing
61 loving
62 lucid
63 magical
64 mystifying
65 modest
66 musing
67 naughty
68 nervous
69 nice
70 nifty
71 nostalgic
72 objective
73 optimistic
74 peaceful
75 pedantic
76 pensive
77 practical
78 priceless
79 quirky
80 quizzical
81 recursing
82 relaxed
83 reverent
84 romantic
85 sad
86 serene
87 sharp
88 silly
89 sleepy
90 stoic
91 strange
92 stupefied
93 suspicious
94 sweet
95 tender
96 thirsty
97 trusting
98 unruffled
99 upbeat
100 vibrant
101 vigilant
102 vigorous
103 wizardly
104 wonderful
105 xenodochial
106 youthful
107 zealous
108 zen

237
lgsm/data/name-right.csv

@ -0,0 +1,237 @@
albattani
allen
almeida
antonelli
agnesi
archimedes
ardinghelli
aryabhata
austin
babbage
banach
banzai
bardeen
bartik
bassi
beaver
bell
benz
bhabha
bhaskara
black
blackburn
blackwell
bohr
booth
borg
bose
bouman
boyd
brahmagupta
brattain
brown
buck
burnell
cannon
carson
cartwright
carver
cerf
chandrasekhar
chaplygin
chatelet
chatterjee
chebyshev
cohen
chaum
clarke
colden
cori
cray
curran
curie
darwin
davinci
dewdney
dhawan
diffie
dijkstra
dirac
driscoll
dubinsky
easley
edison
einstein
elbakyan
elgamal
elion
ellis
engelbart
euclid
euler
faraday
feistel
fermat
fermi
feynman
franklin
gagarin
galileo
galois
ganguly
gates
gauss
germain
goldberg
goldstine
goldwasser
golick
goodall
gould
greider
grothendieck
haibt
hamilton
haslett
hawking
hellman
heisenberg
hermann
herschel
hertz
heyrovsky
hodgkin
hofstadter
hoover
hopper
hugle
hypatia
ishizaka
jackson
jang
jemison
jennings
jepsen
johnson
joliot
jones
kalam
kapitsa
kare
keldysh
keller
kepler
khayyam
khorana
kilby
kirch
knuth
kowalevski
lalande
lamarr
lamport
leakey
leavitt
lederberg
lehmann
lewin
lichterman
liskov
lovelace
lumiere
mahavira
margulis
matsumoto
maxwell
mayer
mccarthy
mcclintock
mclaren
mclean
mcnulty
mendel
mendeleev
meitner
meninsky
merkle
mestorf
mirzakhani
moore
morse
murdock
moser
napier
nash
neumann
newton
nightingale
nobel
noether
northcutt
noyce
panini
pare
pascal
pasteur
payne
perlman
pike
poincare
poitras
proskuriakova
ptolemy
raman
ramanujan
ride
montalcini
ritchie
rhodes
robinson
roentgen
rosalind
rubin
saha
sammet
sanderson
satoshi
shamir
shannon
shaw
shirley
shockley
shtern
sinoussi
snyder
solomon
spence
stonebraker
sutherland
swanson
swartz
swirles
taussig
tereshkova
tesla
tharp
thompson
torvalds
tu
turing
varahamihira
vaughan
visvesvaraya
volhard
villani
wescoff
wilbur
wiles
williams
williamson
wilson
wing
wozniak
wright
wu
yalow
yonath
zhukovsky
1 albattani
2 allen
3 almeida
4 antonelli
5 agnesi
6 archimedes
7 ardinghelli
8 aryabhata
9 austin
10 babbage
11 banach
12 banzai
13 bardeen
14 bartik
15 bassi
16 beaver
17 bell
18 benz
19 bhabha
20 bhaskara
21 black
22 blackburn
23 blackwell
24 bohr
25 booth
26 borg
27 bose
28 bouman
29 boyd
30 brahmagupta
31 brattain
32 brown
33 buck
34 burnell
35 cannon
36 carson
37 cartwright
38 carver
39 cerf
40 chandrasekhar
41 chaplygin
42 chatelet
43 chatterjee
44 chebyshev
45 cohen
46 chaum
47 clarke
48 colden
49 cori
50 cray
51 curran
52 curie
53 darwin
54 davinci
55 dewdney
56 dhawan
57 diffie
58 dijkstra
59 dirac
60 driscoll
61 dubinsky
62 easley
63 edison
64 einstein
65 elbakyan
66 elgamal
67 elion
68 ellis
69 engelbart
70 euclid
71 euler
72 faraday
73 feistel
74 fermat
75 fermi
76 feynman
77 franklin
78 gagarin
79 galileo
80 galois
81 ganguly
82 gates
83 gauss
84 germain
85 goldberg
86 goldstine
87 goldwasser
88 golick
89 goodall
90 gould
91 greider
92 grothendieck
93 haibt
94 hamilton
95 haslett
96 hawking
97 hellman
98 heisenberg
99 hermann
100 herschel
101 hertz
102 heyrovsky
103 hodgkin
104 hofstadter
105 hoover
106 hopper
107 hugle
108 hypatia
109 ishizaka
110 jackson
111 jang
112 jemison
113 jennings
114 jepsen
115 johnson
116 joliot
117 jones
118 kalam
119 kapitsa
120 kare
121 keldysh
122 keller
123 kepler
124 khayyam
125 khorana
126 kilby
127 kirch
128 knuth
129 kowalevski
130 lalande
131 lamarr
132 lamport
133 leakey
134 leavitt
135 lederberg
136 lehmann
137 lewin
138 lichterman
139 liskov
140 lovelace
141 lumiere
142 mahavira
143 margulis
144 matsumoto
145 maxwell
146 mayer
147 mccarthy
148 mcclintock
149 mclaren
150 mclean
151 mcnulty
152 mendel
153 mendeleev
154 meitner
155 meninsky
156 merkle
157 mestorf
158 mirzakhani
159 moore
160 morse
161 murdock
162 moser
163 napier
164 nash
165 neumann
166 newton
167 nightingale
168 nobel
169 noether
170 northcutt
171 noyce
172 panini
173 pare
174 pascal
175 pasteur
176 payne
177 perlman
178 pike
179 poincare
180 poitras
181 proskuriakova
182 ptolemy
183 raman
184 ramanujan
185 ride
186 montalcini
187 ritchie
188 rhodes
189 robinson
190 roentgen
191 rosalind
192 rubin
193 saha
194 sammet
195 sanderson
196 satoshi
197 shamir
198 shannon
199 shaw
200 shirley
201 shockley
202 shtern
203 sinoussi
204 snyder
205 solomon
206 spence
207 stonebraker
208 sutherland
209 swanson
210 swartz
211 swirles
212 taussig
213 tereshkova
214 tesla
215 tharp
216 thompson
217 torvalds
218 tu
219 turing
220 varahamihira
221 vaughan
222 visvesvaraya
223 volhard
224 villani
225 wescoff
226 wilbur
227 wiles
228 williams
229 williamson
230 wilson
231 wing
232 wozniak
233 wright
234 wu
235 yalow
236 yonath
237 zhukovsky

137
lgsm/functions/info_stats.sh

@ -2,73 +2,148 @@
# LinuxGSM info_stats.sh function
# Author: Daniel Gibbs
# Website: https://linuxgsm.com
# Description: Optional Stats to send to LinuxGSM Developer
# Uses Google analytics
# Description: Collect optional Stats sent to LinuxGSM project.
# Uses Google analytics.
local modulegroup="INFO"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
info_distro.sh
# generate uuid
if [ ! -f "${datadir}/uuid.txt" ]; then
mkdir -p "${datadir}"
touch "${datadir}/uuid.txt"
if [ "$(command -v uuidgen 2>/dev/null)" ]; then
uuidgen > "${datadir}/uuid.txt"
# remove uuid that was used in v20.2.0 and below
if [ -f "${datadir}/uuid.txt" ]; then
rm "${datadir:?}/uuid.txt"
fi
# generate uuid's
# this consists of a standard uuid and a docker style name
# to allow human readable uuid's.
# e.g angry_proskuriakova_38a9ef76-4ae3-46a6-a895-7af474831eba
if [ ! -f "${datadir}/uuid-${selfname}.txt" ]||[ ! -f "${datadir}/uuid-install.txt" ]; then
# download dictionary words
if [ ! -f "${datadir}/name-left.csv" ]; then
fn_fetch_file_github "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
fi
if [ ! -f "${datadir}/name-right.csv" ]; then
fn_fetch_file_github "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
fi
# generate instance uuid
if [ -n "$(command -v uuidgen 2>/dev/null)" ]; then
uuid="$(uuidgen)"
else
cat /proc/sys/kernel/random/uuid > "${datadir}/uuid.txt"
uuid="$(cat /proc/sys/kernel/random/uuid)"
fi
nameleft="$(shuf -n 1 "${datadir}/name-left.csv")"
nameright="$(shuf -n 1 "${datadir}/name-right.csv")"
echo "instance_${nameleft}_${nameright}_${uuid}" > "${datadir}/uuid-${selfname}.txt"
# generate install uuid if missing
if [ ! -f "${datadir}/uuid-install.txt" ];then
echo "${nameleft}_${nameright}_${uuid}" > "${datadir}/uuid-install.txt"
fi
fi
uuid=$(cat "${datadir}/uuid.txt")
uuidinstance=$(cat "${datadir}/uuid-${selfname}.txt")
uuidinstall=$(cat "${datadir}/uuid-install.txt")
# machine-id is a unique id set on OS install
uuidhardware=$(cat "/etc/machine-id")
# results are rounded up to reduce number of different results in analytics.
# nearest 100Mhz.
cpuusedmhzroundup=$(((cpuusedmhz + 99) / 100 * 100))
cpuusedmhzroundup="$(((cpuusedmhz + 99) / 100 * 100))"
# nearest 100MB
memusedroundup=$(((memused + 99) / 100 * 100))
memusedroundup="$(((memused + 99) / 100 * 100))"
# Spliting the metrics in to 3 propertys allows more accurate metrics on numbers of invidual instances, installs and hardware.
# Instance Property - UA-165287622-1
# Install Property - UA-165287622-2
# Hardware Property - UA-165287622-3
## Distro.
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=distro" -d "ea=${distroname}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
## Game Server Name.
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=game" -d "ea=${gamename}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
## LinuxGSM Version.
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=version" -d "ea=${version}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
## CPU usage of a game server.
if [ "${cpuusedmhzroundup}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
if [ -n "${cpuusedmhzroundup}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=cpuused" -d "ea=${cpuusedmhzroundup}MHz" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
fi
## Ram usage of a game server.
if [ "${memusedroundup}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
if [ -n "${memusedroundup}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=ramused" -d "ea=${memusedroundup}MB" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
fi
## Disk usage of a game server.
if [ "${serverfilesdu}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
if [ -n "${serverfilesdu}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=diskused" -d "ea=${serverfilesdu}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
fi
## CPU Model.
if [ "${cpumodel}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
if [ -n "${cpumodel}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpu" -d "ea=${cpumodel} ${cpucores} cores" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
fi
## CPU Frequency.
if [ "${cpufreqency}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
if [ -n "${cpufreqency}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=servercpufreq" -d "ea=${cpufreqency} x${cpucores}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
fi
## Server RAM.
if [ "${physmemtotal}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
if [ -n "${physmemtotal}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverram" -d "ea=${physmemtotal}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
fi
## Server Disk.
if [ "${totalspace}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
if [ -n "${totalspace}" ]; then
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=serverdisk" -d "ea=${totalspace}" -d "el=${gamename}" -d "v=1" > /dev/null 2>&1
fi
## Summary Stats
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuid}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-655379-31" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-1" -d "aip=1" -d "cid=${uuidinstance}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-2" -d "aip=1" -d "cid=${uuidinstall}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1
curl https://www.google-analytics.com/collect -d "tid=UA-165287622-3" -d "aip=1" -d "cid=${uuidhardware}" -d "t=event" -d "ec=summary" -d "ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace}" -d "v=1" > /dev/null 2>&1
fn_script_log_info "Send LinuxGSM stats"
fn_script_log_info "* UUID: ${uuid}"
fn_script_log_info "* uuid-${selfname}: ${uuidinstance}"
fn_script_log_info "* uuid-install: ${uuidinstall}"
fn_script_log_info "* uuid-hardware: ${uuidhardware}"
fn_script_log_info "* Game Name: ${gamename}"
fn_script_log_info "* Distro Name: ${distroname}"
fn_script_log_info "* Game Server CPU Used: ${cpuusedmhzroundup}MHz"

Loading…
Cancel
Save