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 (#18743)
This commit is contained in:
parent
402227a8c4
commit
d05e98941a
2 changed files with 2 additions and 2 deletions
src/collectors/apps.plugin
|
@ -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,
|
||||
|
|
|
@ -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],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue