[ server ] [ agent ]- 收集Agent的版本信息

This commit is contained in:
zeaslity
2023-02-07 16:26:22 +08:00
parent f4e636a368
commit 602e3c3034
20 changed files with 334 additions and 84 deletions

View File

@@ -0,0 +1,5 @@
#!/bin/bash
# 完整的更新Octopus Agent
# 删除旧的Agent

View File

@@ -29,6 +29,7 @@ virtualization=""
ioSpeed=""
machineId=""
archInfo=""
agentVersion=""
### tmp usage
ioavg=""
@@ -139,6 +140,13 @@ StartIOTest() {
}
GetAgentLatestVersion(){
ls /octopus-agent | grep "octopus-agent" | cut -d "-" -f3- | cut -d"." -f1
}
#######################################
# description
# Globals:
@@ -332,6 +340,7 @@ tcpControl=$tcpctrl
virtualization=$virt
ioSpeed="$ioavg MB/s"
machineId=$(cat /etc/machine-id)
agentVersion=$(ls /octopus-agent | grep "octopus-agent" | cut -d "-" -f3- | cut -d"." -f1)
EOF
log "env collect complete!"