cloudstack远程调试

news2024/10/7 14:30:56
前置条件:服务器安装好cloudstack的management、agent;

1、managemeng、agent启动服务文件

packaging/systemd

cloudstack-agent.default

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

JAVA_OPTS="-Djava.io.tmpdir=/usr/share/cloudstack-agent/tmp -Xms256m -Xmx2048m"

CLASSPATH="/usr/share/cloudstack-agent/lib/*:/usr/share/cloudstack-agent/plugins/*:/etc/cloudstack/agent:/usr/share/cloudstack-common/scripts"

JAVA_CLASS=com.cloud.agent.AgentShell

#You can uncomment this if you want to enable Java remote debugging.
#Feel free to change the parameters at your will. The 'address' field defines the port to be used.
#JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n"

cloudstack-agent.service

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

# Do not modify this file as your changes will be lost in the next CSM update.
# If you need to add specific dependencies to this service unit do it in the
# /etc/systemd/system/cloudstack-management.service.d/ directory

[Unit]
Description=CloudStack Agent
Documentation=http://www.cloudstack.org/
Requires=libvirtd.service
After=libvirtd.service

[Service]
Type=simple
EnvironmentFile=/etc/default/cloudstack-agent
ExecStart=/usr/bin/java $JAVA_OPTS $JAVA_DEBUG -cp $CLASSPATH $JAVA_CLASS
Restart=always
RestartSec=10s

[Install]
WantedBy=multi-user.target
修改启动服务的配置文件

将配置文件的JAVA_DEBUG注释放开,如果agent与management,在同一设备,修改其中一个端口,如address=*:8081

/etc/default/cloudstack-agent
#JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n"

#agent的启动类
com.cloud.agent.AgentShell

/etc/default/cloudstack-management
#JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=*:8001,server=y,suspend=n"

#management启动类
org.apache.cloudstack.ServerDaemon

IDEA配置JVM远程调试

2、agent后台运行的命令

/usr/bin/java -Djava.io.tmpdir=/usr/share/cloudstack-agent/tmp -Xms256m -Xmx2048m -agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n -cp /usr/share/cloudstack-agent/lib/*:/usr/share/cloudstack-agent/plugins/*:/etc/cloudstack/agent:/usr/share/cloudstack-common/scripts com.cloud.agent.AgentShell

3、management后台运行的命令

/usr/bin/java -agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n -Djava.security.properties=/etc/cloudstack/management/java.security.ciphers -Djava.awt.headless=true -Dcom.sun.management.jmxremote=false -Xmx2G -XX:+UseParallelGC -XX:MaxGCPauseMillis=500 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/cloudstack/management/ -XX:ErrorFile=/var/log/cloudstack/management/cloudstack-management.err -cp /usr/share/cloudstack-management/lib/*:/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cloudstack-management/setup:/usr/share/cloudstack-management:/usr/share/java/mysql-connector-java.jar:/usr/share/cloudstack-mysql-ha/lib/* org.apache.cloudstack.ServerDaemon

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/830980.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

openmp和avx配置

实际场景: 项目中数据拷贝慢(使用的是memcpy),希望能加速拷贝,所以尝试了使用avx的流方式,和openmp方式处理 问题1: 调用avx是报错 error: inlining failed in call to always_inline ‘__m512…

亲测有效!帮你更方便更舒服使用ubuntu20.04!!!

今天要记录的是如何更舒服的使用ubuntu20.04,全部内容就在上面这张图里,包括三方面:1、ubuntu美化;2、ubuntu扩展;3、必备软件。 1、ubuntu美化 这部分内容可以直接参考:这位大佬,讲的很详细也…

gRPC三种Java客户端性能测试实践

本篇文章只做性能测试实践,不会测试各类状况下极限性能,所以硬件配置和软件参数就不单独分享了。 服务端 依旧采用了fun_grpc项目的SDK内容。服务端代码如下: package com.funtester.grpc;import com.funtester.frame.execute.ThreadPoolU…

Python实现GA遗传算法优化卷积神经网络分类模型(CNN分类算法)项目实战

说明:这是一个机器学习实战项目(附带数据代码文档视频讲解),如需数据代码文档视频讲解可以直接到文章最后获取。 1.项目背景 遗传算法(Genetic Algorithm,GA)最早是由美国的 John holland于20世…

验证码安全志:AIGC+集成环境信息信息检测

目录 知己知彼,黑灰产破解验证码的过程 AIGC加持,防范黑灰产的破解 魔高一丈,黑灰产AIGC突破常规验证码 双重防护,保障验证码安全 黑灰产经常采用批量撞库方式登录用户账号,然后进行违法违规操作。 黑灰产将各种方…

RL — 强化学习算法概述

一、说明 在本系列中,我们检查了许多强化学习(RL)算法,例如,MoJoCo任务的策略梯度方法,Atari游戏的DQN和机器人控制的基于模型的RL。虽然许多算法都是针对特定领域引入的,但这种联系只能是遗留的…

BKTEM-3A型热电材料性能测试仪(动态法)

BKTEM-3A型热电材料性能测试仪(动态法) 关键词:塞贝克(seebeck),波尔贴(Peltier)效应,热电系数 BKTEM-3型热电材料性能测试仪热电材料也称温差电材料(thermoelectric materials&…

c语言const修饰的说明

1、const修饰的为常量&#xff0c;不可以直接修改&#xff0c;但是可以通过指针修改 #include "stdio.h" #include <stdlib.h>int main() {//1、constconst int a 10;//a 100;//err 左值不可修改&#xff0c;const修饰的为常量&#xff0c;不可以直接修改&a…

WSL2安装CentOS7和CentOS8

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 前言一、下载ZIP包&#xff1f;二、安装1.打开Windows子系统支持2.安装到指定位置3.管理虚拟机4.配置虚拟机1.配置国内源2.安装软件3.安装第三方源 5.配置用户1.创建…

iNav飞控之FAILSAFE机制

iNav飞控之FAILSAFE机制 1. 源由2. 设计2.1 触发场景2.1.1 上锁时触发2.1.2 解锁时触发 2.2 FAILSAFE策略2.2.1 DROP2.2.2 LAND2.2.3 SET-THR2.2.4 RTH2.2.5 NONE 2.3 异常场景2.3.1 救援上锁2.3.2 救援后解锁2.3.3 FAILSAFE地面预判2.3.4 RTH丢失定位2.3.5 RC链路恢复 3. 重要…

怎样做好字幕翻译服务?

我们知道&#xff0c;字幕泛指影视作品后期加工的文字&#xff0c;往往显示在电视、电影、舞台作品中。字幕翻译就是将外国影片配上本国字幕或者是将本国影片配上外国字幕。那么&#xff0c;字幕翻译的主要流程是什么&#xff0c;怎样做好字幕翻译服务&#xff1f; 据了解&…

二进制链表转整数

给你一个单链表的引用结点 head。链表中每个结点的值不是 0 就是 1。已知此链表是一个整数数字的二进制表示形式。 请你返回该链表所表示数字的 十进制值 。 示例 1&#xff1a; 输入&#xff1a;head [1,0,1] 输出&#xff1a;5 解释&#xff1a;二进制数 (101) 转化为十进…

IDEA超强XSD文件编辑插件-XSD / WSDL Visualizer

前言 XSD / WSDL Visualizer可以简化XML架构定义(XSD)和WSDL文件编辑过程; 通过使用与IntelliJ无缝集成的可视化编辑器&#xff0c;转换处理XSD和WSDL文件的方式。告别导航复杂和难以阅读的代码的挫败感&#xff0c;迎接流线型和直观的体验。 插件安装 在线安装 IntelliJ IDE…

yxBUG记录

1、 原因&#xff1a;前端参数method方法名写错。 2、Field ‘REC_ID‘ doesn‘t have a default value 问题是id的生成问题。 项目的表不是自增。项目有封装好的方法。调用方法即可。 params.put("rec_id",getSequence("表名")) 3、sql语句有问题 检…

【iOS】App仿写--天气预报

文章目录 前言一、首页二、搜索界面三、添加界面四、浏览界面总结 前言 最近完成了暑假的最后一个任务——天气预报&#xff0c;特此记录博客总结。根据iPhone中天气App的功能大致可以将仿写的App分为四个界面——首页&#xff0c;搜索界面&#xff0c;添加界面&#xff0c;浏…

基金公司最佳实践:如何用价值流分析,洞察研发效能瓶颈?

近日&#xff0c;ONES 受邀参加 QECon 2023 全球软件质量&效能大会&#xff08;北京站&#xff09;。在会上&#xff0c;ONES 高级研发总监&首席解决方案架构师陈亮宇&#xff0c;发表了主题为《聚焦价值流分析&#xff0c;寻找研发效能的「北极星」》的演讲&#xff0…

NSX 4.1中新的网络和高级安全功能介绍

我们很高兴地宣布VMware NSX 4.1全面上市&#xff0c;该版本为私有云、混合云和多云的虚拟化网络和高级安全提供了新功能。该版本的新特性和功能将使VMware NSX客户能够利用增强的网络和高级安全&#xff0c;提高运营效率和灵活性&#xff0c;并简化了故障排除的过程。 领先于…

使用免费MES系统的成功经验

随着科技的发展和数字化时代的到来&#xff0c;越来越多的工厂开始采用生产管理软件来提高生产效率和管理水平。 本文将分享一家工厂在使用免费生产管理软件后的成功经验&#xff0c;希望对广大读者有所帮助。 “之前也是在市面上找了很多厂家咨询报价&#xff0c;少则十几万多…

shell脚本清理redis模糊匹配的多个key,并计算释放内存大小

#!/bin/bash# 定义Redis服务器地址和端口 REDIS_HOST"localhost" REDIS_PORT6380# 获取Redis当前内存使用量&#xff08;以字节为单位&#xff09; function get_redis_memory_usage() {redis-cli -h $REDIS_HOST -p $REDIS_PORT INFO memory | grep "used_memo…

一个页面多触发事件需要共用一个接口处理数据,封装回调函数方法回调处理数据

// 事件共用方法queryData(code,data,callback){let params{code:code, //根据实际情况传入参数data:data //根据实际情况传入参数} // 传入借口参数this.$axios({url:, // 接口url地址method:post, // 接口类型params:params // 接口接收参数}).then((res)>{if(res&am…