Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[System logs]: Improvements to prevent filling /var/log partition #865

Merged
merged 7 commits into from
Aug 10, 2017
Merged

[System logs]: Improvements to prevent filling /var/log partition #865

merged 7 commits into from
Aug 10, 2017

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Aug 4, 2017

  • Force log rotation at size thresholds only (no longer also rotating logs daily), allowing for more consistent archived log size
  • Eliminate remaining duplicate log messages
  • Cron facility now only logs to cron.log (was also logging to syslog)
  • Debug, mail, news and user log facilities only log to syslog; no longer creating separate log files for these facilities
  • Cron job that calls logrotate every minute now uses the main /etc/logrotate.conf file so as to check/rotate all logs every minute, not just the logs specified in the rsyslog file. Also redirecting output of this command to /dev/null to prevent "(CRON) info (No MTA installed, discarding output)" messages in cron.log due to lack of a mail service
  • Delete archive files based on remaining /var/log partition space. Note that this solution currently requires a minimum /var/log partition size of 32MB to function correctly
  • Update sonic-sairedis and sonic-swss submodules to incorporate recording file name changes
  • Add .screen file to .gitignore (unrelated)

/var/log/swss/sairedis.rec
/var/log/swss/swss.rec
{
size 512k
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if 1M would be better, resulting less log files.

Copy link
Contributor Author

@jleveque jleveque Aug 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it would result in less log files total. However, I was trying to find a balance between reasonable log file size and supporting as small a partition as possible, while also maximizing the used space of smaller partitions.

Increasing the file size to 1M will increase the minimum /var/log partition size to ~32MB, but will require that we maintain ~20MB free space to ensure we always keep at least one archived copy of each log and have enough free space to potentially fill all logs before the next rotation (vs. a minimum partition size of ~18MB maintaining ~12MB free space with 512k files). If you don't see a problem with this, I will make the change and test it ASAP.

@jleveque jleveque merged commit 9d5adb9 into sonic-net:master Aug 10, 2017
@jleveque jleveque deleted the improve_syslog_new branch August 10, 2017 23:25
zhenggen-xu pushed a commit to zhenggen-xu/sonic-buildimage that referenced this pull request Oct 17, 2019
* msft_github/master:
  [docker-fpm-quagga]: Manage Quagga processes (zebra, bgpd) using supervisor instead of watchquagga (sonic-net#900)
  Add arista-net initramfs hook (sonic-net#899)
  Add Marvell platform (sonic-net#765)
  [sonic-utilities]: Update submodule to remove pager from CLI utils (sonic-net#897)
  Fixing a couple of issues to enable FRR to run with latest SONiC code. (sonic-net#895)
  Fix the network command for ipv6 vlan interfaces (sonic-net#894)
  Add s8810 32q platform support (sonic-net#867)
  [quagga]: Update sonic-quagga submodule (sonic-net#892)
  [docker-database]: Start rsyslogd to allow supervisor to log to syslog (sonic-net#890)
  [docker-platform-monitor]: Prevent supervisor from logging unexpected exits from processes known to exit in < 1 second (sonic-net#889)
  Update sonic-utilities (sonic-net#887)
  [submodule] update sonic-swss submodule (sonic-net#885)
  [LEDs]: Initialize status and fan LEDs to green on Arista 7050-QX-32/7050-QX-32-S (sonic-net#886)
  [sfputil]: Add support for SFP presence, low-power mode and reset (sonic-net#877)
  [System logs]: Improvements to prevent filling /var/log partition (sonic-net#865)
  Update sonic-utilities pointer to support reload minigraph (sonic-net#871)
  [device/accton]: Update Accton-AS7712-32X (sonic-net#776)
  [ConfigDB] Move all BGP configuration into DB (sonic-net#861)
  [sonic-slave]: Split user commands from generic. (sonic-net#868)
  [platform] Add support for Arista DCS-7260CX3-64 (sonic-net#863)
madhanmellanox pushed a commit to madhanmellanox/sonic-buildimage that referenced this pull request Mar 23, 2020
lguohan pushed a commit that referenced this pull request Apr 29, 2020
* src/sonic-utilities 798ce2f...7ce5b62 (19):
  > [utility] Filter FDB entries (#890)
  > [fast reboot] set a fast-reboot DB flag (#887)
  > [show] Add 'ip/ipv6 bgp network' commands (#888)
  > [Vxlan] : adding show vnet/vxlan cmds (#880)
  > [show][bgp] Use only 'show ip bgp' as the base and use bgp_frr_v4 file for FRR routing stack (#884)
  > Revert "[config] Implement a process level lock (#857)" (#882)
  > [generate_dump] Dump systemd specific information (#602)
  > [config] Implement a process level lock (#857)
  > [fwutil]: Update Command-Reference.md. (#876)
  > Add platform options to 'show techsupport' command (#865)
  > [doc]: add ltgm and jenkins badge (#875)
  > Fix even more Python warnings (#873)
  > [showtech]: dump docker stats (#864)
  > Fix more Python warnings (#869)
  > Fix Python warnings (#867)
  > Fixes bug for PFCWD feature parameters (#838)
  > Explicitly specify command names with underscores (continued) (#852)
  > [watermarkstat] Fix issue of fields overwritten before display (#862)
  > [pfc] Add command line to enable/disable/show PFC (#796)
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this pull request May 10, 2021
Signed-off-by: Shlomi Bitton <shlomibi@mellanox.com>
lguohan pushed a commit that referenced this pull request Aug 18, 2021
For gearbox support on arista_7280cr3mk, the following commit in sonic-sairedis is needed:
2021-07-21 c20321c Kamil Cudnik: [meta] Allow objects with the same key exist on different switches (#865)
lguohan pushed a commit that referenced this pull request Sep 16, 2021
Added logrotate file for wtmp and btmp to override default conf and set size cap as 100K as done in 
PR: #865. For buster this is control by separate file wtmp and btmp.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
qiluo-msft pushed a commit that referenced this pull request Sep 17, 2021
Added logrotate file for wtmp and btmp to override default conf and set size cap as 100K as done in 
PR: #865. For buster this is control by separate file wtmp and btmp.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
judyjoseph pushed a commit that referenced this pull request Sep 27, 2021
Added logrotate file for wtmp and btmp to override default conf and set size cap as 100K as done in 
PR: #865. For buster this is control by separate file wtmp and btmp.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
AidanCopeland pushed a commit to Metaswitch/sonic-buildimage that referenced this pull request Apr 14, 2022
mssonicbld added a commit that referenced this pull request Mar 22, 2024
…omatically (#18434)

#### Why I did it
src/sonic-swss-common
```
* 8e24ced - (HEAD -> master, origin/master, origin/HEAD) Add SWIG GO wrapper for ConfigDBConnector. (#865) (13 hours ago) [Hua Liu]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants