Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Setting JVM Parameters for the MgC Agent's Tomcat Server

Updated on 2025-02-17 GMT+08:00

Windows

The following procedure uses Windows 11 as an example.

  1. Navigate to the location of the startup script.

    Go to the MgC Agent installation directory (C:\Edge by default) and find .\tools\SecAs-1.2.29\bin\startup.bat.

  2. Set the JVM parameters.

    1. In the MgC Agent installation directory (C:\Edge by default), edit .\tools\SecAs-1.2.29\bin\catalina.bat.

    2. Add the following information below @echo off in the file:
      set "JAVA_OPTS=-Xms512M -Xmx1024M"

      In the preceding information, -Xms512M -Xmx1024M are the JVM parameters to be configured. -Xms512M indicates that the initial heap memory allocated to the JVM is 512 MB. -Xmx1024M indicates that the maximum heap memory that can be allocated to the JVM is 1,024 MB. You can add other JVM parameters as required.

    3. Save and exit catalina.bat. The JVM parameters are configured for the Edge Tomcat server.
      CAUTION:

      This configuration will be applied if the MgC Agent is started using the startup script. It will not be applied if the MgC Agent is automatically started upon system or service startup.

  3. Restart the Edge Tomcat server.

    If the MgC Agent is running, stop Tomcat and the pre-installed collectors. After that, restart the MgC Agent.

    • Stop the MgC Agent's Tomcat server.
    1. If the MgC Agent is automatically started upon system startup or service startup, perform the following steps:
      1. Press Ctrl, Alt, and Delete and select Task Manager on the displayed page to open it. In the Task Manager dialog box, choose the Details tab.
      2. Select tomcat9.exe and click End Task.
    2. If the MgC Agent is started using the startup script, close the command prompt window that appears during the script execution.
      Figure 1 Command prompt
    • Stop the collectors.
    1. Stop the collectors using the task manager.
      1. Press Ctrl, Alt, and Delete and select Task Manager on the displayed page to open it. In the Task Manager dialog box, choose the Details tab.
      2. Select rda-storage-collector.exe, rda-collector-server.exe, rda-collector-platform.exe, rda-collector-kubernetes.exe, and rda-collector-database.exe individually and click End Task.
    2. Run a script to stop a single collector. rda-storage-collector is used as an example.
      1. Go to the MgC Agent installation directory, find the collector's directory (C:\Edge\tools\plugins\collectors\rda-storage-collector\bin\stop.bat by default), and run stop.bat.

      2. Find and stop the other collectors in the .\tools\plugins\collectors directory.

    • Restart the MgC Agent.

    Go to the MgC Agent installation directory (C:\Edge by default) and run .\tools\SecAs-1.2.29\bin\startup.bat. the MgC Agent's Tomcat server and the pre-installed collectors are restarted.

  4. Query the JVM parameters of the MgC Agent's Tomcat server.

    CAUTION:

    This step requires that the Java development environment be installed on Windows.

    1. Press Ctrl, Alt, and Delete and select Task Manager on the displayed page to open it. In the Task Manager dialog box, choose the Details tab.
    2. The following steps depend on how the MgC Agent is started.
      1. If the MgC Agent is automatically started upon system startup or service startup, find tomcat9.exe in Task Manager and check the corresponding PID.
      2. If the MgC Agent is started using the startup script, search for the java.exe program and check the corresponding PID. If there are multiple java.exe programs, do as follows:
        1. After querying the JVM settings of a Java program, you can determine whether the program is the MgC Agent program based on the value of java_class_path in the command output. If the MgC Agent and tomcat fields are contained, it is the MgC Agent program.
        2. After obtaining the PID, open Command Prompt as the administrator, enter the following command, and press Enter:
          jinfo <PID>
          In the preceding command, PID indicates the PID of the MgC Agent program. You can view the effective JVM parameters in the command output.
          Figure 2 Command prompt

Linux

The following uses CentOS 8 as an example.

  1. Navigate to the location of the startup script.

    Go to the MgC Agent installation directory (/opt/cloud/Edge by default) and find ./scripts/start.sh.

  2. Set the JVM parameters.

    1. In the MgC Agent installation directory (/opt/cloud/Edge by default), edit /tools/SecAs-1.2.29/bin/catalina.sh.
    2. Add the following information at the beginning of the file:
      JAVA_OPTS="-Xms512M -Xmx1024M"

      In the preceding information, -Xms512M -Xmx1024M are the JVM parameters to be configured. -Xms512M indicates that the initial heap memory allocated to the JVM is 512 MB. -Xmx1024M indicates that the maximum heap memory that can be allocated to the JVM is 1,024 MB. You can add other JVM parameters as required.

    3. Save and exit catalina.bat. The JVM parameters are configured for the Edge Tomcat server.

  3. Restart the Edge Tomcat server.

    If the MgC Agent is running, stop Tomcat and the pre-installed collectors.

    1. Go to the .\script directory in the MgC Agent installation directory (/opt/cloud/Edge by default).
    2. Run the following command to stop the MgC Agent:
      sh stop.sh
    3. Run the following command to start the MgC Agent:
      sh start.sh

  4. Query the JVM parameters of the MgC Agent's Tomcat server.

    Run the ps -ef|grep java command to check the JVM parameters when the MgC Agent is running.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback