diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:33:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:34:10 +0000 |
commit | 83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch) | |
tree | 2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/collectors/proc.plugin/proc_pressure.c | |
parent | Releasing debian version 1.47.5-1. (diff) | |
download | netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip |
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/collectors/proc.plugin/proc_pressure.c')
-rw-r--r-- | src/collectors/proc.plugin/proc_pressure.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/collectors/proc.plugin/proc_pressure.c b/src/collectors/proc.plugin/proc_pressure.c index 4037e60ac..c4d4bc2b1 100644 --- a/src/collectors/proc.plugin/proc_pressure.c +++ b/src/collectors/proc.plugin/proc_pressure.c @@ -158,7 +158,7 @@ int do_proc_pressure(int update_every, usec_t dt) { int i; static usec_t next_pressure_dt = 0; - static char *base_path = NULL; + static const char *base_path = NULL; update_every = (update_every < MIN_PRESSURE_UPDATE_EVERY) ? MIN_PRESSURE_UPDATE_EVERY : update_every; pressure_update_every = update_every; @@ -170,9 +170,8 @@ int do_proc_pressure(int update_every, usec_t dt) { return 0; } - if (unlikely(!base_path)) { + if (unlikely(!base_path)) base_path = config_get(CONFIG_SECTION_PLUGIN_PROC_PRESSURE, "base path of pressure metrics", "/proc/pressure"); - } for (i = 0; i < PRESSURE_NUM_RESOURCES; i++) { procfile *ff = resource_info[i].pf; |