Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package btop for openSUSE:Factory checked in 
at 2022-07-07 12:57:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/btop (Old)
 and      /work/SRC/openSUSE:Factory/.btop.new.1523 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "btop"

Thu Jul  7 12:57:18 2022 rev:20 rq:987270 version:1.2.8+git20220629.102b6db

Changes:
--------
--- /work/SRC/openSUSE:Factory/btop/btop.changes        2022-06-01 
17:35:07.750773921 +0200
+++ /work/SRC/openSUSE:Factory/.btop.new.1523/btop.changes      2022-07-07 
12:57:37.515346586 +0200
@@ -1,0 +2,40 @@
+Wed Jun 29 17:02:08 UTC 2022 - scott.bradn...@suse.com
+
+- Update to version 1.2.8+git20220629.102b6db:
+  * v1.2.8 New features & themes
+  * use Shared::procPath, fix Logger error type
+  * Fixed kernel proc filter clearing issue + optimization
+  * Optimize away clear_kernel_cache() function
+  * Add tomorrow night theme
+  * fix identation
+  * Remove duplicate fstype setter
+  * Remove forgotten debug logger calls
+  * Added support for ZFS pool io stats monitoring
+  * Changed: Disable battery monitoring if it fails instead of exiting
+  * Add everforest-dark-hard.theme
+  * Changed spaces to tabs
+  * Finished kernel proc filtering.
+  * Added a check for filter kernel mode
+  * Added caching for kernel processes.
+  * More indentation
+  * Replaced my spaces with tabs
+  * Indentation fix.
+  * Woops that went unnoticed, didn't it?
+  * Fixed menu description
+  * Added linux label on the config option
+  * Fixed clang-format off labels
+  * Made kernel process filtering more efficient
+  * Replaced $*\s with tabs
+  * Fixed some formatting issues.
+  * Added TUI option for kernel proc filtering.
+  * Moved to correct version of the code
+
+-------------------------------------------------------------------
+Tue Jun 14 14:56:35 UTC 2022 - scott.bradn...@suse.com
+
+- Adjusting '/usr/bin' to '%{_bindir}'
+- Update to version 1.2.7+git20220603.83e9942:
+  * Update README.md
+  * Update btop.desktop
+
+-------------------------------------------------------------------

Old:
----
  btop-1.2.7+git20220528.c3eb02f.tar.gz

New:
----
  btop-1.2.8+git20220629.102b6db.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ btop.spec ++++++
--- /var/tmp/diff_new_pack.4Y35V4/_old  2022-07-07 12:57:38.051347384 +0200
+++ /var/tmp/diff_new_pack.4Y35V4/_new  2022-07-07 12:57:38.055347390 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           btop
-Version:        1.2.7+git20220528.c3eb02f
+Version:        1.2.8+git20220629.102b6db
 Release:        0
 Summary:        Usage and stats for processor, memory, disks, network and 
processes
 License:        Apache-2.0
@@ -47,7 +47,7 @@
 %make_install PREFIX=/usr
 
 %files
-/usr/bin/btop
+%{_bindir}/btop
 %dir %{_datadir}/%{name}
 %dir %{_datadir}/%{name}/themes
 %dir %{_datadir}/icons/hicolor

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.4Y35V4/_old  2022-07-07 12:57:38.095347449 +0200
+++ /var/tmp/diff_new_pack.4Y35V4/_new  2022-07-07 12:57:38.095347449 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/aristocratos/btop</param>
-              <param 
name="changesrevision">c3eb02f27f69f2cd03d5ec9ddc8ce7dc8eda3de8</param></service></servicedata>
+              <param 
name="changesrevision">102b6dbc9d33906319e7c710cf58ba2893d6ec49</param></service></servicedata>
 (No newline at EOF)
 

++++++ btop-1.2.7+git20220528.c3eb02f.tar.gz -> 
btop-1.2.8+git20220629.102b6db.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.2.7+git20220528.c3eb02f/CHANGELOG.md 
new/btop-1.2.8+git20220629.102b6db/CHANGELOG.md
--- old/btop-1.2.7+git20220528.c3eb02f/CHANGELOG.md     2022-05-28 
21:08:30.000000000 +0200
+++ new/btop-1.2.8+git20220629.102b6db/CHANGELOG.md     2022-06-29 
18:59:27.000000000 +0200
@@ -1,3 +1,15 @@
+## v1.2.8
+
+* Added: Support for ZFS pool io stats monitoring, by @simplepad
+
+* Added: Filtering of kernel processes, by @0xJoeMama
+
+* Added: New theme everforest-dark-hard, by @iambeingtracked
+
+* Added: New theme tomorrow-night, by @appuchias
+
+* Changed: Disable battery monitoring if it fails instead of exiting
+
 ## v1.2.7
 
 * Fixed: Disk IO stats for individual partitions instead of whole disk (Linux)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.2.7+git20220528.c3eb02f/README.md 
new/btop-1.2.8+git20220629.102b6db/README.md
--- old/btop-1.2.7+git20220528.c3eb02f/README.md        2022-05-28 
21:08:30.000000000 +0200
+++ new/btop-1.2.8+git20220629.102b6db/README.md        2022-06-29 
18:59:27.000000000 +0200
@@ -171,7 +171,7 @@
 
 For best experience, a terminal with support for:
 
-* 24-bit truecolor ([See list of terminals with truecolor 
support](https://gist.github.com/XVilka/8346728))
+* 24-bit truecolor ([See list of terminals with truecolor 
support](https://github.com//termstandard/colors))
 * 256-color terminals are supported through 24-bit to 256-color conversion 
when setting "truecolor" to False in the options or with "-lc/--low-color" 
arguments.
 * 16 color TTY mode will be activated if a real tty device is detected. Can be 
forced with "-t/--tty_on" arguments.
 * Wide characters (Are sometimes problematic in web-based terminals)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.2.7+git20220528.c3eb02f/btop.desktop 
new/btop-1.2.8+git20220629.102b6db/btop.desktop
--- old/btop-1.2.7+git20220528.c3eb02f/btop.desktop     2022-05-28 
21:08:30.000000000 +0200
+++ new/btop-1.2.8+git20220629.102b6db/btop.desktop     2022-06-29 
18:59:27.000000000 +0200
@@ -1,12 +1,13 @@
 [Desktop Entry]
 Type=Application
 Version=1.0
-Name=btop
+Name=btop++
 GenericName=System Monitor
-Comment=Resource monitor that shows usage and stats for processor, memory, 
disks, network and processes.
+GenericName[it]=Monitor di sistema
+Comment=Resource monitor that shows usage and stats for processor, memory, 
disks, network and processes
+Comment[it]=Monitoraggio delle risorse: mostra utilizzo e statistiche per CPU, 
dischi, rete e processi
 Icon=btop
 Exec=btop
 Terminal=true
 Categories=System;Monitor;ConsoleOnly;
 Keywords=system;process;task
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.2.7+git20220528.c3eb02f/src/btop.cpp 
new/btop-1.2.8+git20220629.102b6db/src/btop.cpp
--- old/btop-1.2.7+git20220528.c3eb02f/src/btop.cpp     2022-05-28 
21:08:30.000000000 +0200
+++ new/btop-1.2.8+git20220629.102b6db/src/btop.cpp     2022-06-29 
18:59:27.000000000 +0200
@@ -60,7 +60,7 @@
                {"#801414", "????????????????????????   ?????????   
????????????????????????????????????        ?????????    ?????????"},
                {"#000000", "?????????????????????    ?????????    
????????????????????? ?????????"},
        };
-       const string Version = "1.2.7";
+       const string Version = "1.2.8";
 
        int coreCount;
        string overlay;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.2.7+git20220528.c3eb02f/src/btop_config.cpp 
new/btop-1.2.8+git20220629.102b6db/src/btop_config.cpp
--- old/btop-1.2.7+git20220528.c3eb02f/src/btop_config.cpp      2022-05-28 
21:08:30.000000000 +0200
+++ new/btop-1.2.8+git20220629.102b6db/src/btop_config.cpp      2022-06-29 
18:59:27.000000000 +0200
@@ -96,6 +96,8 @@
 
                {"proc_left",                   "#* Show proc box on left side 
of screen instead of right."},
 
+        {"proc_filter_kernel",  "#* (Linux) Filter processes tied to the Linux 
kernel(similar behavior to htop)."},
+
                {"cpu_graph_upper",     "#* Sets the CPU stat shown in upper 
half of the CPU graph, \"total\" is always available.\n"
                                                                "#* Select from 
a list of detected attributes from the options menu."},
 
@@ -222,6 +224,7 @@
                {"proc_mem_bytes", true},
                {"proc_info_smaps", false},
                {"proc_left", false},
+        {"proc_filter_kernel", false},
                {"cpu_invert_lower", true},
                {"cpu_single_graph", false},
                {"cpu_bottom", false},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.2.7+git20220528.c3eb02f/src/btop_menu.cpp 
new/btop-1.2.8+git20220629.102b6db/src/btop_menu.cpp
--- old/btop-1.2.7+git20220528.c3eb02f/src/btop_menu.cpp        2022-05-28 
21:08:30.000000000 +0200
+++ new/btop-1.2.8+git20220629.102b6db/src/btop_menu.cpp        2022-06-29 
18:59:27.000000000 +0200
@@ -598,6 +598,11 @@
                                " ",
                                "Will show percentage of total memory",
                                "if False."},
+            {"proc_filter_kernel",
+                "(Linux) Filter kernel processes from output.",
+                "",
+                "Set to 'True' to filter out internal",
+                "processes started by the Linux kernel."},
                }
        };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/btop-1.2.7+git20220528.c3eb02f/src/btop_shared.hpp 
new/btop-1.2.8+git20220629.102b6db/src/btop_shared.hpp
--- old/btop-1.2.7+git20220528.c3eb02f/src/btop_shared.hpp      2022-05-28 
21:08:30.000000000 +0200
+++ new/btop-1.2.8+git20220629.102b6db/src/btop_shared.hpp      2022-06-29 
18:59:27.000000000 +0200
@@ -131,6 +131,7 @@
        struct disk_info {
                std::filesystem::path dev;
                string name;
+               string fstype;
                std::filesystem::path stat = "";
                int64_t total = 0, used = 0, free = 0;
                int used_percent = 0, free_percent = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btop-1.2.7+git20220528.c3eb02f/src/linux/btop_collect.cpp 
new/btop-1.2.8+git20220629.102b6db/src/linux/btop_collect.cpp
--- old/btop-1.2.7+git20220528.c3eb02f/src/linux/btop_collect.cpp       
2022-05-28 21:08:30.000000000 +0200
+++ new/btop-1.2.8+git20220629.102b6db/src/linux/btop_collect.cpp       
2022-06-29 18:59:27.000000000 +0200
@@ -16,6 +16,7 @@
 tab-size = 4
 */
 
+#include <robin_hood.h>
 #include <fstream>
 #include <ranges>
 #include <cmath>
@@ -513,52 +514,57 @@
 
                //? Get paths to needed files and check for valid values on 
first run
                if (batteries.empty() and has_battery) {
-                       if (fs::exists("/sys/class/power_supply")) {
-                               for (const auto& d : 
fs::directory_iterator("/sys/class/power_supply")) {
-                                       //? Only consider online power supplies 
of type Battery or UPS
-                                       //? see kernel docs for details on the 
file structure and contents
-                                       //? 
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power
-                                       battery new_bat;
-                                       fs::path bat_dir;
-                                       try {
-                                               if (not d.is_directory()
-                                                       or not 
fs::exists(d.path() / "type")
-                                                       or not 
fs::exists(d.path() / "present")
-                                                       or 
stoi(readfile(d.path() / "present")) != 1)
+                       try {
+                               if (fs::exists("/sys/class/power_supply")) {
+                                       for (const auto& d : 
fs::directory_iterator("/sys/class/power_supply")) {
+                                               //? Only consider online power 
supplies of type Battery or UPS
+                                               //? see kernel docs for details 
on the file structure and contents
+                                               //? 
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power
+                                               battery new_bat;
+                                               fs::path bat_dir;
+                                               try {
+                                                       if (not d.is_directory()
+                                                               or not 
fs::exists(d.path() / "type")
+                                                               or not 
fs::exists(d.path() / "present")
+                                                               or 
stoi(readfile(d.path() / "present")) != 1)
+                                                               continue;
+                                                       string dev_type = 
readfile(d.path() / "type");
+                                                       if (is_in(dev_type, 
"Battery", "UPS")) {
+                                                               bat_dir = 
d.path();
+                                                               
new_bat.base_dir = d.path();
+                                                               
new_bat.device_type = dev_type;
+                                                       }
+                                               } catch (...) {
+                                                       //? skip power supplies 
not conforming to the kernel standard
                                                        continue;
-                                               string dev_type = 
readfile(d.path() / "type");
-                                               if (is_in(dev_type, "Battery", 
"UPS")) {
-                                                       bat_dir = d.path();
-                                                       new_bat.base_dir = 
d.path();
-                                                       new_bat.device_type = 
dev_type;
                                                }
-                                       } catch (...) {
-                                               //? skip power supplies not 
conforming to the kernel standard
-                                               continue;
-                                       }
 
-                                       if (fs::exists(bat_dir / "energy_now")) 
new_bat.energy_now = bat_dir / "energy_now";
-                                       else if (fs::exists(bat_dir / 
"charge_now")) new_bat.energy_now = bat_dir / "charge_now";
-                                       else new_bat.use_energy = false;
-
-                                       if (fs::exists(bat_dir / 
"energy_full")) new_bat.energy_full = bat_dir / "energy_full";
-                                       else if (fs::exists(bat_dir / 
"charge_full")) new_bat.energy_full = bat_dir / "charge_full";
-                                       else new_bat.use_energy = false;
+                                               if (fs::exists(bat_dir / 
"energy_now")) new_bat.energy_now = bat_dir / "energy_now";
+                                               else if (fs::exists(bat_dir / 
"charge_now")) new_bat.energy_now = bat_dir / "charge_now";
+                                               else new_bat.use_energy = false;
+
+                                               if (fs::exists(bat_dir / 
"energy_full")) new_bat.energy_full = bat_dir / "energy_full";
+                                               else if (fs::exists(bat_dir / 
"charge_full")) new_bat.energy_full = bat_dir / "charge_full";
+                                               else new_bat.use_energy = false;
 
-                                       if (not new_bat.use_energy and not 
fs::exists(bat_dir / "capacity")) {
-                                               continue;
-                                       }
+                                               if (not new_bat.use_energy and 
not fs::exists(bat_dir / "capacity")) {
+                                                       continue;
+                                               }
 
-                                       if (fs::exists(bat_dir / "power_now")) 
new_bat.power_now = bat_dir / "power_now";
-                                       else if (fs::exists(bat_dir / 
"current_now")) new_bat.power_now = bat_dir / "current_now";
+                                               if (fs::exists(bat_dir / 
"power_now")) new_bat.power_now = bat_dir / "power_now";
+                                               else if (fs::exists(bat_dir / 
"current_now")) new_bat.power_now = bat_dir / "current_now";
 
-                                       if (fs::exists(bat_dir / "AC0/online")) 
new_bat.online = bat_dir / "AC0/online";
-                                       else if (fs::exists(bat_dir / 
"AC/online")) new_bat.online = bat_dir / "AC/online";
+                                               if (fs::exists(bat_dir / 
"AC0/online")) new_bat.online = bat_dir / "AC0/online";
+                                               else if (fs::exists(bat_dir / 
"AC/online")) new_bat.online = bat_dir / "AC/online";
 
-                                       batteries[bat_dir.filename()] = new_bat;
-                                       
Config::available_batteries.push_back(bat_dir.filename());
+                                               batteries[bat_dir.filename()] = 
new_bat;
+                                               
Config::available_batteries.push_back(bat_dir.filename());
+                                       }
                                }
                        }
+                       catch (...) {
+                               batteries.clear();
+                       }
                        if (batteries.empty()) {
                                has_battery = false;
                                return {0, 0, ""};
@@ -924,9 +930,9 @@
                                                        
found.push_back(mountpoint);
                                                        if (not 
v_contains(last_found, mountpoint)) redraw = true;
 
-                                                       //? Save mountpoint, 
name, dev path and path to /sys/block stat file
+                                                       //? Save mountpoint, 
name, fstype, dev path and path to /sys/block stat file
                                                        if (not 
disks.contains(mountpoint)) {
-                                                               
disks[mountpoint] = disk_info{fs::canonical(dev, ec), 
fs::path(mountpoint).filename()};
+                                                               
disks[mountpoint] = disk_info{fs::canonical(dev, ec), 
fs::path(mountpoint).filename(), fstype};
                                                                if 
(disks.at(mountpoint).dev.empty()) disks.at(mountpoint).dev = dev;
                                                                #ifdef SNAPPED
                                                                        if 
(mountpoint == "/mnt") disks.at(mountpoint).name = "root";
@@ -941,6 +947,10 @@
                                                                                
else
                                                                                
        disks.at(mountpoint).stat = "/sys/block/" + devname + "/stat";
                                                                                
break;
+                                                                       //? Set 
ZFS stat filepath
+                                                                       } else 
if (fs::exists(Shared::procPath.string() + "/spl/kstat/zfs/" + devname + "/io", 
ec) and access(string(Shared::procPath.string() + "/spl/kstat/zfs/" + devname + 
"/io").c_str(), R_OK) == 0) {
+                                                                               
disks.at(mountpoint).stat = Shared::procPath.string() + "/spl/kstat/zfs/" + 
devname + "/io";
+                                                                               
break;
                                                                        }
                                                                        
devname.resize(devname.size() - 1);
                                                                        c++;
@@ -988,7 +998,7 @@
                                #endif
                                if (swap_disk and has_swap) {
                                        mem.disks_order.push_back("swap");
-                                       if (not disks.contains("swap")) 
disks["swap"] = {"", "swap"};
+                                       if (not disks.contains("swap")) 
disks["swap"] = {"", "swap", "swap"};
                                        disks.at("swap").total = 
mem.stats.at("swap_total");
                                        disks.at("swap").used = 
mem.stats.at("swap_used");
                                        disks.at("swap").free = 
mem.stats.at("swap_free");
@@ -1003,39 +1013,74 @@
                                        #endif
 
                                //? Get disks IO
-                               int64_t sectors_read, sectors_write, io_ticks;
+                               int64_t sectors_read, sectors_write, io_ticks, 
io_ticks_read, io_ticks_write;
                                disk_ios = 0;
                                for (auto& [ignored, disk] : disks) {
                                        if (disk.stat.empty() or 
access(disk.stat.c_str(), R_OK) != 0) continue;
                                        diskread.open(disk.stat);
                                        if (diskread.good()) {
-                                               disk_ios++;
-                                               for (int i = 0; i < 2; i++) { 
diskread >> std::ws; diskread.ignore(SSmax, ' '); }
-                                               diskread >> sectors_read;
-                                               if (disk.io_read.empty())
-                                                       
disk.io_read.push_back(0);
-                                               else
-                                                       
disk.io_read.push_back(max((int64_t)0, (sectors_read - disk.old_io.at(0)) * 
512));
-                                               disk.old_io.at(0) = 
sectors_read;
-                                               while 
(cmp_greater(disk.io_read.size(), width * 2)) disk.io_read.pop_front();
-
-                                               for (int i = 0; i < 3; i++) { 
diskread >> std::ws; diskread.ignore(SSmax, ' '); }
-                                               diskread >> sectors_write;
-                                               if (disk.io_write.empty())
-                                                       
disk.io_write.push_back(0);
-                                               else
-                                                       
disk.io_write.push_back(max((int64_t)0, (sectors_write - disk.old_io.at(1)) * 
512));
-                                               disk.old_io.at(1) = 
sectors_write;
-                                               while 
(cmp_greater(disk.io_write.size(), width * 2)) disk.io_write.pop_front();
-
-                                               for (int i = 0; i < 2; i++) { 
diskread >> std::ws; diskread.ignore(SSmax, ' '); }
-                                               diskread >> io_ticks;
-                                               if (disk.io_activity.empty())
-                                                       
disk.io_activity.push_back(0);
-                                               else
-                                                       
disk.io_activity.push_back(clamp((long)round((double)(io_ticks - 
disk.old_io.at(2)) / (uptime - old_uptime) / 10), 0l, 100l));
-                                               disk.old_io.at(2) = io_ticks;
-                                               while 
(cmp_greater(disk.io_activity.size(), width * 2)) disk.io_activity.pop_front();
+                                               //? ZFS Pool Support
+                                               if (disk.fstype == "zfs") {
+                                                       disk_ios++;
+                                                       for (int i = 0; i < 18; 
i++) { diskread >> std::ws; diskread.ignore(SSmax, ' '); }
+                                                       diskread >> 
sectors_read; // nbytes read
+                                                       if 
(disk.io_read.empty())
+                                                               
disk.io_read.push_back(0);
+                                                       else
+                                                               
disk.io_read.push_back(max((int64_t)0, (sectors_read - disk.old_io.at(0))));
+                                                       disk.old_io.at(0) = 
sectors_read;
+                                                       while 
(cmp_greater(disk.io_read.size(), width * 2)) disk.io_read.pop_front();
+
+                                                       diskread >> 
sectors_write; // nbytes written
+                                                       if 
(disk.io_write.empty())
+                                                               
disk.io_write.push_back(0);
+                                                       else
+                                                               
disk.io_write.push_back(max((int64_t)0, (sectors_write - disk.old_io.at(1))));
+                                                       disk.old_io.at(1) = 
sectors_write;
+                                                       while 
(cmp_greater(disk.io_write.size(), width * 2)) disk.io_write.pop_front();
+
+                                                       for (int i = 0; i < 2; 
i++) { diskread >> std::ws; diskread.ignore(SSmax, ' '); }
+                                                       diskread >> 
io_ticks_write;
+                                                       for (int i = 0; i < 2; 
i++) { diskread >> std::ws; diskread.ignore(SSmax, ' '); }
+                                                       diskread >> 
io_ticks_read;
+                                                       io_ticks = 
io_ticks_write + io_ticks_read;
+                                                       if 
(disk.io_activity.empty())
+                                                               
disk.io_activity.push_back(0);
+                                                       else
+                                                               
disk.io_activity.push_back(clamp((long)round((double)(io_ticks - 
disk.old_io.at(2)) / (uptime - old_uptime) / 10), 0l, 100l));
+                                                       disk.old_io.at(2) = 
io_ticks;
+                                                       while 
(cmp_greater(disk.io_activity.size(), width * 2)) disk.io_activity.pop_front();
+                                               } else {
+                                                       disk_ios++;
+                                                       for (int i = 0; i < 2; 
i++) { diskread >> std::ws; diskread.ignore(SSmax, ' '); }
+                                                       diskread >> 
sectors_read;
+                                                       if 
(disk.io_read.empty())
+                                                               
disk.io_read.push_back(0);
+                                                       else
+                                                               
disk.io_read.push_back(max((int64_t)0, (sectors_read - disk.old_io.at(0)) * 
512));
+                                                       disk.old_io.at(0) = 
sectors_read;
+                                                       while 
(cmp_greater(disk.io_read.size(), width * 2)) disk.io_read.pop_front();
+
+                                                       for (int i = 0; i < 3; 
i++) { diskread >> std::ws; diskread.ignore(SSmax, ' '); }
+                                                       diskread >> 
sectors_write;
+                                                       if 
(disk.io_write.empty())
+                                                               
disk.io_write.push_back(0);
+                                                       else
+                                                               
disk.io_write.push_back(max((int64_t)0, (sectors_write - disk.old_io.at(1)) * 
512));
+                                                       disk.old_io.at(1) = 
sectors_write;
+                                                       while 
(cmp_greater(disk.io_write.size(), width * 2)) disk.io_write.pop_front();
+
+                                                       for (int i = 0; i < 2; 
i++) { diskread >> std::ws; diskread.ignore(SSmax, ' '); }
+                                                       diskread >> io_ticks;
+                                                       if 
(disk.io_activity.empty())
+                                                               
disk.io_activity.push_back(0);
+                                                       else
+                                                               
disk.io_activity.push_back(clamp((long)round((double)(io_ticks - 
disk.old_io.at(2)) / (uptime - old_uptime) / 10), 0l, 100l));
+                                                       disk.old_io.at(2) = 
io_ticks;
+                                                       while 
(cmp_greater(disk.io_activity.size(), width * 2)) disk.io_activity.pop_front();
+                                               }
+                                       } else {
+                                               Logger::debug("Error in 
Mem::collect() : when opening " + (string)disk.stat);
                                        }
                                        diskread.close();
                                }
@@ -1259,6 +1304,8 @@
        int filter_found = 0;
 
        detail_container detailed;
+       constexpr size_t KTHREADD = 2;
+       static robin_hood::unordered_set<size_t> kernels_procs = {KTHREADD};
 
        //* Generate process tree list
        void _tree_gen(proc_info& cur_proc, vector<proc_info>& in_procs, 
vector<std::reference_wrapper<proc_info>>& out_procs, int cur_depth, const bool 
collapsed, const string& filter, bool found=false, const bool no_update=false, 
const bool should_filter=false) {
@@ -1426,6 +1473,7 @@
                const auto& reverse = Config::getB("proc_reversed");
                const auto& filter = Config::getS("proc_filter");
                const auto& per_core = Config::getB("proc_per_core");
+               const auto& should_filter_kernel = 
Config::getB("proc_filter_kernel");
                const auto& tree = Config::getB("proc_tree");
                const auto& show_detailed = Config::getB("show_detailed");
                const size_t detailed_pid = Config::getI("detailed_pid");
@@ -1445,6 +1493,8 @@
                const int cmult = (per_core) ? Shared::coreCount : 1;
                bool got_detailed = false;
 
+               static size_t proc_clear_count = 0;
+
                //* Use pids from last update if only changing filter, sorting 
or tree options
                if (no_update and not current_procs.empty()) {
                        if (show_detailed and detailed_pid != 
detailed.last_pid) _collect_details(detailed_pid, round(uptime), current_procs);
@@ -1453,6 +1503,15 @@
                else {
                        should_filter = true;
 
+                       //? First make sure kernel proc cache is cleared.
+                       if (should_filter_kernel and ++proc_clear_count >= 256) 
{
+                               //? Clearing the cache is used in the event of 
a pid wrap around. 
+                               //? In that event processes that acquire old 
kernel pids would also be filtered out so we need to manually clean the cache 
every now and then.
+                               kernels_procs.clear();
+                               kernels_procs.emplace(KTHREADD);
+                               proc_clear_count = 0;
+                       }
+
                        auto totalMem = Mem::get_totalMem();
                        int totalMem_len = to_string(totalMem >> 10).size();
 
@@ -1498,6 +1557,11 @@
                                if (not isdigit(pid_str[0])) continue;
 
                                const size_t pid = stoul(pid_str);
+                               
+                               if (should_filter_kernel and 
kernels_procs.contains(pid)) {
+                                       continue;
+                               }
+
                                found.push_back(pid);
 
                                //? Check if pid already exists in current_procs
@@ -1630,6 +1694,11 @@
                                catch (const std::out_of_range&) { continue; }
 
                                pread.close();
+                               
+                               if (should_filter_kernel and new_proc.ppid == 
KTHREADD) {
+                                       kernels_procs.emplace(new_proc.pid);
+                                       found.pop_back();
+                               }
 
                                if (x-offset < 24) continue;
 
@@ -1657,7 +1726,7 @@
                                }
                        }
 
-                       //? Clear dead processes from current_procs
+                       //? Clear dead processes from current_procs and remove 
kernel processes if enabled
                        auto eraser = rng::remove_if(current_procs, [&](const 
auto& element){ return not v_contains(found, element.pid); });
                        current_procs.erase(eraser.begin(), eraser.end());
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btop-1.2.7+git20220528.c3eb02f/themes/everforest-dark-hard.theme 
new/btop-1.2.8+git20220629.102b6db/themes/everforest-dark-hard.theme
--- old/btop-1.2.7+git20220528.c3eb02f/themes/everforest-dark-hard.theme        
1970-01-01 01:00:00.000000000 +0100
+++ new/btop-1.2.8+git20220629.102b6db/themes/everforest-dark-hard.theme        
2022-06-29 18:59:27.000000000 +0200
@@ -0,0 +1,93 @@
+# Btop everforest dark hard theme by u/archontop.
+
+# All graphs and meters can be gradients
+# For single color graphs leave "mid" and "end" variable empty.
+# Use "start" and "end" variables for two color gradient
+# Use "start", "mid" and "end" for three color gradient
+
+# Main background, empty for terminal default, need to be empty if you want 
transparent background
+theme[main_bg]="#2b3339"
+
+# Main text color
+theme[main_fg]="#d3c6aa"
+
+# Title color for boxes
+theme[title]="#d3c6aa"
+
+# Highlight color for keyboard shortcuts
+theme[hi_fg]="#e67e80"
+
+# Background color of selected items
+theme[selected_bg]="#4b565c"
+
+# Foreground color of selected items
+theme[selected_fg]="#dbbc7f"
+
+# Color of inactive/disabled text
+theme[inactive_fg]="#2b3339"  
+
+# Color of text appearing on top of graphs, i.e uptime and current network 
graph scaling
+theme[graph_text]="#d3c6aa"
+
+# Misc colors for processes box including mini cpu graphs, details memory 
graph and details status text
+theme[proc_misc]="#a7c080"
+
+# Cpu box outline color
+theme[cpu_box]="#4b565c"
+
+# Memory/disks box outline color
+theme[mem_box]="#4b565c"
+
+# Net up/down box outline color
+theme[net_box]="#4b565c"
+
+# Processes box outline color
+theme[proc_box]="#4b565c"
+
+# Box divider line and small boxes line color
+theme[div_line]="#4b565c"
+
+# Temperature graph colors
+theme[temp_start]="#a7c080"
+theme[temp_mid]="#dbbc7f"
+theme[temp_end]="#f85552"
+
+# CPU graph colors
+theme[cpu_start]="#a7c080"
+theme[cpu_mid]="#dbbc7f"
+theme[cpu_end]="#f85552"
+
+# Mem/Disk free meter
+theme[free_start]="#f85552"
+theme[free_mid]="#dbbc7f"
+theme[free_end]="#a7c080"
+
+# Mem/Disk cached meter
+theme[cached_start]="#7fbbb3"
+theme[cached_mid]="#83c092"
+theme[cached_end]="#a7c080"
+
+# Mem/Disk available meter
+theme[available_start]="#f85552"
+theme[available_mid]="#dbbc7f"
+theme[available_end]="#a7c080"
+
+# Mem/Disk used meter
+theme[used_start]="#a7c080"
+theme[used_mid]="#dbbc7f"
+theme[used_end]="#f85552"
+
+# Download graph colors
+theme[download_start]="#8da101"
+theme[download_mid]="#83c092"
+theme[download_end]="#a7c080"
+
+# Upload graph colors
+theme[upload_start]="#f85552"
+theme[upload_mid]="#dbbc7f"
+theme[upload_end]="#a7c080"
+
+# Process box color gradient for threads, mem and cpu usage
+theme[process_start]="#a7c080"
+theme[process_mid]="#f85552"
+theme[process_end]="#CC241D"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/btop-1.2.7+git20220528.c3eb02f/themes/tomorrow-night.theme 
new/btop-1.2.8+git20220629.102b6db/themes/tomorrow-night.theme
--- old/btop-1.2.7+git20220528.c3eb02f/themes/tomorrow-night.theme      
1970-01-01 01:00:00.000000000 +0100
+++ new/btop-1.2.8+git20220629.102b6db/themes/tomorrow-night.theme      
2022-06-29 18:59:27.000000000 +0200
@@ -0,0 +1,89 @@
+#Nord theme but using the Tomorrow Night palette
+#by Appuchia <cont...@appu.ltd>
+
+# Colors should be in 6 or 2 character hexadecimal or single spaced rgb 
decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
+# example for white: "#ffffff", "#ff" or "255 255 255".
+
+# All graphs and meters can be gradients
+# For single color graphs leave "mid" and "end" variable empty.
+# Use "start" and "end" variables for two color gradient
+# Use "start", "mid" and "end" for three color gradient
+
+# Main background, empty for terminal default, need to be empty if you want 
transparent background
+theme[main_bg]="#1d1f21"
+
+# Main text color
+theme[main_fg]="#c5c8c6"
+
+# Title color for boxes
+theme[title]="#c5c8c6"
+
+# Higlight color for keyboard shortcuts
+theme[hi_fg]="#81beb7"
+
+# Background color of selected item in processes box
+theme[selected_bg]="#282a2e"
+
+# Foreground color of selected item in processes box
+theme[selected_fg]="#c5c8c6"
+
+# Color of inactive/disabled text
+theme[inactive_fg]="#373b41"
+
+# Misc colors for processes box including mini cpu graphs, details memory 
graph and details status text
+theme[proc_misc]="#969896"
+
+# Cpu box outline color
+theme[cpu_box]="#81a2be"
+
+# Memory/disks box outline color
+theme[mem_box]="#81a2be"
+
+# Net up/down box outline color
+theme[net_box]="#81a2be"
+
+# Processes box outline color
+theme[proc_box]="#81a2be"
+
+# Box divider line and small boxes line color
+theme[div_line]="#81a2be"
+
+# Temperature graph colors
+theme[temp_start]="#b5bd68"
+theme[temp_mid]="#f0c674"
+theme[temp_end]="#cc6666"
+
+# CPU graph colors
+theme[cpu_start]="#b5bd68"
+theme[cpu_mid]="#f0c674"
+theme[cpu_end]="#cc6666"
+
+# Mem/Disk free meter
+theme[free_start]="#b5bd68"
+theme[free_mid]="#f0c674"
+theme[free_end]="#cc6666"
+
+# Mem/Disk cached meter
+theme[cached_start]="#b5bd68"
+theme[cached_mid]="#f0c674"
+theme[cached_end]="#cc6666"
+
+# Mem/Disk available meter
+theme[available_start]="#b5bd68"
+theme[available_mid]="#f0c674"
+theme[available_end]="#cc6666"
+
+# Mem/Disk used meter
+theme[used_start]="#b5bd68"
+theme[used_mid]="#f0c674"
+theme[used_end]="#cc6666"
+
+# Download graph colors
+theme[download_start]="#b5bd68"
+theme[download_mid]="#f0c674"
+theme[download_end]="#cc6666"
+
+# Upload graph colors
+theme[upload_start]="#b5bd68"
+theme[upload_mid]="#f0c674"
+theme[upload_end]="#cc6666"

++++++ btop.obsinfo ++++++
--- /var/tmp/diff_new_pack.4Y35V4/_old  2022-07-07 12:57:38.187347586 +0200
+++ /var/tmp/diff_new_pack.4Y35V4/_new  2022-07-07 12:57:38.191347592 +0200
@@ -1,5 +1,5 @@
 name: btop
-version: 1.2.7+git20220528.c3eb02f
-mtime: 1653764910
-commit: c3eb02f27f69f2cd03d5ec9ddc8ce7dc8eda3de8
+version: 1.2.8+git20220629.102b6db
+mtime: 1656521967
+commit: 102b6dbc9d33906319e7c710cf58ba2893d6ec49
 

Reply via email to