[agent-go] [status] - update code
This commit is contained in:
@@ -1,41 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="Agent-Dev-LapPro-Ubuntu" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
|
||||||
<option name="ACTIVE_PROFILES" value="dev" />
|
|
||||||
<option name="ALTERNATIVE_JRE_PATH" value="11" />
|
|
||||||
<option name="DEBUG_MODE" value="true" />
|
|
||||||
<envs>
|
|
||||||
<env name="agentVersion" value="2023-02-13" />
|
|
||||||
<env name="archInfo" value=""x86_64 (64 Bit)"" />
|
|
||||||
<env name="cpuBrand" value=""Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz"" />
|
|
||||||
<env name="cpuCore" value=""8 @ 4299.998 MHz"" />
|
|
||||||
<env name="diskTotal" value=""914.9 GB"" />
|
|
||||||
<env name="diskUsage" value=""12.3 GB"" />
|
|
||||||
<env name="ioSpeed" value=""259 MB/s"" />
|
|
||||||
<env name="location" value=""Chengdu Sichuan CN"" />
|
|
||||||
<env name="machineId" value=""ubuntu-lap-pro"" />
|
|
||||||
<env name="managePort" value=""22"" />
|
|
||||||
<env name="memoryTotal" value=""7.6 GB"" />
|
|
||||||
<env name="osInfo" value=""Ubuntu 20.04.5 LTS"" />
|
|
||||||
<env name="osKernelInfo" value=""5.4.0-135-generic"" />
|
|
||||||
<env name="provider" value=""AS139080 The Internet Data Center of Sichuan Mobile Communication Company Limited"" />
|
|
||||||
<env name="server.port" value="8001" />
|
|
||||||
<env name="serverIpInV4" value="""" />
|
|
||||||
<env name="serverIpInV6" value="""" />
|
|
||||||
<env name="serverIpPbV4" value=""183.220.149.17"" />
|
|
||||||
<env name="serverIpPbV6" value="""" />
|
|
||||||
<env name="serverName" value=""Chengdu-amd64-71"" />
|
|
||||||
<env name="tcpControl" value=""cubic"" />
|
|
||||||
<env name="virtualization" value=""Dedicated"" />
|
|
||||||
</envs>
|
|
||||||
<option name="HIDE_BANNER" value="true" />
|
|
||||||
<module name="agent" />
|
|
||||||
<option name="PASS_PARENT_ENVS" value="false" />
|
|
||||||
<projectPathOnTarget name="projectPathOnTarget" value="$PROJECT_DIR$" />
|
|
||||||
<option name="SPRING_BOOT_MAIN_CLASS" value="io.wdd.agent.AgentApplication" />
|
|
||||||
<option name="VM_PARAMETERS" value="-Dserver.port=8001 -Dfile.encoding=utf-8 -Ddebug=true -Dlogging.level.io.wdd.agent=debug -Dspring.profiles.active=dev -Dspring.cloud.nacos.config.group=dev -Dspring.cloud.nacos.config.extension-configs[0].dataId=common-dev.yaml -Dspring.cloud.nacos.config.extension-configs[0].group=dev" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="ToolBeforeRunTask" enabled="true" actionId="Tool_External Tools_git pull code" />
|
|
||||||
<option name="Make" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="Agent-dev-1" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" activateToolWindowBeforeRun="false">
|
|
||||||
<option name="ALTERNATIVE_JRE_PATH" value="11" />
|
|
||||||
<envs>
|
|
||||||
<env name="agentVersion" value="2023-02-13" />
|
|
||||||
<env name="archInfo" value=""x86_64 (64 Bit)"" />
|
|
||||||
<env name="cpuBrand" value=""Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz"" />
|
|
||||||
<env name="cpuCore" value=""12 @ 4299.998 MHz"" />
|
|
||||||
<env name="diskTotal" value=""914.9 GB"" />
|
|
||||||
<env name="diskUsage" value=""12.3 GB"" />
|
|
||||||
<env name="ioSpeed" value=""259 MB/s"" />
|
|
||||||
<env name="location" value=""Chengdu Sichuan CN"" />
|
|
||||||
<env name="machineId" value=""remote-dev-19"" />
|
|
||||||
<env name="managePort" value=""22"" />
|
|
||||||
<env name="memoryTotal" value=""7.6 GB"" />
|
|
||||||
<env name="osInfo" value=""Ubuntu 20.04.5 LTS"" />
|
|
||||||
<env name="osKernelInfo" value=""5.4.0-135-generic"" />
|
|
||||||
<env name="provider" value=""AS139080 The Internet Data Center of Sichuan Mobile Communication Company Limited"" />
|
|
||||||
<env name="serverIpInV4" value="""" />
|
|
||||||
<env name="serverIpInV6" value="""" />
|
|
||||||
<env name="serverIpPbV4" value=""183.220.149.17"" />
|
|
||||||
<env name="serverIpPbV6" value="""" />
|
|
||||||
<env name="serverName" value=""Chengdu-amd64-77"" />
|
|
||||||
<env name="tcpControl" value=""cubic"" />
|
|
||||||
<env name="virtualization" value=""Dedicated"" />
|
|
||||||
<env name="server.port" value="8001" />
|
|
||||||
</envs>
|
|
||||||
<module name="agent" />
|
|
||||||
<target name="UbuntuStation" />
|
|
||||||
<option name="SPRING_BOOT_MAIN_CLASS" value="io.wdd.agent.AgentApplication" />
|
|
||||||
<option name="VM_PARAMETERS" value="-Dserver.port=8001 -Dfile.encoding=utf-8 -Ddebug=true -Dlogging.level.io.wdd.agent=debug -Dspring.profiles.active=dev -Dspring.cloud.nacos.config.group=dev -Dspring.cloud.nacos.config.extension-configs[0].dataId=common-dev.yaml -Dspring.cloud.nacos.config.extension-configs[0].group=dev" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="Make" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="Agent-dev-oracle-s5" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
|
||||||
<option name="ALTERNATIVE_JRE_PATH" value="11" />
|
|
||||||
<envs>
|
|
||||||
<env name="agentVersion" value="2023-02-13" />
|
|
||||||
<env name="archInfo" value=""x86_64 (64 Bit)"" />
|
|
||||||
<env name="cpuBrand" value="Oracle Armpre A1" />
|
|
||||||
<env name="cpuCore" value="4 @2400MHz" />
|
|
||||||
<env name="diskTotal" value="100GB" />
|
|
||||||
<env name="diskUsage" value=""12.3 GB"" />
|
|
||||||
<env name="ioSpeed" value=""259 MB/s"" />
|
|
||||||
<env name="location" value="Seoul Seoul KR" />
|
|
||||||
<env name="machineId" value="oracles5dsaasdadas" />
|
|
||||||
<env name="managePort" value="22333" />
|
|
||||||
<env name="memoryTotal" value=""7.6 GB"" />
|
|
||||||
<env name="osInfo" value=""Ubuntu 20.04.5 LTS"" />
|
|
||||||
<env name="osKernelInfo" value=""5.4.0-135-generic"" />
|
|
||||||
<env name="provider" value=""AS139080 The Internet Data Center of Sichuan Mobile Communication Company Limited"" />
|
|
||||||
<env name="server.port" value="8001" />
|
|
||||||
<env name="serverIpInV4" value="""" />
|
|
||||||
<env name="serverIpInV6" value="""" />
|
|
||||||
<env name="serverIpPbV4" value="146.56.159.175" />
|
|
||||||
<env name="serverIpPbV6" value="""" />
|
|
||||||
<env name="serverName" value="Seoul-arm64-02" />
|
|
||||||
<env name="tcpControl" value="bbr" />
|
|
||||||
<env name="virtualization" value=""Dedicated"" />
|
|
||||||
</envs>
|
|
||||||
<option name="HIDE_BANNER" value="true" />
|
|
||||||
<module name="agent" />
|
|
||||||
<option name="SPRING_BOOT_MAIN_CLASS" value="io.wdd.agent.AgentApplication" />
|
|
||||||
<option name="VM_PARAMETERS" value="-Dserver.port=8001 -Dfile.encoding=utf-8 -Ddebug=true -Dlogging.level.io.wdd.agent=debug -Dspring.profiles.active=dev -Dspring.cloud.nacos.config.group=dev -Dspring.cloud.nacos.config.extension-configs[0].dataId=common-dev.yaml -Dspring.cloud.nacos.config.extension-configs[0].group=dev" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="ToolBeforeRunTask" enabled="true" actionId="Tool_External Tools_git pull" />
|
|
||||||
<option name="Make" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="Server-k3s" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
|
||||||
<module name="server" />
|
|
||||||
<selectedOptions>
|
|
||||||
<option name="spring.boot.profiles" visible="false" />
|
|
||||||
</selectedOptions>
|
|
||||||
<option name="SPRING_BOOT_MAIN_CLASS" value="io.wdd.ServerApplication" />
|
|
||||||
<option name="VM_PARAMETERS" value="-Dfile.encoding=utf-8 -Dspring.profiles.active=k3s -Dspring.cloud.nacos.config.group=k3s -Dspring.cloud.nacos.config.extension-configs[0].dataId=common-k3s.yaml -Dspring.cloud.nacos.config.extension-configs[0].group=k3s" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="Make" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
@@ -8,6 +8,6 @@ func TestReadTimeOutput(t *testing.T) {
|
|||||||
"/root/simple.sh",
|
"/root/simple.sh",
|
||||||
}
|
}
|
||||||
|
|
||||||
ReadTimeOutput(strings)
|
ReadTimeCommandExecutor(strings)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import (
|
|||||||
"agent-go/g"
|
"agent-go/g"
|
||||||
logger2 "agent-go/logger"
|
logger2 "agent-go/logger"
|
||||||
"agent-go/register"
|
"agent-go/register"
|
||||||
"agent-go/status"
|
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
@@ -13,14 +12,6 @@ var log = logger2.Log
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
// 测试调用CPU状态
|
|
||||||
getCpuMap, err := status.GetCpuMap()
|
|
||||||
if err != nil {
|
|
||||||
log.ErrorF("error is %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
log.InfoF("cpu status is %v", getCpuMap)
|
|
||||||
|
|
||||||
// 解析命令行参数
|
// 解析命令行参数
|
||||||
var version string
|
var version string
|
||||||
flag.StringVar(&version, "version", "", "config file version")
|
flag.StringVar(&version, "version", "", "config file version")
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
version: '2.1'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
# https://hub.docker.com/r/bitnami/mysql
|
||||||
|
image: bitnami/mysql:8.0.32-debian-11-r12
|
||||||
|
ports:
|
||||||
|
- '21306:3306'
|
||||||
|
volumes:
|
||||||
|
#- '/octopus-server/mysql/data:/bitnami/mysql/data'
|
||||||
|
- 'mysql_data:/bitnami/mysql/data'
|
||||||
|
#- '/octopus-server/mysql/nacos-2.2.0-initdb.sql:/docker-entrypoint-initdb.d/nacos-2.2.0-initdb.sql'
|
||||||
|
# - '/octopus-server/mysql/wdd-server.sql:/docker-entrypoint-initdb.d/wdd-server.sql'
|
||||||
|
networks:
|
||||||
|
- app-tier
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_USER=boge
|
||||||
|
- MYSQL_ROOT_PASSWORD=boge8tingH
|
||||||
|
- MYSQL_CHARACTER_SET=utf8mb4
|
||||||
|
- MYSQL_COLLATE:utf8_general_ci
|
||||||
|
- MYSQL_AUTHENTICATION_PLUGIN=mysql_native_password
|
||||||
|
healthcheck:
|
||||||
|
test: [ 'CMD', '/opt/bitnami/scripts/mysql/healthcheck.sh' ]
|
||||||
|
interval: 15s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 6
|
||||||
|
rabbitmq:
|
||||||
|
# https://hub.docker.com/r/bitnami/rabbitmq
|
||||||
|
image: docker.io/bitnami/rabbitmq:3.11.10-debian-11-r0
|
||||||
|
ports:
|
||||||
|
- '4369'
|
||||||
|
- '5551'
|
||||||
|
- '5552'
|
||||||
|
- '20672:5672'
|
||||||
|
- '25672'
|
||||||
|
- '20678:15672'
|
||||||
|
environment:
|
||||||
|
- RABBITMQ_VHOST=/
|
||||||
|
- RABBITMQ_VHOSTS=/dev
|
||||||
|
- RABBITMQ_USERNAME=boge
|
||||||
|
- RABBITMQ_PASSWORD=boge8tingH
|
||||||
|
- RABBITMQ_SECURE_PASSWORD=no
|
||||||
|
- RABBITMQ_LOAD_DEFINITIONS=no
|
||||||
|
- RABBITMQ_NODE_PORT_NUMBER=5672
|
||||||
|
- RABBITMQ_NODE_SSL_PORT_NUMBER=5671
|
||||||
|
- RABBITMQ_MANAGEMENT_PORT_NUMBER=15672
|
||||||
|
volumes:
|
||||||
|
- 'rabbitmq_data:/bitnami/rabbitmq/mnesia'
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mysql_data:
|
||||||
|
driver: local
|
||||||
|
rabbitmq_data:
|
||||||
|
driver: local
|
||||||
|
|
||||||
|
networks:
|
||||||
|
app-tier:
|
||||||
|
driver: bridge
|
||||||
Reference in New Issue
Block a user