oceanbase的日志量太大,撑爆磁盘,修改下日志级别

oceanbase的日志量太大,撑爆磁盘,修改下日志级别:

[admin@lnpg ~]$ obclient -h127.0.0.1 -uroot -P2881 -plinux123
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 3221561020
Server version: OceanBase 3.2.4.1 (r101000052023010822-346aa35c32e99d1b82d713f75f0072c45bdf7aab) (Built Jan  8 2023 22:52:43)

Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

obclient [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| oceanbase          |
| information_schema |
| mysql              |
| SYS                |
| LBACSYS            |
| ORAAUDITOR         |
| test               |
+--------------------+
7 rows in set (0.081 sec)

obclient [(none)]> use oceanbase;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
obclient [oceanbase]> ALTER SYSTEM SET syslog_level=OFF;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'OFF' at line 1
obclient [oceanbase]> SHOW PARAMETERS LIKE '%syslog_level%';
+-------+----------+-----------------+----------+---------------------+-----------+-------+----------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone  | svr_type | svr_ip          | svr_port | name                | data_type | value | info                                                                                                                                   | section  | scope   | source  | edit_level        |
+-------+----------+-----------------+----------+---------------------+-----------+-------+----------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone1 | observer | 192.168.207.143 |     2882 | ob_esi_syslog_level | NULL      | WDIAG | specifies the current level of logging for obesi. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone1 | observer | 192.168.207.143 |     2882 | syslog_level        | NULL      | WDIAG | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels.           | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
+-------+----------+-----------------+----------+---------------------+-----------+-------+----------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
2 rows in set (0.013 sec)

obclient [oceanbase]> ALTER SYSTEM SET syslog_level='sql.*:error, common.*:error';
Query OK, 0 rows affected (0.027 sec)

obclient [oceanbase]> ALTER SYSTEM SET ob_esi_syslog_level='sql.*:error, common.*:error';
Query OK, 0 rows affected (0.028 sec)

obclient [oceanbase]> SHOW PARAMETERS LIKE '%syslog_level%';
+-------+----------+-----------------+----------+---------------------+-----------+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone  | svr_type | svr_ip          | svr_port | name                | data_type | value                       | info                                                                                                                                   | section  | scope   | source  | edit_level        |
+-------+----------+-----------------+----------+---------------------+-----------+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone1 | observer | 192.168.207.143 |     2882 | ob_esi_syslog_level | NULL      | sql.*:error, common.*:error | specifies the current level of logging for obesi. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone1 | observer | 192.168.207.143 |     2882 | syslog_level        | NULL      | sql.*:error, common.*:error | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels.           | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
+-------+----------+-----------------+----------+---------------------+-----------+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
2 rows in set (0.002 sec)

[admin@lnpg log]$ pwd
/home/admin/oceanbase/log
[admin@lnpg log]$ ls -lt
total 362364
-rw-r--r-- 1 admin admin  41844056 Oct 14 14:46 observer.log
-rw-r--r-- 1 admin admin  33424227 Oct 14 14:46 rootservice.log
-rw-r--r-- 1 admin admin   1506607 Oct 14 14:46 obesi-daemon.log
-rw-r--r-- 1 admin admin     21754 Oct 14 14:46 election.log
-rw-r--r-- 1 admin admin       295 Oct 14 14:42 observer.log.wf
-rw-r--r-- 1 admin admin 268462084 Oct 14 14:42 observer.log.20241014144215329

上述修改还是打印出了很多INFO信息 

需要这样改才有效:

obclient [(none)]> ALTER SYSTEM SET syslog_level='ERROR';
Query OK, 0 rows affected (0.026 sec)

obclient [(none)]> ALTER SYSTEM SET ob_esi_syslog_level='ERROR';
Query OK, 0 rows affected (0.025 sec)

obclient [(none)]> SHOW PARAMETERS LIKE '%syslog_level%';
+-------+----------+-----------------+----------+---------------------+-----------+-------+----------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone  | svr_type | svr_ip          | svr_port | name                | data_type | value | info                                                                                                                                   | section  | scope   | source  | edit_level        |
+-------+----------+-----------------+----------+---------------------+-----------+-------+----------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone1 | observer | 192.168.207.143 |     2882 | ob_esi_syslog_level | NULL      | ERROR | specifies the current level of logging for obesi. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone1 | observer | 192.168.207.143 |     2882 | syslog_level        | NULL      | ERROR | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels.           | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
+-------+----------+-----------------+----------+---------------------+-----------+-------+----------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
2 rows in set (0.002 sec)

停止observer服务:

[admin@lnpg log]$ pgrep observer
32239
[admin@lnpg log]$ kill -9 `pgrep observer`


[admin@lnpg log]$ obclient -h127.0.0.1 -uroot -P2881 -plinux123
ERROR 2002 (HY000): Can't connect to MySQL server on '127.0.0.1' (115)
[admin@lnpg log]$ /home/admin/oceanbase/bin/observer
/home/admin/oceanbase/bin/observer
[admin@lnpg log]$ 
[admin@lnpg log]$ obclient -h127.0.0.1 -uroot -P2881 -plinux123
ERROR 2002 (HY000): Can't connect to MySQL server on '127.0.0.1' (115)
[admin@lnpg log]$ obclient -h127.0.0.1 -uroot -P2881 -plinux123
ERROR 2002 (HY000): Can't connect to MySQL server on '127.0.0.1' (115)
[admin@lnpg log]$ obclient -h127.0.0.1 -uroot -P2881 -plinux123
ERROR 2002 (HY000): Can't connect to MySQL server on '127.0.0.1' (115)
[admin@lnpg log]$ pgrep observer
[admin@lnpg log]$ pgrep observer
[admin@lnpg log]$ pgrep observer
[admin@lnpg log]$ obclient -h127.0.0.1 -uroot -P2881 -plinux123
ERROR 2002 (HY000): Can't connect to MySQL server on '127.0.0.1' (115)
[admin@lnpg log]$ ps -ef|grep observer
admin    15555 10446  0 14:48 pts/2    00:00:00 grep --color=auto observer

必须这种方式启动,不能用绝对路径:
[admin@lnpg log]$ cd /home/admin/oceanbase/
[admin@lnpg oceanbase]$ ./bin/observer

./bin/observer
[admin@lnpg oceanbase]$ ps -ef|grep observer
admin    15609     1 99 14:48 ?        00:00:04 ./bin/observer
admin    16597 10446  0 14:48 pts/2    00:00:00 grep --color=auto observer
[admin@lnpg oceanbase]$ obclient -h127.0.0.1 -uroot -P2881 -plinux123
ERROR 1045 (42000): Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)
[admin@lnpg oceanbase]$ obclient -h127.0.0.1 -uroot -P2881 -plinux123
ERROR 1045 (42000): Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)
[admin@lnpg oceanbase]$ ps -ef|grep observer
admin    15609     1 99 14:48 ?        00:00:36 ./bin/observer
admin    16695 10446  0 14:48 pts/2    00:00:00 grep --color=auto observer
[admin@lnpg oceanbase]$ ps -ef|grep observer
admin    15609     1 99 14:48 ?        00:01:10 ./bin/observer
admin    16896 10446  0 14:48 pts/2    00:00:00 grep --color=auto observer
[admin@lnpg oceanbase]$ pgrep observer
15609
[admin@lnpg oceanbase]$ ps -ef|grep 15609
admin    15609     1 99 14:48 ?        00:01:58 ./bin/observer
admin    15672 15609  1 14:48 ?        00:00:00 /home/admin/oceanbase/bin/obesi -d -p 2882 -c 10001
admin    16909 10446  0 14:49 pts/2    00:00:00 grep --color=auto 15609
[admin@lnpg oceanbase]$ netstat -tunlp|grep 288
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:2881            0.0.0.0:*               LISTEN      15609/./bin/observe 
tcp        0      0 0.0.0.0:2882            0.0.0.0:*               LISTEN      15609/./bin/observe 
[admin@lnpg oceanbase]$ obclient -h127.0.0.1 -uroot -P2881 -plinux123
ERROR 1045 (42000): Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)
[admin@lnpg oceanbase]$ obclient -h127.0.0.1 -uroot -P2881 -plinux123
ERROR 1045 (42000): Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)
[admin@lnpg oceanbase]$ pwd
/home/admin/oceanbase
[admin@lnpg oceanbase]$ cd log/
[admin@lnpg log]$ ls -lt|head
total 1140008
-rw-r--r-- 1 admin admin 198392336 Oct 14 14:49 observer.log
-rw-r--r-- 1 admin admin  58051631 Oct 14 14:49 rootservice.log
-rw-r--r-- 1 admin admin   1066049 Oct 14 14:49 election.log
-rw-r--r-- 1 admin admin   1632648 Oct 14 14:49 obesi-daemon.log
-rw-r--r-- 1 admin admin       295 Oct 14 14:48 observer.log.wf
-rw-r--r-- 1 admin admin 268465971 Oct 14 14:48 observer.log.20241014144855728
-rw-r--r-- 1 admin admin       586 Oct 14 14:48 observer.log.wf.20241014144855728
drwxrwxr-x 2 admin admin         6 Oct 14 14:47 run
drwxrwxr-x 2 admin admin        50 Oct 14 14:47 audit
[admin@lnpg log]$ date
Mon Oct 14 14:50:02 CST 2024
[admin@lnpg log]$ tail -f observer.log

[admin@lnpg log]$ obclient -h127.0.0.1 -uroot -P2881 -plinux123
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 3221487644
Server version: OceanBase 3.2.4.1 (r101000052023010822-346aa35c32e99d1b82d713f75f0072c45bdf7aab) (Built Jan  8 2023 22:52:43)

Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

obclient [(none)]> exit
Bye
[admin@lnpg log]$ 

[admin@lnpg oceanbase]$ find ./ -name *config*
./etc/observer.config.bin.history
./etc/observer.config.bin
[admin@lnpg oceanbase]$ more ./etc/observer.config.bin
_enable_oracle_priv_check=True
major_compact_trigger=100
all_server_list=192.168.207.143:2882
__min_full_resource_pool_memory=268435456
min_observer_version=3.2.4.1
syslog_level=sql.*:error, common.*:error
cluster_id=10001
cluster=obdemo
rootservice_list=192.168.207.143:2882:2881
_partition_balance_strategy=standard
enable_one_phase_commit=False
system_memory=1G
memory_limit=20G
zone=zone1
devname=ens192
mysql_port=2881
rpc_port=2882
config_additional_dir=/db/ob/admin/1/obdemo/etc3;/db/ob/admin/log1/obdemo/etc2
datafile_size=10G
data_dir=/home/admin/oceanbase/store/obdemo

 
 
   [admin@lnpg oceanbase]$ pwd
/home/admin/oceanbase

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/448050.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

echarts显示隐藏柱状图柱子的背景色

showBackground: true, //控制是否显示背景色backgroundStyle: {// color: rgba(180, 180, 180, 0.4) //背景色的颜色color: red} 关键代码是 showBackground: true, //控制是否显示背景色 设置为false或者直接而不写就是不显示背景色,默认是不显示背景色 true的时…

IO作业代码

问题 通过 fwrite和 fread去拷贝 文件到另外一个文件上 #include<myhead.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include<errno.h> #include<time.h> int main(int argc, const char *argv[]) { FILE *fp fo…

ES 全文检索完全匹配高亮查询

我们ES会将数据文字进行拆词操作&#xff0c;并将拆解之后的数据保存到倒排索引当中几十使用文字的一部分也能查询到数据&#xff0c;这种检索方式我们就称之为全文检索&#xff0c;ES的查询结果也会倒排索引中去查询匹配 下面的查询结果中输入的词&#xff0c;就是输入小也可…

【量化交易】聚宽安装

安装JQData 更换源&#xff1a; 如果使用的是pip默认的PyPI源&#xff0c;可以尝试更换为一个更快的国内镜像源。例如阿里云、豆瓣等提供的PyPI镜像。 更改方法可以通过设置环境变量或者在pip命令中直接指定&#xff1a; PS C:\Users\bilirjs\Documents> pip config set …

第100+28步 ChatGPT学习:概率校准 Bayesian Calibration

基于Python 3.9版本演示 一、写在前面 最近看了一篇在Lancet子刊《eClinicalMedicine》上发表的机器学习分类的文章&#xff1a;《Development of a novel dementia risk prediction model in the general population: A large, longitudinal, population-based machine-learn…

Qt-窗口对话框相关操作(50)

目录 描述 创建 使用 点击弹出对话框 内存泄漏问题 自定义对话框 纯代码 界面操作 模态和非模态对话框 描述 对话框是 GUI 程序中不可或缺的组成部分。⼀些不适合在主窗⼝实现的功能组件可以设置在对话框中。对话框通常是⼀个顶层窗⼝&#xff0c;出现在程序最上层&am…

2024年腾讯外包面试题(微创公司)

笔试&#xff1a; 1、判断异步执行顺序 console.log(1);setTimeout(()>{Promise.resolve().then(()>{console.log(2);})console.log(3);},0);new Promise ((resolve)>{for(let i0; i<1000;i ){if(i1000){resolve();}}console.log(4);}).then(()>{console.log(5…

高可用之限流 08-leaky bucket漏桶算法

限流系列 开源组件 rate-limit: 限流 高可用之限流-01-入门介绍 高可用之限流-02-如何设计限流框架 高可用之限流-03-Semaphore 信号量做限流 高可用之限流-04-fixed window 固定窗口 高可用之限流-05-slide window 滑动窗口 高可用之限流-06-slide window 滑动窗口 sen…

SCALABLEANDEFFECTIVE IMPLICIT GRAPH NEURALNETWORKS ON LARGEGRAPHS

ICLR24 推荐指数&#xff1a; #paper/⭐⭐ 领域&#xff1a; 大图&#xff0c;图扩展 大概的工作&#xff1a;提出了针对子图的虚拟节点&#xff0c;让所有点都与其相连 相关工作&#xff1a; 传统GNN与Inplicit gnn 传统GNN的传播函数&#xff1a; Z ( l 1 ) ϕ ( W ( …

Karmada核心概念

以下内容为翻译&#xff0c;原文地址 Karmada 是什么&#xff1f; | karmada 一、Karmada核心概念 一&#xff09;什么是Karmada 1、Karmada&#xff1a;开放&#xff0c;多云&#xff0c;多集群Kubernetes业务流程 Karmada (Kubernetes Armada)是一个Kubernetes管理系统&…

【OpenCV】(六)—— 阈值处理

阈值处理&#xff08;Thresholding&#xff09;用于将灰度图像转换为二值图像。通过设定一个或多个阈值&#xff0c;可以将图像中的像素分为不同的类别&#xff0c;通常用于分割前景和背景、简化图像、去除噪声等任务。OpenCV 提供了多种阈值处理方法&#xff0c;下面介绍基本阈…

让AI像人一样思考和使用工具,reAct机制详解

reAct机制详解 reAct是什么reAct的关键要素reAct的思维过程reAct的代码实现查看效果引入依赖&#xff0c;定义模型定义相关工具集合工具创建代理启动测试完整代码 思考 reAct是什么 reAct的核心思想是将**推理&#xff08;Reasoning&#xff09;和行动&#xff08;Acting&…

探索人工智能:深度解析未来科技的核心驱动力

目录 &#x1f354; 人工智能的应用方向 &#x1f354; 人工智能的发展历史 &#x1f354; 人工智能、机器学习、深度学习关系 &#x1f354; 为什么学习机器学习&#xff1f; &#x1f354; 小节 学习目标 &#x1f340; 了解人工智能的应用方向 &#x1f340; 了解人工智…

【千库网-注册安全分析报告】

前言 由于网站注册入口容易被黑客攻击&#xff0c;存在如下安全问题&#xff1a; 暴力破解密码&#xff0c;造成用户信息泄露短信盗刷的安全问题&#xff0c;影响业务及导致用户投诉带来经济损失&#xff0c;尤其是后付费客户&#xff0c;风险巨大&#xff0c;造成亏损无底洞…

iPad备份软件哪个好?好用的苹果备份软件推荐

苹果手机在将数据备份到电脑时&#xff0c;需要通过第三方的管理软件&#xff0c;才可以将手机连接到电脑进行备份。苹果手机备份软件有很多&#xff0c;常用的有&#xff1a;爱思助手、iMazing、iTuns等。那么这三款常用的备份软件究竟哪款更好呢&#xff1f;下面就给大家盘点…

uniapp学习(004-2 组件 Part.2生命周期)

零基础入门uniapp Vue3组合式API版本到咸虾米壁纸项目实战&#xff0c;开发打包微信小程序、抖音小程序、H5、安卓APP客户端等 总时长 23:40:00 共116P 此文章包含第31p-第p35的内容 文章目录 组件生命周期我们主要使用的三种生命周期setup(创建组件时执行)不可以操作dom节点…

Kimi AI助手重大更新:语音通话功能闪亮登场!

Kimi人工智能助手近日发布了一项令人瞩目的重大更新&#xff0c;其中最引人注目的是新增的语音通话功能。这一创新不仅拓展了用户与AI互动的方式&#xff0c;还为学习和工作场景提供了突破性的解决方案。 Ai 智能办公利器 - Ai-321.com 人工智能 - Ai工具集 - 全球热门人工智能…

使用 python 下载 bilibili 视频

本文想要达成的目标为&#xff1a;运行 python 代码之后&#xff0c;在终端输入视频链接&#xff0c;可自动下载高清 1080P 视频并保存到相应文件夹。 具体可分为两大步&#xff1a;首先&#xff0c;使用浏览器开发者工具 F12 获取请求链接相关信息&#xff08;根据 api 接口下…

性能测试持续继承 CICD

目录 一、如何实现性能测试持续继承操作 下载ant 验证ant是否安装成功 二、jmeterant结合 1、我们需要把jmeter中extres 中的ant-jmeter-1.1.1.jar 复制到ant的安装目录中的lib目录中 2、把jmeter中extres中的build.xml 复制到ant的安装目录中的bin目录 3、编辑build.x…

uniapp 设置 tabbar 的 midButton 按钮

效果展示&#xff1a; 中间的国际化没生效&#xff08;忽略就行&#xff09; 示例代码&#xff1a; 然后在 App.vue 中进行监听&#xff1a; <script>export default {onLaunch(e) {// #ifdef APPuni.onTabBarMidButtonTap(()>{console.log("中间按钮点击回调…