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.mfbz.cn/a/890952.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Android基于gradle task检查各个module之间资源文件冲突情况

做组件化开发的时候,我们经常会遇到各个不同的module之间资源文件冲突的问题,运行也不报错,但是会出现覆盖的问题,导致运行之后发送错误的效果。 所以我们需要利用一个gradlke 脚本task,来自动化检查资源文件冲突。 …

CST学习笔记(二)Floquet模式激励设置

CST学习笔记(二)Floquet模式激励设置 在CST中我们常常使用Floquet模式来仿真频率选择表面(FSS)或者超材料等,但是我们设置好Zmax的floquet模式数量后,启动仿真,会发现S参数一栏中有很多我们不想要看的S参数&#xff0…

OpenAI Canvas:提升编程与写作效率的全新工作界面

随着人工智能技术的飞速发展,大语言模型(LLM)不仅限于生成文本,还能逐步扩展至编程、设计等任务的支持。近期,OpenAI 推出了一个名为 Canvas 的全新功能,专门用于协助用户进行编程和写作。这一功能与 Claud…

【React】使用脚手架或Vite包两种方式创建react项目

1.使用脚手架搭建React项目: 在终端窗口运行如下命令即可: npx create-react-app react-basic(创建的文件目录) npx:Node.js工具命令,用于查找并执行后续的包命令。 2.使用Vite包创建React项目: 在终端窗口运行如…

【STM32 Blue Pill编程实例】-OLED显示DHT22传感器数据

OLED显示DHT22传感器数据 文章目录 OLED显示DHT22传感器数据1、DHT22介绍2、硬件准备与接线3、模块配置3.1 定时器配置3.2 DHT22引脚配置3.3 OLED配置4、代码实现在本文中,我们将介绍如何将 DHT22 温度和湿度传感器与 STM32 Blue Pill 开发板连接,并使用 HAL 库在 STM32CubeI…

学习底座架构-武汉

1 学习底座架构概述 大脑学习中心-边缘系统 一、当下教育现状 二、什么是学习底座 三、学习底座价值 七、学习底座解决问题的流程 案例:以4R注意力为例 一 注意力问题解决流程 二 注意力问题的危害 三 衡量注意力水平高低的标准 四 注意力问题4大根源 & 2大诱因…

掌握未来技能:亚马逊云科技推出生成式 AI 认证计划!

目录 前言 生成式 AI 的力量 1. 内容创造的无限可能 2. 数据增强和个性化 3. 提高生产力 4. 教育和研究的辅助工具 5. 突破语言障碍 关于亚马逊云科技生成式 AI 认证 1. 认证目标 2. 认证内容 3. 认证优势 如何获得认证 1. 在线学习 2. 实践考试 3.AWS Certifie…

无人机电机故障率骤降:创新设计与六西格玛方法论双赢

项目背景 TBR-100是消费级无人机头部企业推出的主打消费级无人机,凭借其出色的续航能力和卓越的操控性,在市场上获得了广泛认可。在产品运行过程,用户反馈电机故障率偏高,尤其是在飞行一段时间后出现电机过热、损坏以及运行不稳定…

基础入门-Web应用架构搭建漏洞HTTP数据包

网站搭建 这里给一个网站搭建的视频链接,之前又搞过搭建服务器,这里就不再重做了 https://www.bilibili.com/video/BV16A4y1X7vg/?spm_id_from333.337.search-card.all.click&vd_sourcec2c3c616b3ad1faf44a9f6f30a4dbb03 值得注意的是,…

P1320压缩技术(续集版

P1320压缩技术(续集版 感觉这题还是蛮难的对我来说,通过这题我才知道原来字符串输入不碰到空格就会一起输进来 我参考了一写题解自己又写了自己的解法,vs中的scanf_s和scanf()用法不太一样,之前按scanf写法写一直在报错&#xff…

基于springboot+vue实现的酒店在线预订系统

基于springbootvue实现的酒店在线预订系统 (源码L文ppt)4-082 4.2 系统结构设计 构图是系统的体系结构,体系结构是体系结构体系的一部分,体系结构体系是体系结…

Chromium 中chrome.cookies扩展接口c++实现分析

chrome.cookies 使用 chrome.cookies API 查询和修改 Cookie,并在 Cookie 发生更改时收到通知。 更多参考官网定义:chrome.cookies | API | Chrome for Developers (google.cn) 本文以加载一个清理cookies功能扩展为例 https://github.com/Google…

全面讲解C++

数据类型 1.1 基本数据类型 1.1.1 整型(Integer Types) 整型用于表示整数值,分为以下几种类型: int:标准整数类型,通常为4字节(32位)。short:短整型,通常…

集合框架08:LinkedList源码分析、ArrayList和LinkedList区别

视频链接:13.15 LinkedList源码分析_哔哩哔哩_bilibilihttps://www.bilibili.com/video/BV1zD4y1Q7Fw?spm_id_from333.788.videopod.episodes&vd_sourceb5775c3a4ea16a5306db9c7c1c1486b5&p15 13.16 ArrayList和LinkedList区别_哔哩哔哩_bilibilihttps://…

取证之FTK Imager学习笔记

一、FTK Imager制作镜像详细教程 1、文件-创建磁盘镜像 2、参数详解: 1)物理驱动器 整个驱动器,如:识别到的是整块硬盘、U盘等,而不管你分几个分区; 2)逻辑驱动器(L&#xff09…

深入理解Transformer的笔记记录(精简版本)NNLM → Word2Vec

文章的整体介绍顺序为: NNLM → Word2Vec → Seq2Seq → Seq2Seq with Attention → Transformer → Elmo → GPT → BERT 自然语言处理相关任务中要将自然语言交给机器学习中的算法来处理,通常需要将语言数学化,因为计算机机器只认数学符号。向量是人把自然界的东西抽象出…

Redis 实现 查找附近的人 功能

文章目录 概述Redis 中 Geospatial(地理位置)Demo例子总结 概述 使用 Redis 实现“查找附近的人”功能,通常会依赖 Redis 的 Geo(地理位置) 数据类型来存储用户的经纬度,并基于此进行地理范围查询。Redis …

ChatTTS在Windows电脑的本地部署与远程生成音频详细实战指南

文章目录 前言1. 下载运行ChatTTS模型2. 安装Cpolar工具3. 实现公网访问4. 配置ChatTTS固定公网地址 前言 本篇文章主要介绍如何快速地在Windows系统电脑中本地部署ChatTTS开源文本转语音项目,并且我们还可以结合Cpolar内网穿透工具创建公网地址,随时随…

低代码开发技术:驱动MES系统创新与制造业数字化转型的融合之路

低代码开发与生产管理MES系统的融合,是当今制造业数字化转型的一个重要趋势。以下是对这一融合现象的详细分析: 一、低代码开发的概念与特点 低代码开发是一种通过图形化界面和预构建模块来简化应用程序开发过程的方法。它允许开发人员使用拖放组件和最…

请确保已在git上配置你的user.name和user.email

问题:使用vscode在远程服务器上暂存修改报错: 原因:未在远程服务器上配置该项目对应的git的username和useremail 解决方法: 在vscode中新建一个终端 命名: git config --global user.email "youexample.com&qu…