diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-10-13 16:03:37 +0200 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-10-19 14:45:39 +0200 |
commit | 96e2a4259eb0cdf279b83d899f805d274d13a94f (patch) | |
tree | 5ba621678c8089032da1ae2721665d8f67b7bb2f /freebsd | |
parent | 0db398d4c3472071b2814505242450cd8f831501 (diff) |
Continue to update generic data in paused mode
Generic data, as CPU and memory usage, are used by Meters.
In paused mode they would stop receiving updates and especially Graph
Meters would stop showing continuous data.
Improves: #214
Closes: #253
Diffstat (limited to 'freebsd')
-rw-r--r-- | freebsd/FreeBSDProcessList.c | 6 | ||||
-rw-r--r-- | freebsd/FreeBSDProcessList.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c index 62969876..aec7e561 100644 --- a/freebsd/FreeBSDProcessList.c +++ b/freebsd/FreeBSDProcessList.c @@ -379,7 +379,7 @@ IGNORE_WCASTQUAL_END return jname; } -void ProcessList_goThroughEntries(ProcessList* this) { +void ProcessList_goThroughEntries(ProcessList* this, bool pauseProcessUpdate) { FreeBSDProcessList* fpl = (FreeBSDProcessList*) this; Settings* settings = this->settings; bool hideKernelThreads = settings->hideKernelThreads; @@ -389,6 +389,10 @@ void ProcessList_goThroughEntries(ProcessList* this) { FreeBSDProcessList_scanMemoryInfo(this); FreeBSDProcessList_scanCPUTime(this); + // in pause mode only gather global data for meters (CPU/memory/...) + if (pauseProcessUpdate) + return; + int count = 0; struct kinfo_proc* kprocs = kvm_getprocs(fpl->kd, KERN_PROC_PROC, 0, &count); diff --git a/freebsd/FreeBSDProcessList.h b/freebsd/FreeBSDProcessList.h index 75f71c12..c5866334 100644 --- a/freebsd/FreeBSDProcessList.h +++ b/freebsd/FreeBSDProcessList.h @@ -62,6 +62,6 @@ char* FreeBSDProcessList_readProcessName(kvm_t* kd, struct kinfo_proc* kproc, in char* FreeBSDProcessList_readJailName(struct kinfo_proc* kproc); -void ProcessList_goThroughEntries(ProcessList* this); +void ProcessList_goThroughEntries(ProcessList* this, bool pauseProcessUpdate); #endif |