[ server ] [ agent ]- 收集Agent的版本信息
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# 完整的更新Octopus Agent
|
||||
# 删除旧的Agent,
|
||||
@@ -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!"
|
||||
|
||||
Reference in New Issue
Block a user