Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look into libsysstat/libstatgrab situation #704

Closed
jleclanche opened this issue Jun 20, 2015 · 15 comments
Closed

Look into libsysstat/libstatgrab situation #704

jleclanche opened this issue Jun 20, 2015 · 15 comments

Comments

@jleclanche
Copy link
Member

  • Figure out what can be dropped in favour of KF5::Solid
  • Figure out what functionality, if any, is still needed in our current libraries
  • If there's any remaining, see whether we can simply do without that functionality, as their use is limited to lxqt-panel.
@paulolieuthier
Copy link
Contributor

We actually depend on lm_sensors as well, in lxqt-panel's plugin-sensors.

@paulolieuthier
Copy link
Contributor

@paulolieuthier
Copy link
Contributor

This is the situation:

  • The sensors plugin depends on lm_sensors.
  • The network monitor plugin depends on libstatgrab.
  • The sysstat plugin depends on libsysstat.

I think we should choose libsysstat or libstatgrab to provide information for both the sysstat and network plugins. I don't think these two libraries can do what lm_sensors does.

@kuzmas what do you think? I saw your email (linked above), but it's been been two years since that and libstatgrab seems to have matured.

@kuzmas
Copy link
Contributor

kuzmas commented Jun 24, 2015

@paulolieuthier sorry, I haven't been following libstatgrab or lm_sensors features for the last two years.
What I can say for sure is that libsysstat can produce synchronised graphs of cpu, memory, swap and network load. Can lm_sensors or libstatgrab do this? If yes - ditch libsysstat.

tl;dr: if a plugin+library can do something unique then it's better to keep them.

@jleclanche
Copy link
Member Author

@kuzmas agreed, if there's no alternative, we can keep maintaining it. But if it's available in a kf5 or some such, I'd rather we drop it. Nobody is working on it so it just goes unmaintained.

@paulolieuthier
Copy link
Contributor

There is yet another plugin, cpu load, that depends on libstatgrab. I tried porting the network monitor plugin to libsysstat, but the library lacks a fundamental feature: show the global statistics. It only signals the change, with no information about the accumulated resource usage. To put it more clearly: one can set an interval and get updates of how many bytes were transferred and received in each interval. But one can't get information about how much was transmitted/received since computer startup.

That information is provided easily by libstatgrab. Sure it can be added to libsysstat with no much effort. And it's nice a Qt-based library around. But it means maintenance cost for us. Besides, libstatgrab is very portable and have information about processes, users, disks, filesystems etc.

I'll start porting the sysstat plugin to libstatgrab.

@jleclanche
Copy link
Member Author

To put it more clearly: one can set an interval and get updates of how many bytes were transferred and received in each interval.

  1. Is that possible?
  2. Is that even something we want? I think it's OK to display stats since lxqt startup.

@paulolieuthier
Copy link
Contributor

Is that possible?

Yes, both libstatgrab and libsysstat do that by reading /proc/net/dev. It's simple. The problem is that libsysstat only gives the additions on the previous reads.

Is that even something we want? I think it's OK to display stats since lxqt startup.

Yes, we want it. The network monitor plugin can switch its icon depending on whether there has or hasn't been transmitted/received bytes in the previous interval.

@jleclanche
Copy link
Member Author

Yes, we want it. The network monitor plugin can switch its icon depending on whether there has or hasn't been transmitted/received bytes in the previous interval.

That's not a good enough reason tbh

@paulolieuthier
Copy link
Contributor

That's not a good enough reason tbh

What do you mean? Isn't this the core feature of the network monitor plugin (besides showing the stats since startup, which is in a popup)?

@paulolieuthier
Copy link
Contributor

I had some more time and looked further into it. There is one more reason to deprecate libsystat: it only supports Linux. libstatgrab, as I said, is very portable. It supports the BSDs as well. So I started the port. However, libstatgrab, AFAIK, can't give the stats of individual cores of a multi-code CPU. libsysstat can. It means the port would remove features from the plugin. I'm not sure what to do. Maybe we should postpone this issue.

@luis-pereira, @jleclanche, @pmattern, @agaida, @palinek: what do you think?

@paulolieuthier
Copy link
Contributor

libstatgrab also doesn't know about the CPU frequency.

@palinek
Copy link
Contributor

palinek commented Sep 11, 2015

I don't use the stat plugin but IMO such plugin should be aware of cpu cores and their frequencies.

@agaida
Copy link
Member

agaida commented Sep 11, 2015

imho we have two choices - deprecate libsysstat or make sure that the
plugins aren't built for not supported platforms - that should be easy
with cmake. Problem solved :)

On the other hand - do we need the statistic tools at all? a overall
stat would be good - maybe linked to a more detailed tool like qps.

But wait - qps in its current state runs only on linux and maybe
solaris so it should be improved. Another idea is to have a look at the
code from lxde. Maybe this could help.

Alf Gaida
BDBF C688 EFAD BA89 5A9F 464B CD28 0A0B 4D72 827C

@jleclanche jleclanche modified the milestones: 0.11, 0.10 Oct 24, 2015
@paulolieuthier paulolieuthier modified the milestones: 0.12, 0.11 Apr 26, 2016
@jsm222
Copy link

jsm222 commented May 22, 2017

FYI Olivier Duchateau and my self, have ported libsysstat to FreeBSD, with some minor differences, e.g
you cannot use the frequency for the cpu. see https://github.com/jsm222/lxqt-freebsd/tree/0.11/sysutils/libsysstat. libstatgrab seems to be planning per cpu stats as well libstatgrab/libstatgrab#13 but they do not seem to update too frequently at the moment.

@palinek palinek modified the milestones: 0.12, 0.13 Oct 23, 2017
@palinek palinek modified the milestones: 0.13, 0.14 May 22, 2018
@agaida agaida added this to Needs triage in Issues Jul 14, 2018
@agaida agaida closed this as completed Jul 15, 2018
Issues automation moved this from Needs triage to Closed Jul 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Issues
  
Closed
Development

No branches or pull requests

6 participants