Skip to content

Commit ffd7cdf

Browse files
authored
Merge pull request #321 from alutsiuk123/clos-3966-lve-stats3-docs
CLOS-3966: Document switching between lve-stats backends
2 parents 56f54ed + f6aebfd commit ffd7cdf

1 file changed

Lines changed: 109 additions & 0 deletions

File tree

  • docs/cloudlinuxos/cloudlinux_os_components

docs/cloudlinuxos/cloudlinux_os_components/README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,115 @@ You may need to rename `*.rpmsave` files to original ones in order to restore se
108108
You can also use [LVE-stats 2 CLI](/cloudlinuxos/command-line_tools/#lve-stats-2)
109109
:::
110110

111+
### LVE-stats 3 (optimized backend)
112+
113+
Starting with <span class="notranslate">lve-stats 5.0.0</span>, every server gets an optimized
114+
implementation — <span class="notranslate">lve-stats3</span> — installed alongside the original
115+
<span class="notranslate">lve-stats</span>. Both implementations share the same configuration,
116+
database, file layout, command-line tools, and output formats; they differ only in how the work
117+
is performed under the hood.
118+
119+
Once <span class="notranslate">lve-stats3</span> is installed, it becomes the active backend by default.
120+
The usual commands and the <span class="notranslate">`lvestats`</span> systemd service transparently
121+
use the new backend — all existing functionality and integrations continue to work unchanged,
122+
no configuration changes required.
123+
124+
#### What's new
125+
126+
<span class="notranslate">lve-stats3</span> is an optimized implementation of
127+
<span class="notranslate">lve-stats</span> with a noticeably smaller memory and disk footprint
128+
and faster startup.
129+
130+
#### Switching between backends
131+
132+
Both implementations are managed via the Linux <span class="notranslate">`alternatives`</span>
133+
system under the alternative group name <span class="notranslate">`lvestats`</span>. The master
134+
link is <span class="notranslate">`/usr/sbin/lvestats-server`</span>; all other binaries
135+
(<span class="notranslate">`lveinfo`</span>, <span class="notranslate">`lvechart`</span>,
136+
<span class="notranslate">`dbgovchart`</span>, <span class="notranslate">`cloudlinux-top`</span>,
137+
<span class="notranslate">`lve-create-db`</span>,
138+
<span class="notranslate">`lve-read-snapshot`</span>,
139+
<span class="notranslate">`cloudlinux-statsnotifier`</span>,
140+
<span class="notranslate">`cloudlinux-statistics`</span>,
141+
<span class="notranslate">`lve-bursting-info`</span>,
142+
<span class="notranslate">`lve-bursting-cleanup`</span>,
143+
<span class="notranslate">`lvestats-burstwatcher`</span>) follow the master selection
144+
automatically.
145+
146+
##### Check the active backend
147+
148+
<div class="notranslate">
149+
150+
```
151+
# CloudLinux OS / RHEL-family
152+
alternatives --display lvestats
153+
154+
# Ubuntu
155+
update-alternatives --display lvestats
156+
```
157+
158+
</div>
159+
160+
The line <span class="notranslate">`link currently points to ...`</span> shows which backend is
161+
active: a path ending in <span class="notranslate">`.rust`</span> means the new optimized
162+
backend, <span class="notranslate">`.python`</span> means the original backend.
163+
164+
##### Switch to the original backend (Python)
165+
166+
<div class="notranslate">
167+
168+
```
169+
# CloudLinux OS / RHEL-family
170+
alternatives --set lvestats /usr/sbin/lvestats-server.python
171+
172+
# Ubuntu
173+
update-alternatives --set lvestats /usr/sbin/lvestats-server.python
174+
175+
systemctl restart lvestats
176+
```
177+
178+
</div>
179+
180+
##### Switch to the new optimized backend
181+
182+
<div class="notranslate">
183+
184+
```
185+
# CloudLinux OS / RHEL-family
186+
alternatives --set lvestats /usr/sbin/lvestats-server.rust
187+
188+
# Ubuntu
189+
update-alternatives --set lvestats /usr/sbin/lvestats-server.rust
190+
191+
systemctl restart lvestats
192+
```
193+
194+
</div>
195+
196+
##### Restore the default selection
197+
198+
To return to automatic priority-based selection (which prefers the new optimized backend):
199+
200+
<div class="notranslate">
201+
202+
```
203+
# CloudLinux OS / RHEL-family
204+
alternatives --auto lvestats
205+
206+
# Ubuntu
207+
update-alternatives --auto lvestats
208+
209+
systemctl restart lvestats
210+
```
211+
212+
</div>
213+
214+
:::tip Note
215+
Switching the backend does not modify configuration or data. The collected statistics database,
216+
plugin configs, and snapshot files are shared between both backends, so historical data remains
217+
accessible regardless of which one is currently active.
218+
:::
219+
111220
### Configuration
112221

113222
The main configuration file <span class="notranslate">`/etc/sysconfig/lvestats2`</span> contains the following options:

0 commit comments

Comments
 (0)