Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
410 views
in Technique[技术] by (71.8m points)

ubuntu 18.04 - Logwatch is too noisy

I've been using Logwatch for at least 12 years, but since I've moved to Ubuntu 18.04 I've gotten soooo annoyed about the daily e-mail is listing 37 /snap in the filesystem check:

Filesystem      Size  Used Avail Use% Mounted on
 /dev/nvme0n1p2  439G  268G  149G  65% /
 /dev/loop0       83M   83M     0 100% /snap/shotcut/119
 /dev/loop1      234M  234M     0 100% /snap/gimp/322
 /dev/loop3      291M  291M     0 100% /snap/vlc/1620
 /dev/loop4      218M  218M     0 100% /snap/gnome-3-34-1804/60
 /dev/loop2      256K  256K     0 100% /snap/gtk2-common-themes/13
etc...

I have looked for a solution before without luck and I've been looking in the logwatch files, I couldn't find any settings to do this.

question from:https://stackoverflow.com/questions/65875479/logwatch-is-too-noisy

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I looked in /usr/share/logwatch/scripts/services/zz-disk_space, where the df command is:

df -h -x tmpfs -x devtmpfs -x udf -x iso9660

Filesystem                         Size  Used Avail Use% Mounted on
/dev/nvme0n1p2                     439G  268G  150G  65% /
/dev/loop0                          83M   83M     0 100% /snap/shotcut/119
/dev/loop1                         234M  234M     0 100% /snap/gimp/322
/dev/loop3                         291M  291M     0 100% /snap/vlc/1620
etc... (37 of those in total)

By adding '-x squashfs' i get what i want:

df -h -x tmpfs -x devtmpfs -x udf -x iso9660 -x squashfs

Filesystem                         Size  Used Avail Use% Mounted on
/dev/nvme0n1p2                     439G  268G  150G  65% /
/dev/sda                           3.6T  580G  2.9T  17% /backup
/dev/nvme0n1p1                     511M  7.4M  504M   2% /boot/efi
//192.168.0.200/nas-office/backup  1.9T  723G  1.2T  39% /mnt/nas

Excellent!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...