From: Michael Tremer Date: Sat, 12 Oct 2024 14:35:57 +0000 (+0000) Subject: cgroup: Parse more stats X-Git-Tag: 0.9.30~1077 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71561e87684d828686839ba72a4eb1231bff32c4;p=pakfire.git cgroup: Parse more stats This is to reduce logging errors when we could not parse a line. Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/cgroup.c b/src/libpakfire/cgroup.c index a7e628b8b..60284f72e 100644 --- a/src/libpakfire/cgroup.c +++ b/src/libpakfire/cgroup.c @@ -926,6 +926,11 @@ static int __pakfire_cgroup_parse_cpu_stats(struct pakfire_cgroup* cgroup, { "system_usec", &stats->system_usec }, { "usage_usec", &stats->usage_usec }, { "user_usec", &stats->user_usec }, + { "nr_periods", &stats->nr_periods }, + { "nr_throttled", &stats->nr_throttled }, + { "throttled_usec", &stats->throttled_usec }, + { "nr_bursts", &stats->nr_bursts }, + { "burst_usec", &stats->burst_usec }, { NULL, NULL }, }; // Find and store value @@ -951,6 +956,7 @@ static int __pakfire_cgroup_parse_memory_stats(struct pakfire_cgroup* cgroup, { "kernel", &stats->kernel }, { "kernel_stack", &stats->kernel_stack }, { "pagetables", &stats->pagetables }, + { "sec_pagetables", &stats->sec_pagetables }, { "percpu", &stats->percpu }, { "sock", &stats->sock }, { "vmalloc", &stats->vmalloc }, @@ -984,6 +990,10 @@ static int __pakfire_cgroup_parse_memory_stats(struct pakfire_cgroup* cgroup, { "pgrefill", &stats->pgrefill }, { "pgscan", &stats->pgscan }, { "pgsteal", &stats->pgsteal }, + { "pgscan_kswapd", &stats->pgscan_kswapd }, + { "pgscan_direct", &stats->pgscan_direct }, + { "pgsteal_kswapd", &stats->pgsteal_kswapd }, + { "pgsteal_direct", &stats->pgsteal_direct }, { "pgactivate", &stats->pgactivate }, { "pgdeactivate", &stats->pgdeactivate }, { "pglazyfree", &stats->pglazyfree }, diff --git a/src/libpakfire/include/pakfire/cgroup.h b/src/libpakfire/include/pakfire/cgroup.h index 9568fdd0a..9f7f1f9e9 100644 --- a/src/libpakfire/include/pakfire/cgroup.h +++ b/src/libpakfire/include/pakfire/cgroup.h @@ -58,6 +58,9 @@ struct pakfire_cgroup_stats { // Amount of memory allocated for page tables unsigned long pagetables; + // Amount of memory allocated for secondary page tables + unsigned long sec_pagetables; + // Amount of memory used for storing per-cpu kernel data structures unsigned long percpu; @@ -159,6 +162,18 @@ struct pakfire_cgroup_stats { // Amount of reclaimed pages unsigned long pgsteal; + // Amount of scanned pages by kswapd + unsigned long pgscan_kswapd; + + // Amount of scanned pages (direct) + unsigned long pgscan_direct; + + // Amount of reclaimed pages by kswapd + unsigned long pgsteal_kswapd; + + // Amount of reclaimed pages (direct) + unsigned long pgsteal_direct; + // Amount of pages moved to the active LRU list unsigned long pgactivate;