Documentation
¶
Overview ¶
Copyright 2024 The Scitix Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
View Source
const ( /*-----------------conponent id && name-------------------*/ ComponentIDCPU = "01" ComponentNameCPU = "cpu" ComponentIDMemory = "02" ComponentNameMemory = "memory" ComponentIDNvidia = "03" ComponentNameNvidia = "nvidia" ComponentIDInfiniband = "04" ComponentNameInfiniband = "infiniband" ComponentIDEthernet = "05" ComponentNameEthernet = "ethernet" ComponentIDGpfs = "07" ComponentNameGpfs = "gpfs" ComponentIDDMesg = "10" ComponentNameDmesg = "dmesg" ComponentIDHang = "11" ComponentNameGpuEvents = "gpuevents" ComponentIDPodLog = "12" ComponentNamePodlog = "podlog" ComponentIDHCA = "13" ComponentNameHCA = "hca" ComponentIDPCIE = "14" ComponentNamePCIE = "pcie" ComponentIDSyslog = "15" ComponentNameSyslog = "syslog" ComponentIDTransceiver = "16" ComponentNameTransceiver = "transceiver" /*----------------------checker id------------------------*/ CheckerIDInfinibandFW = "4001" CheckerIDInfinibandNicNum = "4002" CheckerIDInfinibandNicNetDev = "4003" CheckerIDInfinibandPhyState = "4004" CheckerIDInfinibandIBState = "4005" CheckerIDInfinibandPCIEACS = "4006" CheckerIDInfinibandPCIEMRR = "4007" CheckerIDInfinibandPCIESpeed = "4008" CheckerIDInfinibandPCIEWidth = "4009" CheckerIDInfinibandPCIETreeSpeed = "4010" CheckerIDInfinibandPCIETreeWidth = "4011" CheckerIDEthPhyState = "4111" CheckerIDInfinibandOFED = "4012" CheckerIDInfinibandPortSpeed = "4013" CheckerNetOperstate = "4014" CheckerIDDmesg = "4200" CheckerIDPodLog = "4300" CheckerIDHang = "4400" // CPU extended checker IDs CheckerIDClockSyncService = "1300" CheckerIDClockSyncOffset = "1301" CheckerIDCPUMCEUncorrected = "1302" CheckerIDCPUMCECorrected = "1303" // Memory extended checker IDs CheckerIDMemoryECCUncorrected = "2100" CheckerIDMemoryECCCorrected = "2101" CheckerIDMemoryCapacity = "2102" /*----------------------error name------------------------*/ ErrorNameNCCL = "NCCLTimeout" ErrorNameDmesg = "DmesgError" )
View Source
const ( KubeConfigPath = "/etc/kubernetes/kubelet.conf" DefaultAnnoKey = "scitix.ai/sichek" ServiceName = "sichek.service" )
View Source
const ( /*---------------component&checker result level---------------*/ LevelInfo = "info" LevelWarning = "warning" LevelCritical = "critical" LevelFatal = "fatal" /*----------------------component status----------------------*/ StatusNormal = "normal" StatusAbnormal = "abnormal" )
View Source
const ( DefaultUserCfgName = "default_user_config.yaml" DefaultSpecCfgName = "default_spec.yaml" DefaultSpecSuffix = "_spec.yaml" DefaultEventRuleName = "default_event_rules.yaml" DefaultEventRuleSuffix = "_rules.yaml" DefaultProductionPath = "/var/sichek" DefaultProductionCfgPath = "/var/sichek/config" DefaultSnapshotPath = "/var/sichek/data/snapshot.json" // OSS Spec URLs DomesticSpecURL = "https://oss-cn-shanghai-2.siflow.cn/hisys:hisys-sichek-sh/specs" OverseasSpecURL = "https://oss-ap-southeast.scitix.ai/hisys-sichek/specs" )
View Source
const ( Reset = "\033[0m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Purple = "\033[35m" Cyan = "\033[36m" White = "\033[37m" )
View Source
const AllCmdTimeout = 60 * time.Second
View Source
const CmdTimeout = 30 * time.Second
View Source
const DefaultCacheLine int64 = 10000 // Default cache line number for event filter
View Source
const DefaultFileLoaderInterval = 5 * time.Second // Default interval for file loader scheduler
View Source
const IbPerfTestTimeout = 600 * time.Second
View Source
const PadLen = len(Green) + len(Reset)
Variables ¶
View Source
var ( DefaultVersion = "v1" DefaultComponentQueryInterval = time.Duration.Seconds(1) DefaultComponents = []string{ ComponentNameCPU, ComponentNameNvidia, ComponentNameInfiniband, ComponentNameEthernet, ComponentNameGpfs, ComponentNameDmesg, ComponentNamePodlog, ComponentNameGpuEvents, ComponentNameSyslog, ComponentNameTransceiver, } )
View Source
var LevelPriority = map[string]int{ LevelInfo: 1, LevelWarning: 2, LevelCritical: 3, LevelFatal: 4, }
priority map
Functions ¶
func LevelColor ¶ added in v0.7.9
LevelColor returns the ANSI color for a given severity level.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.