-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmonitor_collector developments to improve the Docker-monitoring-Dock…
…er scenario cmonitor_collector: * formalize list of monitored files and dump it as debug log after initialization using new helper get_list_monitored_files() * create CMonitorSystem::sample_memory() using newer FastFileReader method instead of proc_read_numeric_stats_from() * remove slow proc_read_numeric_stats_from() using fopen()+sscanf() * move all checks against "m_nCollectFlags" into each sample_*() function to be coherent with new get_list_monitored_files() * move info FastFileReader some generic parsers to read simple stats from the file * move into "deep" collection mode several per-process KPIs to make the output JSON more compact in general case * fix regression where the first samples would have CPU close to 100% int he "cgroup_tasks" JSON section * share the PID reader between cgroup processes/network stats collector code * get rid of lscpu dependency, not available in the alpine docker image and rather read more kernel files about CPU min/max frequency, NUMA topology, etc * add docker-collecting-docker-stats example cmonitor_chart: * remove use of "lscpu" section from input JSON and instead process the "cpuinfo" section with some logic to produce results similar to the ones of "lscpu" * remove use of "cpu_tot" KPI that was removed
- Loading branch information
Showing
54 changed files
with
2,205 additions
and
6,022 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
FROM alpine:3.14 | ||
# NOTE: the version of Alpine used here must be aligned with the one in Dcokerfile.builder | ||
FROM alpine:3.15 | ||
|
||
# make sure you did run the "cmonitor_musl" target before building this image: | ||
RUN apk add libstdc++ libc6-compat | ||
RUN apk add libstdc++ libc6-compat fmt-dev | ||
COPY cmonitor_collector /usr/bin/ | ||
|
||
ARG SAMPLING_INTERVAL_SEC=60 | ||
ENV SAMPLING_INTERVAL_SEC=${SAMPLING_INTERVAL_SEC} | ||
|
||
# finally run the cmonitor collector | ||
# - in foreground since Docker does not like daemons | ||
# - collect "all_baremetal": in this way we just collect ONLY baremetal performance stats, not the cgroup where cmonitor_collector itself is running! | ||
# - by default collect every 1min | ||
# - put resulting files in /perf folder which is actually a volume shared with the host (see docker run command) | ||
CMD /usr/bin/cmonitor_collector \ | ||
--foreground \ | ||
--sampling-interval=$SAMPLING_INTERVAL_SEC \ | ||
--num-samples=0 \ | ||
--collect=all_baremetal \ | ||
--output-directory /perf | ||
# - put resulting files in /perf folder which is actually a volume shared with the host (see README.md for the docker run command) | ||
ENTRYPOINT ["/usr/bin/cmonitor_collector", "--foreground", "--output-directory", "/perf"] | ||
|
||
LABEL GIT_REPO_URL="https://github.com/f18m/cmonitor" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This is just a small docker used to BUILD the cmonitor_collector utility | ||
|
||
FROM alpine:3.15 | ||
RUN apk update && apk add --no-cache binutils make libgcc musl-dev gcc g++ fmt-dev gtest-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.