1/* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16export class SystemCpuSummary { 17 startTime: number = -1 18 startTimeStr: string = ""; 19 duration: number = -1 20 durationStr: string = "" 21 totalLoad: number = -1 22 totalLoadStr: string = "" 23 userLoad: number = -1 24 userLoadStr: string = "" 25 systemLoad: number = -1 26 systemLoadStr: string = "" 27 threads: number = -1 28 threadsStr: string = "" 29} 30 31export class SystemDiskIOSummary { 32 startTime: number = -1 33 startTimeStr: string = "" 34 duration: number = -1 35 durationStr: string = "" 36 dataRead: number = -1 37 dataReadStr: string = "" 38 dataReadSec: number = -1 39 dataReadSecStr: string = "" 40 dataWrite: number = -1 41 dataWriteStr: string = "" 42 dataWriteSec: number = -1 43 dataWriteSecStr: string = "" 44 readsIn: number = -1 45 readsInStr: string = "" 46 readsInSec: number = -1 47 readsInSecStr: string = "" 48 writeOut: number = -1 49 writeOutStr: string = "" 50 writeOutSec: number = -1 51 writeOutSecStr: string = "" 52 53} 54 55export class ProcessHistory { 56 processId: number = -1 57 alive: string = '' // 0 alive and 1 dead 58 firstSeen: string = '' 59 firstSeenNumber: number = -1 60 lastSeen: string = '' 61 lastSeenNumber: number = -1 62 processName: string = "" 63 responsibleProcess: string = "" 64 userName: string = "" 65 cpuTime: string = '' 66 cpuTimeNumber: number = -1 67 pss: number = -1 68} 69 70export class LiveProcess { 71 processId: number = -1 72 processName: string = "" 73 responsibleProcess: string = "" 74 userName: string = "" 75 cpu: string = '' 76 threads: number = -1 77 memory: string = '' 78 memoryNumber: number = -1; 79 diskWrite: number = -1 80 diskReads: number = -1 81 cpuTime: string = "" 82 cpuTimeNumber: number = -1; 83} 84 85export class SystemNetworkSummary { 86 startTime: number = -1 87 startTimeStr: string = "" 88 duration: number = -1 89 durationStr: string = "" 90 dataReceived: number = -1 91 dataReceivedStr: string = "" 92 dataReceivedSec: number = -1 93 dataReceivedSecStr: string = "" 94 dataSend: number = -1 95 dataSendStr: string = "" 96 dataSendSec: number = -1 97 dataSendSecStr: string = "" 98 packetsIn: number = -1 99 packetsInStr: string = "" 100 packetsInSec: number = -1 101 packetsInSecStr: string = "" 102 packetsOut: number = -1 103 packetsOutStr: string = "" 104 packetsOutSec: number = -1 105 packetsOutSecStr: string = "" 106} 107 108export class SystemMemorySummary { 109 startTimeStr: string = "0" 110 durationStr: string = "0" 111 durationNumber: number = -1 112 memoryTotal: string = "0"; 113 memFree: string = "0"; 114 buffers: string = "0"; 115 cached: string = "0"; 116 shmem: string = "0"; 117 slab: string = "0"; 118 swapTotal: string = "0"; 119 swapFree: string = "0"; 120 mapped: string = "0"; 121 vmallocUsed: string = "0"; 122 pageTables: string = "0"; 123 kernelStack: string = "0"; 124 active: string = "0"; 125 inactive: string = "0"; 126 unevictable: string = "0"; 127 vmallocTotal: string = "0"; 128 sUnreclaim: string = "0"; 129 kReclaimable: string = "0"; 130 cmaTotal: string = "0"; 131 cmaFree: string = "0"; 132 zram: string = "0"; 133}