[agent]-[executor] optimize execution code
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/zsh
|
||||
|
||||
RED="31m" ## 姨妈红
|
||||
GREEN="32m" ## 水鸭青
|
||||
@@ -348,26 +348,29 @@ GenerateSystemInfo() {
|
||||
machineNumber=99
|
||||
fi
|
||||
|
||||
export serverName="${city}-${hostArch}-${machineNumber}"
|
||||
export serverIpPbV4="$public_ipv4"
|
||||
export serverIpInV4=""
|
||||
export serverIpPbV6=""
|
||||
export serverIpInV6=""
|
||||
export location="$city $region $country"
|
||||
export provider="$org"
|
||||
export managePort="$(netstat -ntulp | grep sshd | grep -w tcp | awk '{print$4}' | cut -d":" -f2)"
|
||||
export cpuCore="$cores @ $freq MHz"
|
||||
export cpuBrand="$cpuName"
|
||||
export memoryTotal="$tram"
|
||||
export diskTotal="$disk_total_size"
|
||||
export diskUsage="$disk_used_size"
|
||||
export archInfo="$arch ($lbit Bit)"
|
||||
export osInfo="$opsy"
|
||||
export osKernelInfo="$kern"
|
||||
export tcpControl="$tcpctrl"
|
||||
export virtualization="$virt"
|
||||
export ioSpeed="$ioavg MB/s"
|
||||
export machineId="$(cat /host/etc/machine-id)"
|
||||
|
||||
cat >current-env.txt <<EOF
|
||||
serverName="${city}-${hostArch}-${machineNumber}"
|
||||
serverIpPbV4="$public_ipv4"
|
||||
serverIpInV4=""
|
||||
serverIpPbV6=""
|
||||
serverIpInV6=""
|
||||
location="$city $region $country"
|
||||
provider="$org"
|
||||
managePort="$(netstat -ntulp | grep sshd | grep -w tcp | awk '{print$4}' | cut -d":" -f2)"
|
||||
cpuCore="$cores @ $freq MHz"
|
||||
cpuBrand="$cpuName"
|
||||
memoryTotal="$tram"
|
||||
diskTotal="$disk_total_size"
|
||||
diskUsage="$disk_used_size"
|
||||
archInfo="$arch ($lbit Bit)"
|
||||
osInfo="$opsy"
|
||||
osKernelInfo="$kern"
|
||||
tcpControl="$tcpctrl"
|
||||
virtualization="$virt"
|
||||
ioSpeed="$ioavg MB/s"
|
||||
machineId="$(cat /host/etc/machine-id)"
|
||||
EOF
|
||||
|
||||
FunctionEnd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user