• 统计服务器CPU、内存、磁盘、网络IO、队列、数据库占用空间等等信息

统计服务器CPU、内存、磁盘、网络IO、队列、数据库占用空间等等信息

2025-05-28 06:57:09 3 阅读


文章目录

  • 一、背景
  • 二、说明
  • 三、页面
  • 四、代码
    • 前端
      • addMonitorTask.vue
      • showMonitorTask.vue
      • MonitorTask.vue
      • MonitorTaskLog.vue
      • RealtimeCpuMonitor.vue
      • RealtimeDiskMonitor.vue
      • RealtimeMemoryMonitor.vue
      • RealtimeMonitor.vue
    • 后端
      • pom.xml
      • en_US.js
      • zh_CN.js
      • MonitorTaskController
      • IMonitorTaskService
      • MonitorTaskServiceImpl
      • MonitorTaskMapper
      • MonitorTaskMapper.xml
      • MonitorThresholdPo
      • MonitorTaskPo
      • MonitorTaskLog
      • MonitorTask
      • WServerHelper
      • SystemMonitor
      • MonitorPo
      • MonitorConfig
      • AlarmThresholdConstants
      • IFmCurrentService
      • MonitorTaskExe
  • 本人其他相关文章链接

一、背景

我们项目的目标是开发一个类似于电脑任务资源管理器的监控工具。该工具将具备以下功能:

  • 监控系统资源:实时监测 CPU、内存和磁盘空间的使用情况。
  • 创建监控任务:用户可以设置监控任务,并定义相应的监控阈值。
  • 定时记录:系统将每分钟记录当前的监控数据,无论这些数据是否超过设定的阈值。
  • 报警机制:当当前监控值超过设定的阈值时,系统将自动触发报警。

通过这些功能,我们希望能够提供一个全面的资源监控解决方案,帮助用户及时了解系统性能并采取必要的措施。

二、说明

说明点1
功能介绍:
允许创建监控任务,支持“激活/停止”任务
允许查看监控记录,程序每分钟上报检测值
允许查看CPU、内存、磁盘空间使用情况,后端采用websocket推送前端页面,页面采用echart动态滚动上报

说明点2
当前代码有些混乱,全部记录了,所以这里简单介绍下重要的文件:
MonitorTaskExe:定时任务,监控CPU等信息websocket推送前端;监控记录信息入库;超过阈值上报告警
WServerHelper:websocket实现类
MonitorTaskController:任务管理增删改实现逻辑

说明点3
定时任务有以下几种:
scheduleRealTimeTask方法:每5秒执行一次,实时性能查询任务(及CPU、内存、磁盘空间)
scheduleMonitorTask方法:每1分钟执行一次,查询记录入库
scheduleCleanTaskLog方法:每天凌晨清理性能任务日志 仅保留三天内的数据
taskClearTiming方法:任务清理,判断任务是否到达采样时间,超过时间则直接停止任务

三、页面


字段介绍

  • System Info:系统信息
  • Record Time:记录时间
  • Cpu Usage Threshold(%):Cpu使用率阈值(%)
  • Memory Usage Threshold(%):内存使用率阈值(%)
  • Disk Space Usage Threshold(%):磁盘空间使用率阈值(%)
  • Network Rx Rate/s:网络接收数据包速率/s
  • Network Tx Rate/s:网络发送数据包速率/s
  • IOPS kB_read/s:IOPS读取数据量/s
  • IOPS kB_wrtn/s:IOPS写入数据量/s
  • Total number of stored queue operations/s:存储队列操作总数/s
  • Database disk space used in the file system:文件系统中数据库磁盘空间占用大小
  • SBI alarm number/s:南向告警数量/s



四、代码

前端

addMonitorTask.vue

<template>
  <div id="addReportTaskContainer">
      <form id="monitorTaskForm">
      <div class="row h-row-inputBox">
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.task.taskName')}}:</div>
                <input name="taskName" :placeholder="$t('Monitor.task.taskName')" v-model="monitorTask.taskName"
                    class="e-input e-input-group" maxlength="20" />
                <div class="error"></div>
            </div>
          </div>
        </div>
        <div class="col-sm-6 h-col-inputBox" style="display: none">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.task.product')}}:</div>
                <ejs-dropdownlist :dataSource="productList" v-model="monitorTask.product" name="product"
                    :fields="fieldsFormat" @change="productChange" ></ejs-dropdownlist>
                <div class="error"></div>
            </div>
          </div>
        </div>
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
              <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.record.diskSpaceThreshold')}}:</div>
              <input name="spaceThreshold" :placeholder="$t('Monitor.record.diskSpaceThreshold')" v-model="monitorThresholdPo.spaceThreshold"
                     class="e-input e-input-group" maxlength="20" />
              <div class="error"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="row h-row-inputBox">
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.record.cpuThreshold')}}:</div>
                <input name="cpuThreshold" :placeholder="$t('Monitor.record.cpuThreshold')" v-model="monitorThresholdPo.cpuThreshold"
                    class="e-input e-input-group" maxlength="20" />
                <div class="error"></div>
            </div>
          </div>
        </div>
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.record.memoryThreshold')}}:</div>
                <input name="memoryThreshold" :placeholder="$t('Monitor.record.memoryThreshold')" v-model="monitorThresholdPo.memoryThreshold"
                    class="e-input e-input-group" maxlength="20" />
                <div class="error"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="row h-row-inputBox">
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.task.sampleStart')}}:</div>
                <ejs-datetimepicker :format="dateFormat" v-model="monitorTask.sampleStart" ref="startTime" name="sampleStart"
                    class="e-input" :allowEdit="false" @keydown.native="stopEvent" :locale="locale"></ejs-datetimepicker>
                <div class="error"></div>
            </div>
          </div>
        </div>
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.task.sampleEnd')}}:</div>
                <ejs-datetimepicker :format="dateFormat" v-model="monitorTask.sampleEnd" ref="endTime" name="sampleEnd"
                    class="e-input" :allowEdit="false" :min="monitorTask.sampleStart" @keydown.native="stopEvent" :locale="locale"></ejs-datetimepicker>
                <div class="error"></div>
            </div>
          </div>
        </div>
      </div>
    </form>
  </div>
</template>

<script>
    import { CheckBoxSelection } from '@syncfusion/ej2-vue-dropdowns';
    import { FormValidator } from "@syncfusion/ej2-vue-inputs";
    import mixin from '../../../mixin/mixin';

    export default {
        name: 'AddReportTask',
        mixins: [mixin],
        displayFlag : 'none',
        props: {
            baseType: Number,
        },
        components: {
        },
        data() {
            return {
                formValidator: '',
                dateFormat: "yyyy-MM-dd HH:mm:ss",
                locale: localStorage.getItem('locale'),
                currentDay: new Date(),
                productList: [],
                monitorTask: {
                    taskName: '',
                    product: 'PLATFORM',
                    sampleStart: '',
                    sampleEnd: '',
                },
                monitorThresholdPo: {
                    cpuThreshold: '',
                    memoryThreshold: '',
                    spaceThreshold: '',
                },
                fieldsFormat: {
                    text: "text",
                    value: "value"
                },
                formatList: [
                    { text: "csv", value: "csv" },
                    { text: "excel", value: "excel" },
                ],
                validateOptions: {
                    customPlacement: function(inputElement, errorElement) {
                      console.log("******validateOptions-inputElement:", inputElement)
                      console.log("******validateOptions-errorElement:", errorElement)

                        inputElement = inputElement.closest('.form-group').querySelector('.error');
                        inputElement.parentElement.appendChild(errorElement);
                    },
                    rules: {
                        'taskName': {
                            required: [true, `${this.$t('Monitor.placeholder.taskName')}`],
                        },
                        // 'product': {
                        //     required: [true, `${this.$t('Monitor.placeholder.product')}`],
                        // },
                        'cpuThreshold': {
                            number: [true, this.$t('MCS.insertNum')],
                            max: [100, this.$t('System.input1t100')],
                        },
                        'spaceThreshold': {
                            number: [true, this.$t('MCS.insertNum')],
                            max: [100, this.$t('System.input1t100')],
                        },
                        'memoryThreshold': {
                            number: [true, this.$t('MCS.insertNum')],
                            max: [100, this.$t('System.input1t100')],
                        },
                        'sampleStart': {
                            required: [true, `${this.$t('Monitor.placeholder.sampleStart')}`],
                        },
                        'sampleEnd': {
                            required: [true, `${this.$t('Monitor.placeholder.sampleEnd')}`],
                        },
                    }
                }
            }
        },
        methods: {
            init(){
                this.getProductList();
                this.formValidator = new FormValidator('#monitorTaskForm', this.validateOptions);
            },
            getProductList() {
                this.$axios.get("/lte/ems/sys/monitor/log/findProducts").then(response => {
                    let resultVal = response.data.resultVal;
                    resultVal = resultVal.filter(item => !item.includes('ems_5gc') && !item.includes('ems_gnb') && !item.includes('ems_tr069'));
                    for (let i = 0; i < resultVal.length; i++) {
                        this.productList.push({
                            text: resultVal[i],
                            value: resultVal[i],
                        });
                    }
                });
            },
            productChange() {
                this.monitorTask.product = msg.value;
            },
            getMonitorTask() {
                return {
                    monitorTask: {
                        taskName: this.monitorTask.taskName,
                        product: this.monitorTask.product,
                        sampleStart: (new Date(this.monitorTask.sampleStart)).getTime(),
                        sampleEnd: (new Date(this.monitorTask.sampleEnd)).getTime(),
                    },
                    monitorThresholdPo: {
                      cpuThreshold: this.monitorThresholdPo.cpuThreshold,
                      memoryThreshold: this.monitorThresholdPo.memoryThreshold,
                      spaceThreshold: this.monitorThresholdPo.spaceThreshold,
                    },
                 }
            },
            validation() {
              let status = this.formValidator.validate();
              return status;
            },
            stopEvent(event) {
                if (event.keyCode == 13) {
                    event.cancelBubble = true;
                    event.returnValue = false;
                    return false;
                }
            }
        }
    };
</script>

showMonitorTask.vue

<template>
  <div id="addReportTaskContainer">
      <form id="reportTaskForm">
      <div class="row h-row-inputBox">
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.task.taskName')}}:</div>
                <input name="taskName" v-model="monitorTask.taskName" 
                    class="e-input e-input-group" maxlength="20" />
                <div class="error"></div>
            </div>
          </div>
        </div>
        <div class="col-sm-6 h-col-inputBox" style="display: none">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.task.product')}}:</div>
                <input name="product" v-model="monitorTask.product"  readonly="readonly"
                    class="e-input e-input-group" maxlength="20" />
                <div class="error"></div>
            </div>
          </div>
        </div>
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
              <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.record.diskSpaceThreshold')}}:</div>
              <input name="spaceThreshold" :placeholder="$t('Monitor.record.diskSpaceThreshold')" v-model="monitorThresholdPo.spaceThreshold" 
                     class="e-input e-input-group" maxlength="20" />
              <div class="error"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="row h-row-inputBox">
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.record.cpuThreshold')}}:</div>
                <input name="cpuThreshold" v-model="monitorThresholdPo.cpuThreshold" 
                    class="e-input e-input-group" maxlength="20" />
                <div class="error"></div>
            </div>
          </div>
        </div>
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.record.memoryThreshold')}}:</div>
                <input name="memoryThreshold" v-model="monitorThresholdPo.memoryThreshold"
                    class="e-input e-input-group" maxlength="20" />
                <div class="error"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="row h-row-inputBox">
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.task.sampleStart')}}:</div>
                <ejs-datepicker :format="dateFormat" v-model="monitorTask.sampleStart" ref="startTime" name="sampleStart" readonly="readonly"
                    class="e-input" :allowEdit="false" @keydown.native="stopEvent" :locale="locale"></ejs-datepicker>
            </div>
          </div>
        </div>
        <div class="col-sm-6 h-col-inputBox">
          <div class="form-group">
            <div class="e-float-input">
                <div class="h-inputLit"><span class="h-red-code">* </span>{{$t('Monitor.task.sampleEnd')}}:</div>
                <ejs-datepicker :format="dateFormat" v-model="monitorTask.sampleEnd" ref="endTime" name="sampleEnd" readonly="readonly"
                    class="e-input" :allowEdit="false" @keydown.native="stopEvent" :locale="locale"></ejs-datepicker>
            </div>
          </div>
        </div>
      </div>
    </form>
  </div>
</template>
<script>
    import { CheckBoxSelection } from '@syncfusion/ej2-vue-dropdowns';
    import { FormValidator } from "@syncfusion/ej2-vue-inputs";
    import mixin from '../../../mixin/mixin';

    export default {
        name: 'AddReportTask',
        mixins: [mixin],
        displayFlag : 'none',
        props: {
            baseType: Number,
        },
        components: {
        },
        data() {
            return {
                formValidator: '',
                dateFormat: "yyyy-MM-dd HH:mm:ss",
                locale: localStorage.getItem('locale'),
                currentDay: new Date(),
                monitorTask: {
                    taskId:'',
                    taskName: '',
                    product: '',
                    sampleStart: '',
                    sampleEnd: '',
                },
                monitorThresholdPo: {
                    cpuThreshold: '',
                    memoryThreshold: '',
                    spaceThreshold: '',
                },
                productList: [],
                fieldsFormat: {
                    text: "text",
                    value: "value"
                },
                formatList: [
                    { text: "csv", value: "csv" },
                    { text: "excel", value: "excel" },
                ],
                 validateOptions: {
                    customPlacement: function(inputElement, errorElement) {
                      console.log("******validateOptions-inputElement:", inputElement)
                      console.log("******validateOptions-errorElement:", errorElement)

                        inputElement = inputElement.closest('.form-group').querySelector('.error');
                        inputElement.parentElement.appendChild(errorElement);
                    },
                    rules: {
                        'taskName': {
                            required: [true, `${this.$t('Monitor.placeholder.taskName')}`],
                        },
                        // 'product': {
                        //     required: [true, `${this.$t('Monitor.placeholder.product')}`],
                        // },
                        'cpuThreshold': {
                            number: [true, this.$t('MCS.insertNum')],
                            max: [100, this.$t('System.input1t100')],
                        },
                        'spaceThreshold': {
                            number: [true, this.$t('MCS.insertNum')],
                            max: [100, this.$t('System.input1t100')],
                        },
                        'memoryThreshold': {
                            number: [true, this.$t('MCS.insertNum')],
                            max: [100, this.$t('System.input1t100')],
                        },
                        'sampleStart': {
                            required: [true, `${this.$t('Monitor.placeholder.sampleStart')}`],
                        },
                        'sampleEnd': {
                            required: [true, `${this.$t('Monitor.placeholder.sampleEnd')}`],
                        },
                    }
                }
                
            }
        },
        methods: {
            init(editId){
              this.monitorTask.taskId = editId
                const baseUrl = '/lte/ems/sys/monitor/task/queryId';
                const params = { params: {
                    id: editId
                } };
                const That = this;
                this.axios.get(baseUrl, params).then(response => {
                    const result = response.data;
                    var monitorTask = result.monitorTask;
                    this.monitorTask.taskName = monitorTask.taskName;
                    this.monitorTask.product = monitorTask.product;
                    if(monitorTask.sampleStart != null && monitorTask.sampleStart != ''){
                        this.monitorTask.sampleStart = new Date(monitorTask.sampleStart).Format("yyyy-MM-dd HH:mm:ss");
                    }
                    if(monitorTask.sampleEnd != null && monitorTask.sampleEnd != ''){
                        this.monitorTask.sampleEnd = new Date(monitorTask.sampleEnd).Format("yyyy-MM-dd HH:mm:ss");
                    }
                    var monitorThresholdPo = result.monitorThresholdPo;
                    this.monitorThresholdPo.cpuThreshold = monitorThresholdPo.cpuThreshold;
                    this.monitorThresholdPo.memoryThreshold = monitorThresholdPo.memoryThreshold;
                    this.monitorThresholdPo.spaceThreshold = monitorThresholdPo.spaceThreshold;
                });
                this.formValidator = new FormValidator('#reportTaskForm', this.validateOptions);
            },
            getMonitorTask() {
                return {
                    monitorTask: {
                        id:this.monitorTask.taskId,
                        taskName: this.monitorTask.taskName,
                        product: this.monitorTask.product,
                        sampleStart: (new Date(this.monitorTask.sampleStart)).getTime(),
                        sampleEnd: (new Date(this.monitorTask.sampleEnd)).getTime(),
                    },
                    monitorThresholdPo: {
                      cpuThreshold: this.monitorThresholdPo.cpuThreshold,
                      memoryThreshold: this.monitorThresholdPo.memoryThreshold,
                      spaceThreshold: this.monitorThresholdPo.spaceThreshold,
                    },
                 }
            },
            validation() {
              let status = this.formValidator.validate();
              return status;
            },
            stopEvent(event) {
                if (event.keyCode == 13) {
                    event.cancelBubble = true;
                    event.returnValue = false;
                    return false;
                }
            }
        }
    };
</script>

MonitorTask.vue

<template>
  <BasicLayout :left="left" :middle="middle" :right="right">
    <template v-slot:right_view>
      <div class="h-toolbarBg">
        <!-- <ejs-toolbar :items="toolbarItems"> -->
          <ejs-toolbar>
            <e-items>
              <e-item  v-if='isShow_Add' prefixIcon='icon hero-icon hero-icon-add' :tooltipText="$t('Security.add')" :click="showAddDialog"></e-item>
              <e-item  v-if='isShow_Start' prefixIcon='icon hero-icon hero-icon-start-up' :tooltipText="$t('Pm.startUp')" :click="activeMonitorTask"></e-item>
              <e-item  v-if='isShow_Pause' prefixIcon='icon hero-icon hero-icon-disable' :tooltipText="$t('System.deactiveTask')" :click="deactiveMonitorTask"></e-item>
              <e-item  v-if='isShow_Modify' prefixIcon='icon hero-icon hero-icon-edit' :tooltipText="$t('Track.detail')" :click="showEditDialog"></e-item>
              <e-item  v-if='isShow_Delete' prefixIcon='icon hero-icon hero-icon-remove' :tooltipText="$t('Security.delete')" :click="deleteMonitorTask"></e-item>
              <e-item  v-if='isShow_Refresh' prefixIcon='icon hero-icon hero-icon-refresh' :tooltipText="$t('Alarm.refresh')" :click="refreshGrid"></e-item>
            </e-items> 
        </ejs-toolbar>
        <div class='h-inputBox'>
          <ejs-textbox v-model='keyword' :placeholder='$t("Monitor.task.taskName")' @keyup.enter.native="filterMonitorTask" maxLength='20'></ejs-textbox>
        </div>
      </div>
      <div class="h100-80 h-scroll">
        <ejs-grid :dataSource="monitorTaskData" :allowPaging="true" ref="grid" :pageSettings="pageSettings" :height="screenHeight" :allowExcelExport='true' >
          <e-columns>
            <e-column type="checkbox" width="50" textAlign="center"></e-column>
            <e-column field="id" :visible="false"></e-column>
            <e-column field="taskName" :headerText="$t('Monitor.task.taskName')" width="120" textAlign="Center"></e-column>
            <!--<e-column field="product" :headerText="$t('Monitor.task.product')" width="120" textAlign="Center"></e-column>-->
            <e-column field="sampleStart" :headerText="$t('Monitor.task.sampleStart')" :format="dateFormat" width="120" textAlign="Center" clipMode="EllipsisWithTooltip"></e-column>
            <e-column field="sampleEnd" :headerText="$t('Monitor.task.sampleEnd')" :format="dateFormat" width="120" textAlign="Center" clipMode="EllipsisWithTooltip"></e-column>
            <e-column field="exeState" :headerText="$t('Monitor.task.exeState')" :formatter='exeStateFormat' width="120" textAlign="Center"></e-column>
          </e-columns>
        </ejs-grid>
        <ejs-pager
          ref="pager"
          :pageSize="pageSettings.pageSize"
          :pageCount="page.pageCount"
          :currentPage="page.pageNo"
          :totalRecordsCount="page.totalRecordsCount"
          @click="getMonitorTaskList"
        ></ejs-pager>
      </div>
      <CustomDialog ref="addMonitorTaskDialog" v-bind:element="addDialog.element" v-bind:styles="addDialog.styles" >
        <template v-slot:dialog-content>
          <AddMonitorTask ref="addMonitorTaskPage"></AddMonitorTask>
        </template>
      </CustomDialog>
      <CustomDialog ref="showMonitorTaskDialog" v-bind:element="editDialog.element" v-bind:styles="editDialog.styles" >
        <template v-slot:dialog-content>
          <ShowMonitorTask ref="showMonitorTaskPage"></ShowMonitorTask>
        </template>
      </CustomDialog>
      </template>
  </BasicLayout>
</template>
<script>
import CustomDialog from "../../components/common/CustomDialog";
import BasicLayout from '../../layouts/BasicLayout';
import AddMonitorTask from './monitorTask/addMonitorTask';
import ShowMonitorTask from './monitorTask/showMonitorTask';
import {ExcelExport} from '@syncfusion/ej2-vue-grids';
import {EventBus} from "../../plugins/eventBus";

export default {
  name: 'monitorTask',
  provide: {
    grid: [ExcelExport]
  },
  components: {
    CustomDialog,
    BasicLayout,
    AddMonitorTask,
    ShowMonitorTask,
  },
  data() {
    return {
      isShow_Add: JSON.parse(sessionStorage.getItem('authMap')).monitor_task.Add,
      isShow_Start: JSON.parse(sessionStorage.getItem('authMap')).monitor_task.Start,
      isShow_Pause: JSON.parse(sessionStorage.getItem('authMap')).monitor_task.Pause,
      isShow_Modify: JSON.parse(sessionStorage.getItem('authMap')).monitor_task.Modify,
      isShow_Delete: JSON.parse(sessionStorage.getItem('authMap')).monitor_task.Delete,
      isShow_Refresh: JSON.parse(sessionStorage.getItem('authMap')).monitor_task.Refresh,
      monitorTaskData: [],
      left: { show: false, name: '' },
      middle: { show: false, name: '' },
      right: { show: true, crumb: `${this.$t('Security.securityManage')}`+'/' + `${this.$t('Monitor.monitor')}` + '/' + `${this.$t('Monitor.task.titleName')}` },
      toolbarItems: [
        { prefixIcon: 'icon hero-icon hero-icon-add', tooltipText: this.$t('Security.add'), click: this.showAddDialog },
        { prefixIcon: 'icon hero-icon hero-icon-start-up', tooltipText: this.$t('Pm.startUp'), click: this.activeMonitorTask },
        { prefixIcon: 'icon hero-icon hero-icon-disable', tooltipText: this.$t('System.deactiveTask'), click: this.deactiveMonitorTask },
        { prefixIcon: 'icon hero-icon hero-icon-edit', tooltipText: this.$t('Track.detail'), click: this.showEditDialog },
        { prefixIcon: 'icon hero-icon hero-icon-remove', tooltipText: this.$t('Security.delete'), click: this.deleteMonitorTask },
        { prefixIcon: 'icon hero-icon hero-icon-refresh', tooltipText: this.$t('Alarm.refresh'), click: this.refreshGrid },
      ],
      keyword: '',
      pageSettings: { pageSize: 15 },
      page: {
        pageCount: 4,
        totalRecordsCount: 0,
        pageNo: 1,
      },
      dateFormat: {
        type: 'date', format: 'yyyy-MM-dd HH:mm:ss'
      },
      addStatus: true,
      addDialog: {
        element: {
          target: '#app',
          isClose: true,
          refName: 'addMonitorTaskDialog',
          buttonGroup: [
            {
              click: this.dialogHide,
              buttonModel: { content: `${this.$t('Common.cancel')}` }
            },
            {
              click: this.addMonitorTask,
              buttonModel: { content: `${this.$t('Common.ok')}`, cssClass: 'primary-btn' }
            }
          ],
          title: `${this.$t('Pm.addMonitorTask')}`
        },
        styles: {
          width: '860px',
          height: '700px',
          model: true,
          visible: false
        }
      },
      editDialog: {
        element: {
          target: '#app',
          isClose: true,
          refName: 'showMonitorTaskDialog',
          buttonGroup: [
            {
              click: this.modiyMonitorTask,
              buttonModel: {content: `${this.$t('Common.ok')}`, cssClass: 'primary-btn' }
            },

            {
              click: this.dialogHide,
              buttonModel: { content: `${this.$t('Common.close')}` }
            },
          ],
          title: `${this.$t('Pm.updateMonitorTask')}`
        },
        styles: {
          width: '860px',
          height: '700px',
          model: true,
          visible: false
        }
      },
      screenHeight: document.body.clientHeight - 240
    };
  },
  mounted() {
    this.getMonitorTaskList();
    let That = this;
  },
  methods: {
    exeStateFormat(grids, data) {
      if(data.exeState == 0){
        return `${this.$t('Monitor.task.notStarted')}`;
      }else if(data.exeState == 1){
        return `${this.$t('Monitor.task.inUse')}`;
      }else if(data.exeState == 2){
        return `${this.$t('Monitor.task.exeFinish')}`;
      }else if(data.exeState == 3){
        return `${this.$t('System.deactiveTask')}`;
      }
    },
    getMonitorTaskList() {
      const url = '/lte/ems/sys/monitor/task/query';
      this.page.pageNo = this.$refs.pager.ej2Instances.currentPage;
      const params = { params: {
        taskName: this.keyword,
        pageNo: this.page.pageNo,
        pageSize: this.pageSettings.pageSize
      } };
      const That = this;
      this.axios.get(url, params).then(response => {
        const result = response.data.result;
        result.forEach((v) => {
          if (!!v.sampleStart) {
            let date = new Date();
            date.setTime(v.sampleStart);
            v.sampleStart = date;
          }
          if (!!v.sampleEnd) {
            let date = new Date();
            date.setTime(v.sampleEnd);
            v.sampleEnd = date;
          }
        });
        That.monitorTaskData = result;
        That.page.totalRecordsCount = response.data.totalCount;
      });
    },
    filterMonitorTask() {
      this.getMonitorTaskList();
    },
    getRecord() {
      const result = this.$refs.grid.getSelectedRecords();
      if (result === null || result === '') {
        this.$parent.showToast('warning',`${this.$t('Common.tips.noSelect')}`);
        return null;
      }
      return result;
    },
    showAddDialog() {
      this.$refs.addMonitorTaskPage.init();
      this.$refs.addMonitorTaskDialog.show();
    },
    showEditDialog() {
      const record = this.getRecord();
      if (record.length === 0) {
        this.$parent.showToast('warning',`${this.$t('Common.tips.selectOne')}`);
        return null;
      }
      if (record.length !== 1) {
        this.$parent.showToast('warning',`${this.$t('Common.tips.onlyOneSelect')}`);
        return null;
      }
       for(let i=0; i<record.length; i++){
        if(1== record[i].exeState){
          this.$parent.showToast('warning',`${this.$t('Monitor.task.activeMonitor')}`);
          return null;
        }
      }
      this.editId = record[0].id;
      this.$refs.showMonitorTaskPage.init(this.editId);
      this.$refs.showMonitorTaskDialog.show();
    },
    activeMonitorTask() {
      const url = "/lte/ems/sys/monitor/task/active";
      let record = this.getRecord();
      if (record == null) {
        return null;
      }
      if (record.length === 0) {
        this.$parent.showToast('warning',`${this.$t('Common.tips.selectOne')}`);
        return null;
      } else if (record.length > 1) {
        EventBus.$emit('toast', { type: 'warning', content: this.$t('DeployManagement.pleaseSelectOneData') });
        return false;
      }
      for(let i=0; i<record.length; i++){
        if(3 !== record[i].exeState){
          this.$parent.showToast('warning',`${this.$t('Monitor.task.activeMonitor')}`);
          return null;
        }
      }

      for(let i=0; i<this.monitorTaskData.length; i++){
        if(1 == this.monitorTaskData[i].exeState){
          this.$parent.showToast('warning',`${this.$t('Monitor.task.oneActiveMonitor')}`);
          return null;
        }
      }
      let That = this;
      const params = [];
      record.forEach((r, i) => {
        params.push(r.id);
      });
      var currentDate = new Date();
      if (currentDate > record[0].sampleEnd) {
        That.$parent.showToast('error',  `${this.$t('Common.tips.taskExpired')}`);
        return null;
      }
      this.axios.post(url, params).then(response => {
        const result = response.data;
        if(result){
          That.$parent.showToast('success', `${this.$t('Common.tips.success')}`);
          That.getMonitorTaskList();
        }else{
          That.$parent.showToast('error',  `${this.$t('Common.tips.failure')}`);
        }
      });
    },
    deactiveMonitorTask() {
      const url = "/lte/ems/sys/monitor/task/deactive";
      let record = this.getRecord();
      if (record == null) {
        return null;
      }
      if (record.length === 0) {
        this.$parent.showToast('warning',`${this.$t('Common.tips.selectOne')}`);
        return null;
      }
      for(let i=0; i<record.length; i++){
        if(1 !== record[i].exeState){
          this.$parent.showToast('warning',`${this.$t('Monitor.task.deactiveMonitor')}`);
          return null;
        }
      }
      let That = this;
      const params = [];
      record.forEach((r, i) => {
        params.push(r.id);
      });
      this.axios.post(url, params).then(response => {
        const result = response.data;
        if(result){
          That.$parent.showToast('success', `${this.$t('Common.tips.success')}`);
          That.getMonitorTaskList();
        }else{
          That.$parent.showToast('error',  `${this.$t('Common.tips.failure')}`);
        }
      });
    },
    deleteMonitorTask() {
      const record = this.getRecord();
      if (record.length === 0) {
        this.$parent.showToast('warning',`${this.$t('Common.tips.selectOne')}`);
        return null;
      }
      for(let i=0; i<record.length; i++){
        if(1 === record[i].exeState){
          this.$parent.showToast('warning',`${this.$t('Monitor.task.deleteMonitor')}`);
          return null;
        }
      }
      const url = '/lte/ems/sys/monitor/task/delete';
      const params = [];
      record.forEach((r, i) => {
        params.push(r.id);
      });
      let That = this;
      this.$layer.confirm({
        msg: `${this.$t('Common.tips.confirmTip')}`,
        btn1: {
          msg: `${this.$t('Common.cancel')}`
        },
        btn2: {
          msg: `${this.$t('Common.ok')}`,
          func: () => {
            That.axios.post(url, params).then(response => {
              if (response.data) {
                That.$parent.showToast('success', `${this.$t('Common.tips.success')}`);
                That.getMonitorTaskList();
              } else {
                That.$parent.showToast('error', `${this.$t('Common.tips.failure')}`);
              }
            });
          }
        }
      });
    },
    addMonitorTask() {
      let status = this.$refs.addMonitorTaskPage.validation();
      if(!status){
        return;
      }
      const url = '/lte/ems/sys/monitor/task/add';
      const monitorTaskPo = this.$refs.addMonitorTaskPage.getMonitorTask();
      console.log("******addMonitorTask-monitorTaskPo:", monitorTaskPo)

      if(monitorTaskPo == null) {
        return;
      }
      let That = this;
      this.axios.post(url, monitorTaskPo).then(response => {
        const result = response.data;
        if(result==true) {
          That.$parent.showToast('success', `${this.$t('Common.tips.success')}`);
          That.getMonitorTaskList();
          That.$refs.addMonitorTaskDialog.clear();
          That.$refs.addMonitorTaskDialog.close();
        } else if (result==false){
          That.$parent.showToast('error', `${this.$t('Common.tips.failure')}`);
        }else {
          That.$parent.showToast('error', `${this.$t('Security.failureMessage')}`);
        }
      });
    },
    modiyMonitorTask() {
      let status = this.$refs.showMonitorTaskPage.validation();
      if(!status){
        return;
      }
      const url = '/lte/ems/sys/monitor/task/modify';
      const monitorTaskPo = this.$refs.showMonitorTaskPage.getMonitorTask();
      console.log("******modiyMonitorTask-monitorTaskPo:", monitorTaskPo)

      if(monitorTaskPo == null) {
        return;
      }
      let That = this;
      this.axios.post(url, monitorTaskPo).then(response => {
        const result = response.data;
        if(result) {
          That.$parent.showToast('success', `${this.$t('Common.tips.success')}`);
          That.getMonitorTaskList();
          That.$refs.showMonitorTaskDialog.clear();
          That.$refs.showMonitorTaskDialog.close();
        } else {
          That.$parent.showToast('error', `${this.$t('Common.tips.failure')}`);
        }
      });
    },
    dialogHide() {
      this.$refs.addMonitorTaskDialog.clear();
      this.$refs.addMonitorTaskDialog.close();
      this.$refs.showMonitorTaskDialog.clear();
      this.$refs.showMonitorTaskDialog.clear();
    },
    refreshGrid() {
      this.keyword='';
      this.getMonitorTaskList();
    },
    getCheckedData(selectOnly) {
      // false: 不支持多选   true: 支持多选
      const selectedRecords = this.$refs.grid.getSelectedRecords();
      if (selectedRecords.length < 1) {
        // EventBus.$emit('toast', {type: 'warning', content: this.$t('Alarm.no_checked')});
        this.$parent.showToast('warning',`${this.$t('Alarm.no_checked')}`);

        return false;
      }
      if (selectedRecords.length > 1 && !selectOnly) {
        // EventBus.$emit('toast', {type: 'warning', content: this.$t('Common.tips.onlyOneSelect')});
        this.$parent.showToast('warning',`${this.$t('Common.tips.onlyOneSelect')}`);
        return false;
      }
      return selectedRecords;
    },
  },
  watch: {
    screenHeight(val) {
      this.screenHeight = val;
    }
  }
};
</script>

MonitorTaskLog.vue

<template>
  <div class="h100vh-140">
      <div class="h-toolbarBg">
        <ejs-toolbar :items="toolbarItems">
        <!-- <ejs-toolbar>
          <e-items>
          <e-item prefixIcon='icon hero-icon hero-icon-refresh' tooltipText="$t('Alarm.refresh')" :click="refreshGrid"></e-item>
        </e-items>  -->
        </ejs-toolbar>
        <!--<div class='h-inputBox'>-->
        <!--  <ejs-dropdownlist :dataSource="productList" v-model="product"-->
        <!--      :fields="fieldsType" name="productCheck"  @change="productChange" ></ejs-dropdownlist>-->
        <!--</div>-->
        <div class="h-inputBox">
               {{$t('Monitor.task.sampleStart')}}:
              <ejs-datetimepicker ref="dataStart" class="e-input e-disabled e-input-group" name="StartDate"
              :format="dateFormat.format" v-model="monitorTask.sampleStart" :locale="locale"  @change="getMonitorTaskList" ></ejs-datetimepicker>

              {{$t('Monitor.task.sampleEnd')}}:
              <ejs-datetimepicker ref="dataEnd" class="e-input e-disabled e-input-group" name="EndDate"
              :format="dateFormat.format" v-model="monitorTask.sampleEnd" :locale="locale"   @change="getMonitorTaskList"></ejs-datetimepicker>
        </div>
      </div>
      <div class="h100-80 h-scroll">
        <ejs-grid :dataSource="monitorTaskLogData" :allowPaging="true" ref="grid" :pageSettings="pageSettings" :height="screenHeight" :allowExcelExport='true' >
          <e-columns>
            <!-- <e-column type="checkbox" width="50" textAlign="center"></e-column> -->
            <e-column field="id" :visible="false"></e-column>
            <!--<e-column field="product" :headerText="$t('Monitor.record.product')" width="120" textAlign="Center"></e-column>-->
            <e-column field="systemInfo" :headerText="$t('Monitor.record.systemInfo')" width="240" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <!-- <e-column field="taskId" :headerText="$t('Monitor.record.taskId')" width="120" textAlign="Center"></e-column> -->
            <e-column field="recoreTime" :headerText="$t('Monitor.record.recoreTime')" :format="dateFormat" width="120" textAlign="Center" clipMode="EllipsisWithTooltip"></e-column>
            <e-column field="cpu" :headerText="$t('Monitor.record.cpu')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="cpuThreshold" :visible="false" :headerText="$t('Monitor.record.cpuThreshold')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="memory" :headerText="$t('Monitor.record.memory')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="memoryThreshold" :visible="false" :headerText="$t('Monitor.record.memoryThreshold')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="space" :headerText="$t('Monitor.record.diskSpace')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="spaceThreshold" :visible="false" :headerText="$t('Monitor.record.diskSpaceThreshold')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="networkRxRate" :headerText="$t('Monitor.record.networkRxRate')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="networkTxRate" :headerText="$t('Monitor.record.networkTxRate')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="iopsKbRead" :headerText="$t('Monitor.record.IOPSKbRead')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="iopsKbWrite" :headerText="$t('Monitor.record.IOPSKbWrite')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="queueOperands" :headerText="$t('Monitor.record.queueOperands')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="databaseDiskSpaceIsUsed" :headerText="$t('Monitor.record.databaseDiskSpaceIsUsed')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
            <e-column field="snmpAlarmDataSize" :headerText="$t('Monitor.record.snmpAlarmDataSize')" width="120" textAlign="Center" clipMode='EllipsisWithTooltip'></e-column>
          </e-columns>
        </ejs-grid>
        <ejs-pager
          ref="pager"
          :pageSize="pageSettings.pageSize"
          :pageCount="page.pageCount"
          :currentPage="page.pageNo"
          :totalRecordsCount="page.totalRecordsCount"
          @click="getMonitorTaskList"
        ></ejs-pager>
      </div>
  </div>
</template>
<script>
import {ExcelExport} from '@syncfusion/ej2-vue-grids';

export default {
  name: 'monitorSystemLog',
  provide: {
    grid: [ExcelExport]
  },
  components: {
  },
  data() {
    return {
      isShow_Refresh: JSON.parse(sessionStorage.getItem('authMap')).monitor_system_log.Refresh,
      monitorTaskLogData: [],
      left: { show: false, name: '' },
      middle: { show: false, name: '' },
      right: { show: true, crumb: `${this.$t('Security.securityManage')}`+'/' + `${this.$t('Monitor.monitor')}` + '/' + `${this.$t('Monitor.record.titleName')}` },
      toolbarItems: [
        { prefixIcon: 'icon hero-icon hero-icon-refresh', tooltipText: this.$t('Alarm.refresh'), click: this.refreshGrid },
      ],
      locale: localStorage.getItem('locale'),
      product: '',
      productList: [],
      pageSettings: { pageSize: 15 },
      page: {
        pageCount: 4,
        totalRecordsCount: 0,
        pageNo: 1,
      },
      monitorTask: {
                    taskName: '',
                    product: 'PLATFORM',
                    sampleStart: '',
                    sampleEnd: '',
                },
      dateFormat: {
        type: 'date', format: 'yyyy-MM-dd HH:mm:ss'
      },
      fieldsType: {
          text: "text",
          value: "value"
      },
      addStatus: true,
      screenHeight: document.body.clientHeight - 240
    };
  },
  mounted() {
    this.getMonitorTaskList();
    this.getProductList();
    let That = this;
  },
  methods: {
    typeFormat(grids, data) {
      if(data.exeCycle == 'run'){
        return `${this.$t('Monitor.record.run')}`;
      }else if(data.exeCycle == 'start'){
        return `${this.$t('Monitor.record.start')}`;
      }
    },
    getMonitorTaskList() {
      const url = '/lte/ems/sys/monitor/log/queryMonitorTaskLog';
      this.page.pageNo = this.$refs.pager.ej2Instances.currentPage;
      const params = { params: {
        product: this.product,
        pageNo: this.page.pageNo,
        pageSize: this.pageSettings.pageSize,
        startTime:this.monitorTask.sampleStart=='' ? '' : Date.parse(this.monitorTask.sampleStart),
        endTime:this.monitorTask.sampleEnd=='' ? '' : Date.parse(this.monitorTask.sampleEnd)
      } };
      const That = this;
      this.axios.get(url, params).then(response => {
        const result = response.data.result;
        result.forEach((v) => {
          if (!!v.recoreTime) {
            let date = new Date();
            date.setTime(v.recoreTime);
            v.recoreTime = date;
          }
        });
        That.monitorTaskLogData = result;
        That.page.totalRecordsCount = response.data.totalCount;
      });
    },
    productChange(msg){
      this.product = msg.value;
      this.getMonitorTaskList();
    },
    getProductList() {
      this.$axios.get("/lte/ems/sys/monitor/log/findProducts").then(response => {
          let resultVal = response.data.resultVal;
          resultVal = resultVal.filter(item => !item.includes('ems_5gc') && !item.includes('ems_gnb') && !item.includes('ems_tr069'));
          this.productList.push({ text: "All", value: "" });
          for (let i = 0; i < resultVal.length; i++) {
              this.productList.push({
                  text: resultVal[i],
                  value: resultVal[i],
              });
          }
      });
    },
    filterMonitorTask() {
      this.getMonitorTaskList();
    },
    refreshGrid() {
      this.product='';
      this.getMonitorTaskList();
    },
  },
  watch: {
    screenHeight(val) {
      this.screenHeight = val;
    }
  }
};
</script>

RealtimeCpuMonitor.vue

<template>
    <div class='h100vh-150 h-normalBg'>
        <div class='h-ainfoBg'>
            <div class='h-ainfo'>
                <span class='icon hero-icon hero-icon-detailcode'></span>
                <span>{{$t('Monitor.realTimeMonitoring.CPUUtilization')}}{{ CPUUtilization }}%</span>
            </div>
        </div>
        <div class='h-normalContainter'>
                <div class='row h-nomargin h-full-container width-100vw h100-80'>
                    <div id='cpuMonitor' class='width-100vw h100' style="height:599px"></div>
                </div>
        </div>
    </div>
</template>
<script>
import echarts from 'echarts';

export default{
    name: "realtimeCpuMonitor",
    data() {
        return {
            data: [],
            charts: "",
            app: {},
            myChart: null,
            xData: [],
            CPUUtilization: 0
        };
    },
    methods: {
        initData() {
            this.myChart = echarts.init(document.getElementById('cpuMonitor'));
            for (var i=0;i<12;i++){
                if(i==11){
                    this.xData.push('0');
                }else if (i==0){
                    this.xData.push('60s')
                }else{
                    this.xData.push('');
                }
                this.data.push('-');
            }
            let option = this.getChartOption();
            if (option && typeof option === 'object') {
                this.myChart.setOption(option);
            }
        },
        random(min,max){
            return Math.floor(Math.random()*(max-min))+min;
        },
        randomData() {
            return this.random(20,60);
        },
        getMonitorData(CPUUtilization) {
            this.CPUUtilization=CPUUtilization;
            if(this.data.length>=12){
                this.data.shift();
            }
            this.data.push(CPUUtilization);
            this.myChart.clear();
            this.myChart.setOption(this.getChartOption(),true);
            this.myChart.resize();
        },
        getChartOption() {
            const option = {
                title: {
                    text: ''
                },
                tooltip: {
                    trigger: 'axis',
                    formatter: function (params) {
                    return params[0].value;
                    },
                    axisPointer: {
                    animation: false
                    }
                },
                xAxis: {
                    type: 'category',
                    data: this.xData,
                    boundaryGap: false
                },
                yAxis: {
                    name: "%",
                    type: 'value',
                    min: 0,
                    max: 100,
                    axisLabel: {
                        formatter: '{value}'
                    }
                },
                series: [
                    {
                        type: 'line',
                        areaStyle: {
                            color: {
                                type: 'linear',
                                x: 0,
                                y: 0,
                                x2: 0,
                                y2: 1,
                                colorStops: [
                                    {
                                        offset: 0,
                                        color: 'rgb(232,248,252)'
                                    },
                                    {
                                        offset: 1,
                                        color: 'rgb(203,227,243)'
                                    }
                                ],
                                global: false
                            }
                        },
                        data: this.data,
                        lineStyle: {
                            color: '#4097c9'
                        }
                    }
                ]
            };
            return option;
        }
    },
    mounted() {
        this.initData();
    }
}
</script>

RealtimeDiskMonitor.vue

<template>
    <div class='h100vh-150 h-normalBg'>
        <div class='h-ainfoBg'>
            <div class='h-ainfo'>
                <span class='icon hero-icon hero-icon-detailcode'></span>
                <span>{{$t('Monitor.realTimeMonitoring.diskSize')}}{{ diskSize }}GB</span>
                <span>{{$t('Monitor.realTimeMonitoring.diskUsage')}}{{ diskUsage }}GB</span>
                <span>{{$t('Monitor.realTimeMonitoring.diskUtilization')}}{{ diskUtilization }}%</span>
            </div>
        </div>
        <div class='h-normalContainter'>
                <div class='row h-nomargin h-full-container width-100vw h100-80'>
                    <div id='diskMonitor' class='width-100vw h100' style="height:599px"></div>
                </div>
        </div>
    </div>
</template>
<script>
import echarts from 'echarts';

export default{
    name: "realtimeMemoryMonitor",
    data() {
        return {
          data: [],
          charts: "",
          app: {},
          myChart: null,
          xData: [],
          diskSize: 0,
          diskUsage: 0,
          diskUtilization: 0,
        };
    },
    methods: {
        initData() {
            this.myChart = echarts.init(document.getElementById('diskMonitor'));
            for (var i=0;i<12;i++){
                if(i==11){
                    this.xData.push('0');
                }else if (i==0){
                    this.xData.push('60s')
                }else{
                    this.xData.push('');
                }
                this.data.push('-');
            }
            let option = this.getChartOption();
            if (option && typeof option === 'object') {
                this.myChart.setOption(option);
            }
            this.getMonitorData();
        },
        random(min,max){
            return Math.floor(Math.random()*(max-min))+min;
        },
        randomData() {
            return this.random(5600,7000);
        },
        getMonitorData(diskSize, diskUsage, diskUtilization) {
          this.diskSize = diskSize;
          this.diskUsage = diskUsage;
          this.diskUtilization = diskUtilization;
          if(this.data.length >= 12){
            this.data.shift();
          }
          this.data.push(diskUsage);
          this.myChart.clear();
          this.myChart.setOption(this.getChartOption(),true);
          this.myChart.resize();
        },
        getChartOption() {
            const option = {
                title: {
                    text: ''
                },
                tooltip: {
                    trigger: 'axis',
                    formatter: function (params) {
                    return params[0].value;
                    },
                    axisPointer: {
                    animation: false
                    }
                },
                xAxis: {
                    type: 'category',
                    data: this.xData,
                    boundaryGap: false
                },
                yAxis: {
                    name: "GB",
                    type: 'value',
                    axisLabel: {
                        formatter: '{value}'
                    }
                },
                series: [
                    {
                        type: 'line',
                        areaStyle: {
                            color: {
                                type: 'linear',
                                x: 0,
                                y: 0,
                                x2: 0,
                                y2: 1,
                                colorStops: [
                                    {
                                        offset: 0,
                                        color: 'rgb(220,236,203)'
                                    },
                                    {
                                        offset: 1,
                                        color: 'rgb(196,228,172)'
                                    }
                                ],
                                global: false
                            }
                        },
                        data: this.data,
                        lineStyle: {
                            color: '#4da40d'
                        }
                    }
                ]
            };
            return option;
        }
    },
    mounted() {
        this.initData();
    },
    beforeDestroy() {
        try {
            clearInterval(this.clock);
        } catch (e) {
            console.log(e);
        }
    }
}
</script>

RealtimeMemoryMonitor.vue

<template>
    <div class='h100vh-150 h-normalBg'>
        <div class='h-ainfoBg'>
          <div class='h-ainfo'>
            <span class='icon hero-icon hero-icon-detailcode'></span>
            <span>{{$t('Monitor.realTimeMonitoring.memoryTotal')}}{{ memoryTotal }}GB</span>
            <span>{{$t('Monitor.realTimeMonitoring.memoryUsage')}}{{ memoryUsage }}GB</span>
            <span>{{$t('Monitor.realTimeMonitoring.memoryUtilization')}}{{ memoryUsageRatio }}%</span>
          </div>
        </div>
        <div class='h-normalContainter'>
                <div class='row h-nomargin h-full-container width-100vw h100-80'>
                    <div id='memoryMonitor' class='width-100vw h100' style="height:599px"></div>
                </div>
        </div>
    </div>
</template>
<script>
import echarts from 'echarts';

export default{
    name: "realtimeMemoryMonitor",
    data() {
        return {
          data: [],
          charts: "",
          app: {},
          myChart: null,
          xData: [],
          memoryUsage: 0,
          memoryTotal: 0,
          memoryUsageRatio: 0,
        };
    },
    methods: {
        initData() {
            this.myChart = echarts.init(document.getElementById('memoryMonitor'));
            for (var i=0;i<12;i++){
                if(i==11){
                    this.xData.push('0');
                }else if (i==0){
                    this.xData.push('60s')
                }else{
                    this.xData.push('');
                }
                this.data.push('-');
            }
            let option = this.getChartOption();
            if (option && typeof option === 'object') {
                this.myChart.setOption(option);
            }
        },
        random(min,max){
            return Math.floor(Math.random()*(max-min))+min;
        },
        randomData() {
            return this.random(5600,7000);
        },
        getMonitorData(memoryTotal, memoryUsage, memoryUsageRatio) {
          this.memoryTotal = memoryTotal;
          this.memoryUsage = memoryUsage;
          this.memoryUsageRatio = memoryUsageRatio;
          if(this.data.length>=12){
            this.data.shift();
          }
          this.data.push(memoryUsage);
          this.myChart.clear();
          this.myChart.setOption(this.getChartOption(),true);
          this.myChart.resize();
        },
        getChartOption() {
            const option = {
                title: {
                    text: ''
                },
                tooltip: {
                    trigger: 'axis',
                    formatter: function (params) {
                    return params[0].value;
                    },
                    axisPointer: {
                    animation: false
                    }
                },
                xAxis: {
                    type: 'category',
                    data: this.xData,
                    boundaryGap: false
                },
                yAxis: {
                    name: "GB",
                    type: 'value',
                    axisLabel: {
                        formatter: '{value}'
                    }
                },
                series: [
                    {
                        type: 'line',
                        areaStyle: {
                            color: {
                                type: 'linear',
                                x: 0,
                                y: 0,
                                x2: 0,
                                y2: 1,
                                colorStops: [
                                    {
                                        offset: 0,
                                        color: 'rgb(244,234,246)'
                                    },
                                    {
                                        offset: 1,
                                        color: 'rgb(209,169,220)'
                                    }
                                ],
                                global: false
                            }
                        },
                        data: this.data,
                        lineStyle: {
                            color: '#8d29a8'
                        }
                    }
                ]
            };
            return option;
        }
    },
    mounted() {
        this.initData();
    }
}
</script>

RealtimeMonitor.vue

<template>
    <BasicLayout :left="left" :middle="middle" :right="right">
        <template v-slot:right_view>
            <div class="h-outTabs">
                <ejs-tab ref="tabObj" id="tab_orientation" heightAdjustMode="Auto" :selected='selected' :selectedItem="0">
                  <e-tabitems>
                    <e-tabitem :header="headerText1" content="#idv1"></e-tabitem>
                    <e-tabitem :header="headerText2" content="#idv2"></e-tabitem>
                    <e-tabitem :header="headerText3" content="#idv3"></e-tabitem>
                    <e-tabitem :header="headerText4" content="#idv4"></e-tabitem>
                  </e-tabitems>
                </ejs-tab>
            </div>
            <div id="idv1" style="display: none">
              <MonitorTaskLog></MonitorTaskLog>
            </div>
            <div id="idv2" style="display: none">
              <RealtimeCpuMonitor ref='realtimeCpuMonitor'></RealtimeCpuMonitor>
            </div>
            <div id="idv3" style="display: none">
              <RealtimeMemoryMonitor ref='realtimeMemoryMonitor'></RealtimeMemoryMonitor>
            </div>
            <div id="idv4" style="display: none">
              <RealtimeDiskMonitor ref='realtimeDiskMonitor'></RealtimeDiskMonitor>
            </div>
        </template>
    </BasicLayout>
</template>
<script>
import BasicLayout from '../../layouts/BasicLayout';
import RealtimeCpuMonitor from './RealtimeCpuMonitor';
import RealtimeMemoryMonitor from './RealtimeMemoryMonitor';
import RealtimeDiskMonitor from './RealtimeDiskMonitor';
import socketInstance from '../../plugins/stompSock';
import MonitorTaskLog from '../../views/monitor/MonitorTaskLog';

export default{
    name: "realtimeMonitor",
    components: {
        MonitorTaskLog,
        BasicLayout,
        RealtimeCpuMonitor,
        RealtimeMemoryMonitor,
        RealtimeDiskMonitor
    },
    data() {
        return {
            left: { show: false, name: '' },
            middle: { show: false, name: '' },
            right: { show: true, crumb: `${this.$t('Security.securityManage')}`+'/' + `${this.$t('Monitor.monitor')}` + '/' + `${this.$t('Monitor.realTimeMonitoring.crumb')}` },
            headerText1: { text: `${this.$t('Monitor.record.titleName')}` },
            headerText2: { text: `${this.$t('Monitor.realTimeMonitoring.CPUUtilization')}` },
            headerText3: { text: `${this.$t('Monitor.realTimeMonitoring.memoryUsage')}` },
            headerText4: { text: `${this.$t('Monitor.realTimeMonitoring.diskUsage')}`},
            websocketSetting: [
                { topic: '/user/#/realTimeMonitoring', clientId: 'monitoring', callback: this.websocketCallback }
            ],
        };
    },
    methods: {
        selected(args){
            const index = args.selectedIndex;
            if (index === 0) {
            } else {
            }
        },
        websocketInit() {
            socketInstance.init(this.websocketSetting);
        },
        websocketCallback(msg) {
            const data = JSON.parse(msg.body);
            const CPUUtilization = data.CPUUsage;
            this.$refs.realtimeCpuMonitor.getMonitorData(CPUUtilization);
            const memoryTotal = data.memoryTotal;
            const memoryUsage = data.memoryUsage;
            const memoryUsageRatio = data.memoryUsageRatio;
            this.$refs.realtimeMemoryMonitor.getMonitorData(memoryTotal, memoryUsage, memoryUsageRatio);
            const diskTotal = data.diskTotal;
            const diskUsage = data.diskUsage;
            const diskUtilization = data.diskUsageRatio;
            this.$refs.realtimeDiskMonitor.getMonitorData(diskTotal, diskUsage, diskUtilization);
        }
    },
    mounted() {
        this.websocketInit();
    },
    beforeDestroy() {
        for (let i = 0; i < this.websocketSetting.length; i++) {
            socketInstance.stopReceiveTopicMsg(this.websocketSetting[i].clientId, this.websocketSetting[i].topic);
        }
    }
}
</script>

后端

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>ems-common</artifactId>
        <groupId>com.hero.lte.ems</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>ems-common-websocket</artifactId>
<dependencies>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-messaging</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-websocket</artifactId>
    </dependency>

    <!-- http://mvnrepository.com/artifact/org.eclipse.jetty.websocket/websocket-server -->
    <dependency>
        <groupId>org.eclipse.jetty.websocket</groupId>
        <artifactId>websocket-server</artifactId>
    </dependency>


    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
    </dependency>

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>log4j-over-slf4j</artifactId>
    </dependency>

    <dependency>
        <groupId>com.hero.lte.ems</groupId>
        <artifactId>other</artifactId>
        <version>1.0-SNAPSHOT</version>
    </dependency>

</dependencies>

</project>

en_US.js

"record": {
      "systemInfo": "System Info",
      "product": "Product",
      "memory": "Memory Usage Threshold(%)",
      "titleName": "System Monitor Record",
      "recoreTime": "Record Time",
      "memoryThreshold": "Memory Usage Threshold(%)",
      "cpuThreshold": "Cpu Usage Threshold(%)",
      "diskSpaceThreshold": "Disk Space Usage Threshold(%)",
      "diskSpace": "Disk Space Usage Threshold(%)",
      "cpu": "Cpu Usage Threshold(%)",
      "taskId": "Task ID",
      "networkRxRate": "Network Rx Rate/s",
      "networkTxRate": "Network Tx Rate/s",
      "IOPSKbRead": "IOPS kB_read/s",
      "IOPSKbWrite": "IOPS kB_wrtn/s",
      "queueOperands": "Total number of stored queue operations/s",
      "databaseDiskSpaceIsUsed": "Database disk space used in the file system",
      "snmpAlarmDataSize": "SBI alarm number/s",
    },

zh_CN.js

"record": {
      "systemInfo": "系统信息",
      "product": "产品",
      "memory": "内存使用率阈值(%)",
      "titleName": "系统监控记录",
      "recoreTime": "记录时间",
      "memoryThreshold": "内存使用率阈值(%)",
      "cpuThreshold": "Cpu使用率阈值(%)",
      "diskSpaceThreshold": "磁盘空间使用率阈值(%)",
      "diskSpace": "磁盘空间使用率阈值(%)",
      "cpu": "Cpu使用率阈值(%)",
      "taskId": "任务id",
      "networkRxRate": "网络接收数据包速率/s",
      "networkTxRate": "网络发送数据包速率/s",
      "IOPSKbRead": "IOPS读取数据量/s",
      "IOPSKbWrite": "IOPS写入数据量/s",
      "queueOperands": "存储队列操作总数/s",
      "databaseDiskSpaceIsUsed": "文件系统中数据库磁盘空间占用大小",
      "snmpAlarmDataSize": "南向告警数量/s",
    },

MonitorTaskController

package com.hero.lte.ems.monitor.controller;

import com.alibaba.fastjson.JSONObject;
import com.hero.lte.ems.db.orm.mybatis.Page;
import com.hero.lte.ems.monitor.entity.MonitorTask;
import com.hero.lte.ems.monitor.entity.po.MonitorTaskPo;
import com.hero.lte.ems.monitor.entity.po.MonitorThresholdPo;
import com.hero.lte.ems.monitor.eunm.MonitorTaskStateEnum;
import com.hero.lte.ems.monitor.service.IMonitorTaskService;
import com.hero.lte.ems.monitor.take.MonitorTaskExe;
import com.hero.lte.ems.monitor.util.UUIDGennerator;
import com.hero.lte.ems.security.entity.Account;
import com.hero.lte.ems.security.entity.Log;
import com.hero.lte.ems.security.service.ILogService;
import io.swagger.annotations.Api;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.Files;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * @author l22898
 */
@Api(value = "MonitorTaskController",tags={"系统监控任务"})
@RestController
@RequestMapping("/lte/ems/sys/monitor/task/")
public class MonitorTaskController {

    private static final Logger logger = LoggerFactory.getLogger(MonitorTaskController.class);

    @Autowired
    private IMonitorTaskService monitorTaskService;

    @Autowired
    private ILogService logService;

    private String monitorFilePath = "/home/ems/ems_eam/conf/monitorFiles.properties";
    private String checkoutFilePath = "/home/ems/ems_eam/conf/checkout.properties";

    @ResponseBody
    @RequestMapping(value = "query", method = RequestMethod.GET)
    public Page<MonitorTask> getPmGnbReportTaskList(MonitorTask monitorTask, Page<MonitorTask> page){
        Long currentTimeMillis = System.currentTimeMillis();
        boolean expired = false;
        Page<MonitorTask> pageReturn = new Page<>();
        try{
            page.setParam(monitorTask);
            pageReturn = monitorTaskService.getMonitorTaskList(page);
            for (MonitorTask task : pageReturn.getResult()) {
                if (task.getExeState() != 3 && currentTimeMillis > task.getSampleEnd()) {
                    expired = true;
                    task.setExeState(3);
                    monitorTaskService.updateMonitorTask(task);
                }
            }
            if (expired) {
                pageReturn = monitorTaskService.getMonitorTaskList(page);
            }

        }catch (Exception e){
            logger.error("系统监控任务查询失败" ,e);
        }
        return pageReturn;
    }

    @ResponseBody
    @RequestMapping(value = "queryId", method = RequestMethod.GET)
    public MonitorTaskPo getPmGnbReportTask(String id){
        MonitorTaskPo monitorTaskPo = new MonitorTaskPo();
        try{
            //查询任务
            MonitorTask monitorTask = monitorTaskService.getMonitorTask(id);
            JSONObject jsonObject = JSONObject.parseObject(monitorTask.getThreshold());
            MonitorThresholdPo monitorThresholdPo = JSONObject.toJavaObject(jsonObject, MonitorThresholdPo.class);
            monitorTaskPo.setMonitorTask(monitorTask);
            monitorTaskPo.setMonitorThresholdPo(monitorThresholdPo);
        }catch (Exception e){
            logger.error("系统监控任务查询失败" ,e);
        }
        return monitorTaskPo;
    }

    /**
     * 新增
     * @param monitorTaskPo
     * @returnwq
     */
    @ResponseBody
    @RequestMapping(value = "add", method = RequestMethod.POST)
    public String insertMonitorTask(@RequestBody MonitorTaskPo monitorTaskPo) {
        String result = "true";
        try {
            if(monitorTaskPo == null){
                return "false";
            }
            MonitorTask monitorTask = monitorTaskPo.getMonitorTask();
            String taskName = monitorTask.getTaskName();
            //根据任务名称查询是否存在
            List<MonitorTask> monitorTasks = monitorTaskService.queryDataByTaskName(taskName);
            if(monitorTasks.size() > 0){
                logger.error("任务名称重复");
                return "Duplicate task name.";
            }
            monitorTask.setId(UUIDGennerator.generator());
            monitorTask.setExeState(MonitorTaskStateEnum.IN_SUSPEND.getCode());
            monitorTask.setThreshold(JSONObject.toJSONString(monitorTaskPo.getMonitorThresholdPo()));
            monitorTaskService.insertMonitorTask(monitorTask);
            MonitorTaskExe.setMonitorTaskMap(monitorTask);
        } catch (Exception e) {
            logger.error("系统监控任务新增失败" ,e);
            result = "false";
        }finally {
            Subject subject = SecurityUtils.getSubject();
            Account account;
            if (subject != null) {
                account = (Account) subject.getPrincipal();
                String username = account.getUsername();
                String userId = account.getUserId();
                String ip = account.getIp();
                int status;
                if(result.equals("true")){
                     status = 1;
                }else {
                     status = 2;
                }
                this.addOperateLog(userId,username,status,"res.create_monitor_task",ip,"Create a system monitoring task.");
            }

        }
        return result;
    }

    @ResponseBody
    @RequestMapping(value = "modify", method = RequestMethod.POST)
    public boolean updateMonitorTask(@RequestBody MonitorTaskPo monitorTaskPo) {
        boolean result = true;
        try {
            if(monitorTaskPo == null){
                return false;
            }
            MonitorTask monitorTask = monitorTaskPo.getMonitorTask();
            MonitorTask modifyResult = monitorTaskService.getMonitorTask(monitorTask.getId());
            monitorTask.setExeState(modifyResult.getExeState());
            monitorTask.setThreshold(JSONObject.toJSONString(monitorTaskPo.getMonitorThresholdPo()));
            monitorTaskService.updateMonitorTask(monitorTask);
            MonitorTaskExe.setMonitorTaskMap(monitorTask);
        } catch (Exception e) {
            logger.error("系统监控任务修改失败" ,e);
            result = false;
        }finally {
            Subject subject = SecurityUtils.getSubject();
            Account account;
            if (subject != null) {
                account = (Account) subject.getPrincipal();
                String username = account.getUsername();
                String userId = account.getUserId();
                String ip = account.getIp();
                int status;
                if(result){
                    status = 1;
                }else {
                    status = 2;
                }
                this.addOperateLog(userId,username,status,"res.modify_monitor_task",ip,"Modify a system monitoring task.");
            }
        }

        return result;
    }

    /**
     * 暂停
     * @param idList
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "deactive", method = RequestMethod.POST)
    public boolean deactiveMonitorTask(@RequestBody List<String> idList) {
        boolean result = true;
        try {
            if(idList != null && idList.size() > 0){
                monitorTaskService.deactiveMonitorTask(idList);
            }
            MonitorTaskExe.deactiveMonitorTaskMap(idList);
        } catch (Exception e) {
            logger.error("系统监控任务暂停失败" ,e);
            result = false;
        }
        return result;
    }

    /**
     * 启动
     * @param idList
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "active", method = RequestMethod.POST)
    public boolean activeMonitorTask(@RequestBody List<String> idList) {
        boolean result = true;
        try {
            if(idList != null && idList.size() > 0){
                monitorTaskService.activeMonitorTask(idList);
            }
            MonitorTaskExe.activeMonitorTaskMap(idList);
        } catch (Exception e) {
            logger.error("系统监控任务启动失败" ,e);
            result = false;
        }
        return result;
    }

    /**
     * 删除
     * @param idList
     * @id
     */
    @ResponseBody
    @RequestMapping(value = "delete", method = RequestMethod.POST)
    public boolean delete(@RequestBody List<String> idList) {
        boolean result = true;
        try {
            if(idList != null && idList.size() > 0){
                monitorTaskService.deleteMonitorTask(idList);
            }
            MonitorTaskExe.deleteMonitorTaskMap(idList);
        } catch (Exception e) {
            logger.error("系统监控任务删除失败" ,e);
            result = false;
        }finally {
            Subject subject = SecurityUtils.getSubject();
            Account account;
            if (subject != null) {
                account = (Account) subject.getPrincipal();
                String username = account.getUsername();
                String userId = account.getUserId();
                String ip = account.getIp();
                int status;
                if(result){
                    status = 1;
                }else {
                    status = 2;
                }
                this.addOperateLog(userId,username,status,"res.delete_monitor_task",ip,"Delete a system monitoring task.");
            }
        }
        return result;
    }

    @Scheduled(cron = "0 1 0 * * ?")
    public void modifyExpiredTaskStatus() {
        logger.info("-modifyExpiredTaskStatus-begin");
        Long currentTimeMillis = System.currentTimeMillis();
        List<MonitorTask> list = monitorTaskService.getMonitorTaskAll();
        for (MonitorTask task : list) {
            if (task.getExeState() != 3 && currentTimeMillis > task.getSampleEnd()) {
                task.setExeState(3);
                monitorTaskService.updateMonitorTask(task);
            }
        }
    }

    public void addOperateLog(String userId,String userName,int updateStatus,String featureId,String ip,String ExecData){
        Log log = new Log();
        log.setAccountId(userId);
        log.setAccountName(userName);
        log.setModuleId("res.security#res.system_monitor#res.monitor_task");
        log.setFeatureId(featureId);
        log.setExecTime(System.currentTimeMillis());
        log.setExecType(2);
        log.setResult(updateStatus);
        //  Create a system monitoring task
        //  Modify a system monitoring task
        //  Delete a system monitoring task
        log.setExecData(ExecData);
        log.setIp(ip);
        logService.addOperateLog(log);
    }

    @Scheduled(cron = "0 0 0/1 * * ?")
    public void monitorWhetherFilesAreTamperedWith() {
        logger.info("Monitor whether files are tampered begin!");
        // 读取 checkout.properties 文件
        Map<String, String> expectedMD5Map = readExpectedMD5(checkoutFilePath);
        if (expectedMD5Map == null) return;

        // 读取 monitorFiles.properties 文件并进行 MD5 校验
        try (BufferedReader reader = new BufferedReader(new FileReader(monitorFilePath))) {
            String filePath;
            while ((filePath = reader.readLine()) != null) {
                filePath = filePath.trim(); // 去掉前后空格
                if (expectedMD5Map.containsKey(filePath)) {
                    String expectedMD5 = expectedMD5Map.get(filePath);
                    String calculatedMD5 = calculateMD5(new File(filePath));

                    if (calculatedMD5 == null) {
                        logger.error("Monitor whether files are tampered, Error calculating MD5 for file:{}", filePath);
                        continue;
                    }

                    // 比较 MD5 值
                    if (!calculatedMD5.equalsIgnoreCase(expectedMD5)) {
                        logger.error("Monitor whether files are tampered, Error: MD5 mismatch for:{}, Expected:{}, but got:{}, The conclusion document has been tampered with!", filePath, expectedMD5, calculatedMD5);
                    }
                } else {
                    logger.warn("Monitor whether files are tampered, Warning: No expected MD5 found for:{}", filePath);
                }
            }
        } catch (IOException e) {
            logger.error("Monitor whether files are tampered, Exception:{}", e.getMessage());
        }
    }

    private static Map<String, String> readExpectedMD5(String checkoutFilePath) {
        Map<String, String> md5Map = new HashMap<>();
        try (BufferedReader reader = new BufferedReader(new FileReader(checkoutFilePath))) {
            String line;
            while ((line = reader.readLine()) != null) {
                String[] parts = line.split("=");
                if (parts.length == 2) {
                    String filePath = parts[0].trim();
                    String md5Value = parts[1].trim();
                    md5Map.put(filePath, md5Value);
                } else {
                    logger.error("Skipping invalid line in checkout.properties:{}", line);
                }
            }
        } catch (IOException e) {
            logger.error("readExpectedMD5-Exception:{}", e.getMessage());
        }
        return md5Map;
    }

    private static String calculateMD5(File file) {
        try {
            MessageDigest md = MessageDigest.getInstance("MD5");
            byte[] bytes = Files.readAllBytes(file.toPath());
            byte[] digest = md.digest(bytes);

            StringBuilder sb = new StringBuilder();
            for (byte b : digest) {
                sb.append(String.format("%02x", b));
            }
            return sb.toString();
        } catch (IOException | NoSuchAlgorithmException e) {
            logger.error("calculateMD5-Exception:{}", e.getMessage());
            return null;
        }
    }
}

IMonitorTaskService

package com.hero.lte.ems.monitor.service;

import com.hero.lte.ems.db.orm.mybatis.Page;
import com.hero.lte.ems.framework.exception.LteException;
import com.hero.lte.ems.monitor.entity.MonitorTask;

import java.util.List;
import java.util.Map;

public interface IMonitorTaskService {

    Page<MonitorTask> getMonitorTaskList(Page<MonitorTask> pager);

    List<MonitorTask> getMonitorTaskAll();

    MonitorTask getMonitorTask(String id) throws LteException ;

    int insertMonitorTask(MonitorTask monitorTask);

    int updateMonitorTask(Map<String, Object> map);

    int deleteMonitorTask(List<String> idList);

    int deactiveMonitorTask(List<String> idList);

    int activeMonitorTask(List<String> idList);

    int updateMonitorTask(MonitorTask monitorTask);

    List<MonitorTask> queryDataByTaskName(String taskName);
}

MonitorTaskServiceImpl

package com.hero.lte.ems.monitor.service.impl;

import com.hero.lte.ems.db.orm.mybatis.Page;
import com.hero.lte.ems.framework.exception.LteException;
import com.hero.lte.ems.monitor.dao.MonitorTaskMapper;
import com.hero.lte.ems.monitor.entity.MonitorTask;
import com.hero.lte.ems.monitor.service.IMonitorTaskService;
import com.hero.lte.ems.security.config.aop.LogAnnotation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author l22898
 */
@Service
public class MonitorTaskServiceImpl implements IMonitorTaskService {

    private static final Logger LOGGER = LoggerFactory.getLogger(MonitorTaskServiceImpl.class);

    @Resource
    private MonitorTaskMapper monitorTaskMapper;

    @Override
    public Page<MonitorTask> getMonitorTaskList(Page<MonitorTask> pager){
        List<MonitorTask> monitorTaskList = monitorTaskMapper.findMonitorTaskPage(pager, pager.getParam());
        return pager;
    }

    @Override
    public List<MonitorTask> getMonitorTaskAll(){
        List<MonitorTask> monitorTaskList = monitorTaskMapper.findMonitorTaskAll();
        return monitorTaskList;
    }

    @Override
    public MonitorTask getMonitorTask(String id) throws LteException {
        return monitorTaskMapper.findById(id);
    }

    @Override
    public int insertMonitorTask(MonitorTask monitorTask){
        return monitorTaskMapper.insertMonitorTask(monitorTask);
    }

    @Override
    public int updateMonitorTask(MonitorTask monitorTask){
        return monitorTaskMapper.modMonitorTask(monitorTask);
    }

    @Override
    public List<MonitorTask> queryDataByTaskName(String taskName) {

        return monitorTaskMapper.queryDataByTaskName(taskName);
    }

    @Override
    public int updateMonitorTask(Map<String, Object> map){
        return monitorTaskMapper.updateMonitorTask(map);
    }

    @Override
    public int deleteMonitorTask(List<String> idList){
        return monitorTaskMapper.deleteMonitorTask(idList);
    }

    @Override
    @LogAnnotation(module = "res.security#res.system_monitor", feature = "res.alarm_mod", type = 2)
    public int deactiveMonitorTask(List<String> idList) {
        return monitorTaskMapper.deactiveMonitorTask(idList);
    }

    @Override
    @LogAnnotation(module = "res.security#res.system_monitor", feature = "res.alarm_mod", type = 2)
    public int activeMonitorTask(List<String> idList) {
        return monitorTaskMapper.activeMonitorTask(idList);
    }
}

MonitorTaskMapper

package com.hero.lte.ems.monitor.dao;

import com.hero.lte.ems.db.orm.mybatis.Page;
import com.hero.lte.ems.monitor.entity.MonitorTask;
import com.hero.lte.ems.monitor.entity.MonitorTaskLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface MonitorTaskMapper {

    MonitorTask findById(String id);

    List<MonitorTask> findMonitorTaskPage(@Param("page") Page pager, @Param("monitorTask") MonitorTask monitorTask);

    List<MonitorTask> findMonitorTaskAll();

    int insertMonitorTask(MonitorTask monitorTask);

    int updateMonitorTask(Map<String, Object> map);

    int deleteMonitorTask(@Param("idList")List<String> idList);

    int deactiveMonitorTask(@Param("idList")List<String> idList);

    int activeMonitorTask(@Param("idList")List<String> idList);

    int modMonitorTask(MonitorTask monitorTask);

    List<MonitorTask> queryDataByTaskName(@Param("taskName") String taskName);
}

MonitorTaskMapper.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hero.lte.ems.monitor.dao.MonitorTaskMapper">
    <resultMap id="BaseResultMap" type="com.hero.lte.ems.monitor.entity.MonitorTask">
        <id column="ID" property="id" jdbcType="VARCHAR"/>
        <result column="TASK_NAME" property="taskName" jdbcType="VARCHAR"/>
        <result column="PRODUCT" property="product" jdbcType="VARCHAR"/>
        <result column="THRESHOLD" property="threshold" jdbcType="VARCHAR"/>
        <result column="SAMPLE_START" property="sampleStart" jdbcType="BIGINT"/>
        <result column="SAMPLE_END" property="sampleEnd" jdbcType="BIGINT"/>
        <result column="EXE_STATE" property="exeState" jdbcType="INTEGER"/>
    </resultMap>

    <sql id="Base_Column_List">
		ID, TASK_NAME, PRODUCT, THRESHOLD, SAMPLE_START, SAMPLE_END, EXE_STATE
	</sql>

    <select id="findById" parameterType="java.lang.String" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from monitor_task
        where id = #{id,jdbcType=VARCHAR}
    </select>

    <select id="findMonitorTaskPage" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from monitor_task
        <where>
            <if test="monitorTask.taskName != null and monitorTask.taskName !=''" >
                and BINARY TASK_NAME like CONCAT('%',#{monitorTask.taskName},'%')
            </if>
            <if test="monitorTask.product != null and monitorTask.product !=''" >
                and BINARY PRODUCT like CONCAT('%',#{monitorTask.product},'%')
            </if>
        </where>
    </select>

    <select id="findMonitorTaskAll" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from monitor_task
    </select>

    <insert id="insertMonitorTask" parameterType="com.hero.lte.ems.monitor.entity.MonitorTask">
		insert into monitor_task (ID, TASK_NAME, PRODUCT, THRESHOLD, SAMPLE_START, SAMPLE_END, EXE_STATE)
		values(
            #{id,jdbcType=VARCHAR},
            #{taskName,jdbcType=VARCHAR},
            #{product,jdbcType=VARCHAR},
            #{threshold,jdbcType=VARCHAR},
            #{sampleStart,jdbcType=BIGINT},
            #{sampleEnd,jdbcType=BIGINT},
            #{exeState,jdbcType=INTEGER}
		)
	</insert>

    <update id="modMonitorTask" parameterType="com.hero.lte.ems.monitor.entity.MonitorTask">
        update monitor_task
        <set>
            <if test="taskName != null">
                task_name = #{taskName,jdbcType=INTEGER},
            </if>
            <if test="threshold != null">
                threshold = #{threshold,jdbcType=INTEGER},
            </if>
            <if test="exeState != -1">
                EXE_STATE = #{exeState},
            </if>
        </set>
        where id = #{id,jdbcType=VARCHAR}
    </update>

    <update id="updateMonitorTask" parameterType="java.util.Map">
        update monitor_task
        <set>
            <if test="exeState != null">
                EXE_STATE = #{exeState,jdbcType=INTEGER},
            </if>
        </set>
        where id in
        <foreach collection="idList" item="item" index="index" open="("
                 separator="," close=")">
            #{item}
        </foreach>
    </update>

    <delete id="deleteMonitorTask" parameterType="java.lang.String" >
        delete from monitor_task
        where id in
        <foreach collection="idList" item="item" index="index" open="("
                 separator="," close=")">
            #{item}
        </foreach>
        and EXE_STATE in ('0','2','3')
    </delete>

    <update id="deactiveMonitorTask" parameterType="java.lang.String" >
        update monitor_task
        <set>
            EXE_STATE = 3,
        </set>
        where id in
        <foreach collection="idList" item="item" index="index" open="("
                 separator="," close=")">
            #{item}
        </foreach>
    </update>

    <update id="activeMonitorTask" parameterType="java.lang.String" >
        update monitor_task
        <set>
            EXE_STATE = 1,
        </set>
        where id in
        <foreach collection="idList" item="item" index="index" open="("
                 separator="," close=")">
            #{item}
        </foreach>
    </update>

    <select id="queryDataByTaskName" resultMap="BaseResultMap" parameterType="java.lang.String">
        select
        <include refid="Base_Column_List"/>
        from monitor_task where TASK_NAME = #{taskName}
    </select>
</mapper>

MonitorThresholdPo

package com.hero.lte.ems.monitor.entity.po;

public class MonitorThresholdPo {

    private Double cpuThreshold;

    private Double memoryThreshold;

    private Double spaceThreshold;

    private Double upTrafficThreshold;

    private Double downTrafficThreshold;

    public Double getCpuThreshold() {
        return cpuThreshold;
    }

    public void setCpuThreshold(Double cpuThreshold) {
        this.cpuThreshold = cpuThreshold;
    }

    public Double getMemoryThreshold() {
        return memoryThreshold;
    }

    public void setMemoryThreshold(Double memoryThreshold) {
        this.memoryThreshold = memoryThreshold;
    }

    public Double getSpaceThreshold() {
        return spaceThreshold;
    }

    public void setSpaceThreshold(Double spaceThreshold) {
        this.spaceThreshold = spaceThreshold;
    }

    public Double getUpTrafficThreshold() {
        return upTrafficThreshold;
    }

    public void setUpTrafficThreshold(Double upTrafficThreshold) {
        this.upTrafficThreshold = upTrafficThreshold;
    }

    public Double getDownTrafficThreshold() {
        return downTrafficThreshold;
    }

    public void setDownTrafficThreshold(Double downTrafficThreshold) {
        this.downTrafficThreshold = downTrafficThreshold;
    }

    @Override
    public String toString() {
        return "MonitorThresholdPo{" +
                "cpuThreshold=" + cpuThreshold +
                ", memoryThreshold=" + memoryThreshold +
                ", spaceThreshold=" + spaceThreshold +
                ", upTrafficThreshold=" + upTrafficThreshold +
                ", downTrafficThreshold=" + downTrafficThreshold +
                '}';
    }
}

MonitorTaskPo

package com.hero.lte.ems.monitor.entity.po;

import com.hero.lte.ems.monitor.entity.MonitorTask;

public class MonitorTaskPo {

    private MonitorTask monitorTask;

    private MonitorThresholdPo monitorThresholdPo;

    public MonitorTask getMonitorTask() {
        return monitorTask;
    }

    public void setMonitorTask(MonitorTask monitorTask) {
        this.monitorTask = monitorTask;
    }

    public MonitorThresholdPo getMonitorThresholdPo() {
        return monitorThresholdPo;
    }

    public void setMonitorThresholdPo(MonitorThresholdPo monitorThresholdPo) {
        this.monitorThresholdPo = monitorThresholdPo;
    }

    @Override
    public String toString() {
        return "MonitorTaskPo{" +
                "monitorTask=" + monitorTask +
                ", monitorThresholdPo=" + monitorThresholdPo +
                '}';
    }
}

MonitorTaskLog

package com.hero.lte.ems.monitor.entity;

public class MonitorTaskLog {

    private String id;

    private String systemInfo;

    private String taskId;

    private String product;

    private Long recoreTime;

    private Double cpu;

    private Double cpuThreshold;

    private Double memory;

    private Double memoryThreshold;

    private Double space;

    private Double spaceThreshold;

    private Double upTraffic;

    private Double upTrafficThreshold;

    private Double downTraffic;

    private Double downTrafficThreshold;
    //网络接收数据包速率/s
    private Double networkRxRate;
    //网络发送数据包速率/s
    private Double networkTxRate;
    //IOPS读取数据量/s
    private Double iopsKbRead;
    //IOPS写入数据量/s
    private Double iopsKbWrite;
    //每秒存储队列输入/输出操作数
    private Double queueOperands;
    //南向告警数据量/s
    private Double snmpAlarmDataSize;
    //文件系统中数据库磁盘空间已用
    private String databaseDiskSpaceIsUsed;


    private Long startTime;

    private Long endTime;

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSystemInfo() {
        return systemInfo;
    }

    public void setSystemInfo(String systemInfo) {
        this.systemInfo = systemInfo;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product;
    }

    public Long getRecoreTime() {
        return recoreTime;
    }

    public void setRecoreTime(Long recoreTime) {
        this.recoreTime = recoreTime;
    }

    public Double getCpu() {
        return cpu;
    }

    public void setCpu(Double cpu) {
        this.cpu = cpu;
    }

    public Double getCpuThreshold() {
        return cpuThreshold;
    }

    public void setCpuThreshold(Double cpuThreshold) {
        this.cpuThreshold = cpuThreshold;
    }

    public Double getMemory() {
        return memory;
    }

    public void setMemory(Double memory) {
        this.memory = memory;
    }

    public Double getMemoryThreshold() {
        return memoryThreshold;
    }

    public void setMemoryThreshold(Double memoryThreshold) {
        this.memoryThreshold = memoryThreshold;
    }

    public Double getSpace() {
        return space;
    }

    public void setSpace(Double space) {
        this.space = space;
    }

    public Double getSpaceThreshold() {
        return spaceThreshold;
    }

    public void setSpaceThreshold(Double spaceThreshold) {
        this.spaceThreshold = spaceThreshold;
    }

    public Double getUpTraffic() {
        return upTraffic;
    }

    public void setUpTraffic(Double upTraffic) {
        this.upTraffic = upTraffic;
    }

    public Double getUpTrafficThreshold() {
        return upTrafficThreshold;
    }

    public void setUpTrafficThreshold(Double upTrafficThreshold) {
        this.upTrafficThreshold = upTrafficThreshold;
    }

    public Double getDownTraffic() {
        return downTraffic;
    }

    public void setDownTraffic(Double downTraffic) {
        this.downTraffic = downTraffic;
    }

    public Double getDownTrafficThreshold() {
        return downTrafficThreshold;
    }

    public void setDownTrafficThreshold(Double downTrafficThreshold) {
        this.downTrafficThreshold = downTrafficThreshold;
    }

    public Double getNetworkRxRate() {
        return networkRxRate;
    }

    public void setNetworkRxRate(Double networkRxRate) {
        this.networkRxRate = networkRxRate;
    }

    public Double getNetworkTxRate() {
        return networkTxRate;
    }

    public void setNetworkTxRate(Double networkTxRate) {
        this.networkTxRate = networkTxRate;
    }

    public Double getIopsKbRead() {
        return iopsKbRead;
    }

    public void setIopsKbRead(Double iopsKbRead) {
        this.iopsKbRead = iopsKbRead;
    }

    public Double getIopsKbWrite() {
        return iopsKbWrite;
    }

    public void setIopsKbWrite(Double iopsKbWrite) {
        this.iopsKbWrite = iopsKbWrite;
    }

    public Double getQueueOperands() {
        return queueOperands;
    }

    public void setQueueOperands(Double queueOperands) {
        this.queueOperands = queueOperands;
    }

    public Double getSnmpAlarmDataSize() {
        return snmpAlarmDataSize;
    }

    public void setSnmpAlarmDataSize(Double snmpAlarmDataSize) {
        this.snmpAlarmDataSize = snmpAlarmDataSize;
    }

    public String getDatabaseDiskSpaceIsUsed() {
        return databaseDiskSpaceIsUsed;
    }

    public void setDatabaseDiskSpaceIsUsed(String databaseDiskSpaceIsUsed) {
        this.databaseDiskSpaceIsUsed = databaseDiskSpaceIsUsed;
    }

    @Override
    public String toString() {
        return "MonitorTaskLog{" +
                "id='" + id + ''' +
                ", systemInfo='" + systemInfo + ''' +
                ", taskId='" + taskId + ''' +
                ", product='" + product + ''' +
                ", recoreTime=" + recoreTime +
                ", cpu=" + cpu +
                ", cpuThreshold=" + cpuThreshold +
                ", memory=" + memory +
                ", memoryThreshold=" + memoryThreshold +
                ", space=" + space +
                ", spaceThreshold=" + spaceThreshold +
                ", upTraffic=" + upTraffic +
                ", upTrafficThreshold=" + upTrafficThreshold +
                ", downTraffic=" + downTraffic +
                ", downTrafficThreshold=" + downTrafficThreshold +
                ", networkRxRate=" + networkRxRate +
                ", networkTxRate=" + networkTxRate +
                ", iopsKbRead=" + iopsKbRead +
                ", iopsKbWrite=" + iopsKbWrite +
                ", queueOperands=" + queueOperands +
                ", snmpAlarmDataSize=" + snmpAlarmDataSize +
                ", databaseDiskSpaceIsUsed='" + databaseDiskSpaceIsUsed + ''' +
                '}';
    }
}

MonitorTask

package com.hero.lte.ems.monitor.entity;

public class MonitorTask {

    private String id;

    private String taskName;

    private String product;

    private String threshold;

    private Long sampleStart;

    private Long sampleEnd;

    //【0:未开始、1:执行中、2:执行状态、3:暂停状态】
    private Integer exeState;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product;
    }

    public String getThreshold() {
        return threshold;
    }

    public void setThreshold(String threshold) {
        this.threshold = threshold;
    }

    public Long getSampleStart() {
        return sampleStart;
    }

    public void setSampleStart(Long sampleStart) {
        this.sampleStart = sampleStart;
    }

    public Long getSampleEnd() {
        return sampleEnd;
    }

    public void setSampleEnd(Long sampleEnd) {
        this.sampleEnd = sampleEnd;
    }

    public Integer getExeState() {
        return exeState;
    }

    public void setExeState(Integer exeState) {
        this.exeState = exeState;
    }

    @Override
    public String toString() {
        return "MonitorTask{" +
                "id='" + id + ''' +
                ", taskName='" + taskName + ''' +
                ", product='" + product + ''' +
                ", threshold='" + threshold + ''' +
                ", sampleStart=" + sampleStart +
                ", sampleEnd=" + sampleEnd +
                ", exeState=" + exeState +
                '}';
    }
}

WServerHelper

package com.hero.lte.ems.websocket.server;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.stereotype.Component;

@Component
public class WServerHelper {

    @Autowired
    SimpMessagingTemplate messagingTemplate;


    public void push2OneClient(String topic,String channlId ,Object msg) {
        this.messagingTemplate.convertAndSend("/user/"+channlId+"/"+topic, msg);
    }


    public void push2AllClient(String topic,Object msg) {
        this.messagingTemplate.convertAndSend("/topic/"+topic, msg);
    }

}

SystemMonitor

package com.hero.lte.ems.monitor.util;

import com.hero.lte.ems.monitor.entity.po.MonitorPo;

public abstract class SystemMonitor {

    public abstract MonitorPo getCPUInfo();

    public abstract MonitorPo getMemoryInfo();

    public abstract MonitorPo getDiskInfo();

    //获取【网络接收数据包速率/s、网络发送数据包速率/s】资源信息
    public abstract MonitorPo getNetworkResourceInformation();

    //获取文件系统中mysql磁盘空间使用情况
    public abstract MonitorPo getUsageOfTheMysqlDiskSpaceInTheFileSystem();

    //用来监控磁盘 I/O 性能,获取【IOPS读取数据量/s、IOPS写入数据量/s】资源信息
    public abstract MonitorPo getIopsResourceInformation();

    //获取每秒存储队列输入/输出操作数
    public abstract MonitorPo getStoresQueueInputOrOutputOperandsPerSecond();
}

MonitorPo

package com.hero.lte.ems.monitor.entity.po;

public class MonitorPo {

    private String product;

    private Double cpu;

    private Double memory;

    private Double memoryTotal;

    private Double memoryUseRatio;

    private Double diskTotal;

    private Double diskFree;

    private Double diskUse;

    private Double diskUseRatio;

    //网络接收数据包速率/s
    private Double networkRxRate;
    //网络发送数据包速率/s
    private Double networkTxRate;
    //IOPS读取数据量/s
    private Double iopsKbRead;
    //IOPS写入数据量/s
    private Double iopsKbWrite;
    //每秒存储队列输入/输出操作数
    private Double queueOperands;
    //南向告警数据量/s
    private Double snmpAlarmDataSize;
    //文件系统中数据库磁盘空间已用
    private String databaseDiskSpaceIsUsed;

    public Double getNetworkRxRate() {
        return networkRxRate;
    }

    public void setNetworkRxRate(Double networkRxRate) {
        this.networkRxRate = networkRxRate;
    }

    public Double getNetworkTxRate() {
        return networkTxRate;
    }

    public void setNetworkTxRate(Double networkTxRate) {
        this.networkTxRate = networkTxRate;
    }

    public Double getIopsKbRead() {
        return iopsKbRead;
    }

    public void setIopsKbRead(Double iopsKbRead) {
        this.iopsKbRead = iopsKbRead;
    }

    public Double getIopsKbWrite() {
        return iopsKbWrite;
    }

    public void setIopsKbWrite(Double iopsKbWrite) {
        this.iopsKbWrite = iopsKbWrite;
    }

    public Double getQueueOperands() {
        return queueOperands;
    }

    public void setQueueOperands(Double queueOperands) {
        this.queueOperands = queueOperands;
    }

    public Double getSnmpAlarmDataSize() {
        return snmpAlarmDataSize;
    }

    public void setSnmpAlarmDataSize(Double snmpAlarmDataSize) {
        this.snmpAlarmDataSize = snmpAlarmDataSize;
    }

    public String getDatabaseDiskSpaceIsUsed() {
        return databaseDiskSpaceIsUsed;
    }

    public void setDatabaseDiskSpaceIsUsed(String databaseDiskSpaceIsUsed) {
        this.databaseDiskSpaceIsUsed = databaseDiskSpaceIsUsed;
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product;
    }

    public Double getCpu() {
        return cpu;
    }

    public void setCpu(Double cpu) {
        this.cpu = cpu;
    }

    public Double getMemory() {
        return memory;
    }

    public void setMemory(Double memory) {
        this.memory = memory;
    }

    public Double getDiskTotal() {
        return diskTotal;
    }

    public void setDiskTotal(Double diskTotal) {
        this.diskTotal = diskTotal;
    }

    public Double getDiskFree() {
        return diskFree;
    }

    public void setDiskFree(Double diskFree) {
        this.diskFree = diskFree;
    }

    public Double getMemoryTotal() {
        return memoryTotal;
    }

    public void setMemoryTotal(Double memoryTotal) {
        this.memoryTotal = memoryTotal;
    }

    public Double getDiskUse() {
        return diskUse;
    }

    public void setDiskUse(Double diskUse) {
        this.diskUse = diskUse;
    }

    public Double getDiskUseRatio() {
        return diskUseRatio;
    }

    public void setDiskUseRatio(Double diskUseRatio) {
        this.diskUseRatio = diskUseRatio;
    }
    public Double getMemoryUseRatio() {
        return memoryUseRatio;
    }

    public void setMemoryUseRatio(Double memoryUseRatio) {
        this.memoryUseRatio = memoryUseRatio;
    }


    @Override
    public String toString() {
        return "MonitorPo{" +
                "product='" + product + ''' +
                ", cpu=" + cpu +
                ", memory=" + memory +
                ", memoryTotal=" + memoryTotal +
                ", memoryUseRatio=" + memoryUseRatio +
                ", diskTotal=" + diskTotal +
                ", diskFree=" + diskFree +
                ", diskUse=" + diskUse +
                ", diskUseRatio=" + diskUseRatio +
                ", networkRxRate=" + networkRxRate +
                ", networkTxRate=" + networkTxRate +
                ", iopsKbRead=" + iopsKbRead +
                ", iopsKbWrite=" + iopsKbWrite +
                ", queueOperands=" + queueOperands +
                ", snmpAlarmDataSize=" + snmpAlarmDataSize +
                ", databaseDiskSpaceIsUsed='" + databaseDiskSpaceIsUsed + ''' +
                '}';
    }
}

MonitorConfig

package com.hero.lte.ems.monitor.entity.po;

import com.hero.lte.ems.monitor.entity.MonitorTask;

import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class MonitorConfig {

    /** 系统监控任务集合 **/
    public static final Map<String, MonitorTaskPo> MONITOR_TASK_MAP = new HashMap<>();

    /** 系统运行状态 **/
    public static final Integer MONITOR_RUN_SUCCESS = 1;

    /** 系统日志使用状态 **/
    public static final Integer MONITOR_SYS_USE = 0;

    /** 系统日志使用状态 **/
    public static final Integer MONITOR_SYS_FINISH = 1;

    public static final String SYSTEM_INFO ;

    static {
        String osName = "" ;
        String osVersion = "" ;
        Properties sysProperty = System.getProperties(); //系统属性
        Set<Object> keySet = sysProperty.keySet();
        for (Object object : keySet) {
            if("os.name".equals(object.toString())){
                osName = sysProperty.getProperty(object.toString());
            }
            if("os.version".equals(object.toString())){
                osVersion = sysProperty.getProperty(object.toString());
            }
        }
        SYSTEM_INFO = osName + " " + osVersion;
    }

}

AlarmThresholdConstants

package com.hero.lte.ems.common.constant;

/**
 * 告警相关常量
 * @author 211145187
 * @date 2023/6/21 14:24
 **/
public final class AlarmThresholdConstants {
    private AlarmThresholdConstants(){};

    // 系统监控任务中CPU阈值或者内存阈值超出设定值
    public static final int SYSTEM_MONITOR_TASK_EXCEEDS_THE_SPECIFIED_THRESHOLD = 40000;
    // enodeb进程异常
    public static final int ENODEB_PROCESS_EXCEPTION = 40001;

}

IFmCurrentService

package com.hero.lte.ems.fm.service;

import com.hero.lte.ems.db.orm.mybatis.Page;
import com.hero.lte.ems.fm.entity.ExportParam;
import com.hero.lte.ems.fm.model.*;
import com.hero.lte.ems.fm.model.db.FmAlarmLevelLangDb;
import com.hero.lte.ems.fm.model.event.AlarmTypeVo;
import com.hero.lte.ems.fm.model.parse.AlarmAutoConfirm;
import com.hero.lte.ems.fm.model.statistics.NeAlarmStatistics;
import com.hero.lte.ems.framework.resp.ResultSet;
import com.hero.lte.ems.mid.model.BusinessNe;
import org.redisson.api.RMap;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author w17231
 * @date 2017年3月16日
 */

public interface IFmCurrentService extends IFmConfirmService{

    /**
     * 按告警id和清除状态查询网元id
     *
     * @param alarmIds
     * @param clearState
     * @return
     */
    List<Integer> queryNeByAlarmId(List<Integer> alarmIds, Integer clearState);

    /**
     * 按网元id和清除状态查询当前告警
     *
     * @param neIds
     * @param clearState
     * @return
     */
    List<Alarm> queryByNeId(List<Integer> neIds, Integer clearState);

    /**
     * 通过nodeId集合以及清除状态查询告警
     *
     * @param nodeIds    nodeId集合
     * @param clearState 清除状态
     * @return
     */
    List<Alarm> queryByNodeIds(List<Integer> nodeIds, Integer clearState);

    /**
     * 按清除状态查询当前告警
     *
     * @param clearState
     * @return
     */
    List<Alarm> quryByClearState(Integer clearState);

    /**
     * 按告警等级查询当前告警
     *
     * @param alarmLevel
     * @return
     */
    int queryByAlarmLevel(Integer alarmLevel, String systemId);

    /**
     * 根据流水号查询告警
     *
     * @param messageNos(多个流水号)
     * @return
     */
    List<Alarm> queryBySN(List<Long> messageNos);
    /**
     * 根据流水号查询过滤后告警
     *
     * @param messageNos(多个流水号)
     * @return
     */
    List<Alarm> queryFilterBySN(List<Long> messageNos);

    /**
     * 根据流水号查询告警
     *
     * @param alarmSeqs
     * @return
     */
    List<AlarmFlow> queryFlowBySeq(List<Long> alarmSeqs);

    List<Alarm> queryBySNForEffectiveDevice(List<Long> messageNos);

    /**
     * 根据流水号查询告警
     *
     * @param messageNo
     * @return
     */
    Alarm queryBySN(Long messageNo, RMap<Integer, String>... rMap);

    /**
     * 根据流水号更新数据上报状态
     *
     * @param receiveMessageNos
     * @return
     */
    boolean updateSync(List<Long> receiveMessageNos);

    /**
     * 根据网元id及告警id、清除状态查询告警
     *
     * @param neid
     * @param alarmId
     * @param clearstate
     * @return
     */
    List<Alarm> queryByNeidAlarmId(Integer neid, Integer alarmId, Integer clearstate);

    List<Alarm> queryByNodeFlagAndNodeId(Integer nodeFlag, Integer nodeId, Integer alarmId, Integer clearState);

    List<Alarm> queryByEquipmentIdAlarmId(Integer equipmentId, Integer alarmId, Integer clearstate);

    /**
     * 根据网元id删除当前告警
     *
     * @param neids
     * @return
     */
//    boolean deleteByNeid(List neids);

    /**
     * 根据节点id删除当前告警
     *
     * @param nodeIds
     * @return
     */
    boolean deleteByNodeId(List<Integer> nodeIds);

    /**
     * 根据网元id修改当前告警对应网元名称
     *
     * @param neid
     * @param nename
     * @return
     */
    boolean updateBtsName(Integer neid, String nename);

    /**
     * 查询所有未上报告警流水号
     *
     * @return
     */
    List<Long> queryBySync(Integer maxNum);

    /**
     * 告警入库
     *
     * @param alarm
     */
    boolean add(Alarm alarm);

    /**
     * 查询最大告警流水号
     *
     * @return
     */
    Long queryMaxMessageNo();

    /**
     * 按条件查询告警
     *
     * @param alarmVo
     * @return
     */
    List<Alarm> queryCurrentAlarm(AlarmVo alarmVo);

    Page<Alarm> qryCurrentAlarmPage(AlarmVo alarmVo, boolean flag, Page<Alarm> page);

    /**
     * 分页查询当前告警
     *
     * @param alarm
     * @param page
     */
    Page<Alarm> queryCurrentAlarm(AlarmVo alarm, Page<Alarm> page);

    /**
     * 分页查询当前告警(不做国际化)
     *
     * @param alarm
     * @param page
     */
    Page<Alarm> queryCurrentAlarmNoStatic(AlarmVo alarm, Page<Alarm> page);

    /**
     * 保存告警
     *
     * @param alarm
     * @return
     */
    Boolean saveAlarm(Alarm alarm);

    /**
     * 查询当前网元列表
     *
     * @param systemId
     * @return
     */
    List<BusinessNe> lteNes(String systemId);

    /**
     * 告警详细信息
     *
     * @param messageNo
     * @return
     */
    Alarm detail(Long messageNo);

    /**
     * 修改告警修复建议信息
     *
     * @param messageNo 告警流水号
     * @param solution  修复建议
     * @return
     */
    boolean modifyAdvise(Long messageNo, String solution);

    /**
     * 告警确认
     *
     * @param messageNos
     * @param user
     * @param date
     * @return
     */
    @Override
    Map<Long, Integer> lteConfirm(List<Long> messageNos, String user, String date, Boolean reportPdt);

    /**
     * 告警反确认
     *
     * @param messageNos
     * @return
     */
    void lteUnConfirm(List<Long> messageNos);

    /**
     * 告警清除
     *
     * @param messageNos
     * @param user
     * @param date
     * @return
     */
    Map<Long, Integer> lteClear(List<Long> messageNos, String user, String date, Boolean reportPdt);

    /**
     * 屏蔽告警
     *
     * @param messageNos
     * @return
     */
    boolean shield(List<Long> messageNos, String userName);

    /**
     * 按alarmKey查询当前告警
     *
     * @param alarmKey
     * @return
     */
    Alarm queryByAlarmKey(String alarmKey, String appendInfo);

    /**
     * 告警自动清除
     *
     * @param alarm
     */
    Long alarmAutoClear(Alarm alarm);

    /**
     * 根据网元id清除状态统计告警
     *
     * @param
     * @param clearState
     * @return
     */
    List<NeAlarmStatistics> getStatisticsData(List<Integer> neIds, Integer clearState);

    /**
     * 获取AlarmType集合
     *
     * @return
     */
    List<AlarmTypeVo> getAlarmTypes();

    /**
     * 获取告警级别集合
     *
     * @return
     */
    List<FmAlarmLevelLangDb> getAlarmLevels();

    /**
     * 告警定位到网元
     *
     * @param systemId
     * @param messageNo
     * @return
     */
    Map<String, String> locateNe(String systemId, String messageNo);

    /**
     * 获取同步待清除告警
     *
     * @param ClearPath
     * @param clearState
     * @return
     */
    List<Alarm> qrySynClearAlarm(Integer ClearPath, Integer clearState);

    /**
     * 查询告警流水号
     *
     * @param systemId
     * @param clearState
     * @return
     */
    List<Long> qryMessageNos(String systemId, Integer clearState);

    /**
     * 按告警流水号查询告警,查询范围包含当前表和历史表
     *
     * @param messageNos
     * @return
     */
    List<Alarm> qryByMessageNos(List<Long> messageNos);

    /**
     * 获取Lte网元类型
     *
     * @return
     */
    Map<Integer, String> lteNodeTypeToMap();

    /**
     * 获取Lte单板类型
     *
     * @return
     */
    Map<Integer, String> lteBrdTypeToMap();

    /**
     * 获取Lte告警类型
     *
     * @return
     */
    Map<Integer, String> lteAlarmTypeToMap();

    /**
     * 批量增加告警
     *
     * @param list
     * @return
     */
    Boolean add(List<Alarm> list);

    /**
     * 根据alarmKey判断告警是否存在
     *
     * @param alarmKey
     * @return
     */
    Boolean hasAlarm(String alarmKey, String appendInfo);

    /**
     * 获取最大流水号
     *
     * @return
     */
    Long getMaxMessageNo();

    /**
     * 获取流水表最大流水号
     *
     * @return
     */
    Long getMaxAlarmSeq();

    /**
     * 告警推送成功后处理
     *
     * @param result
     */
    void dealCurrentAlarmReceive(String result);

    /**
     * 获取需要自动确认的告警流水号
     *
     * @param minConfirmTime 告警确认最小时间
     * @return
     */
    List<Long> getAutoConfirmMessageNos(String systemId, Date minConfirmTime, Integer alarmLevel);

    /**
     * 获取当前告警中需要自动确认的告警流水号
     * @param alarmType
     * @param alarmLevel
     * @return
     */
    @Override
    List<Long> getAutoConfirmNos(Integer alarmType, Integer alarmLevel);

    /**
     * AlarmLevelCount@return
     */
    public void startAutoConfirm(AlarmAutoConfirm control);

    /**
     * 自动确认参数
     *
     * @return
     */
    AlarmAutoConfirm getAutoConfirmInfo();

    /**
     * 获取系统id下某个等级的告警数量
     *
     */
//    public int getAlarmCount(String systemId, Integer level);

    /**
     * 获取某网元的最大告警等级
     *
     */
//    public Integer getMaxLevel(String systemId);

    /**
     * 查询告警数量
     */
    AlarmCountInfo queryAlarmCountInfo(AlarmVo alarmVo);

    /**
     * 初始化是否推送缓存
     */
    public Integer isOn(String systemId);

    public void modifyAutoPara(String systemId);

    /**
     * 根据网元ID,清除状态查询告警流水号
     *
     * @param syncNeIds
     * @param value
     * @return
     */
    List<Long> qryMessageNos(List<Integer> syncNeIds, int value);

    /**
     * 根据通知状态和告警等级查询告警流水号
     *
     * @param notifyState
     * @return
     */
    List<Long> qryNotifyMessageNos(int notifyState, List<Integer> levels, String systemId, Integer ruleId);

    /**
     * 根据通知状态和alarmId查询告警流水号
     *
     * @param notifyState
     * @return
     */
    List<Long> qryNotifyMessageNosByAlarmId(int notifyState, List<Integer> alarmIds, String systemId, Integer ruleId);

    public boolean updateNotifyStatus(List<Long> messageNos);

    public boolean updateNotifyRules(List<Long> messageNos, String postFix);

    public SynAlarmResult synAlarmToPdt(String systemId);

    /**
     * 查询权限网元
     *
     * @param concurrentHashMap
     * @return
     */
    public void setRoleNe(ConcurrentHashMap concurrentHashMap);

    /**
     * 当前告警是否权限内
     *
     * @param alarm
     * @return
     */
    public boolean isRole(Alarm alarm);

    /**
     * 查询单板告警级别
     *
     * @param neId
     * @return
     */
    public List<NeAlarmStatistics> queryBoardAlarmLevelByNeId(int neId, int clearState);

    /**
     * 查询网元告警级别
     *
     * @param neId
     * @return
     */
    public List<NeAlarmStatistics> queryNetElementAlarmLevel(int clearState);

    /**
     * 修改告警详情
     *
     * @param alarm
     * @return
     */
    Integer changeDetails(AlarmVo alarm);

    /**
     * 插入流水表
     *
     * @param flow
     * @return
     */
    Boolean addAlarmFlow(AlarmFlow flow);

    List<Alarm> queryByCreatTime(Date startTime, Date endTime);

    Map<String, Object> getStatisticsData(AlarmVo alarmVo);

    /**
     * 获取未升级的告警
     * @return
     */
    List<Alarm> queryUnUpdateAlarm();

    int updateAlarm(Alarm alarm);

    List<AlarmCurrentExport> qryAllCurrentAlarm(AlarmVo alarmVo, boolean flag, String[] formatI18n);

    Page<Alarm> queryCurrentAlarmPageForDataPush(AlarmDataPushVo alarmDataPushVo, Page<Alarm> page);

    int fmCurrentAlarmDataPush(AlarmDataPushVo alarmDataPushVo);

    ResultSet synchronizeAllAlarmData(String userId);

    /**
     * 根据条件查询当前告警数量,与qryAllCurrentAlarmPage的明细条件一致
     * @param alarmVo
     * @param flag
     * @return
     */
	Integer queryAllCurrentAlarmCount(AlarmVo alarmVo, boolean flag);

	List<Alarm> getCurrentAlarmByNeId(Long neId);

    void exportAllData(HttpServletResponse response, ExportParam<Alarm> exportParam) throws IOException;
}

MonitorTaskExe

package com.hero.lte.ems.monitor.take;

import com.alibaba.fastjson.JSONObject;
import com.hero.lte.ems.common.constant.AlarmThresholdConstants;
import com.hero.lte.ems.common.spring.SpringContextHolder;
import com.hero.lte.ems.common.tools.CustomStringUtils;
import com.hero.lte.ems.fm.cache.AlarmAutoClearQueeCache;
import com.hero.lte.ems.fm.enums.ClearStateEnum;
import com.hero.lte.ems.fm.enums.FaultTypeEnum;
import com.hero.lte.ems.fm.model.Alarm;
import com.hero.lte.ems.fm.service.IFmCurrentService;
import com.hero.lte.ems.fm.util.AlarmParamUtil;
import com.hero.lte.ems.monitor.dao.MonitorTaskLogMapper;
import com.hero.lte.ems.monitor.dao.MonitorTaskMapper;
import com.hero.lte.ems.monitor.entity.MonitorTask;
import com.hero.lte.ems.monitor.entity.MonitorTaskLog;
import com.hero.lte.ems.monitor.entity.po.MonitorConfig;
import com.hero.lte.ems.monitor.entity.po.MonitorPo;
import com.hero.lte.ems.monitor.entity.po.MonitorTaskPo;
import com.hero.lte.ems.monitor.entity.po.MonitorThresholdPo;
import com.hero.lte.ems.monitor.eunm.MonitorTaskStateEnum;
import com.hero.lte.ems.monitor.eunm.ProductEnum;
import com.hero.lte.ems.monitor.util.SystemMonitor;
import com.hero.lte.ems.monitor.util.SystemMonitorFactory;
import com.hero.lte.ems.monitor.util.UUIDGennerator;
import com.hero.lte.ems.topo.enums.NetElementTypeEnum;
import com.hero.lte.ems.websocket.enums.WSTopicEnum;
import com.hero.lte.ems.websocket.server.WServerHelper;
import org.redisson.api.RMap;
import org.redisson.api.RScoredSortedSet;
import org.redisson.api.RedissonClient;
import org.redisson.client.protocol.ScoredEntry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.time.Clock;
import java.util.*;

/**
 * 定时查询服务器性能
 */
@Component
public class MonitorTaskExe {

    private  static Logger log = LoggerFactory.getLogger(MonitorTaskExe.class);

    @Autowired
    private MonitorTaskMapper monitorTaskMapper;

    @Autowired
    private MonitorTaskLogMapper monitorTaskLogMapper;
    @Autowired
    @Qualifier(value = "redissonClient")
    RedissonClient redissonClient;

    @Resource
    WServerHelper serverHelper;

    @Scheduled(cron = "*/5 * * * * *")
    public void scheduleRealTimeTask() {
        log.info("实时性能查询任务");
        realTimeMonitoring();
    }

    private void realTimeMonitoring() {
        SystemMonitor monitor = SystemMonitorFactory.createSystemMonitor();
        JSONObject jsonObj = new JSONObject();
        if (monitor != null) {
            MonitorPo monitorPoCPU = monitor.getCPUInfo();
            if (monitorPoCPU != null) {
                jsonObj.put("CPUUsage", monitorPoCPU.getCpu());
            }
            MonitorPo monitorPoMemory = monitor.getMemoryInfo();
            if (monitorPoMemory != null) {
                jsonObj.put("memoryUsage", monitorPoMemory.getMemory());
                jsonObj.put("memoryTotal", monitorPoMemory.getMemoryTotal());
                jsonObj.put("memoryUsageRatio", monitorPoMemory.getMemoryUseRatio());
            }
            MonitorPo monitorPoDisk = monitor.getDiskInfo();
            if (monitorPoDisk != null) {
                jsonObj.put("diskUsage", monitorPoDisk.getDiskUse());
                jsonObj.put("diskTotal", monitorPoDisk.getDiskTotal());
                jsonObj.put("diskUsageRatio", monitorPoDisk.getDiskUseRatio());
            }
        }
        log.info("json:{}", jsonObj);
        serverHelper.push2OneClient(WSTopicEnum.realTimeMonitoring.name(),"monitoring",JSONObject.toJSONString(jsonObj));
    }

    /**
     * 定时查询服务器性能,每1分钟执行一次 20231101 改1分钟一条
     */
    @Scheduled(cron = "0 0/1 * * * *")
    public void scheduleMonitorTask() {
        try{
            Date date = new Date();
            this.scheduleMonitor(date);
        }catch (Exception e){
            log.error("定时查询服务器性能出错!", e);
        }
    }

    /**
     * 每天凌晨清理性能任务日志 仅保留三天内的数据
     * 0 59 23  * * *
     */
    @Scheduled(cron = "0 59 23 * * *")
    public void scheduleCleanTaskLog() {
        this.cleanTaskLog();
    }

    public void cleanTaskLog() {
        long threeDay =Clock.systemUTC().millis() - (3*24 * 60 * 60 * 1000);
        log.info("每日清理三天前数据  time---:{}",threeDay);
        monitorTaskLogMapper.cleanTaskLog(threeDay);
    }

    /**
     * 任务清理
     */
    @Scheduled(cron = "30 10 1 * * *")
    public void taskClearTiming() {
        try{
            this.taskClear();
        }catch (Exception e){
            log.error("任务清理出错!", e);
        }
    }

    /**
     * 项目启动后将任务读入内存
     */
    @PostConstruct
    public void startSysLog(){
        log.info("项目启动后将系统监控任务读入内存");
        try{
            List<MonitorTask> monitorTaskList = monitorTaskMapper.findMonitorTaskAll();
            log.info("系统监控任共:monitorTaskList.size(){}, monitorTaskList", monitorTaskList.size(), monitorTaskList);
            for(MonitorTask monitorTask : monitorTaskList){
                setMonitorTaskMap(monitorTask);
            }
        }catch (Exception e){
            log.error("记录项目运行状态出错!", e);
        }
    }

    /**
     * 任务清理
     */
    public void taskClear() {
        Date date = new Date();
        //获取任务
        Map<String, MonitorTaskPo> monitorTaskMap = MonitorConfig.MONITOR_TASK_MAP;
        log.info("monitorTaskMap:" +monitorTaskMap.size());
        if(monitorTaskMap.isEmpty()){
            return;
        }
        List<String> inUseList = new ArrayList<>();
        List<String> exeFinishList = new ArrayList<>();
        for(String mapKey : monitorTaskMap.keySet()){
            MonitorTaskPo monitorTaskPo = monitorTaskMap.get(mapKey);
            MonitorTask monitorTask = monitorTaskPo.getMonitorTask();
            Long sampleStart = monitorTask.getSampleStart();
            Long sampleEnd = monitorTask.getSampleEnd();
            Long currentTime = date.getTime();
            //判断任务是否到达采样时间,当前是“大于等于采样开始时间”且“小于等于采样结束时间”
            if(currentTime >= sampleStart && currentTime <= sampleEnd){
                inUseList.add(monitorTask.getId());
            }else if(currentTime > sampleEnd){
                exeFinishList.add(monitorTask.getId());
            }
        }
        log.info("inUseList:" + inUseList.size());
        log.info("exeFinishList:" + exeFinishList.size());
        Map<String, Object> inUseMap = new HashMap<>();
        inUseMap.put("idList", inUseList);
        inUseMap.put("exeState", MonitorTaskStateEnum.IN_USE.getCode());
        Map<String, Object> exeFinishMap = new HashMap<>();
        exeFinishMap.put("idList", exeFinishList);
        exeFinishMap.put("exeState", MonitorTaskStateEnum.EXE_FINISH.getCode());
        if(inUseList.size() > 0){
            monitorTaskMapper.updateMonitorTask(inUseMap);
        }
        if(exeFinishList.size() > 0){
            monitorTaskMapper.updateMonitorTask(exeFinishMap);
        }
    }
    /**
     * 新增或更新任务Map
     * @param monitorTask
     */
    public static void setMonitorTaskMap(MonitorTask monitorTask){
        MonitorTaskPo monitorTaskPo = new MonitorTaskPo();
        //监控任务
        MonitorThresholdPo monitorThresholdPo = JSONObject.parseObject(monitorTask.getThreshold(), MonitorThresholdPo.class);
        if (monitorTask.getExeState() == null) {
            monitorTask.setExeState(MonitorTaskStateEnum.IN_SUSPEND.getCode());
        } else {
            monitorTask.setExeState(monitorTask.getExeState());
        }
        monitorTaskPo.setMonitorTask(monitorTask);
        monitorTaskPo.setMonitorThresholdPo(monitorThresholdPo);

        MonitorConfig.MONITOR_TASK_MAP.put(monitorTask.getId(), monitorTaskPo);
    }
    /**
     * 删除任务Map
     * @param idList
     */
    public static void deactiveMonitorTaskMap(List<String> idList) {
        //获取任务
        Map<String, MonitorTaskPo> monitorTaskMap = MonitorConfig.MONITOR_TASK_MAP;
        for(String id : idList){
            MonitorTaskPo monitorTaskPo = monitorTaskMap.get(id);
            MonitorTask monitorTask = monitorTaskPo.getMonitorTask();
            monitorTask.setExeState(MonitorTaskStateEnum.IN_SUSPEND.getCode());
            monitorTaskPo.setMonitorTask(monitorTask);
            MonitorConfig.MONITOR_TASK_MAP.put(id, monitorTaskPo);
        }
    }

    /**
     * 删除任务Map
     * @param idList
     */
    public static void activeMonitorTaskMap(List<String> idList) {
        //获取任务
        Map<String, MonitorTaskPo> monitorTaskMap = MonitorConfig.MONITOR_TASK_MAP;
        for(String id : idList){
            MonitorTaskPo monitorTaskPo = monitorTaskMap.get(id);
            MonitorTask monitorTask = monitorTaskPo.getMonitorTask();
            monitorTask.setExeState(MonitorTaskStateEnum.IN_USE.getCode());
            monitorTaskPo.setMonitorTask(monitorTask);
            MonitorConfig.MONITOR_TASK_MAP.put(id, monitorTaskPo);
        }
    }

    /**
     * 删除任务Map
     * @param idList
     */
    public static void deleteMonitorTaskMap(List<String> idList){
        for(String id : idList){
            MonitorConfig.MONITOR_TASK_MAP.remove(id);
        }
    }

    /**
     * 定时查询服务器性能,超过目阈值入库 改所有的内容都入库
     */
    public void scheduleMonitor(Date date) {
        String detail = "out of Threshold! cpu=%s, cpuThreshold=%s, memory=%s, memoryThreshold=%s, diskSpace=%s, diskSpaceThreshold=%s";
        Date currentDate = new Date();
        boolean whetherDeleteAlarm = false;
        boolean whetherAddAlarm = false;
        List<Alarm> alarmList = new ArrayList<>();
        JSONObject redisJson = new JSONObject();
        //获取任务
        Map<String, MonitorTaskPo> monitorTaskMap = MonitorConfig.MONITOR_TASK_MAP;
        if(monitorTaskMap.isEmpty()){
            return;
        }
        //按产品名称将任务分组
        Map<String, List<MonitorTaskPo>> monitorTaskProductMap = new HashMap<>();
        for(String mapKey : monitorTaskMap.keySet()){
            MonitorTaskPo monitorTaskPo = monitorTaskMap.get(mapKey);
            MonitorTask monitorTask = monitorTaskPo.getMonitorTask();
            Long sampleStart = monitorTask.getSampleStart();
            Long sampleEnd = monitorTask.getSampleEnd();
            Long currentTime = date.getTime();
            //判断任务是否到达采样时间,当前是“大于等于采样开始时间”且“小于等于采样结束时间”
            // 2023/01/10 新增了暂停按钮,所以这里需要判断状态是否为暂停状态
            if(currentTime >= sampleStart && currentTime <= sampleEnd||monitorTask.getExeState()==MonitorTaskStateEnum.IN_SUSPEND.getCode()){
                String product = monitorTask.getProduct();
                List<MonitorTaskPo> productList = monitorTaskProductMap.get(product);
                if(productList == null){
                    productList = new ArrayList<>();
                }
                productList.add(monitorTaskPo);
                monitorTaskProductMap.put(product, productList);
            }
        }
        log.info( "monitorTaskProductMap:{}", JSONObject.toJSONString(monitorTaskProductMap));
        //获取产品
        List<String> list = ProductEnum.getCodeList();
        //按产品名称执行任务,将超过阈值的数据入库
        for(String productCode : list){
            log.info( "productCode:{}", productCode);
            List<MonitorTaskPo> monitorTaskPoList = monitorTaskProductMap.get(productCode);
            log.info( "monitorTaskPoList:{}", monitorTaskPoList);
            if(monitorTaskPoList == null || monitorTaskPoList.isEmpty()){
                continue;
            }
            String productSearch = ProductEnum.getSearch(productCode);
            log.info( "查询进程:{}", productSearch);
            SystemMonitor monitor = SystemMonitorFactory.createSystemMonitor();
            log.info( "-monitor:{}", monitor);
            if(monitor == null){
                continue;
            }

            RedissonClient redisson = SpringContextHolder.getBean("redissonClient");
            RMap<Long, Long> rMap = redisson.getMap("numberOfAlarmsReceivedPerMinute");
            long average = CustomStringUtils.calculateAverage(rMap);
            log.info( "-average:{}", average);

            List<MonitorTaskLog> monitorTaskLogList = new ArrayList<>();
            /** 遍历“监控任务” **/
            for(MonitorTaskPo monitorTaskPo :monitorTaskPoList ){
                //监控任务
                MonitorThresholdPo monitorThresholdPo = monitorTaskPo.getMonitorThresholdPo();
                Integer exeState = monitorTaskPo.getMonitorTask().getExeState();
                log.info( "monitorTaskPo:{},    monitor:{},    monitorThresholdPo{}", monitorTaskPo, monitor,monitorThresholdPo);
                /** 对比“进程当前信息”与“监控任务” **/
                if(exeState == 1 && monitorThresholdPo.getCpuThreshold() != null && monitorThresholdPo.getMemoryThreshold() != null && monitorThresholdPo.getSpaceThreshold() != null){
                    MonitorTaskLog monitorTaskLog = new MonitorTaskLog();
                    monitorTaskLog.setSystemInfo(MonitorConfig.SYSTEM_INFO);
                    monitorTaskLog.setTaskId(monitorTaskPo.getMonitorTask().getId());
                    monitorTaskLog.setId(UUIDGennerator.generator());
                    monitorTaskLog.setProduct(productCode);
                    monitorTaskLog.setRecoreTime(Clock.systemUTC().millis());

                    MonitorPo monitorPoCPU = monitor.getCPUInfo();
                    if (monitorPoCPU != null) {
                        monitorTaskLog.setCpu(monitorPoCPU.getCpu());
                        monitorTaskLog.setCpuThreshold(monitorThresholdPo.getCpuThreshold());
                    }
                    MonitorPo monitorPoMemory = monitor.getMemoryInfo();
                    if (monitorPoMemory != null) {
                        monitorTaskLog.setMemory(monitorPoMemory.getMemory());
                        monitorTaskLog.setMemoryThreshold(monitorThresholdPo.getMemoryThreshold());
                    }
                    MonitorPo monitorPoDisk = monitor.getDiskInfo();
                    if (monitorPoDisk != null) {
                        monitorTaskLog.setSpace(monitorPoDisk.getDiskUseRatio());
                        monitorTaskLog.setSpaceThreshold(monitorThresholdPo.getSpaceThreshold());
                    }
                    MonitorPo monitorPoNetwork = monitor.getNetworkResourceInformation();
                    if (monitorPoNetwork != null) {
                        monitorTaskLog.setNetworkRxRate(monitorPoNetwork.getNetworkRxRate());
                        monitorTaskLog.setNetworkTxRate(monitorPoNetwork.getNetworkTxRate());
                    }
                    MonitorPo monitorPoIops = monitor.getIopsResourceInformation();
                    if (monitorPoIops != null) {
                        monitorTaskLog.setIopsKbRead(monitorPoIops.getIopsKbRead());
                        monitorTaskLog.setIopsKbWrite(monitorPoIops.getIopsKbWrite());
                    }
                    MonitorPo monitorPoStoresQueue = monitor.getStoresQueueInputOrOutputOperandsPerSecond();
                    if (monitorPoStoresQueue != null) {
                        monitorTaskLog.setQueueOperands(monitorPoStoresQueue.getQueueOperands());
                    }
                    MonitorPo monitorPoMysqlDisk = monitor.getUsageOfTheMysqlDiskSpaceInTheFileSystem();
                    if (monitorPoMysqlDisk != null) {
                        monitorTaskLog.setDatabaseDiskSpaceIsUsed(monitorPoMysqlDisk.getDatabaseDiskSpaceIsUsed());
                    }

                    monitorTaskLog.setSnmpAlarmDataSize((double) average);

                    if (monitorPoCPU != null && monitorPoMemory != null && monitorPoDisk != null) {
                        if (monitorPoCPU.getCpu() >= monitorThresholdPo.getCpuThreshold() || monitorPoMemory.getMemory() >= monitorThresholdPo.getMemoryThreshold() || monitorPoDisk.getDiskUseRatio() >= monitorThresholdPo.getSpaceThreshold()) {
                            detail = String.format(detail, monitorPoCPU.getCpu(), monitorThresholdPo.getCpuThreshold(), monitorPoMemory.getMemory(), monitorThresholdPo.getMemoryThreshold(), monitorPoDisk.getDiskUseRatio(), monitorThresholdPo.getSpaceThreshold());
                            whetherAddAlarm = true;
                        } else if(monitorPoCPU.getCpu() < monitorThresholdPo.getCpuThreshold() && monitorPoMemory.getMemory() < monitorThresholdPo.getMemoryThreshold() && monitorPoDisk.getDiskUseRatio() < monitorThresholdPo.getSpaceThreshold()) {
                            whetherDeleteAlarm = true;
                        }
                    }
                    monitorTaskLogList.add(monitorTaskLog);
                }

            }
            log.info("-whetherDeleteAlarm:{},whetherAddAlarm:{}", whetherDeleteAlarm, whetherAddAlarm);
            log.info("-monitorTaskLogList:{}", monitorTaskLogList);
            log.info("-monitorTaskLogList.size():{}", (monitorTaskLogList.size() > 0));
            if(monitorTaskLogList.size() > 0) {
                monitorTaskLogMapper.insertMonitorTaskLog(monitorTaskLogList);
                if (whetherAddAlarm) {
                    log.info("add alarm whetherAddAlarm:{}", whetherAddAlarm);
                    //添加告警
                    IFmCurrentService currentAlarmService = SpringContextHolder.getBean(IFmCurrentService.class);
                    Alarm alarm = addAlarmParam(currentDate, productCode, detail);
                    //同类告警只产生一条,当需要添加告警时得先确认之前是否有同类告警,如果没有就新增,如果有就不应该再添加告警了,此处就是逻辑判断
                    RMap<String, Object> internalAlarmsMap = redissonClient.getMap("InternalAlarmsOfTheSameType");
                    //补充打印key功能,为了验证当版本升级时候,为啥40000的key在缓存中会消失或者清除问题,目前补救办法是入库前先查询是否有告警,有则不添加,没有则可以添加
                    for (String key : internalAlarmsMap.keySet()) {
                        log.info("-begin-key:{},value:{}", key, internalAlarmsMap.get(key));
                    }
                    if (productCode.equals("PLATFORM") && !internalAlarmsMap.containsKey(alarm.getAlarmID().toString())) {
                        log.info("!containsKey-key:{}", alarm.getAlarmID().toString());
                        alarmList = currentAlarmService.queryByNodeFlagAndNodeId(0, 0, alarm.getAlarmID(), ClearStateEnum.UNCLEAR.getValue());
                        if (alarmList.size() == 0) {
                            boolean result = currentAlarmService.add(alarm);
                            log.info("-scheduleMonitor-addAlarm: add data result = {}", result);
                            if (result) {
                                redisJson = fillJsonParameter(alarm);
                                internalAlarmsMap.put(alarm.getAlarmID().toString(), redisJson);
                            }
                            for (String key : internalAlarmsMap.keySet()) {
                                log.info("-end-key:{},value:{}", key, internalAlarmsMap.get(key));
                            }
                        }
                        log.info("alarmList has content:{}", alarmList);
                    }
                }
            }
            if (whetherDeleteAlarm) {
                log.info("clear alarm whetherDeleteAlarm:{}", whetherDeleteAlarm);
                //清除告警
                Integer alarmId = AlarmThresholdConstants.SYSTEM_MONITOR_TASK_EXCEEDS_THE_SPECIFIED_THRESHOLD;
                RMap<String, Object> internalAlarmsMap = redissonClient.getMap("InternalAlarmsOfTheSameType");
                if (productCode.equals("PLATFORM") && internalAlarmsMap.containsKey(alarmId.toString())) {
                    for (String key : internalAlarmsMap.keySet()) {
                        log.info("-begin-key:{},value:{}", key, internalAlarmsMap.get(key));
                    }
                    JSONObject json = JSONObject.parseObject(internalAlarmsMap.get(alarmId.toString()).toString());
                    String alarmKey = json.getString("alarmKey");
                    Alarm alarm = addClearAlarmParam(alarmKey);
                    boolean result = AlarmAutoClearQueeCache.getInstance().addDataWithoutBlock(alarm);
                    log.info("-scheduleMonitor-clearAlarm: add auto clear data result = {}", result);
                    if (result) {
                        internalAlarmsMap.remove(alarmId.toString());
                    }
                    for (String key : internalAlarmsMap.keySet()) {
                        log.info("-end-key:{},value:{}", key, internalAlarmsMap.get(key));
                    }
                }
            }
        }
    }

    /**
     * 拼接存入redis的JSONObject参数
     * @Author 211145187
     * @Date 2024/3/5 14:48
     * @param alarm alarm
     * @Return JSONObject
     **/
    public JSONObject fillJsonParameter(Alarm alarm) {
        log.info("-fillJsonParameter-alarm:{}", alarm);
        JSONObject json = new JSONObject();
        json.put("alarmID", alarm.getAlarmID());
        json.put("alarmKey", alarm.getAlarmKey());
        json.put("alarmType", alarm.getAlarmType());
        json.put("appendInfo", alarm.getAppendInfo());
        json.put("clearState", alarm.getClearState());
        json.put("confirmState", alarm.getConfirmState());
        json.put("createTime", alarm.getCreateTime());
        json.put("filterUsers", alarm.getFilterUsers());
        json.put("intoDbTime", alarm.getIntoDbTime());
        json.put("isLinkedAlarm", alarm.getIsLinkedAlarm());
        json.put("isNmsAlarm", alarm.isNmsAlarm());
        json.put("level", alarm.getLevel());
        json.put("messageNo", alarm.getMessageNo());
        json.put("neID", alarm.getNeID());
        json.put("nodeFlag", alarm.getNodeFlag());
        json.put("nodeId", alarm.getNodeId());
        json.put("nodeType", alarm.getNodeType());
        json.put("nodeTypeId", alarm.getNodeTypeId());
        json.put("notification", alarm.getNotification());
        json.put("notifyRules", alarm.getNotifyRules());
        json.put("probableCause", alarm.getProbableCause());
        json.put("systemType", alarm.getSystemType());
        json.put("ulReportType", alarm.getUlReportType());
        log.info("-fillJsonParameter-json:{}", json);
        return json;
    }

    /**
     * 拼接添加告警参数
     * 说明:由于之前只有基站相关告警,而没有内部告警,比如cpu超阈值或者运行服务挂了等等,因此补充了nodeId为0的自定义内部告警,同时跳过参数加工处理、过滤等操作,直接操作数据表,因此目前只能这样了,多少有点不优雅,一切先以按时完成开发为主,后续有时间再优化吧
     * @param currentDate currentDate
     * @param processName 进程名称
     * @param detail 原因详情
     * @return Alarm
     */
    public Alarm addAlarmParam(Date currentDate, String processName, String detail) {
        log.info("-MonitorTaskExe-addAlarmParam-currentDate:{},processName:{},detail:{}", currentDate, processName, detail);
        Alarm alarm = new Alarm();
        Long messageNo = AlarmParamUtil.nextAlarmSN();
        alarm.setAppendInfo(detail);
        alarm.setMessageNo(messageNo);
        alarm.setNotification(0);
        alarm.setNotifyRules("");
        alarm.setSystemType("Lte");
        alarm.setCreateTime(currentDate);
        alarm.setIntoDbTime(new Date());
        alarm.setLevel(1);
        alarm.setAlarmID(AlarmThresholdConstants.SYSTEM_MONITOR_TASK_EXCEEDS_THE_SPECIFIED_THRESHOLD);
        alarm.setAlarmType(2);
        alarm.setNodeType(NetElementTypeEnum.UNMS.getTypeName().toUpperCase());
        alarm.setNodeName(NetElementTypeEnum.UNMS.getTypeName().toUpperCase());
        alarm.setNeName(NetElementTypeEnum.UNMS.getTypeName().toUpperCase());
        alarm.setNodeTypeId(NetElementTypeEnum.UNMS.getTypeCode().toString());
        alarm.setProbableCause("Alarm.systemMonitorTaskExceedsTheSpecifiedThreshold");
        alarm.setNodeFlag(0);
        alarm.setNodeId(0);
        alarm.setNeID(0);
        alarm.setUlReportType(FaultTypeEnum.FAULT_REPORT.getType());
        alarm.setAlarmKey(AlarmParamUtil.getAlarmKey(alarm.getNeID(), alarm.getCabinet(), alarm.getFrame(),
                alarm.getSlot(), alarm.getSubSlot(), alarm.getAlarmID(), alarm.getCreateTime(),
                alarm.getXxdwinfo1(), alarm.getXxdwinfo2()) + processName);
        return alarm;
    }

    /**
     * 拼接清除告警参数
     * @param alarmKey alarmKey
     * @return Alarm
     */
    public Alarm addClearAlarmParam(String alarmKey) {
        log.info("-MonitorTaskExe-addClearAlarmParam-alarmKey:{}", alarmKey);
        Alarm alarm = new Alarm();
        alarm.setAlarmID(AlarmThresholdConstants.SYSTEM_MONITOR_TASK_EXCEEDS_THE_SPECIFIED_THRESHOLD);
        alarm.setNeID(0);
        alarm.setUlReportType(FaultTypeEnum.FAULT_RECOVER.getType());
        alarm.setConfirmTime(new Date());
        alarm.setAlarmKey(alarmKey);
        return alarm;
    }

    /**
     * 获取key值最小的键
     * @param map map
     * @return key
     */
    private static String getMinKey(RMap<String, Object> map) {
        // 使用 RScoredSortedSet 创建有序集合
        RScoredSortedSet<String> set = (RScoredSortedSet<String>) map.keySet();
        // 获取有序集合中的第一个元素的键
        ScoredEntry<String> minEntry = set.entryRange(0, 0).iterator().next();
        // 返回最小的 key
        return minEntry.getScore().toString();
    }
}

本人其他相关文章链接

1.统计服务器CPU、内存、磁盘、网络IO、队列、数据库占用空间等等信息
2.查询服务器CPU、内存、磁盘、网络IO、队列、数据库占用空间等等信息

本文地址:https://www.vps345.com/12582.html

搜索文章

Tags

docker 容器 运维 java-rabbitmq java PV计算 带宽计算 流量带宽 服务器带宽 上行带宽 上行速率 什么是上行带宽? CC攻击 攻击怎么办 流量攻击 DDOS攻击 服务器被攻击怎么办 源IP ubuntu 无人机 机器人 服务器安全 网络安全策略 防御服务器攻击 安全威胁和解决方案 程序员博客保护 数据保护 安全最佳实践 centos python linux 机器学习 服务器 深度学习 人工智能 自动化 ai nlp macos MacMini Mac 迷你主机 mini Apple pytorch ROS 自动驾驶 javascript 前端 chrome edge 数据库 oracle 关系型 安全 分布式 ssh漏洞 ssh9.9p2 CVE-2025-23419 Deepseek Deepseek-R1 大模型 私有化部署 推理模型 ddos android 网络安全 web安全 网络工程师 网络管理 软考 2024 2024年上半年 下午真题 答案 harmonyos 华为 https jvm 虚拟机 windows 游戏 云计算 ssh word图片自动上传 word一键转存 复制word图片 复制word图文 复制word公式 粘贴word图文 粘贴word公式 vue.js spring boot nginx c++ 计算机外设 bug 物联网 经验分享 部署 redis FTP服务器 deepseek DeepSeek-R1 API接口 数据库系统 开发语言 云原生 iventoy VmWare OpenEuler flutter Google pay Apple pay conda 缓存 网络 权限 音视频 程序 编程 内存 性能分析 AIGC 人工智能生成内容 Dify tcp/ip 网络协议 react.js 前端面试题 node.js 持续部署 stm32 单片机 嵌入式硬件 神经网络 计算机视觉 卷积神经网络 springsecurity6 oauth2 授权服务器 前后端分离 YOLO 目标检测 udp 语言模型 http vue3 excel 在线预览 xlsx xls文件 在浏览器直接打开解析xls表格 前端实现vue3打开excel 文件地址url或接口文档流二进 github git vscode ssl django MCP 华为云 华为od CH340 串口驱动 CH341 uart 485 Ubuntu DeepSeek DeepSeek Ubuntu DeepSeek 本地部署 DeepSeek 知识库 DeepSeek 私有化知识库 本地部署 DeepSeek DeepSeek 私有化部署 gnu 学习 笔记 tensorflow DNS kubernetes prometheus grafana 负载均衡 opengl 游戏引擎 k8s ansible vite yolov5 智能体开发 AI 镜像源 ollama 压力测试 大模型压力测试 EvalScope 远程桌面 服务器无法访问 ip地址无法访问 无法访问宝塔面板 宝塔面板打不开 Ollama 模型联网 API CherryStudio 学习方法 程序人生 kafka llama deepseek-r1 大模型本地部署 自然语言处理 microsoft 进程 操作系统 进程控制 Ubuntu USB转串口 arm开发 架构 DeepSeek Linux linux环境变量 hadoop opencv notepad 数据分析 pycharm ide svn mysql 远程工作 鸿蒙 arkUI arkTs 鸿蒙系统 Ubuntu20.04 GLIBC 2.35 Linux 维护模式 webpack gitee ip协议 vnc 7z ui axure 富文本编辑器 cron crontab日志 Alexnet cursor 工具分享 apache qt arm dash json 正则表达式 nvm gitlab unity RTSP xop RTP RTSPServer 推流 视频 远程连接 gitea npm rsyslog rust腐蚀 mcu c语言 系统安全 uni-app 面试 职场和发展 oracle fusion oracle中间件 电脑 NVML nvidia-smi C 环境变量 进程地址空间 wsl 算法 Qwen2.5-coder 离线部署 UEFI Legacy MBR GPT U盘安装操作系统 list 数据结构 命令 maxkb ARG adb nohup 异步执行 MobaXterm 文件传输 visualstudio intellij-idea 性能优化 bash 策略模式 spring cloud php iftop 网络流量监控 gcc centos 7 eureka dify 知识库 本地化部署 tomcat golang ubuntu20.04 ros ros1 Noetic 20.04 apt 安装 CPU 使用率 系统监控工具 linux 命令 qps 高并发 微服务 阿里云 腾讯云 vue jdk 后端 嵌入式 debian unix 回显服务器 UDP的API使用 AutoDL audio vue音乐播放器 vue播放音频文件 Audio音频播放器自定义样式 播放暂停进度条音量调节快进快退 自定义audio覆盖默认样式 Flask FastAPI Waitress Gunicorn uWSGI Uvicorn 实时音视频 RAID RAID技术 磁盘 存储 go file server http server web server IIS服务器 IIS性能 日志监控 jupyter mcp typescript 计算机网络 Cursor vim 英语 开机黑屏 本地环回 bind vmware 卡死 jellyfin nas AI编程 程序员创富 kotlin android studio iphone VMware Tools vmware tools安装 vmwaretools安装步骤 vmwaretools安装失败 vmware tool安装步骤 vm tools安装步骤 vm tools安装后不能拖 vmware tools安装步骤 具身智能 强化学习 ArkUI ArkTS 移动端开发 linux驱动开发 burpsuite 安全工具 mac安全工具 burp安装教程 渗透工具 diskgenius 大数据 快捷键 旋转屏幕 自动操作 cuda Python教程 Python pycharm安装 Maxkb RAG技术 本地知识库 WSL2 IP 地址 selenium LLM langchain 产品经理 C++ pygame 爬虫 网络爬虫 网络药理学 生信 生物信息学 gromacs 分子动力学模拟 MD 动力学模拟 sql eclipse 指令 ffmpeg 视频编解码 pip Doris搭建 docker搭建Doris Doris搭建过程 linux搭建Doris Doris搭建详细步骤 Doris部署 ip DevOps 软件交付 数据驱动 应用场景 数据安全 devops compose JDK Java LInux Windows VMware 防火墙 端口号 开放端口 访问列表 命名管道 客户端与服务端通信 ACL 流量控制 基本ACL 规则配置 rocketmq agi mount挂载磁盘 wrong fs type LVM挂载磁盘 Centos7.9 小程序 微信小程序域名配置 微信小程序服务器域名 微信小程序合法域名 小程序配置业务域名 微信小程序需要域名吗 微信小程序添加域名 chatgpt oneapi 智能路由器 dell服务器 gpu算力 ipython rpc YOLOv8 NPU Atlas800 A300I pro asi_bench filezilla 无法连接服务器 连接被服务器拒绝 vsftpd 331/530 反向代理 串口服务器 kylin 大文件分片上传断点续传及进度条 如何批量上传超大文件并显示进度 axios大文件切片上传详细教 node服务器合并切片 vue3大文件上传报错提示错误 vu大文件秒传跨域报错cors websocket 上传视频文件到服务器 uniApp本地上传视频并预览 uniapp移动端h5网页 uniapp微信小程序上传视频 uniapp app端视频上传 uniapp uview组件库 jar outlook 错误代码2603 无网络连接 2603 web 硬件工程 big data 编辑器 云计算面试题 mysql离线安装 ubuntu22.04 mysql8.0 mac 私有化 本地部署 网络结构图 虚拟显示器 远程控制 并查集 leetcode 开发环境 matplotlib fonts-noto-cjk mysql安装报错 windows拒绝安装 xcode 运维开发 python2 ubuntu24.04 QT 5.12.12 QT开发环境 Ubuntu18.04 虚拟局域网 智能手机 open webui pdf IP配置 netplan 图像处理 1024程序员节 grep python3.11 冯诺依曼体系 elasticsearch Ubuntu 22.04 MySql 算家云 算力租赁 安装教程 zip unzip maven firewall 数据集 perf 大模型应用 virtualenv webdav 框架搭建 ubuntu 18.04 flash-attention 报错 虚拟现实 国产数据库 瀚高数据库 数据迁移 下载安装 spring 多线程 gpt html fstab 开源 milvus centos-root /dev/mapper yum clean all df -h / du -sh 图形化界面 微信 k8s部署 MySQL8.0 高可用集群(1主2从) tcpdump 测试工具 linuxdeployqt 打包部署程序 appimagetool rdp 远程服务 信息与通信 京东云 matlab SSE SRS 流媒体 直播 C语言 c# 交换机 硬件 设备 GPU PCI-Express 升级 CVE-2024-7347 漏洞 科技 个人开发 大模型微调 雨云 NPS ping++ react next.js 部署next.js 服务器配置 flask xrdp 银河麒麟 环境迁移 IMM fastapi web3.py adobe PVE 高效日志打印 串口通信日志 服务器日志 系统状态监控日志 异常记录日志 rtsp服务器 rtsp server android rtsp服务 安卓rtsp服务器 移动端rtsp服务 大牛直播SDK asm IM即时通讯 QQ 企业微信 剪切板对通 HTML FORMAT 像素流送api 像素流送UE4 像素流送卡顿 像素流送并发支持 镜像下载 freebsd jmeter Chatbox spark hive Qualcomm WoS QNN AppBuilder asp.net大文件上传 asp.net大文件上传下载 asp.net大文件上传源码 ASP.NET断点续传 信号处理 es6 qt6.3 g726 p2p 区块链 密码学 智能合约 哈希算法 交互 chatbox Agent 安卓 mamba Vmamba 多层架构 解耦 灵办AI Redis Desktop java-ee 重启 排查 系统重启 日志 原因 protobuf 序列化和反序列化 安装 jenkins Mac内存不够用怎么办 PX4 MAVROS 四旋翼无人机 高级IO epoll openvpn server openvpn配置教程 centos安装openvpn visual studio code 智慧农业 开源鸿蒙 团队开发 .net shell脚本免交互 expect linux免交互 隐藏文件 其他 GPU环境配置 Ubuntu22 CUDA PyTorch Anaconda安装 openssl iot 驱动开发 教程 环境搭建 Maven mongodb export env 变量 链表 chromium dpi 打不开xxx软件 无法检查其是否包含恶意软件 ollama api ollama外网访问 软件需求 openjdk postgresql photoshop vm 图论 腾讯云大模型知识引擎 docker run 数据卷挂载 端口映射 交互模式 glibc ue4 着色器 ue5 虚幻 目标跟踪 OpenVINO 推理应用 ip命令 新增网卡 新增IP 启动网卡 Portainer搭建 Portainer使用 Portainer使用详解 Portainer详解 Portainer portainer 微信小程序 miniapp 真机调试 调试 debug 断点 网络API请求调试方法 集成学习 集成测试 AI大模型 大模型技术 本地部署大模型 单例模式 计算生物学 生物信息 基因组 ROS2 burp suite 抓包 kernel AI-native 5G 网易邮箱大师 Linux Vim tar 一切皆文件 remote-ssh 显卡驱动持久化 GPU持久化 Claude Desktop Claude MCP Windows Cli MCP rpa xml DrissionPage prompt AI提示词优化 dns 网络攻击模型 mcp-proxy mcp-inspector fastapi-mcp agent sse oceanbase 传统数据库升级 银行 多线程服务器 Linux网络编程 FTP 服务器 webrtc 阻塞队列 生产者消费者模型 服务器崩坏原因 自定义客户端 SAS 常用命令 文本命令 目录命令 IIS .net core Hosting Bundle .NET Framework vs2022 课程设计 华为认证 live555 rtsp rtp VM搭建win2012 win2012应急响应靶机搭建 攻击者获取服务器权限 上传wakaung病毒 应急响应并溯源 挖矿病毒处置 应急响应综合性靶场 数据挖掘 ESP32 NAS Termux Samba 监控 自动化运维 大语言模型 LLMs string模拟实现 深拷贝 浅拷贝 经典的string类问题 三个swap EtherNet/IP串口网关 EIP转RS485 EIP转Modbus EtherNet/IP网关协议 EIP转RS485网关 EIP串口服务器 外网访问 内网穿透 银河麒麟操作系统 国产化 html5 firefox gaussdb transformer grub 版本升级 扩容 rust 媒体 EtherCAT转Modbus ECT转Modbus协议 EtherCAT转485网关 ECT转Modbus串口网关 EtherCAT转485协议 ECT转Modbus网关 C# MQTTS 双向认证 emqx rustdesk HP Anyware 虚拟化 ftp服务 文件上传 numpy ECT转485串口服务器 ECT转Modbus485协议 ECT转Modbus串口服务器 智能电视 华为OD 华为OD机试真题 可以组成网络的服务器 css css3 行情服务器 股票交易 速度慢 切换 股票量化接口 股票API接口 券商 股票交易接口api 类型 特点 shell zabbix mariadb 前端框架 ECS服务器 HarmonyOS Next linux安装配置 系统 黑苹果 低代码 ArcTS 登录 ArcUI GridItem VMware安装mocOS macOS系统安装 ios rag ragflow 大模型部署 Linux PID iperf3 带宽测试 进程优先级 调度队列 进程切换 隐藏目录 文件系统 管理器 通配符 sublime text linux内核 安卓模拟器 iNode Macos nohup后台启动 iTerm2 vmamba sqlserver wps Office Ardupilot 系统架构 sublime text3 车载系统 设备树 毕设 进程间通信 进程信号 termux Bug解决 Qt platform OpenCV mac设置host fpga开发 材料工程 图文教程 VMware虚拟机 macOS系统安装教程 macOS最新版 虚拟机安装macOS Sequoia 创业创新 管道 匿名管道 Github加速 Mac上Github加速 Chrome浏览器插件 js 流程图 mermaid appium 软件测试 自动化测试 功能测试 离线部署dify JAVA 开发 Docker Desktop onlyoffice 实时互动 政务 分布式系统 监控运维 Prometheus Grafana efficientVIT YOLOv8替换主干网络 TOLOv8 CrewAI ai小智 语音助手 ai小智配网 ai小智教程 智能硬件 esp32语音助手 diy语音助手 etcd RBAC 监控k8s集群 集群内prometheus 聚类 读写锁 llm dubbo 思科 tcp kali 共享文件夹 scikit-learn Mermaid 可视化图表 自动化生成 ubuntu安装 linux入门小白 3d 数学建模 sdkman 命令行 基础入门 ci/cd 进程程序替换 execl函数 execv函数 execvp函数 execvpe函数 putenv函数 安装MySQL docker desktop 镜像 Kali 渗透 RDP n8n 工作流 powerpoint UFW WSL2 上安装 Ubuntu 计算机学习路线 编程语言选择 卸载 软件 列表 Docker Docker Compose Kubernetes ranger MySQL8.0 企业风控系统 互联网反欺诈 DDoS攻击 SQL注入攻击 恶意软件和病毒攻击 Apache Flume 数据采集 安装部署 配置优化 高级功能 大数据工具集成 IPMI stm32项目 MS Materials zotero WebDAV 同步失败 代理模式 pillow RustDesk自建服务器 rustdesk服务器 docker rustdesk aws 宝塔面板访问不了 宝塔面板网站访问不了 宝塔面板怎么配置网站能访问 宝塔面板配置ip访问 宝塔面板配置域名访问教程 宝塔面板配置教程 HTML audio 控件组件 vue3 audio音乐播放器 Audio标签自定义样式默认 vue3播放音频文件音效音乐 自定义audio播放器样式 播放暂停调整声音大小下载文件 LDAP MQTT 消息队列 cpu 实时 使用 odoo 服务器动作 Server action 知识图谱 大模型教程 opcua opcda KEPServer安装 ssrf 失效的访问控制 孤岛惊魂4 安全威胁分析 统信 国产操作系统 虚拟机安装 宝塔面板 同步 备份 建站 Hyper-V WinRM TrustedHosts vSphere vCenter 软件定义数据中心 sddc 源码剖析 rtsp实现步骤 流媒体开发 Kali Linux 黑客 渗透测试 信息收集 WebRTC express 大文件秒传跨域报错cors opensearch helm Netty 即时通信 NIO SSH Unity Dedicated Server Host Client 无头主机 sysctl.conf vm.nr_hugepages 测试用例 鲲鹏 火绒安全 Dell R750XS 群晖 文件分享 java-rocketmq gateway Clion Nova ResharperC++引擎 Centos7 远程开发 llama.cpp TCP WebServer 话题通信 服务通信 windows 服务器安装 samba 浪潮信息 AI服务器 lighttpd安装 Ubuntu配置 Windows安装 性能测试 服务器优化 录音麦克风权限判断检测 录音功能 录音文件mp3播放 小程序实现录音及播放功能 RecorderManager 解决录音报错播放没声音问题 CNNs 图像分类 postman gunicorn 锁屏不生效 安全漏洞 信息安全 昇腾 大模型训练/推理 推理问题 mindie PyQt PySide6 显示器 pyside6 界面 ecmascript localhost NFS shard 匿名FTP 邮件传输代理 SSL支持 chroot监狱技术 教育电商 游戏程序 notepad++ SoC 概率论 考研 Claude sse_starlette Starlette Server-Sent Eve 服务器推送事件 路径解析 宠物 毕业设计 免费学习 宠物领养 宠物平台 webgl AI写作 VMware安装Ubuntu Ubuntu安装k8s harmonyOS面试题 MacOS录屏软件 微信分享 Image wxopensdk Hive环境搭建 hive3环境 Hive远程模式 cnn GaN HEMT 氮化镓 单粒子烧毁 辐射损伤 辐照效应 DevEco Studio conda配置 conda镜像源 safari Ark-TS语言 键盘 基础环境 软件工程 软件构建 CLion IDE 信息可视化 echarts yum docker-compose docker compose Reactor Reactor反应堆 工具 大屏端 elk deep learning 桌面环境 HarmonyOS Tabs组件 TabContent TabBar TabsController 导航页签栏 滚动导航栏 frp 电脑桌面出现linux图标 电脑桌面linux图标删除不了 电脑桌面Liunx图标删不掉 linux图标删不掉 yolov8 高德地图 鸿蒙接入高德地图 HarmonyOS5.0 终端工具 远程工具 空间 查错 搜索引擎 WSL resolv.conf GPU训练 SecureCRT Ubuntu 24 常用命令 Ubuntu 24 Ubuntu vi 异常处理 向量数据库 milvus安装 mybase systemctl composer rabbitmq 蓝耘科技 元生代平台工作流 ComfyUI 深度求索 私域 eNSP 网络规划 VLAN 企业网络 环境配置 产测工具框架 IMX6ULL 管理框架 SSH 密钥生成 SSH 公钥 私钥 生成 minicom 串口调试工具 firewalld 王者荣耀 网络用户购物行为分析可视化平台 大数据毕业设计 设计模式 docker搭建nacos详解 docker部署nacos docker安装nacos 腾讯云搭建nacos centos7搭建nacos ragflow 源码启动 Linux的权限 vr 流水线 脚本式流水线 springboot 实战案例 WebUI DeepSeek V3 主从复制 minio 设置代理 实用教程 监控k8s 监控kubernetes WLAN 文心一言 word edge浏览器 rancher Linux无人智慧超市 LInux多线程服务器 QT项目 LInux项目 单片机项目 database nftables Ubuntu22.04 开发人员主页 ebpf uprobe 图片增强 增强数据 云原生开发 K8S k8s管理系统 GameFramework HybridCLR Unity编辑器扩展 自动化工具 make命令 makefile文件 esp32 蓝牙 电子信息 通信工程 毕业 换源 国内源 Debian 免密 公钥 私钥 远程过程调用 Windows环境 宝塔面板无法访问 WireGuard 异地组网 ufw 硬件架构 计算机科学与技术 fiddler 信号 trae 网卡 LVM 磁盘分区 lvresize 磁盘扩容 pvcreate 考试 rtc 磁盘挂载 新盘添加 partedUtil autoware ros2 Alist rclone mount 挂载 网盘 linux子系统 忘记密码 gru 桥接模式 windows虚拟机 虚拟机联网 UOS 开机自启动 桌面快捷方式 超级终端 多任务操作 提高工作效率 程序员 isaacgym RAGflow risc-v 实验 Trae AI 原生集成开发环境 Trae AI MCP server C/S Cline Kylin-Server 服务器安装 HistoryServer Spark YARN jobhistory 嵌入式实习 c Xterminal VSCode ruoyi Invalid Host allowedHosts vscode1.86 1.86版本 ssh远程连接 大模型入门 NAT转发 NAT Server vasp安装 openEuler 云电竞 云电脑 todesk kylin v10 麒麟 v10 intellij idea ocr EasyConnect 做raid 装系统 BMC rc.local 开机自启 systemd 麒麟 单一职责原则 nextjs reactjs HAProxy 多个客户端访问 IO多路复用 TCP相关API windows日志 windwos防火墙 defender防火墙 win防火墙白名单 防火墙白名单效果 防火墙只允许指定应用上网 防火墙允许指定上网其它禁止 磁盘监控 ukui 麒麟kylinos openeuler 直播推流 r语言 数据可视化 mock mock server 模拟服务器 mock服务器 Postman内置变量 Postman随机数据 KingBase 项目部署到linux服务器 项目部署过程 cpp-httplib Java Applet URL操作 服务器建立 Socket编程 网络文件读取 创意 社区 执法记录仪 智能安全帽 smarteye mybatis playbook 剧本 博客 数据库架构 数据管理 数据治理 数据编织 数据虚拟化 sqlite3 CDN 网站搭建 serv00 VMware创建虚拟机 .netcore 矩阵 GCC aarch64 编译安装 HPC 工业4.0 域名服务 DHCP 符号链接 配置 db KylinV10 麒麟操作系统 Vmware CPU 主板 电源 TrueLicense MQTT协议 消息服务器 代码 云桌面 微软 AD域控 证书服务器 互信 浏览器自动化 clickhouse 硅基流动 ChatBox 代码规范 视频监控 网站 小智 高效I/O 充电桩平台 充电桩开源平台 c/s 日志分析 系统取证 海康 飞腾处理器 #STC8 #STM32 支持向量机 框架 商用密码产品体系 nvidia rsync web开发 bigdata 大模型推理 fpga 源代码管理 gitee go accept linq 中间件 HTTP状态码 客户端错误 服务器端错误 API设计 多端开发 智慧分发 应用生态 鸿蒙OS 医疗APP开发 app开发 僵尸进程 远程 执行 sshpass 操作 chrome devtools chromedriver alias unalias 别名 模拟器 RAGFLOW RAG 检索增强生成 文档解析 大模型垂直应用 chrome 浏览器下载 chrome 下载安装 谷歌浏览器下载 中兴光猫 换光猫 网络桥接 自己换光猫 Ubuntu Server Ubuntu 22.04.5 kvm 在线office bcompare Beyond Compare keepalived Attention NLP threejs 3D Linux awk awk函数 awk结构 awk内置变量 awk参数 awk脚本 awk详解 cmos 嵌入式系统开发 SenseVoice CentOS Stream CentOS ESXi trea idea 模拟实现 Ubuntu共享文件夹 共享目录 Linux共享文件夹 webstorm c/c++ 串口 系统开发 binder framework 源码环境 强制清理 强制删除 mac废纸篓 okhttp Xinference top Linux top top命令详解 top命令重点 top常用参数 ArkTs uv 沙盒 DIFY 软链接 硬链接 Linux权限 权限命令 特殊权限 磁盘清理 IO curl wget CosyVoice 内核 fork wait waitpid exit 华为证书 HarmonyOS认证 华为证书考试 网络文件系统 多产物 双系统 cmake 跨平台 Mac软件 perl MVS 海康威视相机 stable diffusion AI作画 lvm System V共享内存 进程通信 宝塔 su sudo sudo原理 su切换 linux上传下载 MDK 嵌入式开发工具 论文笔记 Isaac Sim 虚拟仿真 wpf 用户管理 initramfs Linux内核 Grub 动静态库 gpt-3 zookeeper retry 重试机制 玩游戏 视觉检测 wsl2 lio-sam SLAM macbook Linux find grep hdc node CUPS 打印机 Qt5 裸机装机 linux磁盘分区 裸机安装linux 裸机安装ubuntu 裸机安装kali 裸机 vsxsrv csrf OpenCore 需求分析 提示词 miniconda PostgreSQL15数据库 顽固图标 启动台 统信UOS 切换root RockyLinux nano AppLinking 应用间跳转 yum换源 树莓派项目 Bluetooth 配对 图形渲染 direct12 YOLOv12 ceph fd 文件描述符 ollama下载加速 热榜 k8s资源监控 annotations自动化 自动化监控 监控service 监控jvm workflow 健康医疗 互联网医院 可信计算技术 安全架构 3GPP 卫星通信 AnythingLLM AnythingLLM安装 Docker引擎已经停止 Docker无法使用 WSL进度一直是0 镜像加速地址 大模型面经 大模型学习 openstack Xen KVM 怎么卸载MySQL MySQL怎么卸载干净 MySQL卸载重新安装教程 MySQL5.7卸载 Linux卸载MySQL8.0 如何卸载MySQL教程 MySQL卸载与安装 DocFlow 拓扑图 seatunnel P2P HDLC HiCar CarLife+ CarPlay QT RK3588 k8s集群资源管理 yum源切换 更换国内yum源 DenseNet cudnn anaconda Docker Hub docker pull daemon.json 自动化编程 springboot远程调试 java项目远程debug docker远程debug java项目远程调试 springboot远程 moveit 机器人运动 springcloud RAGFlow log4j rime GRUB引导 Linux技巧 飞牛nas fnos docker搭建pg docker搭建pgsql pg授权 postgresql使用 postgresql搭建 mq OpenManus wireshark 显示过滤器 ICMP Wireshark安装 容器技术 openwrt WebVM selete Typore redhat 版本 copilot lb 协议 import save load 迁移镜像 计算机 蓝桥杯 Helm k8s集群 生活 Docker快速入门 netlink libnl3 Apache Beam 批流统一 案例展示 数据分区 容错机制 软件卸载 系统清理 ShapeFile GeoJSON Nginx 网络编程 底层实现 分子对接 autodock mgltools PDB PubChem ajax 音乐服务器 Navidrome 音流 内存管理 EVE-NG 相机 kubeless client-go k8s二次开发 软考设计师 中级设计师 SQL 软件设计师 智能体 autogen openai coze Trae叒更新了? Masshunter 质谱采集分析软件 使用教程 科研软件 Crawlee Playwright 小番茄C盘清理 便捷易用C盘清理工具 小番茄C盘清理的优势尽显何处? 教你深度体验小番茄C盘清理 C盘变红?!不知所措? C盘瘦身后电脑会发生什么变化? hosts hosts文件管理工具 开源软件 轮播图 RagFlow fabric LLaMA-Factory dns是什么 如何设置电脑dns dns应该如何设置 工作流自动化工具 bushujiaocheng 部署教程 AI算力 租算力 到算家云 网卡的名称修改 eth0 ens33 EMQX 通信协议 华为机试 AD域 H3C v10 物联网开发 kind ftp 云服务 个人博客 armbian u-boot 技术 win11 无法解析服务器的名称或地址 LLM Web APP Streamlit autodl 高效远程协作 TrustViewer体验 跨设备操作便利 智能远程控制 junit DeepSeek行业应用 Heroku 网站部署 unity3d HCIE 数通 豆瓣 追剧助手 迅雷 云服务器 服务器繁忙 压测 ECS 我的世界 我的世界联机 数码 统信操作系统 深度优先 并集查找 换根法 树上倍增 移动云 kamailio sip VoIP googlecloud 内网环境 服务器数据恢复 数据恢复 存储数据恢复 raid5数据恢复 磁盘阵列数据恢复 iis X11 Xming 聊天服务器 套接字 客户端 Socket DigitalOcean GPU服务器购买 GPU服务器哪里有 GPU服务器 ux llama3 Chatglm 开源大模型 三级等保 服务器审计日志备份 远程看看 远程协助 弹性计算 计算虚拟化 弹性裸金属 联想开天P90Z装win10 崖山数据库 YashanDB 显示管理器 lightdm gdm 模拟退火算法 裸金属服务器 弹性裸金属服务器 bonding 链路聚合 思科模拟器 Cisco asp.net上传文件夹 asp.net上传大文件 .net core断点续传 IPMITOOL 硬件管理 C++软件实战问题排查经验分享 0xfeeefeee 0xcdcdcdcd 动态库加载失败 程序启动失败 程序运行权限 标准用户权限与管理员权限 大数据平台 致远OA OA服务器 服务器磁盘扩容 uni-file-picker 拍摄从相册选择 uni.uploadFile H5上传图片 微信小程序上传图片 micropython mqtt wsgiref Web 服务器网关接口 温湿度数据上传到服务器 Arduino HTTP 代码调试 ipdb W5500 OLED u8g2 TCP服务器 LORA camera Arduino XCC Lenovo 半虚拟化 硬件虚拟化 Hypervisor 树莓派 VNC .net mvc断点续传 田俊楠 毕昇JDK 繁忙 解决办法 替代网站 汇总推荐 AI推理 iBMC UltraISO 服务器管理 配置教程 网站管理 迁移指南 Windsurf 上传视频至服务器代码 vue3批量上传多个视频并预览 如何实现将本地视频上传到网页 element plu视频上传 ant design vue vue3本地上传视频及预览移除 gradle 安防软件 云耀服务器 React Next.js 开源框架 视频平台 录像 视频转发 视频流 机柜 1U 2U Web服务器 多线程下载工具 PYTHON 服务器扩容没有扩容成功 visual studio Carla 智能驾驶 Web应用服务器 服务器部署 本地拉取打包 联机 僵尸毁灭工程 游戏联机 开服 语音识别 联网 easyconnect 代理 笔灵AI AI工具 蓝桥杯C++组 arcgis nacos netty 内网渗透 靶机渗透 负载测试 deepseak 豆包 KIMI 腾讯元宝 VPN wireguard 跨域请求 umeditor粘贴word ueditor粘贴word ueditor复制word ueditor上传word图片 ueditor导入word ueditor导入pdf ueditor导入ppt 论文阅读 servlet 电路仿真 multisim 硬件工程师 硬件工程师学习 电路图 电路分析 仪器仪表 laravel web3 区块链项目 金仓数据库 2025 征文 数据库平替用金仓 金仓数据库概述 金仓数据库的产品优化提案 软件开发 信任链 分布式账本 共识算法 文件存储服务器组件 规格说明书 设计规范 Webserver 异步 Qt QModbus 技术共享 RK3568 机架式服务器 1U工控机 国产工控机 计算机系统 finebi OpenManage OpenGL muduo issue 静态NAT GPU状态 全栈 av1 电视盒子 机顶盒ROM 魔百盒刷机 小游戏 五子棋 VR手套 数据手套 动捕手套 动捕数据手套 neo4j 数据仓库 数据库开发 deekseek apt 捆绑 链接 谷歌浏览器 youtube google gmail 小艺 Pura X navicat 单元测试 crosstool-ng 鸿蒙开发 移动开发 元服务 应用上架 sonoma 自动更新 飞牛NAS 飞牛OS MacBook Pro 输入法 OpenHarmony 邮件APP 免费软件 Linux24.04 deepin 混合开发 环境安装 源码 分析解读 prometheus数据采集 prometheus数据模型 prometheus特点 合成模型 扩散模型 图像生成 Linux的基础指令 交叉编译 向日葵 AList fnOS 历史版本 下载 边缘计算 cocoapods 用户缓冲区 本地部署AI大模型 HarmonyOS NEXT 原生鸿蒙 稳定性 看门狗 支付 微信支付 开放平台 etl can 线程池 查看显卡进程 fuser x64 SIGSEGV xmm0 Cookie MacOS vpn MAC ELF加载 csrutil mac恢复模式进入方法 SIP 恢复模式 xfce 终端 g++ g++13 pyicu 推荐算法 beautifulsoup 实时内核 大版本升 升级Ubuntu系统 llamafactory 微调 Qwen Xshell 线程 Echarts图表 折线图 柱状图 异步动态数据 可视化效果 子系统 星河版 lsb_release /etc/issue /proc/version uname -r 查看ubuntu版本 NVM Node Yarn PM2 Charles Obsidian Dataview 可执行程序 react native STL Linux的基础开发工具 cpolar 欧拉系统 接口返回 mvc harmonyosnext 导航栏 SPI devmem wifi驱动 jdk11安装 jdk安装 openjdk11 openjdk11安装 GKI KMI 互联网实用编程指南 ubuntu24 vivado24 苹果电脑装windows系统 mac安装windows系统 mac装双系统 macbook安装win10双 mac安装win10双系统 苹果电脑上安装双系统 mac air安装win 系统内核 Linux版本 多路转接 libreoffice word转pdf mac安装软件 mac卸载软件 mac book mac cocoapods macos cocoapods npu 技能大赛 IO模型 GoogLeNet TRAE 影刀 #影刀RPA# nac 802.1 portal SSH 服务 SSH Server OpenSSH Server 本地知识库部署 DeepSeek R1 模型 jina 跨域 ubuntu24.04.1 yaml Ultralytics 可视化 fast 实习 ShenTong AI代码编辑器 Open WebUI 办公自动化 pdf教程 RoboVLM 通用机器人策略 VLA设计哲学 vlm fot robot 视觉语言动作模型 pyautogui cd 目录切换 Logstash 日志采集 ssh远程登录 xpath定位元素 IPv4 子网掩码 公网IP 私有IP bot docker命令大全 浏览器开发 AI浏览器 rnn 序列化反序列化 PPI String Cytoscape CytoHubba linux 命令 sed 命令 自动化任务管理 多进程 显卡驱动 虚幻引擎 searxng dity make bat 金融 telnet 远程登录 AI Agent 字节智能运维 Node-Red 编程工具 流编程 easyui ruby qemu libvirt 网络建设与运维 网络搭建 神州数码 神州数码云平台 云平台 免费域名 域名解析 钉钉 DeepSeek r1 cfssl 自学笔记 小米 澎湃OS Android 端口聚合 windows11 DBeaver virtualbox NLP模型 电视剧收视率分析与可视化平台 网页服务器 web服务器 scapy Zoertier 内网组网 GeneCards OMIM TTD VGG网络 卷积层 池化层 SystemV IPv6 IPv6测试 IPv6测速 IPv6检测 IPv6查询 全文检索 图搜索算法 脚本 GRE IPv4/IPv6双栈 双栈技术 网路规划设计 ensp综合实验 IPv4过渡IPv6 IPv4与IPv6 物理地址 页表 虚拟地址 postgres Dify重启后重新初始化 pthread Qwen3 qwen3 32b vllm 可用性测试 d3d12 android-studio deepseek-v3 ktransformers 动态库 GCC编译器 -fPIC -shared 医院门诊管理系统 Modbus TCP MLLMs VLM gpt-4v springboot容器部署 springboot容器化部署 微服务容器化负载均衡配置 微服务容器多节点部署 微服务多节点部署配置负载均衡 集成 scrapy python高级编程 Ansible elk stack 通用环境搭建 MySQL 热键 代理配置 企业级DevOps 转换 服务注册与发现 电脑操作 pppoe radius Kylin OS SVN Server tortoise svn UDP SSL证书 code-server 微信公众平台 RTMP 应用层 流式接口 网页设计 ecm bpm CORS hibernate 游戏机 pyqt 游戏服务器 TrinityCore 魔兽世界 恒源云 Wi-Fi bootstrap 飞书 查询数据库服务IP地址 SQL Server 银河麒麟服务器操作系统 系统激活 无桌面 XFS xfs文件系统损坏 I_O error SSL 域名 Spring Security MNN vscode 1.86 api VPS SEO 社交电子 iDRAC R720xd 直流充电桩 充电桩 jetty undertow 相差8小时 UTC 时间 网工 token sas Nuxt.js nuxt3 服务器部署ai模型 MI300x uniapp 银河麒麟高级服务器 外接硬盘 Kylin thingsboard 聊天室 雨云服务器 URL 宕机切换 服务器宕机 nfs 备份SQL Server数据库 数据库备份 傲梅企业备份网络版 FunASR ASR mosquitto DOIT 四博智联 业界资讯 能力提升 面试宝典 IT信息化 算力 AISphereButler Minecraft Anolis nginx安装 linux插件下载 网络穿透 SWAT 配置文件 服务管理 网络共享 加解密 Yakit yaklang 磁盘镜像 服务器镜像 服务器实时复制 实时文件备份 chfs ubuntu 16.04 状态管理的 UDP 服务器 Arduino RTOS vue-i18n 国际化多语言 vue2中英文切换详细教程 如何动态加载i18n语言包 把语言json放到服务器调用 前端调用api获取语言配置文件 SysBench 基准测试 服务器主板 AI芯片 skynet Dell HPE 联想 浪潮 idm embedding OD机试真题 服务器能耗统计 pgpool lua 微信开放平台 微信公众号配置 智能音箱 智能家居 音乐库 飞牛 dba AP配网 AK配网 小程序AP配网和AK配网教程 WIFI设备配网小程序UDP开 超融合 端口测试 less Jellyfin UOS1070e Qwen2.5-VL saltstack 服务器正确解析请求体 代码托管服务 AI员工 banner powerbi WINCC 授时服务 北斗授时 zerotier 服务器ssl异常解决 弹性服务器 Pyppeteer 动态规划 配置原理 glm4 solidworks安装 程序化交易 量化交易 高频交易 massa sui aptos sei AimRT 7-zip wordpress element-ui 上传视频并预览视频 vue上传本地视频及进度条功能 vue2选择视频上传到服务器 upload上传视频组件插件 批量上传视频 限制单个上传视频 java-zookeeper Python 视频爬取教程 Python 视频爬取 Python 视频教程 paddle AWS qwen2vl Putty 花生壳 OpenSSH PTrade QMT 量化股票 pxe pyscenic 生信教程 能源 制造 动态域名 LVS rtcp CPU架构 服务器cpu 惠普服务器 惠普ML310e Gen8 惠普ML310e Gen8V2 腾讯云服务器 轻量应用服务器 linux系统入门 linux命令 vue在线预览excel和编辑 vue2打开解析xls电子表格 浏览器新开页签或弹框内加载预览 文件url地址或接口二进制文档 解决网页打不开白屏报错问题 socket 分布式数据库 集中式数据库 业务需求 选型误 5090 显卡 AI性能 科勘海洋 数据采集浮标 浮标数据采集模块 OpenAI aiohttp asyncio Java进程管理 DevOps自动化 脚本执行 跨平台开发 远程运维 Apache Exec JSch 性能监控 分类 粘包问题 语法 移动魔百盒 服务网格 istio sequoiaDB deepseek r1 regedit 开机启动 玩机技巧 软件分享 软件图标 EMUI 回退 降级 风扇控制软件 嵌入式Linux IPC xshell termius iterm2 mm-wiki搭建 linux搭建mm-wiki mm-wiki搭建与使用 mm-wiki使用 mm-wiki详解 Linux环境 代理服务器 ArtTS 我的世界服务器搭建 minecraft whistle 极限编程 archlinux kde plasma brew comfyui comfyui教程 对比 meld DiffMerge win向maOS迁移数据 数据库管理 bert swift Bandizip Mac解压 Mac压缩 压缩菜单 软件商店 信创 livecd systemtools 实时日志 logs NTP服务器 orbslam2 端口开放 lvs IP地址 计算机基础 影视app function address 函数 地址 broadcom 截图 录屏 gif 开发工具 基础指令 pipe函数 管道的大小 匿名管道的四种情况 ps命令 手动分区 C/C++ chrome历史版本下载 chrominum下载 Linux的进程概念 cuda驱动 时间轮 flink IMX317 MIPI H265 VCU figma 企业网络规划 华为eNSP Python基础 Python技巧 kerberos TCP协议 USB网络共享 运维监控 docker部署Python docker部署翻译组件 docker部署deepl docker搭建deepl java对接deepl 翻译组件使用 抗锯齿 烟花代码 烟花 元旦 增强现实 沉浸式体验 技术实现 案例分析 AR dock 加速 软负载 seleium 端口 查看 ss 项目部署 proxy模式 deployment daemonset statefulset cronjob 问题解决 性能调优 安全代理 抓包工具 达梦 DM8 image 接口优化 Sealos 集群管理 AzureDataStudio qt5 客户端开发 机械臂 webview post.io 企业邮箱 搭建邮箱 静态IP 命令模式 源代码 watchtower 线程同步 线程互斥 条件变量 anythingllm open-webui docker国内镜像 finalsheel MinIO 漏洞报告生成 mapreduce 定义 核心特点 优缺点 适用场景 红黑树封装map和set 4 - 分布式通信、分布式张量 百度云 文件共享 LSTM Python学习 Python编程 GPUGEEK 基本指令 模板 openresty 仓库 共享 设置 软路由 Linux指令 影刀证书 分享 亲测 线程安全 CodeBuddy首席试玩官 Radius Ubuntu 24.04.1 轻量级服务器 GIS 遥感 WebGIS 僵尸世界大战 游戏服务器搭建 根服务器 银河麒麟桌面操作系统 服务器时间 内网服务器 内网代理 内网通信 es open Euler dde h.264 Headless Linux 黑客技术 AI agent ISO镜像作为本地源 ldap 线性代数 电商平台 国标28181 监控接入 语音广播 流程 SDP qt项目 qt项目实战 qt教程 佛山戴尔服务器维修 佛山三水服务器维修 HTTP 服务器控制 ESP32 DeepSeek triton 模型分析 sqlite swoole ai工具 Erlang OTP gen_server 热代码交换 事务语义 tailscale derp derper 中转 备选 调用 示例 xss hugo 游戏开发 sentinel 干货分享 黑客工具 密码爆破 流量运营 分布式训练 midjourney 架构与原理 IDEA 北亚数据恢复 oracle数据恢复 hexo 搭建个人相关服务器 存储维护 NetApp存储 EMC存储 VS Code 欧标 OCPP AD 域管理 状态模式 小智AI服务端 xiaozhi TTS 西门子PLC 通讯 无法访问wordpess后台 打开网站页面错乱 linux宝塔面板 wordpress更换服务器 阿里云ECS 信创终端 中科方德 win服务器架设 windows server nosql mcp服务器 client close NFC 近场通讯 智能门锁 yashandb 网络原理 免费 三次握手 logstash vCenter服务器 ESXi主机 监控与管理 故障排除 日志记录 矩池云 数据下载 数据传输 cocos2d 3dcoat 泛型编程 工厂方法模式 自定义登录信息展示 motd 美化登录 实时云渲染 云渲染 3D推流 openvino 环境 非root h.265 anonymous 风扇散热策略 曙光 海光 宁畅 中科可控 RNG 状态 可复现性 随机数生成 大厂程序员 硅基计算 碳基计算 认知计算 生物计算 AGI 系统架构设计 软件哲学 程序员实现财富自由 gitlab服务器 零日漏洞 CVE 机架式 IDC openssh macOS 搜狗输入法 中文输入法 鸿蒙NEXT 华为鸿蒙系统 ArkTS语言 Component 生命周期 条件渲染 Image图片组件 NVIDIA GRANT REVOKE qtcreator java毕业设计 微信小程序医院预约挂号 医院预约 医院预约挂号 小程序挂号 mujoco OS Ubuntu 24.04 搜狗输入法闪屏 Ubuntu中文输入法 能效分析 ubantu ANDROID_HOME zshrc easyTier 组网 自定义shell当中管道的实现 匿名和命名管道 进程池实现 latex charles clipboard 剪贴板 剪贴板增强 IT 护眼模式 文件权限 重置密码 dnf Mac部署 Ollama模型 Openwebui 配置教程 AI模型 编译 烧录 uni-app x 路径规划 李心怡 解决方案 零售 输入系统 solr VM虚拟机 docker search 知行EDI 电子数据交换 知行之桥 EDI homeassistant 智能问答 Spring AI Milvus web环境 Multi-Agent 蜂窝网络 频率复用 射频单元 无线协议接口RAN 主同步信号PSS 手机 学习路线 代码复审 烟雾检测 yolo检测 消防检测 Web3 Telegram 5分钟快速学 docker入门 dockerfile 高可用 恒玄BES nacos容器环境变量 docker启动nacos参数 nacos镜像下载 podman registries sql注入 大大通 第三代半导体 碳化硅 带外管理 Unity插件 ardunio BLE tidb ABAP 数字证书 签署证书 lrzsz caddy 火山引擎 authing pythonai PlaywrightMCP 网络库 aac mcp协议 go-zero Async注解 事件驱动 vmware tools 站群 多IP 流量 证书 签名 排序算法 选择排序 jQuery 光电器件 LED 站群服务器 物理服务器 服务器租用 云服务器租用 物理机租用 网络接口 时间间隔 所有接口 多网口 事件分析 边缘服务器 利旧 AI识别 DELL R730XD维修 全国服务器故障维修 客户端-服务器架构 点对点网络 服务协议 网络虚拟化 网络安全防御 Svelte 实时传输 linux cpu负载异常 Metastore Catalog nginx默认共享目录 青少年编程 MateBook 更换镜像源 红黑树 tar.gz tar.xz linux压缩 迁移 SFTP 本地不受DeepSeek 进程等待 内存泄漏 泰山派 根文件系统 CAD瓦片化 栅格瓦片 矢量瓦片 Web可视化 DWG解析 金字塔模型 数字比特流 模拟信号 将二进制数据映射到模拟波形上 频谱资源 振幅频率相位 载波高频正弦波 容器化 Serverless BCLinux nmcli 网络配置 containerd 访问公司内网 MobileNetV3 dify部署 华为昇腾910b3 access blocked 破解 janus rtmp http状态码 请求协议 机器人仿真 模拟仿真 地平线5 asp.net 电子信息工程 EF Core 客户端与服务器评估 查询优化 数据传输对象 查询对象模式 多媒体 独立服务器 低成本 服务器托管 云托管 数据中心 idc机房 量子计算 Cache Aside Read/Write Write Behind CTE AGE debezium 数据变更 android-ndk gerrit BEVFusion Linux系统编程 安全性测试 写时拷贝 Linux的进程调度队列 活动队列 Linux的进程控制 MCP 服务器 JADX-AI 插件 A2A 去中心化 网络带宽 问题排查 raid slave Navigation 路由跳转 鸿蒙官方推荐方式 鸿蒙原生开发 codereview code-review 深度强化学习 深度Q网络 Q_Learning 经验回收 电子器件 二极管 三极管 RHEL 网络IO 队列 数据库占用空间 文件清理 环境部署 微信自动化工具 微信消息定时发送 AI导航站 OSB Oracle中间件 SOA 三维重建 嵌入式实时数据库 FS bootfs rootfs linux目录 Jenkins流水线 声明式流水线 eventfd 高性能 生成对抗网络 万物互联 工业自动化 工厂改造 系统完整性 越狱设备 笔记本电脑 Arduino下载开发板 esp32开发板 esp32-s3 视频服务器 过期连接 LangGraph 模型上下文协议 MultiServerMCPC load_mcp_tools load_mcp_prompt 若依 内存不足 outofmemory Key exchange 主包过大 开启黑屏 Windows 11 重装电脑系统 相机标定 鼠标