D23704: Allow tmpfs in ksysguard disk space monitor

2020-05-10 Thread Jiří Paleček
jpalecek added a comment. @davidedmundson Can you please have a look at this? REPOSITORY R106 KSysguard REVISION DETAIL https://phabricator.kde.org/D23704 To: jpalecek, #plasma, davidedmundson Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas,

D23592: ksysguard: handle multiple mounts to the same mountpoint gracefully

2020-05-10 Thread Jiří Paleček
jpalecek added a comment. Could this be committed please? REPOSITORY R106 KSysguard BRANCH master REVISION DETAIL https://phabricator.kde.org/D23592 To: jpalecek, davidedmundson Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, Zre

D29615: Nice all threads of multithreaded programs

2020-05-10 Thread Jiří Paleček
jpalecek created this revision. jpalecek added reviewers: ahiemstra, davidedmundson. Herald added a project: Plasma. jpalecek requested review of this revision. REVISION SUMMARY Setting process priorities by ksysguard has the flaw that it only sets priority of a single thread of a multithread

D29616: Fix memory errors caused by using dangling pointers to SensorClients in SensorAgent

2020-05-10 Thread Jiří Paleček
jpalecek created this revision. jpalecek added reviewers: davidedmundson, ahiemstra. Herald added a project: Plasma. jpalecek requested review of this revision. REVISION SUMMARY When some SensorClients are destroyed, eg. when KSysguard is closed, they fail to deregister themselves from Sensor

D29617: Renice all threads of a multithreaded process

2020-05-10 Thread Jiří Paleček
jpalecek created this revision. jpalecek added reviewers: Plasma, davidedmundson. Herald added a project: Plasma. jpalecek requested review of this revision. REVISION SUMMARY This is a mirror of D29615 implemented in libksysguard for local processes. All

D29618: Fix case fallback warning

2020-05-10 Thread Jiří Paleček
jpalecek created this revision. jpalecek added reviewers: Plasma, davidedmundson. Herald added a project: Plasma. jpalecek requested review of this revision. REVISION SUMMARY Courtesy of gcc warnings: in decoding of the "ps" reply, the answer would be wrongly used as free memory as well due t

D29616: Fix memory errors caused by using dangling pointers to SensorClients in SensorAgent

2020-05-11 Thread Jiří Paleček
jpalecek added inline comments. INLINE COMMENTS > anthonyfieroni wrote in SensorBrowser.cpp:53 > When you delete the map content, all agents should loose their connections, > no? No, it only deletes the HostInfo structure. See the source

D29616: Fix memory errors caused by using dangling pointers to SensorClients in SensorAgent

2020-05-11 Thread Jiří Paleček
jpalecek added inline comments. INLINE COMMENTS > ahiemstra wrote in SensorBrowser.cpp:53 > I agree with Anthony though, if you delete a hostInfo it _should_ remove its > connection. So it's better to move this code into a destructor for HostInfo. But the host info, at least in its present form

D29616: Fix memory errors caused by using dangling pointers to SensorClients in SensorAgent

2020-05-11 Thread Jiří Paleček
jpalecek updated this revision to Diff 82568. jpalecek added a comment. Move the client deregistering code from SensorBrowserModel to HostInfo Also remove the clear function. After investigating further, I've found out it suffers from the same problem, that it doesn't deregister from t

D29780: Detach sensor shell agent from terminal

2020-05-15 Thread Jiří Paleček
jpalecek created this revision. jpalecek added reviewers: Plasma, davidedmundson. Herald added a project: Plasma. jpalecek requested review of this revision. REVISION SUMMARY When I run ksysgruard from a terminal, I found out it doesn't connect to remote hosts' sensors (tried with localhost, b

D29808: KSysGuard Network Plugin: Don't use std::regex to parse the network files.

2020-05-23 Thread Jiří Paleček
jpalecek added a comment. In D29808#673157 , @sandsmark wrote: > > It's all C code whereas the rest of the helper is C++. It also relies very heavily on magic numbers now. > > > > > I think a much simpler implementation would be to split

D23592: ksysguard: handle multiple mounts to the same mountpoint gracefully

2019-08-30 Thread Jiří Paleček
jpalecek created this revision. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. jpalecek requested review of this revision. REVISION SUMMARY On Linux, it may happen that two mounts are mounted to the same mount point. Two different devices or the same device twice, does

D23593: Don't accept duplicated sensor names from ksysguardd

2019-08-30 Thread Jiří Paleček
jpalecek created this revision. jpalecek added a reviewer: davidedmundson. jpalecek added a project: Plasma. jpalecek requested review of this revision. REVISION SUMMARY It shouldn't happen, but sometimes ksysguardd sends the same sensor name twice or more times. That would result in excessive

D23594: Use sensor index for request ID in SystemMonitorEngine::updateSensors()

2019-08-30 Thread Jiří Paleček
jpalecek created this revision. jpalecek added a project: Plasma. jpalecek requested review of this revision. REVISION SUMMARY When id is -1, the answerReceived function expects the response to be the list of sensors. However, this function sends commands to update values of individual sensors

D23595: Speed up sending request to ksysguardd

2019-08-30 Thread Jiří Paleček
jpalecek created this revision. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. jpalecek requested review of this revision. REVISION SUMMARY While investigating bug 407526, I discovered that most of the time is spent in SensorAgent::sendRequest. This is because it searc

D23704: Allow tmpfs in ksysguard disk space monitor

2019-09-03 Thread Jiří Paleček
jpalecek created this revision. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. jpalecek requested review of this revision. REVISION SUMMARY As tmpfs mounts are more widely used for shared memory in browsers like Chromium and Firefox, there is a need for more and more s

D8673: Sanitize signal handling in ksmserver

2018-04-13 Thread Jiří Paleček
jpalecek updated this revision to Diff 32067. jpalecek added a comment. I finally got round to this. So: - this revision stores the socketpair fds in KSMServer instance, so they can be closed later. - also, it uses the modern QObject::connect syntax with pmfs instead of strings

D8673: Sanitize signal handling in ksmserver

2018-04-13 Thread Jiří Paleček
jpalecek added a comment. In D8673#245716 , @davidedmundson wrote: > Thanks, do you have commit access? Sorry, no. BRANCH master REVISION DETAIL https://phabricator.kde.org/D8673 To: jpalecek, #plasma, davidedmundson Cc: broulik, gr

D8673: Sanitize signal handling in ksmserver

2017-11-05 Thread Jiří Paleček
jpalecek created this revision. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel. REVISION SUMMARY The TERM signal handling in ksmserver invokes functions which are not async-signal safe, like Qt functions and C++ destructors. Moreover,

D8673: Sanitize signal handling in ksmserver

2017-11-05 Thread Jiří Paleček
jpalecek edited the summary of this revision. jpalecek added a reviewer: Plasma. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D8673 To: jpalecek, #plasma Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart

D8673: Sanitize signal handling in ksmserver

2017-11-05 Thread Jiří Paleček
jpalecek edited the summary of this revision. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D8673 To: jpalecek, #plasma Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart

D8673: Sanitize signal handling in ksmserver

2017-11-06 Thread Jiří Paleček
jpalecek added a comment. In https://phabricator.kde.org/D8673#164830, @davidedmundson wrote: > Do the sockets need closing in the destructor? Good point. I assumed the `KSMServer` instance is practically a singleton (being assigned to global `the_server` etc.) which is created on