SensorLogger in ksysguard NOW is writing on disk file [SOLVED]
Francesco Lazzarotto
francesco.lazzarotto at iasf-roma.inaf.it
Thu Oct 20 12:00:47 BST 2011
Dear Duncan,
thank you for your detailed answer, fortunately the maintainer
of the ksysguard app has answered to me after my help request, and invited me
to modify the software to fix the bug, and so I did and fortunately I
succeeded!
Down here you can read about the modifications I made, that I've sent to the
maintainer yet, hoping this will help to have a fixed version in the
dstribution as soon as possible.
Now I'm using the version modified by me for the use I needed, and
I can have logfiles for the sensor of my lab data center.
> Therefore, I'd suggest filing a bug with kde on it, if one's not already
> filed.
yes, I submitted the bug report to this thread
https://bugs.kde.org/show_bug.cgi?id=223094
> As I said, I don't know what resources you're trying to log, but if it's
> something to do with hardware sensors, memory usage, cpu usage, disk
> activity/space, or network usage, I have had a bit of experience figuring
> out how to harvest that sort of information at the command line,
I'm the person in charge of some systems in a data centre, performing
satellite data elaboration h24, as main things I have to monitor that
operational servers are up, with enough disk space and with nominal CPU, RAM
usage and temperature, hopefully from a remote station, then having the
results directly on logfile is helping me to retrieve this infos from remote
computers.
In a wider point of view, it could be useful for me to read every kind of
sensor connected to and readable by a computer, because I'm working in a
scientific lab, so I accept your help and I would ask you some infos about
sensor logging with other tools in the future, if needed.
> As it happens, I used to use ksysguard in kde3, but when I switched to
> kde4 in the 4.2/4.3 era, not only was there no ksysguard plasmoid to
> replace the kicker applet that I relied on in kde3, but ksysguard itself,
> like much of kde4 at the time (despite what the kde PR said and despite
> the dropping of support for the latest reasonably workable version, then
> kde 3.5.10, even after promising support as long as there were users,
> guess a lot of current and former kde users know how much to trust kde
> claims now, about as far as they can launch a now decommissioned NASA
> shuttle!) was rather buggy, failing to properly save and restore its own
> configuration, among other problems.
Yes I agree that there are still *some* problems to have all working correctly
passing from kde3 to kde4 ... but I hope this will go better in the future and
I'll try to do something to participate in the improvement of kde.
Long life to KDE!
Thank you again for your help.
Francesco.
>Oggetto: SensorLogger in ksysguard NOW is writing on disk file [SOLVED]
>Data: giovedì 13 ottobre 2011, 23:00:17
>Da: Francesco Lazzarotto <francesco.lazzarotto at iasf-roma.inaf.it>
>A: John Tapsell <johnflux at gmail.com>
>CC: kde-devel at kde.org
>Hi John, I modified the code in order to make ksysguard write (again) the logs
>on a file. I used the package kdebase-workspace_4.6.5.orig.tar, compiled
>with CMake.
>What I have changed is:
>1) I implemented the method
> virtual void timerEvent ( QTimerEvent * event );
>in the class LogSensor, in this way
>void LogSensor::timerEvent ( QTimerEvent * event )
>{
> timerTick();
>}
>to call the timerTick() method every time the timerEvent() is called, caused
>by the behavior of the QObject superclass.
>2) in the source file SensorLogger.cpp I modified the constructor of the
>SensorLogger Class this way:
>SensorLogger::SensorLogger( QWidget *parent, const QString& title,
>SharedSettings *workSheetSettings )
> : KSGRD::SensorDisplay( parent, title, workSheetSettings )
>{
>...
>...
> // mView->setContextMenuPolicy( Qt::CustomContextMenu );
> mView->setContextMenuPolicy( Qt::DefaultContextMenu );
>giving as argument Qt::DefaultContextMenu instead of Qt::CustomContextMenu
>after this, right clicking on the sensorlogger line was possible again to
>select the option "Start Logging" and make ksysguard start to write in the
>selected logfile.
>at the link
>http://www.fileden.com/files/2009/2/22/2333221/ksysguard_modified_by_lazzarotto.tar.gz
>you can access the source directory with my modifications, please check if it
>works fine also in your computer (if you can).
>Now I can use ksysguard to set up some automatic control on my
>servers/systems
>and to plot/analyse logged data with external programs, just as I did to plot
>the attached image "laptop_temperature.jpg" created using the temperature
>sensor of my laptop, read and logged by ksysguard.
>I'm going to use this version for my applications, tell me if I can do
>something more for the maintaining of this app.
>bye
>Francesco.
>In data martedì 11 ottobre 2011 14:48:56, John Tapsell ha scritto:
> Good to hear!
>
> If you have ubuntu, the fastest way to get developing is to do something
> like:
>
> sudo apt-get install project-neon-utils project-neon-kdelibs
>
> git clone kde:kde-workspace.git
>
> neon-env
>
> cd kde-workspace
>
> neonmake
>
>
>
> or something like that, off the top of my head. The code is in the
> folder ksysguard/gui/
>
> John
>
>
> On 11 October 2011 13:39, Francesco Lazzarotto
>
> <francesco.lazzarotto at iasf-roma.inaf.it> wrote:
> > Hello John,
> > thank you very much for your answer, now I'm going to download the source
> > code for ksysguard, and compiling it, to check if also the version
> > compiled from source have the same bug. I reported yet what I'm
> > experiencing with ksysguard adding a post on the related bug item at
> > bugs.kde.org
> > https://bugs.kde.org/show_bug.cgi?id=223094
> > If it's really a bug I believe that the sensor logging feature is not
> > used very much, so not many people are complaining for this problem ...
> > As soon I will have some more news about this problem I will report it
> > to you. Thank you again,
> > Francesco.
> >
> >> In data martedì 11 ottobre 2011 14:19:14, John Tapsell ha scritto:
> >> Hi Francesco,
> >>
> >> I'm the maintainer of the ksysguard app. I haven't looked at the
> >> sensor logging code for years - I wouldn't be surprised at all if it
> >> has stopped working (bit rot). You're welcome to hire me to fix it,
> >> file a bug report on kde.bugs.org, or fix it yourselves if you can. I
> >> welcome patches.
> >>
> >>
> >>
> >> Sorry for the bugs,
> >>
> >> John Tapsell
> >>
> >> On 11 October 2011 13:13, Francesco Lazzarotto
> >>
> >> <francesco.lazzarotto at iasf-roma.inaf.it> wrote:
> >> > Hi everybody, please apologise me if this is not the suitable mailing
> >> > list, but I haven't found a more specific list ... i'd like to ask for
> >> > some help in troubleshooting a ksysguard app. feature, to use it in my
> >> > work at our lab data-centre, to monitor some server resources.
> >> > I'm using ksysguard on kde 4.4.x and 4.6.y, and all seems to go fine,
> >> > except for the SensorLogger function ... I'm trying to make ksysguard
> >> > write sensor values on a text log file, as provided by the specific
> >> > sensor type and following the user manual instructions.
> >> > But I can't succeed in starting the file logging right clicking on the
> >> > sensor pad, because when I right click I can't get this option, and
> >> > the red cross icon remains at the beginning of the file loggin line
> >> > ... please can you help me? Do you know how to start loggin in any
> >> > other way? Have I a bug in my ksysguard version??
> >> > Thank you very much for your answer.
>In data lunedì 17 ottobre 2011 13:28:10, Duncan ha scritto:
> Francesco Lazzarotto posted on Tue, 11 Oct 2011 13:23:31 +0200 as
>
> excerpted:
> > Hi everybody, please apologise if this is not the suitable mailing list,
> > but I haven't found a more specific list ... i'd like to ask for some
> > help in troubleshooting a ksysguard app. feature, to use it in my work
> > at our lab data-centre, to monitor some server resources.
>
> ksysguard? This is a reasonable list for it. =:^) Unfortunately, almost
> a week after you posted, it seems none of the users reading here can
> answer your question.
>
> FWIW, I can't help you much either, directly, but I had saved your
> question marked unread, to reply to later if nobody stepped up with
> better help than I can provide, and since they didn't, well, I'll do what
> I can and hope it helps.
>
> As it happens, I used to use ksysguard in kde3, but when I switched to
> kde4 in the 4.2/4.3 era, not only was there no ksysguard plasmoid to
> replace the kicker applet that I relied on in kde3, but ksysguard itself,
> like much of kde4 at the time (despite what the kde PR said and despite
> the dropping of support for the latest reasonably workable version, then
> kde 3.5.10, even after promising support as long as there were users,
> guess a lot of current and former kde users know how much to trust kde
> claims now, about as far as they can launch a now decommissioned NASA
> shuttle!) was rather buggy, failing to properly save and restore its own
> configuration, among other problems.
>
> So out of necessity, I switched to something else. For my usage, current
> status display, not logging, that something else was first yasp-scripted
> because it was reasonably easy to learn to configuration language for and
> then to setup, then more recently, the somewhat more advanced
> superkaramba.
>
> So, I've not used ksysguard since I decided the 4.x version was way too
> buggy to be useful when I tried it when switching from kde3, and I've
> never actually used the file logging functionality you are trying to use,
> as you state below. That's why I tried to leave the post for someone who
> could better answer your question to tackle, but as no one has stepped
> up...
>
> > I'm using ksysguard on kde 4.4.x and 4.6.y, and all seems to go fine,
> > except for the SensorLogger function ... I'm trying to make ksysguard
> > write sensor values on a text log file, as provided by the specific
> > sensor type and following the user manual instructions.
> >
> > But I can't succeed in starting the file logging right clicking on the
> > sensor pad, because when I right click I can't get this option, and the
> > red cross icon remains at the beginning of the file loggin line ...
> > please can you help me? Do you know how to start loggin in any other
> > way? Have I a bug in my ksysguard version??
>
> As I said, I hadn't ever tried actually logging to a file, and in fact
> haven't used ksysguard itself for awhile (tho I still have it
> installed). However, I just tried it now, on the now-current kde 4.7.2,
> and...
>
> I see exactly the same behavior!
>
> I even tried touching the file and restarting ksysguard, to see if it
> would allow me to start the logger once the file existed, with no luck.
> Further, I even opened the *.sgrd file and inspected the values there, to
> see if there was an "activated" value or some such I could toggle
> manually. Again, no luck.
>
> So either there's something that both you and I are missing and that
> doesn't seem to be in the "system monitor handbook" (why they call it the
> impossibly generic system monitor, I don't know, ksysguard is at least
> googlable, but at least the binary name remains the same, unlike "the
> application formerly known as kcontrol", now the impossibly generic AND
> incorrect "systemsettings", since with a couple exceptions, it's not
> systemsettings at all, but kde-specific settings, further specific to a
> single user!), or that functionality is still broken, as it would seem to
> have been since kde3 era, since you mention kde 4.4 and 4.6 and I tried
> 4.7 now and know 4.2 and 4.3 were even MORE broken!
>
> Therefore, I'd suggest filing a bug with kde on it, if one's not already
> filed. But at this point I'd not count on it actually working properly
> any time soon. Perhaps it will, but I'd be exploring other options if I
> were you, as I already was forced to do here for much of what I formerly
> depended on kde for. (ksysguard wasn't the only thing. But I'll spare
> you the list, save to mention that you get a *LOT* of performance back
> once you're able to turn off semantic-desktop at compile time, as I'm
> able to do now here on Gentoo, now that I killed kmail and ultimately all
> of kdepim. Without that and with a graphics card that can handle the
> OpenGL effects reasonably well, kde4 finally feels as responsive as kde3
> used to, and I'm MUCH happier with it! =:^)
>
> So I'd suggest trying something else. I don't know specifically what
> you're trying to log, but one thing I found out with yasp-scripted and
> superkaramba is how much information is already exposed in /proc (for
> most memory, filesystem, process, uptime, etc, data) or /sys files (for
> power and hardware sensors) or with the sensors command (from the
> lm_sensors package). By using commandline tools such as grep/sed/awk and
> shell patterns and redirection, it's very possible to get most (all?) of
> the data exposed in ksysguard, and then to either display them using yasp-
> scripted or superkaramba as I did, or to log them, as you need to do.
>
> You actually have a couple alternatives. If you're already doing
> centralized syslogging or find it convenient enough to setup, you can
> setup scripts on each machine to write the desired data to syslog, and
> then have your syslogger spit out the logs as you need them. syslog-ng
> is a quite full-featured syslogger that makes splitting up logs into
> separate files, as well as centralized logging, much easier to configure
> than some of the other syslog daemons do.
>
> Alternatively, you likely already have ssh setup and ksysguardd
> configured for it on the remote systems. Setting up commandline ssh
> scripts to harvest the information and log it as ksysguard would if it
> worked, shouldn't be too difficult.
>
> As I said, I don't know what resources you're trying to log, but if it's
> something to do with hardware sensors, memory usage, cpu usage, disk
> activity/space, or network usage, I have had a bit of experience figuring
> out how to harvest that sort of information at the command line, for
> display here but once it's harvested it can be written to a log file just
> as easily, and may be able to save you a bit of duplicated work. If
> you'd like, take a look at the grep/sed/etc stuff in yasp-scripted on
> kde-look.org, as I submitted a number of scripts for it that it now ships
> with (in a duncan subdir of the scripts dir). Or, you may contact me
> either on-list or off, as the logging details probably veer from on-topic
> for the list, and may not be appropriate for a public list in any case.
Francesco Lazzarotto, PhD.
Istituto di Astrofisica Spaziale
e Fisica Cosmica (IASF) - INAF.
[National Institute for Space Astrophysics]
http://www.iasf-roma.inaf.it/indexen.htm
c/o Consiglio Nazionale delle Ricerche (CNR)
Area di Ricerca di Tor Vergata,
via Fosso del Cavaliere, 100.
00133 - Roma
tel +39 06 49934430
fax +39 06 45488188
mobile +39 335 7126078
email 1: francesco.lazzarotto at iasf-roma.inaf.it
email 2: flazzarotto1 at alice.it
http://www.linkedin.com/in/francescolazzarotto
___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list