diff --git a/app/src/main/java/eu/faircode/netguard/SinkholeService.java b/app/src/main/java/eu/faircode/netguard/SinkholeService.java
index 03db77d7..24c6aa7b 100644
--- a/app/src/main/java/eu/faircode/netguard/SinkholeService.java
+++ b/app/src/main/java/eu/faircode/netguard/SinkholeService.java
@@ -637,6 +637,25 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
if (filter && loglevel <= Log.WARN) {
int[] count = jni_get_session_count();
remoteViews.setTextViewText(R.id.tvSessions, count[0] + "/" + count[1] + "/" + count[2]);
+
+ File proc = new File("/proc/sys/fs/file-nr");
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new FileReader(proc));
+ String line = br.readLine();
+ String[] filenr = line.split("\\s+");
+ if (filenr.length == 3) {
+ int perc = Integer.parseInt(filenr[0]) * 100 / Integer.parseInt(filenr[2]);
+ remoteViews.setTextViewText(R.id.tvFiles, perc + "%");
+ }
+ } catch (Throwable ignored) {
+ } finally {
+ if (br != null)
+ try {
+ br.close();
+ } catch (IOException ignored) {
+ }
+ }
}
// Show notification
diff --git a/app/src/main/res/layout/traffic.xml b/app/src/main/res/layout/traffic.xml
index 3127056b..9e106242 100644
--- a/app/src/main/res/layout/traffic.xml
+++ b/app/src/main/res/layout/traffic.xml
@@ -68,6 +68,16 @@
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Info"
android:textSize="10sp" />
+
+