diff --git a/docs/cloudlinuxos/cloudlinux_os_components/README.md b/docs/cloudlinuxos/cloudlinux_os_components/README.md index f6e7c0b09..5e73a597b 100644 --- a/docs/cloudlinuxos/cloudlinux_os_components/README.md +++ b/docs/cloudlinuxos/cloudlinux_os_components/README.md @@ -108,6 +108,115 @@ You may need to rename `*.rpmsave` files to original ones in order to restore se You can also use [LVE-stats 2 CLI](/cloudlinuxos/command-line_tools/#lve-stats-2) ::: +### LVE-stats 3 (optimized backend) + +Starting with lve-stats 5.0.0, every server gets an optimized +implementation — lve-stats3 — installed alongside the original +lve-stats. Both implementations share the same configuration, +database, file layout, command-line tools, and output formats; they differ only in how the work +is performed under the hood. + +Once lve-stats3 is installed, it becomes the active backend by default. +The usual commands and the `lvestats` systemd service transparently +use the new backend — all existing functionality and integrations continue to work unchanged, +no configuration changes required. + +#### What's new + +lve-stats3 is an optimized implementation of +lve-stats with a noticeably smaller memory and disk footprint +and faster startup. + +#### Switching between backends + +Both implementations are managed via the Linux `alternatives` +system under the alternative group name `lvestats`. The master +link is `/usr/sbin/lvestats-server`; all other binaries +(`lveinfo`, `lvechart`, +`dbgovchart`, `cloudlinux-top`, +`lve-create-db`, +`lve-read-snapshot`, +`cloudlinux-statsnotifier`, +`cloudlinux-statistics`, +`lve-bursting-info`, +`lve-bursting-cleanup`, +`lvestats-burstwatcher`) follow the master selection +automatically. + +##### Check the active backend + +
+ +``` +# CloudLinux OS / RHEL-family +alternatives --display lvestats + +# Ubuntu +update-alternatives --display lvestats +``` + +
+ +The line `link currently points to ...` shows which backend is +active: a path ending in `.rust` means the new optimized +backend, `.python` means the original backend. + +##### Switch to the original backend (Python) + +
+ +``` +# CloudLinux OS / RHEL-family +alternatives --set lvestats /usr/sbin/lvestats-server.python + +# Ubuntu +update-alternatives --set lvestats /usr/sbin/lvestats-server.python + +systemctl restart lvestats +``` + +
+ +##### Switch to the new optimized backend + +
+ +``` +# CloudLinux OS / RHEL-family +alternatives --set lvestats /usr/sbin/lvestats-server.rust + +# Ubuntu +update-alternatives --set lvestats /usr/sbin/lvestats-server.rust + +systemctl restart lvestats +``` + +
+ +##### Restore the default selection + +To return to automatic priority-based selection (which prefers the new optimized backend): + +
+ +``` +# CloudLinux OS / RHEL-family +alternatives --auto lvestats + +# Ubuntu +update-alternatives --auto lvestats + +systemctl restart lvestats +``` + +
+ +:::tip Note +Switching the backend does not modify configuration or data. The collected statistics database, +plugin configs, and snapshot files are shared between both backends, so historical data remains +accessible regardless of which one is currently active. +::: + ### Configuration The main configuration file `/etc/sysconfig/lvestats2` contains the following options: