elvetemedve / gnome-shell-extension-system-monitor

Gnome Shell extension for displaying resource usage
GNU General Public License v3.0
87 stars 15 forks source link

Fix process list by CPU usage #28

Closed elvetemedve closed 7 years ago

elvetemedve commented 7 years ago

Time values returned by glibtop_proc_time() are absolute CPU time counting from the start time of a process. Sorting by this value results in a process list showing the oldest and most CPU hungry programs. Becase we interested in current usage, relative time has to be calculated first and sorted secondly. In addition to that this commit reverts filtering for system processes, which change was added in the previous release. To filter out kernel processes, it simply rejects processes with empty argument list, which is the case for kernel module processes (e.g. [kworker/4:0]).

Resolves issue https://github.com/elvetemedve/gnome-shell-extension-system-monitor/issues/27.