summaryrefslogtreecommitdiffstats
path: root/darwin
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-10-13 16:03:37 +0200
committerChristian Göttsche <cgzones@googlemail.com>2020-10-19 14:45:39 +0200
commit96e2a4259eb0cdf279b83d899f805d274d13a94f (patch)
tree5ba621678c8089032da1ae2721665d8f67b7bb2f /darwin
parent0db398d4c3472071b2814505242450cd8f831501 (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 'darwin')
-rw-r--r--darwin/DarwinProcessList.c6
-rw-r--r--darwin/DarwinProcessList.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/darwin/DarwinProcessList.c b/darwin/DarwinProcessList.c
index 10d0697f..f6f08b50 100644
--- a/darwin/DarwinProcessList.c
+++ b/darwin/DarwinProcessList.c
@@ -144,7 +144,7 @@ void ProcessList_delete(ProcessList* this) {
free(this);
}
-void ProcessList_goThroughEntries(ProcessList* super) {
+void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
DarwinProcessList *dpl = (DarwinProcessList *)super;
bool preExisting = true;
struct kinfo_proc *ps;
@@ -158,6 +158,10 @@ void ProcessList_goThroughEntries(ProcessList* super) {
ProcessList_getVMStats(&dpl->vm_stats);
openzfs_sysctl_updateArcStats(&dpl->zfs);
+ // in pause mode only gather global data for meters (CPU/memory/...)
+ if (pauseProcessUpdate)
+ return;
+
/* Get the time difference */
dpl->global_diff = 0;
for(int i = 0; i < dpl->super.cpuCount; ++i) {
diff --git a/darwin/DarwinProcessList.h b/darwin/DarwinProcessList.h
index 58102d35..44a847dc 100644
--- a/darwin/DarwinProcessList.h
+++ b/darwin/DarwinProcessList.h
@@ -51,6 +51,6 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, ui
void ProcessList_delete(ProcessList* this);
-void ProcessList_goThroughEntries(ProcessList* super);
+void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate);
#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy