]> git.ipfire.org Git - pakfire.git/commitdiff
cgroup: Parse more stats
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2024 14:35:57 +0000 (14:35 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2024 14:35:57 +0000 (14:35 +0000)
This is to reduce logging errors when we could not parse a line.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/cgroup.c
src/libpakfire/include/pakfire/cgroup.h

index a7e628b8be56810f76f00f51cf945464730b3120..60284f72e40f1e3cebab83db23d7d9e8986a05ec 100644 (file)
@@ -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 },
index 9568fdd0a7f58a94016421b54050837cbddd9677..9f7f1f9e96ae04115c251081c670d11ef67dbc36 100644 (file)
@@ -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;