0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-28 06:32:30 +00:00

fix(apps.plugin): fix debug msg spam on macOS/freeBSD ()

This commit is contained in:
Ilya Mashchenko 2024-10-10 12:36:44 +03:00 committed by GitHub
parent 402227a8c4
commit d05e98941a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions
src/collectors/apps.plugin

View file

@ -291,7 +291,7 @@ bool apps_os_read_pid_stat_freebsd(struct pid_stat *p, void *ptr) {
usec_t started_ut = timeval_usec(&proc_info->ki_start);
p->values[PDF_UPTIME] = (system_current_time_ut > started_ut) ? (system_current_time_ut - started_ut) / USEC_PER_SEC : 0;
if(unlikely(debug_enabled || p->target))
if(unlikely(debug_enabled))
debug_log_int("READ PROC/PID/STAT: %s/proc/%d/stat, process: '%s' on target '%s' (dt=%llu) VALUES: utime=" KERNEL_UINT_FORMAT ", stime=" KERNEL_UINT_FORMAT ", cutime=" KERNEL_UINT_FORMAT ", cstime=" KERNEL_UINT_FORMAT ", minflt=" KERNEL_UINT_FORMAT ", majflt=" KERNEL_UINT_FORMAT ", cminflt=" KERNEL_UINT_FORMAT ", cmajflt=" KERNEL_UINT_FORMAT ", threads=%d",
netdata_configured_host_prefix, p->pid, pid_stat_comm(p), (p->target)?string2str(p->target->name):"UNSET",
p->stat_collected_usec - p->last_stat_collected_usec,

View file

@ -242,7 +242,7 @@ bool apps_os_read_pid_stat_macos(struct pid_stat *p, void *ptr) {
// Note: Some values such as guest time, cutime, cstime, etc., are not directly available in MacOS.
// You might need to approximate or leave them unset depending on your needs.
if(unlikely(debug_enabled || p->target)) {
if(unlikely(debug_enabled)) {
debug_log_int("READ PROC/PID/STAT for MacOS: process: '%s' on target '%s' VALUES: utime=" KERNEL_UINT_FORMAT ", stime=" KERNEL_UINT_FORMAT ", minflt=" KERNEL_UINT_FORMAT ", majflt=" KERNEL_UINT_FORMAT ", threads=%d",
pid_stat_comm(p), (p->target) ? string2str(p->target->name) : "UNSET",
p->values[PDF_UTIME],