shjung 1 gadu atpakaļ
vecāks
revīzija
54439aaf99

+ 6 - 6
src/main/java/com/tsi/app/server/websocket/WebSocketSessionClient.java

@@ -95,13 +95,13 @@ public class WebSocketSessionClient {
                 this.consumerThread = new SessionConsumerThread(this.websocketHandler, this.session);
                 this.thread = new Thread(this.consumerThread);
                 this.thread.setUncaughtExceptionHandler(
-                        new Thread.UncaughtExceptionHandler() {
-                            @Override
-                            public void uncaughtException(Thread th, Throwable ex) {
-                                log.error("Uncaught exception: {}, {}", groupId, ex.getMessage());
-                            }
+                    new Thread.UncaughtExceptionHandler() {
+                        @Override
+                        public void uncaughtException(Thread th, Throwable ex) {
+                            log.error("Uncaught exception: {}, {}", groupId, ex.getMessage());
                         }
-                );
+                    }
+                 );
                 this.thread.start();
             }
             this.consumerThread.setTopics(this.threadTopics);

+ 9 - 1
src/main/resources/mybatis/mapper/tsc-ssip-api.xml

@@ -68,7 +68,15 @@
 
     <insert id="insertSystemStatusHs" parameterType="com.tsi.app.server.vo.SystemStatus">
         <![CDATA[
-        INSERT INTO tb_tsc_system_status_hs (clct_dt, host_name, use_mem_rate, real_mem_rate, use_swap_rate, use_disk_rate, use_cpu_rate, task_cnt, thread_cnt, load_avg)
+        INSERT INTO tb_tsc_system_status_hs (clct_dt, host_name, total_mem, use_mem, total_disk, use_disk, use_mem_rate, use_cpu_rate, use_disk_rate, task_cnt, thread_cnt, load_avg)
+        VALUES (STR_TO_DATE(#{info.clctDt}, '%Y%m%d%H%i%s'), #{info.hostName}, #{info.totalMem}, #{info.useMem}, #{info.totalDisk}, #{info.useDisk}, #{info.useMemRate}, #{info.useCpuRate}, #{info.useDiskRate}, #{info.tasks}, #{info.threads}, #{info.loadAvg})
+        ]]>
+    </insert>
+
+    <insert id="insertSystemStatusHs-old" parameterType="com.tsi.app.server.vo.SystemStatus">
+        <![CDATA[
+        INSERT INTO tb_tsc_system_status_hs (clct_dt, host_name, :q1:q!
+                                            , real_mem_rate, use_swap_rate, use_disk_rate, use_cpu_rate, task_cnt, thread_cnt, load_avg)
         VALUES (DATE_SUB(NOW(), INTERVAL MOD(NOW(), 5) SECOND), #{info.hostName}, #{info.useMemRate}, #{info.realMemRate}, #{info.useSwapRate}, #{info.useDiskRate}, #{info.useCpuRate}, #{info.tasks}, #{info.threads}, #{info.loadAvg})
         ]]>
     </insert>