From ad5be08a0703659e1b90ec4a5c6ff58a42660bae Mon Sep 17 00:00:00 2001 From: Simon Levermann Date: Wed, 23 Oct 2019 09:06:03 +0200 Subject: Ignore some non-interesting filesystem types Generally, how much space we have in squashfs, or tmpfs shouldn't interest us. This becomes more relevant in distros like Ubuntu, where snaps are a thing, and each snap mounts their own FS in a squashfs that is always full, thus falsifying the output of sysinfo. --- plugins/sysinfo/shared/df.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/sysinfo/shared/df.c b/plugins/sysinfo/shared/df.c index ce0760a6..bb2c2131 100644 --- a/plugins/sysinfo/shared/df.c +++ b/plugins/sysinfo/shared/df.c @@ -26,7 +26,7 @@ int xs_parse_df(gint64 *out_total, gint64 *out_free) FILE *pipe; char buffer[bsize]; - pipe = popen("df -k -l -P", "r"); + pipe = popen("df -k -l -P --exclude-type=squashfs --exclude-type=devtmpfs --exclude-type=tmpfs", "r"); if(pipe==NULL) return 1; -- cgit 1.4.1