Documentation
¶
Overview ¶
-------------------------------------------------------------------------
* * oom_controller.go * OOM controller in k8s environment * * * Copyright (c) 2021, Alibaba Group Holding Limited * 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. * * IDENTIFICATION * plugins/polardb_pg_opensource/resource/process/oom_controller.go *-------------------------------------------------------------------------
-------------------------------------------------------------------------
* * pg_process_collector.go * collect polardb pg process resource * * * Copyright (c) 2021, Alibaba Group Holding Limited * 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. * * IDENTIFICATION * plugins/polardb_pg_opensource/resource/process/pg_process_collector.go *-------------------------------------------------------------------------
Index ¶
Constants ¶
View Source
const MaxTopSize = 3
Variables ¶
View Source
var BackendTypeMap = map[string]string{
"logger": "logger",
"checkpointer": "checkpoint",
"background writer": "bgwriter",
"walwriter": "walwriter",
"autovacuum": "autovacuum",
"archiver": "archiver",
"stats collector": "pgstat",
"walsender": "walsender",
"walreceiver": "walreceiver",
"startup": "startup",
"writer": "bgwriter",
"bgworker": "bgworker",
}
Functions ¶
This section is empty.
Types ¶
type OOMController ¶
type OOMController struct {
// contains filtered or unexported fields
}
func NewOOMController ¶
func NewOOMController() *OOMController
func (*OOMController) Collect ¶
func (c *OOMController) Collect(out map[string]interface{}) error
func (*OOMController) Init ¶
func (c *OOMController) Init(m map[string]interface{}, logger *log.PluginLogger) error
func (*OOMController) Stop ¶
func (c *OOMController) Stop() error
type PgProcessResource ¶
type PgProcessResource struct {
BackendType string
State string
CpuUser uint64
CpuSys uint64
Rss uint64
ReadIOCount uint64
WriteIOCount uint64
ReadIOThroughput uint64
WriteIOThroughput uint64
BlockReadThroughput uint64
BlockWriteThroughput uint64
CpuUserDelta float64
CpuSysDelta float64
ReadIOCountDelta float64
WriteIOCountDelta float64
ReadIOThroughputDelta float64
WriteIOThroughputDelta float64
BlockReadThroughputDelta float64
BlockWriteThroughputDelta float64
Count uint64
}
type PgProcessResourceCollector ¶
type PgProcessResourceCollector struct {
// contains filtered or unexported fields
}
func NewPgProcessResourceCollector ¶
func NewPgProcessResourceCollector() *PgProcessResourceCollector
func (*PgProcessResourceCollector) Collect ¶
func (p *PgProcessResourceCollector) Collect(out map[string]interface{}) error
func (*PgProcessResourceCollector) Init ¶
func (p *PgProcessResourceCollector) Init(m map[string]interface{}, logger *log.PluginLogger) error
func (*PgProcessResourceCollector) Stop ¶
func (p *PgProcessResourceCollector) Stop() error
Click to show internal directories.
Click to hide internal directories.