-
Bug
-
Resolution: Unresolved
-
Critical
-
dirsrv-12.2
Description of problem:
Server Statistics uses a bunch of shell commands to collect statistics:
https://github.com/389ds/389-ds-base/blob/c69f2691bb9c3933c1ff3f81139011fc7d66b0aa/src/cockpit/389-console/src/lib/monitor/serverMonitor.jsx#L138
For example, netstat is deprecated in favor of ss, and it's not installed by default. We also don't have net-tools as a runtime requirement.
dsconf monitor also shows statistics, and it can extended to support the missing metrics. For example, psutil module in Python can be used to display net connections and memory consumption.
Version-Release number of selected component (if applicable):
cockpit-389-ds-2.2.6-1.module+el9dsrv+17949+63c5b04e.noarch
How reproducible:
always
Steps to Reproduce:
1. Run pspy in terminal
2. In browser click on Monitoring tab
Actual results:
A bunch of processes are spawned by cockpit:
2023/02/20 06:27:21 CMD: UID=0 PID=15250 | /bin/sh -c netstat -anp | grep ':389|:636' | grep ESTABLISHED | grep ns-slapd | wc -l –
2023/02/20 06:27:29 CMD: UID=0 PID=15292 | /bin/sh -c top -n 1 -b -p 8019 | tail -1 –
2023/02/20 06:27:33 CMD: UID=0 PID=15309 | /bin/sh -c awk '/MemTotal/
' /proc/meminfo –
Expected results:
dsconf monitor should be used instead of shell commands
Additional info: