hakandundar34coding / system-monitoring-center

Multi-featured system monitor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting process information when cat command of uutils/coreutils is used

d-enk opened this issue · comments

commented
> flatpak run io.github.hakandundar34coding.system-monitoring-center 

Traceback (most recent call last):
  File "/app/share/system-monitoring-center/systemmonitoringcenter/Processes.py", line 1233, in loop_func
    rows_data_dict = Libsysmon.get_processes_information(process_list, processes_of_user, cpu_usage_divide_by_cores, detail_level, self.rows_data_dict_prev, self.system_boot_time, self.username_uid_dict)
  File "/app/share/system-monitoring-center/systemmonitoringcenter/Libsysmon.py", line 556, in get_processes_information
    pid = int(stat_file_split[0])
ValueError: invalid literal for int() with base 10: '/sbin/init\x00splash\x002'
Traceback (most recent call last):
  File "/app/share/system-monitoring-center/systemmonitoringcenter/MainWindow.py", line 1135, in main_gui_tab_loop
    Processes.loop_func()
  File "/app/share/system-monitoring-center/systemmonitoringcenter/Processes.py", line 1233, in loop_func
    rows_data_dict = Libsysmon.get_processes_information(process_list, processes_of_user, cpu_usage_divide_by_cores, detail_level, self.rows_data_dict_prev, self.system_boot_time, self.username_uid_dict)
  File "/app/share/system-monitoring-center/systemmonitoringcenter/Libsysmon.py", line 556, in get_processes_information
    pid = int(stat_file_split[0])
ValueError: invalid literal for int() with base 10: '/sbin/init\x00splash\x002'

It will be fixed today. Can you share a screenshot of System tab of System Monitoring Center?

commented

image

Is it Flatpak version of the application?

commented

Is it Flatpak version of the application?

Yeah

Can you share output of the following commands?

cat /proc/1/stat
cat /proc/1/status
cat /proc/1/statm
cat /proc/1/cmdline
cat /proc/version
commented
$ cat /proc/1/stat
1 (systemd) S 0 1 1 0 -1 4194560 271496 58376942 168 9052 4944 2847 184538 42616 20 0 1 0 25 173137920 3458 18446744073709551615 1 1 0 0 0 0 671173123 4096 1260 0 0 0 17 5 0 0 0 0 0 0 0 0 0 0 0 0 0
$ cat /proc/1/status
Name:	systemd
Umask:	0000
State:	S (sleeping)
Tgid:	1
Ngid:	0
Pid:	1
PPid:	0
TracerPid:	0
Uid:	0	0	0	0
Gid:	0	0	0	0
FDSize:	512
Groups:	 
NStgid:	1
NSpid:	1
NSpgid:	1
NSsid:	1
VmPeak:	  233444 kB
VmSize:	  169080 kB
VmLck:	       0 kB
VmPin:	       0 kB
VmHWM:	   13832 kB
VmRSS:	   13832 kB
RssAnon:	    6016 kB
RssFile:	    7816 kB
RssShmem:	       0 kB
VmData:	   21312 kB
VmStk:	    1032 kB
VmExe:	     896 kB
VmLib:	    9048 kB
VmPTE:	     100 kB
VmSwap:	       0 kB
HugetlbPages:	       0 kB
CoreDumping:	0
THP_enabled:	1
Threads:	1
SigQ:	1/127009
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	7be3c0fe28014a03
SigIgn:	0000000000001000
SigCgt:	00000001000004ec
CapInh:	0000000000000000
CapPrm:	000001ffffffffff
CapEff:	000001ffffffffff
CapBnd:	000001ffffffffff
CapAmb:	0000000000000000
NoNewPrivs:	0
Seccomp:	0
Seccomp_filters:	0
Speculation_Store_Bypass:	thread vulnerable
SpeculationIndirectBranch:	conditional enabled
Cpus_allowed:	ff
Cpus_allowed_list:	0-7
Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:	0
voluntary_ctxt_switches:	135408
nonvoluntary_ctxt_switches:	5770
$ cat /proc/1/statm
42270 3458 1954 224 0 5586 0
$ cat /proc/1/cmdline
/sbin/initsplash

$ cat /proc/version
Linux version 6.2.0-26-generic (buildd@bos03-amd64-042) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2

Finally, can you share output of the following command?

cat /proc/version /proc/1/status /proc/1/stat /proc/1/statm /proc/1/status /proc/version /proc/1/io /proc/1/cmdline /proc/version /proc/2/stat /proc/2/statm /proc/2/status /proc/version /proc/2/io /proc/2/cmdline /proc/version
commented
# cat /proc/version /proc/1/status /proc/1/stat /proc/1/statm /proc/1/status /proc/version /proc/1/io /proc/1/cmdline /proc/version /proc/2/stat /proc/2/statm /proc/2/status /proc/version /proc/2/io /proc/2/cmdline /proc/version
Linux version 6.2.0-26-generic (buildd@bos03-amd64-042) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2
Name:	systemd
Umask:	0000
State:	S (sleeping)
Tgid:	1
Ngid:	0
Pid:	1
PPid:	0
TracerPid:	0
Uid:	0	0	0	0
Gid:	0	0	0	0
FDSize:	512
Groups:	 
NStgid:	1
NSpid:	1
NSpgid:	1
NSsid:	1
VmPeak:	  233444 kB
VmSize:	  169080 kB
VmLck:	       0 kB
VmPin:	       0 kB
VmHWM:	   13832 kB
VmRSS:	   13832 kB
RssAnon:	    6016 kB
RssFile:	    7816 kB
RssShmem:	       0 kB
VmData:	   21312 kB
VmStk:	    1032 kB
VmExe:	     896 kB
VmLib:	    9048 kB
VmPTE:	     100 kB
VmSwap:	       0 kB
HugetlbPages:	       0 kB
CoreDumping:	0
THP_enabled:	1
Threads:	1
SigQ:	1/127009
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	7be3c0fe28014a03
SigIgn:	0000000000001000
SigCgt:	00000001000004ec
CapInh:	0000000000000000
CapPrm:	000001ffffffffff
CapEff:	000001ffffffffff
CapBnd:	000001ffffffffff
CapAmb:	0000000000000000
NoNewPrivs:	0
Seccomp:	0
Seccomp_filters:	0
Speculation_Store_Bypass:	thread vulnerable
SpeculationIndirectBranch:	conditional enabled
Cpus_allowed:	ff
Cpus_allowed_list:	0-7
Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:	0
voluntary_ctxt_switches:	137525
nonvoluntary_ctxt_switches:	5869
1 (systemd) S 0 1 1 0 -1 4194560 273405 59747792 168 9567 5062 2910 189735 43444 20 0 1 0 25 173137920 3458 18446744073709551615 94406671654912 94406672569613 140725933949216 0 0 0 671173123 4096 1260 1 0 0 17 1 0 0 0 0 0 94406672965264 94406673285404 94406681059328 140725933952796 140725933952814 140725933952814 140725933953005 0
42270 3458 1954 224 0 5586 0
Name:	systemd
Umask:	0000
State:	S (sleeping)
Tgid:	1
Ngid:	0
Pid:	1
PPid:	0
TracerPid:	0
Uid:	0	0	0	0
Gid:	0	0	0	0
FDSize:	512
Groups:	 
NStgid:	1
NSpid:	1
NSpgid:	1
NSsid:	1
VmPeak:	  233444 kB
VmSize:	  169080 kB
VmLck:	       0 kB
VmPin:	       0 kB
VmHWM:	   13832 kB
VmRSS:	   13832 kB
RssAnon:	    6016 kB
RssFile:	    7816 kB
RssShmem:	       0 kB
VmData:	   21312 kB
VmStk:	    1032 kB
VmExe:	     896 kB
VmLib:	    9048 kB
VmPTE:	     100 kB
VmSwap:	       0 kB
HugetlbPages:	       0 kB
CoreDumping:	0
THP_enabled:	1
Threads:	1
SigQ:	1/127009
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	7be3c0fe28014a03
SigIgn:	0000000000001000
SigCgt:	00000001000004ec
CapInh:	0000000000000000
CapPrm:	000001ffffffffff
CapEff:	000001ffffffffff
CapBnd:	000001ffffffffff
CapAmb:	0000000000000000
NoNewPrivs:	0
Seccomp:	0
Seccomp_filters:	0
Speculation_Store_Bypass:	thread vulnerable
SpeculationIndirectBranch:	conditional enabled
Cpus_allowed:	ff
Cpus_allowed_list:	0-7
Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:	0
voluntary_ctxt_switches:	137525
nonvoluntary_ctxt_switches:	5869
Linux version 6.2.0-26-generic (buildd@bos03-amd64-042) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2
rchar: 18211109659
wchar: 2673743416
syscr: 16698922
syscw: 10068666
read_bytes: 1631228928
write_bytes: 2032820224
cancelled_write_bytes: 234291200
/sbin/initsplashLinux version 6.2.0-26-generic (buildd@bos03-amd64-042) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2
2 (kthreadd) S 0 0 0 0 -1 2129984 0 0 0 0 0 17 0 0 20 0 1 0 25 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 1 0 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0
Name:	kthreadd
Umask:	0000
State:	S (sleeping)
Tgid:	2
Ngid:	0
Pid:	2
PPid:	0
TracerPid:	0
Uid:	0	0	0	0
Gid:	0	0	0	0
FDSize:	64
Groups:	 
NStgid:	2
NSpid:	2
NSpgid:	0
NSsid:	0
Threads:	1
SigQ:	1/127009
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	ffffffffffffffff
SigCgt:	0000000000000000
CapInh:	0000000000000000
CapPrm:	000001ffffffffff
CapEff:	000001ffffffffff
CapBnd:	000001ffffffffff
CapAmb:	0000000000000000
NoNewPrivs:	0
Seccomp:	0
Seccomp_filters:	0
Speculation_Store_Bypass:	thread vulnerable
SpeculationIndirectBranch:	conditional enabled
Cpus_allowed:	ff
Cpus_allowed_list:	0-7
Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:	0
voluntary_ctxt_switches:	5051
nonvoluntary_ctxt_switches:	22
Linux version 6.2.0-26-generic (buildd@bos03-amd64-042) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2
rchar: 0
wchar: 0
syscr: 0
syscw: 0
read_bytes: 0
write_bytes: 0
cancelled_write_bytes: 0
Linux version 6.2.0-26-generic (buildd@bos03-amd64-042) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2

I used the command output that you shared. There was no errors when Processes tab is opened.
A screenshot (output of 2 processes is shared):

smc_processes

I will test the application on virtual machine. The same distribution that you use will be used.

Did you modify the source code of the application?
Is it the latest version of the application?

commented

Did you modify the source code of the application?

No

Is it the latest version of the application?

⟩ flatpak info io.github.hakandundar34coding.system-monitoring-center 

System Monitoring Center - Multi-featured system monitor

          ID: io.github.hakandundar34coding.system-monitoring-center
         Ref: app/io.github.hakandundar34coding.system-monitoring-center/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 2.21.1
     License: GPL-3.0
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 12.7 MB
     Runtime: org.gnome.Platform/x86_64/44
         Sdk: org.gnome.Sdk/x86_64/44

      Commit: fab2b75d2e51aac94d2d57851dcbaeea65392a726afb04fbdcea7b1ef32eab3e
      Parent: e17e1e35ebda3087597bfd6799612f8d57563adc377ae9d969f57aa62c02618a
     Subject: Changes for version (v2.21.1) (7cd0cbf2)
        Date: 2023-08-20 15:47:33 +0000

Can you write this code in line 543 in Processes.py in the following directory?
/var/lib/flatpak/app/io.github.hakandundar34coding.system-monitoring-center/current/active/files/share/system-monitoring-center/systemmonitoringcenter

Code:
print(process_data_stat_statm_status)
There are 8 spaces at the beginning of the code.

Result:

smc_code

After that, can you share the output when the application is run by using terminal and Processes tab is opened?

Note: You can close the application just after (1-2 seconds) opening the Processes tab. The output may be very long. You can also direct it to a file by adding > a_file_name.txt at the end of the terminal command.

commented
1 (systemd) S 0 1 1 0 -1 4194560 279816 181024659 168 10154 5322 3056 781792 304198 20 0 1 0 25 173137920 3458 18446744073709551615 1 1 0 0 0 0 671173123 4096 1260 0 0 0 17 6 0 0 0 0 0 0 0 0 0 0 0 0 0
42270 3458 1954 224 0 5586 0
Name:   systemd
Umask:  0000
State:  S (sleeping)
Tgid:   1
Ngid:   0
Pid:    1
PPid:   0
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 512
Groups:  
NStgid: 1
NSpid:  1
NSpgid: 1
NSsid:  1
VmPeak:   233444 kB
VmSize:   169080 kB
VmLck:         0 kB
VmPin:         0 kB
VmHWM:     13832 kB
VmRSS:     13832 kB
RssAnon:            6016 kB
RssFile:            7816 kB
RssShmem:              0 kB
VmData:    21312 kB
VmStk:      1032 kB
VmExe:       896 kB
VmLib:      9048 kB
VmPTE:       100 kB
VmSwap:        0 kB
HugetlbPages:          0 kB
CoreDumping:    0
THP_enabled:    1
Threads:        1
SigQ:   1/127009
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 7be3c0fe28014a03
SigIgn: 0000000000001000
SigCgt: 00000001000004ec
CapInh: 0000000000000000
CapPrm: 000001ffffffffff
CapEff: 000001ffffffffff
CapBnd: 000001ffffffffff
CapAmb: 0000000000000000
NoNewPrivs:     0
Seccomp:        0
Seccomp_filters:        0
Speculation_Store_Bypass:       thread vulnerable
SpeculationIndirectBranch:      conditional enabled
Cpus_allowed:   ff
Cpus_allowed_list:      0-7
Mems_allowed:   00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:      0
voluntary_ctxt_switches:        149274
nonvoluntary_ctxt_switches:     6174

/sbin/initsplash2 (kthreadd) S 0 0 0 0 -1 2129984 0 0 0 0 0 17 0 0 20 0 1 0 25 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0
Name:   kthreadd
Umask:  0000
State:  S (sleeping)
Tgid:   2
Ngid:   0
Pid:    2
PPid:   0
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 64
Groups:  
NStgid: 2
NSpid:  2
NSpgid: 0
NSsid:  0
Threads:        1
SigQ:   1/127009
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: ffffffffffffffff
SigCgt: 0000000000000000
CapInh: 0000000000000000
CapPrm: 000001ffffffffff
CapEff: 000001ffffffffff
CapBnd: 000001ffffffffff
CapAmb: 0000000000000000
NoNewPrivs:     0
Seccomp:        0
Seccomp_filters:        0
Speculation_Store_Bypass:       thread vulnerable
SpeculationIndirectBranch:      conditional enabled
Cpus_allowed:   ff
Cpus_allowed_list:      0-7
Mems_allowed:   00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:      0
voluntary_ctxt_switches:        5210
nonvoluntary_ctxt_switches:     23

Traceback (most recent call last):
  File "/home/denk/Documents/github.com/hakandundar34coding/system-monitoring-center/src/Processes.py", line 1233, in loop_func
    rows_data_dict = Libsysmon.get_processes_information(process_list, processes_of_user, cpu_usage_divide_by_cores, detail_level, self.rows_data_dict_prev, self.system_boot_time, self.username_uid_dict)
  File "/home/denk/Documents/github.com/hakandundar34coding/system-monitoring-center/src/Libsysmon.py", line 558, in get_processes_information
    pid = int(stat_file_split[0])
ValueError: invalid literal for int() with base 10: '/sbin/init\x00splash\x002'
1 (systemd) S 0 1 1 0 -1 4194560 279816 181024659 168 10154 5322 3056 781792 304198 20 0 1 0 25 173137920 3458 18446744073709551615 1 1 0 0 0 0 671173123 4096 1260 0 0 0 17 6 0 0 0 0 0 0 0 0 0 0 0 0 0
42270 3458 1954 224 0 5586 0
Name:   systemd
Umask:  0000
State:  S (sleeping)
Tgid:   1
Ngid:   0
Pid:    1
PPid:   0
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 512
Groups:  
NStgid: 1
NSpid:  1
NSpgid: 1
NSsid:  1
VmPeak:   233444 kB
VmSize:   169080 kB
VmLck:         0 kB
VmPin:         0 kB
VmHWM:     13832 kB
VmRSS:     13832 kB
RssAnon:            6016 kB
RssFile:            7816 kB
RssShmem:              0 kB
VmData:    21312 kB
VmStk:      1032 kB
VmExe:       896 kB
VmLib:      9048 kB
VmPTE:       100 kB
VmSwap:        0 kB
HugetlbPages:          0 kB
CoreDumping:    0
THP_enabled:    1
Threads:        1
SigQ:   1/127009
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 7be3c0fe28014a03
SigIgn: 0000000000001000
SigCgt: 00000001000004ec
CapInh: 0000000000000000
CapPrm: 000001ffffffffff
CapEff: 000001ffffffffff
CapBnd: 000001ffffffffff
CapAmb: 0000000000000000
NoNewPrivs:     0
Seccomp:        0
Seccomp_filters:        0
Speculation_Store_Bypass:       thread vulnerable
SpeculationIndirectBranch:      conditional enabled
Cpus_allowed:   ff
Cpus_allowed_list:      0-7
Mems_allowed:   00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:      0
voluntary_ctxt_switches:        149274
nonvoluntary_ctxt_switches:     6174

/sbin/initsplash2 (kthreadd) S 0 0 0 0 -1 2129984 0 0 0 0 0 17 0 0 20 0 1 0 25 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0
Name:   kthreadd
Umask:  0000
State:  S (sleeping)
Tgid:   2
Ngid:   0
Pid:    2
PPid:   0
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 64
Groups:  
NStgid: 2
NSpid:  2
NSpgid: 0
NSsid:  0
Threads:        1
SigQ:   1/127009
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: ffffffffffffffff
SigCgt: 0000000000000000
CapInh: 0000000000000000
CapPrm: 000001ffffffffff
CapEff: 000001ffffffffff
CapBnd: 000001ffffffffff
CapAmb: 0000000000000000
NoNewPrivs:     0
Seccomp:        0
Seccomp_filters:        0
Speculation_Store_Bypass:       thread vulnerable
SpeculationIndirectBranch:      conditional enabled
Cpus_allowed:   ff
Cpus_allowed_list:      0-7
Mems_allowed:   00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:      0
voluntary_ctxt_switches:        5210
nonvoluntary_ctxt_switches:     23

Traceback (most recent call last):
  File "/home/denk/Documents/github.com/hakandundar34coding/system-monitoring-center/src/MainWindow.py", line 1135, in main_gui_tab_loop
    Processes.loop_func()
  File "/home/denk/Documents/github.com/hakandundar34coding/system-monitoring-center/src/Processes.py", line 1233, in loop_func
    rows_data_dict = Libsysmon.get_processes_information(process_list, processes_of_user, cpu_usage_divide_by_cores, detail_level, self.rows_data_dict_prev, self.system_boot_time, self.username_uid_dict)
  File "/home/denk/Documents/github.com/hakandundar34coding/system-monitoring-center/src/Libsysmon.py", line 558, in get_processes_information
    pid = int(stat_file_split[0])
ValueError: invalid literal for int() with base 10: '/sbin/init\x00splash\x002'

It worked on virtual machine on Ubuntu 22.04.3.

A screenshot:

smc_process2

I found the problem. There is a problem in the command output that you shared. Commandline information is shown in the PID area.

Can you follow these steps?

  • Remove the previous print() code in Processes.py file.
  • Write the following code in line 890 in Processes.py file (there are 4 spaces at the beginning of the code): print(cat_output)
  • Run the application by using the following command: flatpak run io.github.hakandundar34coding.system-monitoring-center > smc_processes_output.txt
  • Open Processes tab and close the application after 1 second.
  • Upload the output file.
commented

I understand what the problem.
There is another cat by uutils/coreutils command one in my $PATH

I have no idea why they outputs are differently. Bug may be

commented

If it's not difficult for you, you could write a reproducer of this problem and write an issue

Can you use the other cat command?

Otherwise, commandline information of a process is shown in the PID area of another process.

Is there a way to call specific cat command on your system?

commented

Is there a way to call specific cat command on your system?

Yes, sure

I'm sorry for taking up your time
Thank you very much

This issue can be closed