当前位置:网站首页>Solve the problem that rsyslog service occupies too much memory
Solve the problem that rsyslog service occupies too much memory
2022-07-27 01:13:00 【Drive the tractor home】

Catalog
3、 ... and 、 terms of settlement
One 、 summary
Use top Command to view memory usage , Find out rsyslogd High memory footprint .

Two 、 screening
1、journalctl -u rsyslog Check the status

2、tail /var/log/messages see messages journal
![]()
perform journalctl --verify The command check found the system log volume file corruption error

3、 ... and 、 terms of settlement
1、 Delete the damaged above journal file
2、 Delete /var/lib/rsyslog/imjournal.state file
3、 modify rsyslogd Restart after the service configuration file rsyslog
vim /usr/lib/systemd/system/rsyslog.service stay Service Add in configuration MemoryAccounting=yes,MemoryMax=80M,MemoryHigh=8M Three to limit service memory usage , As shown below :
[Unit]
Description=System Logging Service
;Requires=syslog.socket
Wants=network.target network-online.target
After=network.target network-online.target
Documentation=man:rsyslogd(8)
Documentation=http://www.rsyslog.com/doc/
[Service]
Type=notify
EnvironmentFile=-/etc/sysconfig/rsyslog
ExecStart=/usr/sbin/rsyslogd -n $SYSLOGD_OPTIONS
Restart=on-failure
UMask=0066
StandardOutput=null
Restart=on-failure
MemoryAccounting=yes
MemoryMax=80M
MemoryHigh=8M
[Install]
WantedBy=multi-user.target
;Alias=syslog.service Usually rsyslogd The size is only 5M, So set the upper memory limit to 8M, Then limit the absolute memory to 80M.
Restart the service
systemctl daemon-reload
systemctl restart rsyslog
--------------------------- Thank you for the compliment !-------------------------------------
边栏推荐
- One of the Flink requirements - processfunction (requirement: alarm if the temperature rises continuously within 30 seconds)
- Li Hongyi machine learning (2017 Edition)_ P6-8: gradient descent
- Verilog的基本语法
- 快来帮你三分钟了解物联网
- Redisson working principle - source code analysis
- 无重复字符的最长子串
- Pytorch tensor data basic operation
- RS485信号的测量
- 浅析ContentValues
- Uni-app 小程序 App 的广告变现之路:Banner 信息流广告
猜你喜欢

Rabbit学习笔记

Applet live broadcast, online live broadcast, live broadcast reward: Tencent cloud mobile live broadcast component mlvb multi scene live broadcast expansion

微信大量下架数字藏品相关小程序:NFT产品究竟是未来还是陷阱?

Li Hongyi machine learning (2017 Edition)_ P21: convolutional neural network CNN

Tencent upgrades the live broadcast function of video Number applet. Tencent's foundation for continuous promotion of live broadcast is this technology called visual cube (mlvb)

Flink sliding window understanding & introduction to specific business scenarios

快来帮你三分钟了解物联网

MLVB 云直播新体验:毫秒级低延迟直播解决方案(附直播性能对比)

In 2022, will there be opportunities for mobile Internet apps and short video live tracks?

李宏毅机器学习(2017版)_P6-8:梯度下降
随机推荐
短视频App开发有哪些必备的功能?
Spark data skew solution
Flink 1.15 implements SQL script to recover data from savepointh
Rabbit learning notes
Scala-模式匹配
Android——LitePal数据库框架的基本用法
5. 合法的括号串
并发编程之生产者消费者模式
Programming method of sparksql
Flink's fault tolerance mechanism (checkpoint)
随着5G越来越普及,我们的生活会受到哪些积极的影响
Li Hongyi machine learning (2017 Edition)_ P14: back propagation
李宏毅机器学习(2017版)_P13:深度学习
adb.exe已停止工作 弹窗问题
How to open ads for profit after uni app develops apps and plug-ins: uni ad
最长公共子串
Verilog过程赋值语句
Flink1.11 SQL local run demo & local webui visual solution
How can Tencent cloud live plug-in mlvb make use of these advantages to become the divine assistant of anchor Live Streaming?
Scala pattern matching