0%

环境
CentOS 8

什么是 Prometheus

Prometheus 是一套开源的系统监控报警框架。它启发于 Google 的 borgmon 监控系统,由工作在 SoundCloud 的 google 前员工在 2012 年创建,作为社区开源项目进行开发,并于 2015 年正式发布。2016 年,Prometheus 正式加入 Cloud Native Computing Foundation,成为受欢迎度仅次于 Kubernetes 的项目。

阅读全文 »

临时关闭:

1
setenforce 0

永久关闭:

1
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

用法

1
2
3
4
5
6
7
8
# 禁止显示器睡眠
caffeinate -d
# 禁止系统睡眠
caffeinate -is
# 当1000号进程存在时不睡眠
caffeinate -w 1000
# 1小时内不睡眠
caffeinate -t 3600
阅读全文 »

创建

LIST分区

1
2
3
4
5
6
7
8
CREATE TABLE `test` (
`date` int(11) NOT NULL DEFAULT '0' COMMENT 'date',
PRIMARY KEY (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
PARTITION BY LIST (`date`)
(
PARTITION P_20191201 VALUES IN (20191201)
);
阅读全文 »