kcollectd-0.9/0000755001345300001440000000000011333606624013031 5ustar berbericuserskcollectd-0.9/CMakeLists.txt0000644001345300001440000000066411331347212015570 0ustar berbericuserscmake_minimum_required(VERSION 2.6) cmake_policy(SET CMP0011 OLD) project(kcollectd) set(VERSION 0.9) find_package(KDE4 REQUIRED) include (KDE4Defaults) add_definitions(-Wall -g) # Basedir for collectd if(NOT RRD_BASEDIR) set(RRD_BASEDIR "/var/lib/collectd/rrd") endif(NOT RRD_BASEDIR) set(RRD_BASEDIR ${RRD_BASEDIR} CACHE PATH "path to collectd-data") # config.h configure_file(config.h.in config.h) subdirs(kcollectd po doc) kcollectd-0.9/TODO0000644001345300001440000000000011034465034013503 0ustar berbericuserskcollectd-0.9/AUTHORS0000644001345300001440000000011711172607273014102 0ustar berbericusersM G Berberich Florian Forster kcollectd-0.9/config.h.in0000644001345300001440000000016211172607273015055 0ustar berbericusers/* Version */ #define VERSION "@VERSION@" /* Basedir of collectd databases */ #define RRD_BASEDIR "@RRD_BASEDIR@"kcollectd-0.9/ChangeLog0000644001345300001440000000341611331347212014600 0ustar berbericusers2010-01-31: Version 0.9 session-management 2009-11-30: Version 0.8.2 make it compile with binutils-gold (see debian Bug#554939) 2009-10-11: Version 0.8.1 added a manual to make the help-menu-entry work. 2009-06-06: Version 0.8 added drag-n-drop Pixmap make datasource-tree hideable multiline legends 2009-06-01: read argument from commandline to load file load/save config in xml-file 2009-05-31: added Menus main window now is a KMainWindow 2009-05-26: Version 0.7 context-menu changed functionality of gui. now datasources has to be dragged to graph-widget 2009-05-10: widgets allows multigraphs 2009-05-03: Version: 0.6 added auto-update-and-follow-mode to manpage changed from reading command-output of “rrdtool info” to using the (new) function in rrd API 2009-04-19: Ported to KDE4 single leave-entries are no longer shown in tree 2009-03-31: fixed overlapping of labels on flat graphs improved horzontal-lines (there can now be 10, 5 or 2 in a region) 2009-01-08: Version 0.3 fixed bug reported by Daniel Clark (this was a security problem) 2008-08-01: removed dependency on kglobalsettings.h from graph-widget most of minmax → misc.cc code-cleanup removed y_range and base vom Graph-widget-class 2008-07-31: Version 0.2 multi-select. The user now can select multible datasources. There might be problems if rrd-layout differs between datasources some cleanup 2008-07-23 some cleanup, time-axes 2008-07-14 removed the label displaying the datasource added last-{hour,day,week,month}-buttons added some sensiblity-checks to zooming fixed Qt-problem with strftimes localized output some more comments color_-variables KDE-defaultcolor for text translation de fixed name as a graph-label (but inactive) 2008-07-10 translation kcollectd-0.9/po/0000755001345300001440000000000011333606624013447 5ustar berbericuserskcollectd-0.9/po/CMakeLists.txt0000644001345300001440000000011511172576617016215 0ustar berbericusers find_package(Gettext) gettext_create_translations(kcollectd.pot ALL de.po) kcollectd-0.9/po/de.po0000644001345300001440000001254011264373036014402 0ustar berbericusers# translation of de.po to # This file is put in the public domain. # # M G Berberich , 2008, 2009. msgid "" msgstr "" "Project-Id-Version: de\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-06-06 21:35+0200\n" "PO-Revision-Date: 2009-06-16 20:41+0200\n" "Last-Translator: M G Berberich \n" "Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 0.3\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: ../kcollectd/graph.cc:228 ../kcollectd/graph.cc:258 msgid "%A %Y-%m-%d" msgstr "%A, %d. %B %Y" #: ../kcollectd/graph.cc:230 ../kcollectd/graph.cc:260 msgid "%A %Y-%m-%d %H:%M" msgstr "%A, %d. %B %Y %H:%M" #: ../kcollectd/graph.cc:232 ../kcollectd/graph.cc:262 msgid "%A %Y-%m-%d %H:%M:%S" msgstr "%A, %d. %B %Y %H:%M:%S" #: ../kcollectd/graph.cc:226 ../kcollectd/graph.cc:256 msgid "%Y-%m" msgstr "%B %Y" #: ../kcollectd/gui.cc:178 msgid "&Edit" msgstr "&Bearbeiten" #: ../kcollectd/gui.cc:171 msgid "&File" msgstr "&Datei" #: ../kcollectd/gui.cc:182 msgid "&View" msgstr "&Ansicht" #: ../kcollectd/gui.cc:145 msgid "" "

This button toggles the automatic update-and-follow mode

The " "automatic update-and-follow mode updates the graph every ten seconds. In " "this mode the graph still can be zoomed, but always displays now near " "the right edge and can not be scrolled any more.
This makes kcollectd " "some kind of status monitor.

" msgstr "" "

Dieser Knopf schaltet den automatischen Aktualisierung-und-folge Modus an " "an und aus

Der automatische aktualisierungs-und-folge Modus " "aktualisiert den Graph alle zehn Sekunden. In diesem Modus kann der Graph " "noch gezoomt werden, stellt aber immer Jetzt nahe der rechten Kante " "dar und kann nicht mehr verschoben werden.
Dadurch wird kcollectd zu " "einer Art Statusmonitor.

" #: ../kcollectd/kcollectd.cc:135 msgid "A kcollectd-file to open" msgstr "Eine kcollectd-Datei zum Öffen" #: ../kcollectd/gui.cc:73 msgid "Add New Subgraph" msgstr "Erzeuge neuen Untergraphen" #: ../kcollectd/gui.cc:95 msgid "Automatic Update" msgstr "automatisches Update" #: ../kcollectd/graph.cc:656 msgid "Drop sensors from list here" msgstr "Ziehen Sie Sensoren aus der Liste hierher" #: ../kcollectd/kcollectd.cc:146 msgid "" "Failed to read collectd-structure at '%1'\n" "Terminating." msgstr "" "Die collectd-Struktur unter ‚%1‘ konnte nicht gelesen werden.\n" "Breche ab." #: ../kcollectd/gui.cc:101 msgid "Hide Datasource Tree" msgstr "Blende Datenquellenbaum aus" #: ../kcollectd/kcollectd.cc:120 msgid "KCollectd" msgstr "KCollectd " #: ../kcollectd/gui.cc:70 msgid "Last Day" msgstr "Letzter Tag" #: ../kcollectd/gui.cc:69 msgid "Last Hour" msgstr "Letzte Stunde" #: ../kcollectd/gui.cc:72 msgid "Last Month" msgstr "Letzter Monat" #: ../kcollectd/gui.cc:71 msgid "Last Week" msgstr "Letzte Woche" #: ../kcollectd/kcollectd.cc:127 msgid "M G Berberich" msgstr "M G Berberich" #: ../kcollectd/kcollectd.cc:124 msgid "Maintainer and developer" msgstr "" #: ../kcollectd/gui.cc:114 msgid "Sensordata" msgstr "Sensordaten" #: ../kcollectd/gui.cc:296 ../kcollectd/gui.cc:331 msgid "System message is: ‘%1’" msgstr "Systemnachricht lautet: ‚%1‘" #: ../kcollectd/kcollectd.cc:121 msgid "Viewer for Collectd-databases" msgstr "Betrachter für collectd Datensammlungen" #: ../kcollectd/kcollectd.cc:131 msgctxt "EMAIL OF TRANSLATORS" msgid "Your emails" msgstr "berberic@fmi.uni-passau.de" #: ../kcollectd/kcollectd.cc:130 msgctxt "NAME OF TRANSLATORS" msgid "Your names" msgstr "M G Berberich" #: ../kcollectd/graph.cc:761 msgid "add new subgraph" msgstr "Erzeuge neuen Untergraphen" #: ../kcollectd/graph.cc:765 msgid "delete this subgraph" msgstr "Entferne diesen Untergraphen" #: ../kcollectd/gui.cc:260 msgid "" "file ‘%1’ allready exists.\n" "Do you want to overwrite it?" msgstr "" "Die Datei ‚%1‘ existiert bereits.\n" "Wollen Sie sie überschreiben?" #: ../kcollectd/graph.cc:236 ../kcollectd/graph.cc:266 msgid "from %1 to %2" msgstr "Von %1 bis %2" #: ../kcollectd/gui.cc:135 msgid "increases magnification" msgstr "erhöht die Vergrößerung" #: ../kcollectd/gui.cc:130 msgid "last day" msgstr "Letzter Tag" #: ../kcollectd/gui.cc:132 msgid "last hour" msgstr "Letzte Stunde" #: ../kcollectd/gui.cc:126 msgid "last month" msgstr "Letzter Monat" #: ../kcollectd/gui.cc:128 msgid "last week" msgstr "Letzte Woche" #: ../kcollectd/gui.cc:330 msgid "opening the file ‘%1’ for writing failed." msgstr "Das Öffnen der Datei ‚%1‘ zum Schreiben schlug fehl." #: ../kcollectd/gui.cc:295 msgid "reading file ‘%1’ failed." msgstr "Lesen der Datei ‚%1‘ fehlgeschlagen." #: ../kcollectd/gui.cc:139 msgid "reduces magnification" msgstr "verringert die Vergrößerung" #: ../kcollectd/graph.cc:771 msgid "remove " msgstr "Entferne " #: ../kcollectd/gui.cc:143 msgid "toggle automatic update-and-follow mode." msgstr "schaltet den automatischen update-und-folge Modus an und aus" #: ../kcollectd/graph.cc:365 msgid "week %V" msgstr "Woche %V" #: ../kcollectd/kcollectd.cc:123 msgid "© 2008, 2009 M G Berberich" msgstr "© 2008, 2009 M G Berberich" #~ msgctxt "Your emails" #~ msgid "EMAIL OF TRANSLATORS" #~ msgstr "berberic@fmi.uni-passau.de" #~ msgctxt "Your names" #~ msgid "NAME OF TRANSLATORS" #~ msgstr "M G Berberich" kcollectd-0.9/po/kcollectd.pot0000644001345300001440000000751311212542651016140 0ustar berbericusers# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-06-06 21:35+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../kcollectd/graph.cc:226 ../kcollectd/graph.cc:256 msgid "%Y-%m" msgstr "" #: ../kcollectd/graph.cc:228 ../kcollectd/graph.cc:258 msgid "%A %Y-%m-%d" msgstr "" #: ../kcollectd/graph.cc:230 ../kcollectd/graph.cc:260 msgid "%A %Y-%m-%d %H:%M" msgstr "" #: ../kcollectd/graph.cc:232 ../kcollectd/graph.cc:262 msgid "%A %Y-%m-%d %H:%M:%S" msgstr "" #: ../kcollectd/graph.cc:236 ../kcollectd/graph.cc:266 msgid "from %1 to %2" msgstr "" #: ../kcollectd/graph.cc:365 msgid "week %V" msgstr "" #: ../kcollectd/graph.cc:656 msgid "Drop sensors from list here" msgstr "" #: ../kcollectd/graph.cc:761 msgid "add new subgraph" msgstr "" #: ../kcollectd/graph.cc:765 msgid "delete this subgraph" msgstr "" #: ../kcollectd/graph.cc:771 msgid "remove " msgstr "" #: ../kcollectd/gui.cc:69 msgid "Last Hour" msgstr "" #: ../kcollectd/gui.cc:70 msgid "Last Day" msgstr "" #: ../kcollectd/gui.cc:71 msgid "Last Week" msgstr "" #: ../kcollectd/gui.cc:72 msgid "Last Month" msgstr "" #: ../kcollectd/gui.cc:73 msgid "Add New Subgraph" msgstr "" #: ../kcollectd/gui.cc:95 msgid "Automatic Update" msgstr "" #: ../kcollectd/gui.cc:101 msgid "Hide Datasource Tree" msgstr "" #: ../kcollectd/gui.cc:114 msgid "Sensordata" msgstr "" #: ../kcollectd/gui.cc:126 msgid "last month" msgstr "" #: ../kcollectd/gui.cc:128 msgid "last week" msgstr "" #: ../kcollectd/gui.cc:130 msgid "last day" msgstr "" #: ../kcollectd/gui.cc:132 msgid "last hour" msgstr "" #: ../kcollectd/gui.cc:135 msgid "increases magnification" msgstr "" #: ../kcollectd/gui.cc:139 msgid "reduces magnification" msgstr "" #: ../kcollectd/gui.cc:143 msgid "toggle automatic update-and-follow mode." msgstr "" #: ../kcollectd/gui.cc:145 msgid "" "

This button toggles the automatic update-and-follow mode

The " "automatic update-and-follow mode updates the graph every ten seconds. In " "this mode the graph still can be zoomed, but always displays now near " "the right edge and can not be scrolled any more.
This makes kcollectd " "some kind of status monitor.

" msgstr "" #: ../kcollectd/gui.cc:171 msgid "&File" msgstr "" #: ../kcollectd/gui.cc:178 msgid "&Edit" msgstr "" #: ../kcollectd/gui.cc:182 msgid "&View" msgstr "" #: ../kcollectd/gui.cc:260 msgid "" "file ‘%1’ allready exists.\n" "Do you want to overwrite it?" msgstr "" #: ../kcollectd/gui.cc:295 msgid "reading file ‘%1’ failed." msgstr "" #: ../kcollectd/gui.cc:296 ../kcollectd/gui.cc:331 msgid "System message is: ‘%1’" msgstr "" #: ../kcollectd/gui.cc:330 msgid "opening the file ‘%1’ for writing failed." msgstr "" #: ../kcollectd/kcollectd.cc:120 msgid "KCollectd" msgstr "" #: ../kcollectd/kcollectd.cc:121 msgid "Viewer for Collectd-databases" msgstr "" #: ../kcollectd/kcollectd.cc:123 msgid "© 2008, 2009 M G Berberich" msgstr "" #: ../kcollectd/kcollectd.cc:124 msgid "Maintainer and developer" msgstr "" #: ../kcollectd/kcollectd.cc:127 msgid "M G Berberich" msgstr "" #: ../kcollectd/kcollectd.cc:130 msgctxt "NAME OF TRANSLATORS" msgid "Your names" msgstr "" #: ../kcollectd/kcollectd.cc:131 msgctxt "EMAIL OF TRANSLATORS" msgid "Your emails" msgstr "" #: ../kcollectd/kcollectd.cc:135 msgid "A kcollectd-file to open" msgstr "" #: ../kcollectd/kcollectd.cc:146 msgid "" "Failed to read collectd-structure at '%1'\n" "Terminating." msgstr "" kcollectd-0.9/doc/0000755001345300001440000000000011333606624013576 5ustar berbericuserskcollectd-0.9/doc/en/0000755001345300001440000000000011333606624014200 5ustar berbericuserskcollectd-0.9/doc/en/CMakeLists.txt0000644001345300001440000000014011264377635016745 0ustar berbericuserskde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kcollectd) kcollectd-0.9/doc/en/index.docbook0000644001345300001440000001133311264374433016655 0ustar berbericusers kcollectd 0.8"> ]> The &kcollectd; Handbook M G Berberich
berberic@fmi.uni-passau.de
2008 2009 M G Berberich &FDLNotice; 2009-10-11 0.8.1 &kcollectd; is a small applications that allows to view rrd datacollections that have been created by collectd. KDE kcollectd collect
Introduction &kcollectd; is a small applications that allows to view rrd datacollections that have been created by collectd. It is quite limited, but allows to zoom and scroll around and has an automatic update and follow mode, which makes it some kind of statusmonitor. Using &kcollectd; At the left side of the window is a tree, that lists all collectd datasources that kcollectd has found. You can select one or more of them with the mouse. At the right the selected datasources are shown as graph. You can move the graph to the left or right with the mouse und zoom in or out with the mousewheel or the zoombuttons. At the lower left there is a auto-update-button that allows to switch kcollectd into the update-and-follow-mode. In this mode the graph still can be zoomed, but always displays now near the right edge and can not be scrolled any more. See also collectd(1) rrdtool(1) Credits and License &kcollectd; Program copyright 2008 M G Berberich berberic@fmi.uni-passau.de Contributors: Florian Forster octo@verplant.org Documentation copyright 2009 M G Berberich berberic@fmi.uni-passau.de &underFDL; &underGPL; &documentation.index;
kcollectd-0.9/doc/kcollectd.10000644001345300001440000000352111177301712015621 0ustar berbericusers.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH KCOLLECTD 1 "9 February 2009" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME kcollectd \- view collectd datacollections .SH SYNOPSIS .B kcollectd .\"RI [ options ] " files" ... .SH DESCRIPTION .B Kcollectd is a small applications that allows to view .B rrd datacollections that have been created by \fBcollectd\fR(1). .PP It is quite limited, but allows to zoom and scroll around and has an automatic update and follow mode, which makes it some kind of status-monitor. .PP At the left side of the window is a tree, that lists all \fBcollectd\fR(1) datasources that .B kcollectd has found. You can select one or more of them with the mouse. .PP At the right the selected datasources are shown as graph. You can move the graph to the left or right with the mouse und zoom in or out with the mousewheel or the zoombuttons. .PP At the lower left there is a auto-update-button that allows to switch .B kcollectd into the update-and-follow-mode. In this mode the graph still can be zoomed, but always displays .I now near the right edge and can not be scrolled any more. .SH AUTHOR kcollectd was written by M G Berberich. .PP This manual page was written by M G Berberich . .SH "SEE ALSO" .BR collectd(1) .BR rrdtool(1) kcollectd-0.9/doc/CMakeLists.txt0000644001345300001440000000001511264372740016334 0ustar berbericuserssubdirs(en) kcollectd-0.9/COPYING0000644001345300001440000010437411034465034014071 0ustar berbericusers GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . kcollectd-0.9/README0000644001345300001440000000000011034465034013673 0ustar berbericuserskcollectd-0.9/Doxyfile0000644001345300001440000002423111034465034014535 0ustar berbericusers# Doxyfile 1.5.1-KDevelop #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- PROJECT_NAME = kcollectd PROJECT_NUMBER = 0.1 OUTPUT_DIRECTORY = CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English USE_WINDOWS_ENCODING = NO BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = YES STRIP_FROM_PATH = /tmp/CCC/ STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO DETAILS_AT_TOP = NO INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 8 ALIASES = OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO BUILTIN_STL_SUPPORT = NO DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL = NO EXTRACT_PRIVATE = NO EXTRACT_STATIC = NO EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_METHODS = NO HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = NO HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO CASE_SENSE_NAMES = YES HIDE_SCOPE_NAMES = NO SHOW_INCLUDE_FILES = YES INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO SORT_BY_SCOPE_NAME = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES SHOW_DIRECTORIES = YES FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- INPUT = /tmp/CCC/kcollectd FILE_PATTERNS = *.c \ *.cc \ *.cxx \ *.cpp \ *.c++ \ *.d \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ *.idl \ *.odl \ *.cs \ *.php \ *.php3 \ *.inc \ *.m \ *.mm \ *.dox \ *.py \ *.C \ *.CC \ *.C++ \ *.II \ *.I++ \ *.H \ *.HH \ *.H++ \ *.CS \ *.PHP \ *.PHP3 \ *.M \ *.MM \ *.PY \ *.C \ *.H \ *.tlh \ *.diff \ *.patch \ *.moc \ *.xpm \ *.dox RECURSIVE = yes EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXAMPLE_PATH = EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO IMAGE_PATH = INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- SOURCE_BROWSER = NO INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES REFERENCES_LINK_SOURCE = YES USE_HTAGS = NO VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = NO COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES HTML_OUTPUT = html HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO BINARY_TOC = NO TOC_EXPAND = NO DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = NO TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = YES LATEX_OUTPUT = latex LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = NO PAPER_TYPE = a4wide EXTRA_PACKAGES = LATEX_HEADER = PDF_HYPERLINKS = NO USE_PDFLATEX = NO LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO RTF_OUTPUT = rtf COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = NO MAN_OUTPUT = man MAN_EXTENSION = .3 MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = yes XML_OUTPUT = xml XML_SCHEMA = XML_DTD = XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- GENERATE_PERLMOD = NO PERLMOD_LATEX = NO PERLMOD_PRETTY = YES PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = kcollectd.tag ALLEXTERNALS = NO EXTERNAL_GROUPS = YES PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = YES HIDE_UNDOC_RELATIONS = YES HAVE_DOT = NO CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES UML_LOOK = NO TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CALL_GRAPH = NO CALLER_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png DOT_PATH = DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 1024 MAX_DOT_GRAPH_HEIGHT = 1024 MAX_DOT_GRAPH_DEPTH = 1000 DOT_TRANSPARENT = NO DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE = NO kcollectd-0.9/INSTALL0000644001345300001440000000042711172620442014060 0ustar berbericusers cmake Install Prefix: -DCMAKE_INSTALL_PREFIX=[prefix] Debug/Release: -DCMAKE_BUILD_TYPE=[DEBUG|Release] RRD-Basedir: -DRRD_BASEDIR=[basedir] default is /var/lib/collectd/rrd rpath: set -DCMAKE_SKIP_RPATH=true if you do not want to have an rpath in kcollectd. kcollectd-0.9/kcollectd/0000755001345300001440000000000011333606624014775 5ustar berbericuserskcollectd-0.9/kcollectd/graph.h0000644001345300001440000001540511331347212016245 0ustar berbericusers/* -*- c++ -*- */ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef GRAPH_H #define GRAPH_H #include #include #include #include #include #include #include #include #include "misc.h" class time_iterator; class GraphInfo { public: struct datasource { QString rrd; QString ds; QString label; std::vector avg_data, min_data, max_data; }; void add(const QString &rrd, const QString &ds, const QString &label); void add(const datasource &d) { dslist.push_back(d); } void clear() { dslist.clear(); } size_t size() const { return dslist.size(); } Range minmax(); Range minmax_adj(double *base); int top() const { return top_; } int bottom() const { return bottom_; } int legend_lines() const { return legend_lines_; } void top(int t) { top_ = t; } void bottom(int b) { bottom_ = b; } void legend_lines(int l) { legend_lines_ = l; } // iterators pointing to datasources typedef std::vector::iterator iterator; typedef std::vector::const_iterator const_iterator; iterator begin() { return dslist.begin(); } iterator end() { return dslist.end(); } const_iterator begin() const { return dslist.begin(); } const_iterator end() const { return dslist.end(); } void erase(iterator i) { dslist.erase(i); } bool empty() const { return dslist.empty(); } private: int top_, bottom_, legend_lines_; std::vector dslist; }; /** * subclassed MimeData for interal drag'n drop */ class GraphMimeData : public QMimeData { Q_OBJECT public: void setGraph(const QString &rrd, const QString &ds, const QString &label); const QString &rrd() const { return rrd_; } const QString &ds() const { return ds_; } const QString &label() const { return label_; } private: QString rrd_; QString ds_; QString label_; }; /** * */ class Graph : public QFrame { Q_OBJECT; public: typedef std::vector graph_list; typedef graph_list::iterator iterator; typedef graph_list::const_iterator const_iterator; explicit Graph(QWidget *parent=0); Graph(QWidget *parent, const std::string &rrd, const std::string &ds, const char *name=0); void clear(); GraphInfo &add(const QString &rrd, const QString &ds, const QString &label); GraphInfo &add(); bool changed() { return changed_state; } void changed(bool c) { changed_state = c; } void autoUpdate(bool active); bool autoUpdate() { return (autoUpdateTimer != -1); } virtual QSize sizeHint() const; virtual void paintEvent(QPaintEvent *ev); virtual void resizeEvent(QResizeEvent*); virtual void last(time_t span); virtual void zoom(double factor); virtual void mousePressEvent(QMouseEvent *e); virtual void mouseMoveEvent(QMouseEvent *e); virtual void wheelEvent(QWheelEvent *e); virtual void timerEvent(QTimerEvent *event); // drag-and-drop virtual void dragEnterEvent(QDragEnterEvent *event); virtual void dragMoveEvent(QDragMoveEvent *event); virtual void dropEvent(QDropEvent *event); // Iterators iterator begin() { return glist.begin(); } iterator end() { return glist.end(); } const_iterator begin() const { return glist.begin(); } const_iterator end() const { return glist.end(); } bool empty() const { return glist.empty(); } time_t range() { return span; } public slots: virtual void removeGraph(); virtual void splitGraph(); private: bool fetchAllData(); void drawAll(); int calcLegendHeights(int box_size, int width); void drawLegend(QPainter &paint, int left, int pos, int box_size, const GraphInfo &ginfo); void drawFooter(QPainter &paint, int left, int right); void drawHeader(QPainter &paint); void drawYLines(QPainter &paint, const QRect &rect, const Range &y_range, double base, QColor color); void drawYLabel(QPainter &paint, const QRect &rect, const Range &range, double base); void drawXLines(QPainter &paint, const QRect &rect, time_iterator it, QColor color); void drawXLabel(QPainter &paint, int y, int left, int right, time_iterator it, QString format, bool center); void findXGrid(int width, QString &format, bool ¢er, time_iterator &minor_x, time_iterator &major_x, time_iterator &label_x ); void drawGraph(QPainter &paint, const QRect &rect, const GraphInfo &gi, double min, double max); void layout(); graph_list::iterator graphAt(const QPoint &pos); graph_list::const_iterator graphAt(const QPoint &pos) const; // rrd-data graph_list glist; bool data_is_valid; time_t start; // user set start of graph time_t span; // user-set span of graph time_t data_start; // real start of data (from rrd_fetch) time_t data_end; // real end of data (from rrd_fetch) time_t tz_off; // offset of the local timezone from GMT unsigned long step; // technical helpers int origin_x, origin_y; time_t origin_start, origin_end; bool dragging; // widget-data QFont font, header_font, small_font; QPixmap offscreen; QRect graph_rect; int graph_height, label_width, box_size; int label_y1, label_y2; QColor color_major, color_minor, color_graph_bg; QColor color_minmax[8], color_line[8]; // Auto-Update int autoUpdateTimer; time_t timer_diff; // state bool changed_state; }; /** * add a datasource to the GraphInfo */ inline void GraphInfo::add(const QString &rrd, const QString &ds, const QString &label) { datasource new_ds; new_ds.rrd = rrd; new_ds.ds = ds; new_ds.label = label; dslist.push_back(new_ds); } /** * set graph-infos. */ inline void GraphMimeData::setGraph(const QString &r, const QString &d, const QString &l) { rrd_ = r; ds_ = d; label_ = l; } /** * */ inline GraphInfo & Graph::add(const QString &rrd, const QString &ds, const QString &label) { GraphInfo &gi = add(); gi.add(rrd, ds, label); data_is_valid = false; return gi; } inline GraphInfo &Graph::add() { GraphInfo gi; glist.push_back(gi); changed(true); layout(); update(); return glist.back(); } inline QSize Graph::sizeHint() const { return QSize(640, 480); } #endif kcollectd-0.9/kcollectd/timeaxis.h0000644001345300001440000000335011212757202016765 0ustar berbericusers/* -*- c++ -*- */ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef TIMEAXIS_H #define TIMEAXIS_H #include #include #include class time_iterator { public: enum it_type { seconds, weeks, month, years }; time_iterator(); time_iterator(time_t start, time_t step, it_type type = seconds); void set(time_t start, time_t step, it_type type = seconds); time_iterator &operator++(); time_iterator &operator--(); time_t &operator*(); time_t *operator->(); bool valid(); time_t interval(); const struct tm *tm(); protected: it_type type; time_t now_t; struct tm now_tm; time_t step; }; inline time_iterator::time_iterator(time_t start, time_t step, it_type type) { set(start, step, type); } inline time_iterator::time_iterator() { set(0, 0); } inline time_t &time_iterator::operator*() { return now_t; } inline time_t *time_iterator::operator->() { return &now_t; } inline bool time_iterator::valid() { return step != 0; } #endif kcollectd-0.9/kcollectd/gui.h0000644001345300001440000000500411331347212015722 0ustar berbericusers/* -*- c++ -*- */ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef GUI_H #define GUI_H #include #include #include "graph.h" class QLabel; class Graph; class QTreeWidget; class QVBoxLayout; class KAction; class KPushButton; class KCollectdGui : public KMainWindow // QWidget { Q_OBJECT; public: KCollectdGui(QWidget *parent=0); virtual ~KCollectdGui(); QTreeWidget *listview() { return listview_; } KActionCollection* actionCollection() { return &action_collection; } void set(Graph *graph); void load(const QString &filename); void save(const QString &filename); public slots: void startDrag(QTreeWidgetItem * widget, int col); virtual void last_month(); virtual void last_week(); virtual void last_day(); virtual void last_hour(); virtual void zoomIn(); virtual void zoomOut(); virtual void autoUpdate(bool active); virtual void hideTree(bool active); virtual void splitGraph(); virtual void load(); virtual void save(); protected: virtual void saveProperties(KConfigGroup &); virtual void readProperties(const KConfigGroup &); private: QTreeWidget *listview_; QVBoxLayout *vbox; Graph * graph; KPushButton *auto_button; KAction *auto_action, *panel_action; QString filename; KActionCollection action_collection; }; inline void KCollectdGui::last_month() { graph->last(3600*24*31); } inline void KCollectdGui::last_week() { graph->last(3600*24*7); } inline void KCollectdGui::last_day() { graph->last(3600*24); } inline void KCollectdGui::last_hour() { graph->last(3600); } inline void KCollectdGui::zoomIn() { graph->zoom(1.0/1.259921050); } inline void KCollectdGui::zoomOut() { graph->zoom(1.259921050); } inline void KCollectdGui::splitGraph() { graph->splitGraph(); } #endif kcollectd-0.9/kcollectd/CMakeLists.txt0000644001345300001440000000151411305031302017516 0ustar berbericusers set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAG} ${KDE4_ENABLE_EXCEPTIONS}") find_package(Boost COMPONENTS filesystem system) kde4_add_executable(kcollectd graph.cc gui.cc kcollectd.cc misc.cc rrd_interface.cc timeaxis.cc) set(rrd_LIBRARIES rrd) include_directories(${KDE4_INCLUDES} ${Boost_INCLUDE_DIRS}) target_link_libraries(kcollectd ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${Boost_LIBRARIES} ${rrd_LIBRARIES}) install(TARGETS kcollectd ${INSTALL_TARGETS_DEFAULT_ARGS}) # desktop-file install(FILES kcollectd.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) # mime-type # for KDE 4.2 we require at least version 0.23 set(SHARED_MIME_INFO_MINIMUM_VERSION "0.23") find_package(SharedMimeInfo REQUIRED) install(FILES kcollectd.xml DESTINATION ${XDG_MIME_INSTALL_DIR}) update_xdg_mimetypes(${XDG_MIME_INSTALL_DIR}) subdirs(icons) kcollectd-0.9/kcollectd/icons/0000755001345300001440000000000011333606624016110 5ustar berbericuserskcollectd-0.9/kcollectd/icons/ox128-mime-application-x-kcollectd.png0000644001345300001440000002360711210764452025142 0ustar berbericusersPNG  IHDR>asBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org< IDATxy|3f%!Y@PD,@ n*/ꯢRTU[TUJ* ZE1*A a&@HBwܙ$X}^yݙ͙'F8Y~@!.& 0'jACax4HR_'A&Ztjhc@v#$t`u.kE!- N@P3@*hy?2CKAhL 0k TsE %AvC~A"cUUT]!h3V Ds!R!b^hG )chOmQIV6b☛A<+3B赚/3DKɮ^!b(kY' jh\/!zO 72#%D .7lZ~&,Y7&oGǡI񦄂A 10zHI{[4覘 š&vG)v?CDP)2ɒ6Pζ|uO&%& pSDE&hɗ6y!R6bQN hMS3KgV&B9˲q=LmSzsD H7GZ&B٨u@l"' ccn |7 6H hҐ/iqǜ(墖oe"& *)߂ سg,sddd$teYfQ__OE1'`?YR_[{O?>:uܞMVe\.&L`ժU 05kְmvuO&Ygb BHCzuM </ΜKPTTDee%B zȷbU%%,[/`%|},֮YI[ʷ,˜7p t@Ϟ=cw+2#''38s9PnD2)!J3' RA=xY]ZkիxQ|0Kt>}p<#p}C^~~x]SDm <,&6=͔n/W3K0aGM L˃>O<7vJaa!u?R4D_I뱤YcJҥ +Vȑ#,]ގI-Tn޼yqTWWe>lm|$b,Ĉi{;u)=%%L~3g-j6_t)۷o#--:zḞV7Q@`*kL<|i\ w Nbe71PqLT3`=Sĉߏ*vZª_jbu,e7-ԇ";^@̘1siYՈl1:jm(iVRo4EqTVV`nNQ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4!ljRռ$ ^ד?bOʬ'U&ßD$t;x "z2xЋIgßW/H])jg!~ #3 {z2?VT`٤CH5Z9/Xcp%,^wrXU}U"~&#`Sfd C[3|xn|(V D|WoUul^;UuW.{L'vEF!6E;H8Czc=T1  &tnVדc7a?%trM DDjcK/Uu]Xl.'w)A>O6}qLS©B)3Ҡ|惪;aSgQj8 PHS8$=Ag̊EHBHn#Jf{@dе'aS>*7A.[ ޏk `b (tU?S&_ Q9.ɮٗ C!OϨRStB vVKqНJA0`NOXRC!ִT3VଭBdS."h ƒdbBI&%,t=Y|!=&t4 حhU"'C0S@p(bx{Bp2S1v{_"`Ap ZOuiv0`F o*.XG h.7`"0pQls`vJbTtttdDԖ{xV.ajQFBr?$$(hE_OG0M &1`mÜ&'`ZTg79ףL:؏{ Q0 n >aFCٿ@if`S(%UX6znԓ3` \OfH%˄PÞ zҽ%R >CF'js}5(%AZ5ta(4LUJ-5S̙ 5@fX3f( ד0sFyʏmYr_FqZzI#& +A?d~lQIENDB`kcollectd-0.9/kcollectd/icons/mkicons0000755001345300001440000000070111172576617017510 0ustar berbericusers#!/bin/bash SVGS="oxsc-mime-kcollectdgraph.svgz oxsc-app-kcollectd.svgz" for i in $SVGS; do [[ $i =~ ^([a-zA-Z]+)sc-([a-z]+)-([^ ]+)\.svgz$ ]] if [ $? != 0 ]; then echo "Name '$i' does not match" continue fi TYPE=${BASH_REMATCH[1]} GROUP=${BASH_REMATCH[2]} NAME=${BASH_REMATCH[3]} for SIZE in 16 22 32 48 64 128; do inkscape --export-png "${TYPE}${SIZE}-${GROUP}-${NAME}.png" --export-width $SIZE "$i" done donekcollectd-0.9/kcollectd/icons/CMakeLists.txt0000644001345300001440000000005111172576617020655 0ustar berbericusers kde4_install_icons(${ICON_INSTALL_DIR})kcollectd-0.9/kcollectd/icons/oxsc-mime-application-x-kcollectd.svgz0000644001345300001440000002534211210764452025440 0ustar berbericusers}ks7\ˤl~Qy˒Jjvfo)ZdH|ɯI6ba q98w_/`p=n_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/d;1 R 4f hoÎb)ciV NRHXzx(!u6^I*3*ƀ儧R !Ş02f (I e_f!hDLcѩA'ܬL:hF%e#X*@URQFM~K=GD4XBjj`GD/;-ef#XbB`2BXWXLKKX9H|0Y.:FX  9Ut4AUa2 ,=7aq5HH/s( {ARDŽPJtR[s0-E II*˜hH.rN Ve R# `oݢ2ޔ])ݺkMfբL>2H"un1:]ҨH;J._T1A7#Q ꁢ`\2,6}~aE*~HSa x~Z=X{Ȼ[=A@eZՕCiвR4$>?ّ$dGRIUH1YsNZB۔=Kv0oYl}'RSܔA|VvF^6EѮ|Fs%&VPbWgW/wL 151u+%~5lW]jϭ1X~neOzѽVe wO~G:,?Qh4kcollectd-0.9/kcollectd/icons/ox64-mime-application-x-kcollectd.png0000644001345300001440000001037011210764452025052 0ustar berbericusersPNG  IHDR@@iqsBIT|d pHYsu85tEXtSoftwarewww.inkscape.org<uIDATx՛ytU?*+ k(E hO Y>:Ӷ}l#Q4qAi(m,c A2H d!! Y߾ם?[J:;{[~wW%!0UHDzB2z+K@| E0# /HH dz X2k o5e4P_SRRPU :0@f!DP12:NǔcKHFxH#g@a(|dx4ޮCyq%Td}*= =x|f7"'L镀MZB(mVz' A0k=\GEG׃է._ONx(/B1sݠ713^D ѝ.++6,n{fw!pqz}voz0PDOYi)֭fG.Odu#Ȍbv[3 ---̞= Ŕ' &F'=xq֯dU+*bʔ|‹/r}e@|xYx^0u7n;wdѢEω~n0Yu+iiimwu/mu˅E'YC)H1 z@G̟7O?4 "xu|=tbp)--nPZZJ~~>cfsc(uO]?:/%9 Y`NEQ8q"{n쏘 x$l߾_xiFee%se˖-}'D\ =p_AZx[cҥ4wqnq_Lee%{졤J͛ѣG7n\\=eee7!e0 Svvuή.e.EZ,iZjVMl6y\u]ի{'t:zp---rܸq?'^x:ę3g8wg1m /TXwTUq8oEkk+ׯG48t'N@JÇfԩngȑ~Mɓkc񔖖G|r&LWQTU8.݄/[<Ϝ9믿лرc6mZBF!C4idffe˖EEE%C" $)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bericusersPNG  IHDRĴl;sBIT|d pHYsaa0UtEXtSoftwarewww.inkscape.org<IDAT8_L[U?v"ReIx0)8#a(&2lŹH$Af l<@dd 34!iDfHD#{0s2Q Z.mo=>k)#1_~ss9B)BgJ%$T=)e."1"OH &R(++\Z)%B$vBJKK=vۙ> $o`7jm_]]ŋH!ɾA-XJd|D znwbʳJM{~##r&--MtSP)RիRΝM9})%i211qR`X4OO,(** ׋EJJlBJXX\#sLMVJ!ÑUmS=|9*9B34550>Ñފ4} d9{xHGR]]8TTTd3+,}=yⶓO\.˲,-*BL&]בL$077h4' 0MTJ)n%]gIYTU,#k-b$a>gRa^'  M^{p333DŽ> %ALx^199 χYd2l쬷xqy#'cy3FrB!.ċg]nנ\px˻qZG9ɍ8={ej5 m~]m 뿏ܲ>K atB:). _1{ a`oo_WpBl`?rx ݉AF4ypp@˲Xh48mf\f6e,z}$iHbHyB'!Mq4N,3äIENDB`kcollectd-0.9/kcollectd/icons/ox16-app-kcollectd.png0000644001345300001440000000122511172576617022144 0ustar berbericusersPNG  IHDRasBIT|d pHYs:tEXtSoftwarewww.inkscape.org<IDAT8MHTaEbț,ɠ6j #-#Z .B Zd LZpB࢚2g&N-,9yߗPU@?` 8gP'U!#P Aw[D^_y'`AU9h^]!`X5Ai// 70BUgLw$T Ov?oulX丈l#oIJ : >&`+0 EGDxyJɤyqD9]%:oh~^^8@lf`ڢ>PRCmDn q4ʸ!i*YZ喝`sZ'8(.t^s1\Ԋ<[G%-3PJF"9f8` f/ۿ(/MiZMK}& ;Jܨdkp1 dIC3vJy(1Ij@n窛F7G MagIENDB`kcollectd-0.9/kcollectd/icons/oxsc-app-kcollectd.svgz0000644001345300001440000000671311172576617022537 0ustar berbericusersIcrsc-app-kcollectd.svgzY[o~/ J.~%6EX\\Y}oNIhe=3sWy3YVf{a)vա_޿b}8E]nm}ptZe}]?˧|x6[,pMepZm׳vqmrWC}Z\.g}˷uWS:y8m>nnIM2Ƹj;C]PӲOM}^}=o73HKw f9^2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*ĽϰoȎØH.=.E'؆%ph8,NێpjQq&`Iu-R i9 j[B=ԙtF]Juz?;#kcollectd-0.9/kcollectd/icons/ox32-mime-application-x-kcollectd.png0000644001345300001440000000335311210764452025050 0ustar berbericusersPNG  IHDR szzsBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<hIDATX]loY(42B\%*MVNۋT@T(^^ZܠBֽAj*rZ.P&6&6 ^k׻;w]V9̜o5h|抈af (|@%PpY &"@IRn.2MP E53x|>V;@L Ӳg\yWUKXjTRD*^??KY+rJ)s3΋iJ4 酅4W$2L˖v:;; }}:tW#bY)0pM>rbaq8%%y- %мF{XJ15=溺,&T9ePJc1.laxhFil,h-R!x<.Y$67's ILMMI2T*%aٳgR444i 0 1MSLӔt:-XLL˲hYܢ=P,ϝ`p pe.]s)N _.DOǐ9Wcǹ+PD~V;W>yI.}z/f?ȖLĶc8fV}'glGBDmz?QU6/bfo'\t ;`\Y>kǿ {/<UtkOضM#;LuW^kpG]b8mۘIcMP"noWq8—ODzsDS3ZG0Zu<֓Lܼy3zdwPlOGߥ9Dd2I,#1334O8`--h6RU$>aLLL0888ں\|_n]@ @mm-f;lL??6džy"CC}y"4/,\!{^i,"HF`xx8#5@_ lasBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATxwՕ￧G# *D2BD$- XYGۀx6N` %KBi?ӟ{{Ue@D|U]mz, Ov]S u"r,VK*DdX,C;]ȻaemDVHU-t6p 䁣TJi?O 9> x?hx9~;nnwR_E>p8w.wḄss;7^pnުC$sEM82Qu`)vΒTbth[)趘ui)p4>h4UN?0Ie%xnjgv|$"r<0Swf32Hc_ܬDoz  ?b>ڥ "iwjiJ`"܋;0J<}Vi(n0*"D``c&Uun'ێb4KJ`K=T{8bRBaKwvR G|@D2L@U ܍wU|;۫Q-\\( Y%ssX0ުXxl7 F",66U0 %@ "2xCUiwbfV޿YgȈno+5n lLVˀ2U}%31{H|, ">"0EU_c0|,77ӱFIUsm )lfDd!5:$`17p~m4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B3", "2 c #E5E5E5", "3 c #BFBFBF", "4 c #ECF9EB", "5 c #4BCF43", "6 c #0CC400", "7 c #0DD200", "8 c #0ED500", "9 c #0DD100", "0 c #0CC200", "a c #DEF5DC", "b c #DFF6DE", "c c #53D24A", "d c #B0B0B0", "e c #F6F6F6", "f c #AAAAAA", "g c #D2F2D1", "h c #25CF1B", "i c #10ED01", "j c #10F701", "k c #0FE801", "l c #1EE610", "m c #11EB03", "n c #11F901", "o c #0FE701", "p c #89E084", "q c #81DD7B", "r c #29C720", "s c #C4C4C4", "t c #505050", "u c #080808", "v c #353535", "w c #7F7F7F", "x c #F8F8F8", "y c #FCFEFC", "z c #A2E79E", "A c #13DA07", "B c #12D405", "C c #9FE69A", "D c #F5FCF5", "E c #89E184", "F c #13DC06", "G c #10F801", "H c #0ED600", "I c #14C109", "J c #86DE81", "K c #13C108", "L c #099201", "M c #C7CCC7", "N c #EDEDED", "O c #515151", "P c #B4B6B4", "Q c #838383", "R c #151515", "S c #878787", "T c #F5F5F5", "U c #959995", "V c #FCFCFC", "W c #E4F8E4", "X c #49D941", "Y c #11D604", "Z c #EFFBEE", "` c #59D651", " . c #0FE901", ".. c #10EF01", "+. c #10C504", "@. c #C5EFC2", "#. c #D7F5D6", "$. c #1FCC13", "%. c #10F001", "&. c #0CC300", "*. c #098C00", "=. c #879F87", "-. c #B1B1B1", ";. c #AFAFAF", ">. c #6F6F6F", ",. c #2A2A2A", "'. c #B3EAAF", "). c #52D14B", "!. c #9A9A9A", "~. c #202020", "{. c #B4B4B4", "]. c #A9AEA9", "^. c #10770A", "/. c #99E495", "(. c #18DF0A", "_. c #12D306", ":. c #9EE599", "<. c #E6F9E6", "[. c #28C81E", "}. c #10EC01", "|. c #0FE201", "1. c #0CC000", "2. c #85DE7F", "3. c #D6F4D4", "4. c #0EDE00", "5. c #10F601", "6. c #0ED200", "7. c #A6E7A3", "8. c #3C3C3C", "9. c #6A726A", "0. c #20C415", "a. c #0DC002", "b. c #E8F8E7", "c. c #E6E6E6", "d. c #000000", "e. c #D2D2D2", "f. c #A1E69C", "g. c #0FEC01", "h. c #0FEB01", "i. c #4ED446", "j. c #E1F6DF", "k. c #FDFEFD", "l. c #4AD042", "m. c #32C928", "n. c #FAFEFA", "o. c #1DC412", "p. c #0DCB00", "q. c #10F201", "r. c #0ED300", "s. c #74DC6E", "t. c #878887", "u. c #092109", "v. c #9BE497", "w. c #212121", "x. c #FEFEFE", "y. c #3ACB31", "z. c #0EDD00", "A. c #88DF83", "B. c #0ED800", "C. c #10F101", "D. c #0CC100", "E. c #B7ECB5", "F. c #D2F3D0", "G. c #26C61C", "H. c #0DCE00", "I. c #1EF70F", "J. c #32ED26", "K. c #26B81D", "L. c #000500", "M. c #054700", "N. c #0A9F00", "O. c #11650C", "P. c #131313", "Q. c #6A6A6A", "R. c #CAF0C7", "S. c #0DCF00", "T. c #15C20A", "U. c #0FE101", "V. c #0CC500", "W. c #4DD045", "X. c #3ECD36", "Y. c #0DC800", "Z. c #0BAB01", "`. c #19A70F", " + c #26B91C", ".+ c #145610", "++ c #000600", "@+ c #033200", "#+ c #2B8226", "$+ c #D1D4D1", "%+ c #64D65C", "&+ c #0DCA00", "*+ c #0EBF03", "=+ c #EAF8E9", "-+ c #21C417", ";+ c #D5F3D3", ">+ c #F7FCF7", ",+ c #79DC72", "'+ c #45CE3C", ")+ c #51B04A", "!+ c #669263", "~+ c #BFCEBE", "{+ c #498E44", "]+ c #0FE401", "^+ c #5EDA57", "/+ c #69D361", "(+ c #098C01", "_+ c #0CB501", ":+ c #1FCD14", "<+ c #3BCC32", "[+ c #36CA2D", "}+ c #DAF5D9", "|+ c #C9C9C9", "1+ c #ACADAC", "2+ c #7BDD76", "3+ c #1DE40F", "4+ c #14B90A", "5+ c #50974C", "6+ c #F4FBF4", "7+ c #CBF0C8", "8+ c #56D34E", "9+ c #85DF80", "0+ c #EAF9EA", "a+ c #DADADA", "b+ c #C1C1C1", "c+ c #FBFBFB", ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . + @ . . . . . . . . . # $ . . . . % & . . . . . . . . . . . . . ", ". . . . . . . . . . . . * = - ; > , ' . . . ) ! . . ~ { ] . . . . ^ / . . . . . . . . . . . . . ", ". . . . . . . . . . . ( _ : : : : : < . . . [ } . . . | 1 . . . 2 3 . . . . . . . . . . . . . . ", ". . . . . . . . . 4 5 6 7 8 9 0 : : : a . b : c . . . . d ~ e . f . . . . . . . . . . . . . . . ", ". . . . . . . . g h i j k l m n o 6 : p . q : r . . . . s t u v w x . . . . . . . . . y . . . . ", ". . . . . . . z A j B C 4 . D E F G H I J K : L M . . N u O P Q R S . . T U V . . W X Y ; . . . ", ". . . . . Z ` ...+.@.. . . . . #.$.%. .&.: : *.=.-.;.>.,.'.).. !.~.1 {.].^.[ ) /.(.j _.:.. . . ", ". . . . <.[.}.|.1.2.. . . . . . . 3._ 4.5.6.: : 7.. . 8.9.0.a.b.c.d.e.. f.: : &.g.h.i.j.. . . . ", ". . . k.l.|. .: m.n.. . . . . . . . g o.p.i q.r.s.. . t.u.: : v.!.w.x.. y.: p.5.z.: 3.. . . . . ", ". . . A.B.C.D.: E.. . . . . . . . . . F.G.: H.h.n I.J.K.L.M.N.O.P.Q.. R.: S.j S.: : a . . . . . ", ". . n.T.U.V.: W.. . . . . . . . . . . . <.X.: : : Y.Z.`. +.+++@+#+$+;.%+6.j &+: : *+D . . . . . ", ". . . =+J -+*+;+. . . . . . . . . . . . . >+,+'+)+!+~+. . . {+]+ .^+/+(+_+:+<+: : [+. . . . . . ", ". . . . . k.}+. . . . . . . . . . . . . . . . . |+{.. . . . 1+2+3+n 5.4+5+6+. 7+8+9+. . . . . . ", ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ;.. . ;+0+. . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~ Q a+. . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b+c+. . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "}; kcollectd-0.9/kcollectd/rrd_interface.cc0000644001345300001440000000554211201554660020115 0ustar berbericusers/* -*- c++ -*- * * (C) 2008 M G Berberich * */ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include "rrd_interface.h" /** * wrapper for rrd_info taking a string instead of char* * * copying the filename is probably unnecessary, but the signature of * rrd_info does not guarantee leaving it alone. */ static inline rrd_info_t *rrd_info(int, const std::string &filename) { char c_file[filename.length()+1]; filename.copy(c_file, std::string::npos); c_file[filename.length()] = 0; char * arg[] = { 0, c_file, 0 }; return rrd_info(2, arg); } /** * read the datasources-names of a rrd * * using rrd_info */ void get_dsinfo(const std::string &rrdfile, std::set &list) { using namespace std; list.clear(); rrd_info_t *infos = rrd_info(2, rrdfile); rrd_info_t *i = infos; while (i) { string line(i->key); if (line.substr(0,3) == "ds[") { size_t e = line.find("].type"); if (e != string::npos) { string name = line.substr(3, line.find("].type")-3); list.insert(name); } } i = i->next; } if (infos) rrd_info_free(infos); } /** * gets data from a rrd * * @a start and @a end may get changed from this function and represent * the start and end of the data returned. */ void get_rrd_data (const std::string &file, const std::string &ds, time_t *start, time_t *end, unsigned long *step, const char *type, std::vector *result) { unsigned long ds_cnt = 0; char **ds_name; rrd_value_t *data; int status; result->clear(); status = rrd_fetch_r(file.c_str(), type, start, end, step, &ds_cnt, &ds_name, &data); if (status != 0) { return; } const unsigned long length = (*end - *start) / *step; for(unsigned int i=0; ipush_back (data[n * ds_cnt + i]); break; free(ds_name[i]); } free(ds_name); free(data); } kcollectd-0.9/kcollectd/misc.h0000644001345300001440000000403411212757202016075 0ustar berbericusers/* -*- c++ -*- */ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef LABELING_H #define LABELING_H #include #include bool si_char(double d, std::string &s, double &m); std::string si_number(double d, int p, const std::string &s, double m); QString Qstrftime(const char *format, const tm *t); /** * linear mapping from range [x1, x2] to range [y1, y2] */ class linMap { double m_, t_; public: linMap(double x1, double y1, double x2, double y2) { m_ = (y2-y1)/(x2-x1); t_ = y1-m_*x1; } double operator()(double x) const { return m_ * x + t_; } double m() const { return m_; } }; /** * small helper holding tow doubles e.g. a point */ class Range { double x_; double y_; static const double NaN; public: Range() : x_(NaN), y_(NaN) { } Range(double x, double y) : x_(x), y_(y) { } double min() const { return x_; } double max() const { return y_; } void min(double a) { x_ = a; } void max(double a) { y_ = a; } void set(double x, double y) { x_ = x; y_ = y; } bool isValid() const { return x_ != NaN; } }; Range ds_minmax(const std::vector &avg_data, const std::vector &min_data, const std::vector &max_data); Range range_adj(const Range &range, double *base); Range range_max(const Range &a, const Range &b); #endif kcollectd-0.9/kcollectd/kcollectd.desktop0000644001345300001440000000061211211014674020324 0ustar berbericusers[Desktop Entry] Exec=kcollectd Icon=kcollectd Type=Application Terminal=false StartupNotify=true Categories=Qt;KDE;Utility; MimeType=application/x-kcollectd Name=KDE collectd database-viewer Name[de]=KDE collectd Datenbankbetrachter GenericName=Collectd viewer GenericName[de]=Collectd Datenbankbetrachter Comment=Viewer for collectd-databases Comment[de]=Betrachter für collectd-Datenbanken kcollectd-0.9/kcollectd/rrd_interface.h0000644001345300001440000000227011331347212017747 0ustar berbericusers/* -*- c++ -*- * * (C) 2008 M G Berberich * */ /* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef RRD_INTERAFCE_H #define RRD_INTERAFCE_H #include #include #include void get_dsinfo(const std::string &rrdfile, std::set &list); void get_rrd_data (const std::string &file, const std::string &ds, time_t *start, time_t *end, unsigned long *step, const char *type, std::vector *result); #endif kcollectd-0.9/kcollectd/gui.cc0000644001345300001440000003507211333076672016103 0ustar berbericusers/* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "rrd_interface.h" #include "graph.h" #include "gui.moc" #include "drag_pixmap.xpm" #ifndef RRD_BASEDIR # define RRD_BASEDIR "/var/lib/collectd/rrd" #endif static struct { KStandardAction::StandardAction actionType; const char *name; const char *slot; } standard_actions[] = { { KStandardAction::ZoomIn, "zoomIn", SLOT(zoomIn()) }, { KStandardAction::ZoomOut, "zoomOut", SLOT(zoomOut()) }, { KStandardAction::Open, "open", SLOT(load()) }, { KStandardAction::SaveAs, "save", SLOT(save()) }, { KStandardAction::Quit, "quit", SLOT(close()) }, }; static struct { const char *label; const char *name; const char *slot; } normal_actions[] = { { I18N_NOOP("Last Hour"), "lastHour", SLOT(last_hour()) }, { I18N_NOOP("Last Day"), "lastDay", SLOT(last_day()) }, { I18N_NOOP("Last Week"), "lastWeek", SLOT(last_week()) }, { I18N_NOOP("Last Month"), "lastMonth", SLOT(last_month()) }, { I18N_NOOP("Add New Subgraph"), "splitGraph", SLOT(splitGraph()) }, }; static const std::string delimiter("•"); static void get_datasources(const std::string &rrdfile, const std::string &info, QTreeWidgetItem *item) { std::set datasources; get_dsinfo(rrdfile, datasources); if (datasources.size() == 1) { item->setFlags(item->flags() | Qt::ItemIsSelectable); item->setText(1, QString::fromUtf8(info.c_str())); item->setText(2, QString::fromUtf8(rrdfile.c_str())); item->setText(3, QString::fromUtf8((*datasources.begin()).c_str())); } else { for(std::set::iterator i=datasources.begin(); i != datasources.end(); ++i){ QStringList SL(i->c_str()); SL.append(QString::fromUtf8((info + delimiter + *i).c_str())); SL.append(QString::fromUtf8(rrdfile.c_str())); SL.append(QString::fromUtf8(i->c_str())); QTreeWidgetItem *dsitem = new QTreeWidgetItem(item, SL); item->setFlags(dsitem->flags() & ~Qt::ItemIsSelectable); } } } static QTreeWidgetItem *mkItem(QTreeWidget *listview, std::string s) { return new QTreeWidgetItem(listview, QStringList(QString(s.c_str()))); } static QTreeWidgetItem *mkItem(QTreeWidgetItem *item, std::string s) { return new QTreeWidgetItem(item, QStringList(QString(s.c_str()))); } static void get_rrds(const boost::filesystem::path rrdpath, QTreeWidget *listview) { using namespace boost::filesystem; const directory_iterator end_itr; for (directory_iterator host(rrdpath); host != end_itr; ++host ) { if (is_directory(*host)) { QTreeWidgetItem *hostitem = mkItem(listview, host->leaf()); hostitem->setFlags(hostitem->flags() & ~Qt::ItemIsSelectable); for (directory_iterator sensor(*host); sensor != end_itr; ++sensor ) { if (is_directory(*sensor)) { QTreeWidgetItem *sensoritem = mkItem(hostitem, sensor->leaf()); sensoritem->setFlags(sensoritem->flags() & ~Qt::ItemIsSelectable); for (directory_iterator rrd(*sensor); rrd != end_itr; ++rrd ) { if (is_regular(*rrd) && extension(*rrd) == ".rrd") { QTreeWidgetItem *rrditem = mkItem(sensoritem, basename(*rrd)); rrditem->setFlags(rrditem->flags() & ~Qt::ItemIsSelectable); std::ostringstream info; info << host->leaf() << delimiter << sensor->leaf() << delimiter << basename(*rrd); get_datasources(rrd->string(), info.str(), rrditem); } } } } } } listview->sortItems(0, Qt::AscendingOrder); } /** * Constructs a KCollectdGui * * @param parent parent-widget see KMainWindow */ KCollectdGui::KCollectdGui(QWidget *parent) : KMainWindow(parent), action_collection(parent) { // standard_actions for (size_t i=0; i< sizeof(standard_actions)/sizeof(*standard_actions); ++i) actionCollection()->addAction(standard_actions[i].actionType, standard_actions[i].name, this, standard_actions[i].slot); // normal actions for (size_t i=0; i< sizeof(normal_actions)/sizeof(*normal_actions); ++i) { KAction *act = new KAction(i18n(normal_actions[i].label), this); connect(act, SIGNAL(triggered()), this, normal_actions[i].slot); actionCollection()->addAction(normal_actions[i].name, act); } // toggle_actions auto_action = new KAction(KIcon("chronometer"), i18n("Automatic Update"), this); auto_action->setCheckable(true); auto_action->setShortcut(KShortcut("f8")); actionCollection()->addAction("autoUpdate", auto_action); connect(auto_action, SIGNAL(toggled(bool)), this, SLOT(autoUpdate(bool))); panel_action = new KAction(i18n("Hide Datasource Tree"), this); panel_action->setCheckable(true); panel_action->setShortcut(KShortcut("f9")); actionCollection()->addAction("hideTree", panel_action); connect(panel_action, SIGNAL(toggled(bool)), this, SLOT(hideTree(bool))); // build widgets QWidget *main_widget = new QWidget(this); setCentralWidget(main_widget); QHBoxLayout *hbox = new QHBoxLayout(main_widget); listview_ = new QTreeWidget; listview_->setColumnCount(1); listview_->setHeaderLabels(QStringList(i18n("Sensordata"))); listview_->setRootIsDecorated(true); listview_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); hbox->addWidget(listview_); vbox = new QVBoxLayout; hbox->addLayout(vbox); graph = new Graph; vbox->addWidget(graph); QHBoxLayout *hbox2 = new QHBoxLayout; vbox->addLayout(hbox2); KPushButton *last_month = new KPushButton(i18n("last month")); hbox2->addWidget(last_month); KPushButton *last_week = new KPushButton(i18n("last week")); hbox2->addWidget(last_week); KPushButton *last_day = new KPushButton(i18n("last day")); hbox2->addWidget(last_day); KPushButton *last_hour = new KPushButton(i18n("last hour")); hbox2->addWidget(last_hour); KPushButton *zoom_in = new KPushButton(KIcon("zoom-in"), QString()); zoom_in->setToolTip(i18n("increases magnification")); zoom_in->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); hbox2->addWidget(zoom_in); KPushButton *zoom_out = new KPushButton(KIcon("zoom-out"), QString()); zoom_out->setToolTip(i18n("reduces magnification")); zoom_out->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); hbox2->addWidget(zoom_out); auto_button = new KPushButton(KIcon("chronometer"), QString()); auto_button->setToolTip(i18n("toggle automatic update-and-follow mode.")); #if 1 QString text = i18n("

This button toggles the " "automatic update-and-follow mode

" "

The automatic update-and-follow mode updates the graph " "every ten seconds. " "In this mode the graph still can be zoomed, but always displays " "now near the right edge and " "can not be scrolled any more.
" "This makes kcollectd some kind of status monitor.

"); auto_button->setWhatsThis(text); #endif auto_button->setCheckable(true); auto_button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); hbox2->addWidget(auto_button); // signals connect(listview_, SIGNAL(itemPressed(QTreeWidgetItem *, int)), SLOT(startDrag(QTreeWidgetItem *, int))); connect(last_month, SIGNAL(clicked()), this, SLOT(last_month())); connect(last_week, SIGNAL(clicked()), this, SLOT(last_week())); connect(last_day, SIGNAL(clicked()), this, SLOT(last_day())); connect(last_hour, SIGNAL(clicked()), this, SLOT(last_hour())); connect(zoom_in, SIGNAL(clicked()), this, SLOT(zoomIn())); connect(zoom_out, SIGNAL(clicked()), this, SLOT(zoomOut())); connect(auto_button, SIGNAL(toggled(bool)), this, SLOT(autoUpdate(bool))); // Menu KMenu *fileMenu = new KMenu(i18n("&File")); menuBar()->addMenu(fileMenu); fileMenu->addAction(actionCollection()->action("open")); fileMenu->addAction(actionCollection()->action("save")); fileMenu->addSeparator(); fileMenu->addAction(actionCollection()->action("quit")); KMenu *editMenu = new KMenu(i18n("&Edit")); menuBar()->addMenu(editMenu); editMenu->addAction(actionCollection()->action("splitGraph")); KMenu *viewMenu = new KMenu(i18n("&View")); menuBar()->addMenu(viewMenu); viewMenu->addAction(actionCollection()->action("zoomIn")); viewMenu->addAction(actionCollection()->action("zoomOut")); viewMenu->addSeparator(); viewMenu->addAction(actionCollection()->action("lastHour")); viewMenu->addAction(actionCollection()->action("lastDay")); viewMenu->addAction(actionCollection()->action("lastWeek")); viewMenu->addAction(actionCollection()->action("lastMonth")); viewMenu->addSeparator(); viewMenu->addAction(actionCollection()->action("autoUpdate")); viewMenu->addSeparator(); viewMenu->addAction(actionCollection()->action("hideTree")); menuBar()->addMenu(helpMenu()); // build rrd-tree get_rrds(RRD_BASEDIR, listview()); } KCollectdGui::~KCollectdGui() { } void KCollectdGui::startDrag(QTreeWidgetItem *widget, int col) { // if (event->button() == Qt::LeftButton // && iconLabel->geometry().contains(event->pos())) { QDrag *drag = new QDrag(this); GraphMimeData *mimeData = new GraphMimeData; if (widget->text(1).isEmpty()) return; mimeData->setText(widget->text(1)); mimeData->setGraph(widget->text(2), widget->text(3), widget->text(1)); drag->setMimeData(mimeData); drag->setPixmap(QPixmap(drag_pixmap_xpm)); drag->exec(); } void KCollectdGui::set(Graph *new_graph) { if (graph) { vbox->removeWidget(graph); delete graph; } vbox->insertWidget(0, new_graph); } void KCollectdGui::autoUpdate(bool t) { auto_button->setChecked(t); auto_action->setChecked(t); graph->autoUpdate(t); } void KCollectdGui::hideTree(bool t) { listview_->setHidden(t); } void KCollectdGui::load() { QString file = KFileDialog::getOpenFileName(KUrl(), "application/x-kcollectd", this); if (file.isEmpty()) return; load(file); } void KCollectdGui::save() { QString file = KFileDialog::getSaveFileName(KUrl(), "application/x-kcollectd", this); if (file.isEmpty()) return; QFile out(file); if (out.exists()) { int answer = KMessageBox::questionYesNo(this, i18n("file ‘%1’ allready exists.\n" "Do you want to overwrite it?", file)); if (answer != KMessageBox::Yes) { return; } } out.close(); save(file); } void KCollectdGui::load(const QString &file) { QFile in(file); if (in.open(QIODevice::ReadOnly)) { QDomDocument doc; doc.setContent(&in); graph->clear(); QDomElement t = doc.documentElement().firstChildElement("tab"); while(!t.isNull()) { QDomElement g = t.firstChildElement("graph"); while(!g.isNull()) { GraphInfo &graphinfo = graph->add(); QDomElement p = g.firstChildElement("plot"); while(!p.isNull()) { graphinfo.add(p.attribute("rrd"), p.attribute("ds"), p.attribute("label")); p = p.nextSiblingElement(); } g = g.nextSiblingElement(); } t = t.nextSiblingElement(); } filename = file; graph->changed(false); } else { KMessageBox::detailedSorry(this, i18n("reading file ‘%1’ failed.", filename), i18n("System message is: ‘%1’", in.errorString())); } } void KCollectdGui::save(const QString &file) { QFile out(file); if (out.open(QIODevice::WriteOnly)) { QXmlStreamWriter stream(&out); stream.setAutoFormatting(true); stream.writeStartDocument(); stream.writeDTD(""); stream.writeStartElement("kcollectd"); stream.writeStartElement("tab"); for(Graph::const_iterator i = graph->begin(); i != graph->end(); ++i) { stream.writeStartElement("graph"); for(GraphInfo::const_iterator j = i->begin(); j != i->end(); ++j) { stream.writeStartElement("plot"); stream.writeAttribute("rrd", j->rrd); stream.writeAttribute("ds", j->ds); stream.writeAttribute("label", j->label); stream.writeEndElement(); } stream.writeEndElement(); } stream.writeEndElement(); stream.writeEndElement(); stream.writeEndDocument(); filename = file; graph->changed(false); } else { KMessageBox::detailedSorry(this, i18n("opening the file ‘%1’ for writing failed.", filename), i18n("System message is: ‘%1’", out.errorString())); } } void KCollectdGui::saveProperties(KConfigGroup &conf) { conf.writeEntry("hide-navigation", listview_->isHidden()); conf.writeEntry("auto-update", graph->autoUpdate()); conf.writeEntry("range", qint64(graph->range())); if (!graph->changed() && !filename.isEmpty()) { conf.writeEntry("filename", QDir().absoluteFilePath(filename)); conf.writeEntry("file-is-session", false); } else { char hostname[100]; gethostname(hostname, sizeof(hostname)); QString file = QString("%1session-%2-%3") .arg(KGlobal::dirs()->saveLocation("appdata")) .arg(hostname) .arg(getpid()); save(file); conf.writeEntry("filename", file); conf.writeEntry("file-is-session", true); } } void KCollectdGui::readProperties(const KConfigGroup &conf) { bool nav = conf.readEntry("hide-navigation", false); bool aut = conf.readEntry("auto-update", false); time_t range = conf.readEntry("range", 24*3600); QString file = conf.readEntry("filename", QString()); bool file_is_session = conf.readEntry("file-is-session", false); if (!file.isEmpty()) { load(file); if (file_is_session) { QFile::remove(file); graph->changed(true); } else { filename = file; } } panel_action->setChecked(nav); autoUpdate(aut); graph->last(range); } kcollectd-0.9/kcollectd/misc.cc0000644001345300001440000001120711201554660016234 0ustar berbericusers/* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include "misc.h" /** * determine the apropriate SI-prefix for a number */ bool si_char(double d, std::string &s, double &m) { const struct { double factor; const char * const si_char; } si_table[] = { { 1e-24, "y" }, { 1e-21, "z" }, { 1e-18, "a" }, { 1e-15, "f" }, { 1e-12, "p" }, { 1e-9, "n" }, { 1e-6, "µ" }, { 1e-3, "m" }, { 1, "" }, { 1e3, "k" }, { 1e6, "M" }, { 1e9, "G" }, { 1e12, "T" }, { 1e15, "P" }, { 1e18, "E" }, { 1e21, "Z" }, { 1e24, "Y" }, }; const int tablesize = sizeof(si_table)/sizeof(*si_table); int i; for(i=0; i < tablesize; ++i) { if (d < si_table[i].factor) break; } if (i == 0 || i == tablesize) { m = 1.0; s = ""; return false; } else { --i; m = si_table[i].factor; s = si_table[i].si_char; return true; } } /** * formats a number with prefix s and magnitude m, precission p */ std::string si_number(double d, int p, const std::string &s, double m) { std::ostringstream os; os << std::setprecision(p) << d/m; if (!s.empty()) os << " " << s; return os.str(); } /** * some kind of strftime that returns a QString and handles locale * !! strftime already is localized */ QString Qstrftime(const char *format, const tm *t) { char buffer[50]; if(strftime(buffer, sizeof(buffer), format, t)) return QString::fromLocal8Bit(buffer); else return QString(); } /** * determine min and max values for a graph and save it into y_range */ Range ds_minmax(const std::vector &avg_data, const std::vector &min_data, const std::vector &max_data) { const std::size_t size = avg_data.size(); // all three datasources must be of equal length if (size != min_data.size() || size != max_data.size()) return Range(); bool valid = false; double min(std::numeric_limits::max()); double max(std::numeric_limits::min()); // process avg_data if (!avg_data.empty()) { for(std::size_t i=0; i avg_data[i]) min = avg_data[i]; if (max < avg_data[i]) max = avg_data[i]; } } // process min/max-data if (!min_data.empty() && !max_data.empty()) { for(std::size_t i=0; i min_data[i]) min = min_data[i]; if (max < min_data[i]) max = min_data[i]; if (min > max_data[i]) min = max_data[i]; if (max < max_data[i]) max = max_data[i]; } } // no data found at all if(!valid) return Range(); return Range(min, max); } /** * determine min and max values for a graph and base * and do some adjustment */ Range range_adj(const Range &y_range, double *base) { if(!y_range.isValid()) return Range(); double min(y_range.min()), max(y_range.max()); double tmp_base = 1.0; if (y_range.min() == y_range.max()) { max += 1; min -= 1; } else { // allign to sensible values tmp_base = pow(10, floor(log(max-min)/log(10))); min = floor(min/tmp_base)*tmp_base; max = ceil(max/tmp_base)*tmp_base; // setting some margin at top and bottom const double margin = 0.05 * (max-min); max += margin; min -= margin; } if (base) *base = tmp_base; return Range(min, max); } /** * merges two ranges @a a and @a b into a range, so that the new range * encloses @a a and @a b. */ Range range_max(const Range &a, const Range &b) { if (!a.isValid() || !b.isValid()) return Range(); Range r; r.min(fmin(a.min(), b.min())); r.max(fmax(a.max(), b.max())); return r; } // definition of NaN in Range const double Range::NaN = std::numeric_limits::quiet_NaN(); kcollectd-0.9/kcollectd/timeaxis.cc0000644001345300001440000000614411201554660017130 0ustar berbericusers/* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "timeaxis.h" void time_iterator::set(time_t start, time_t st, it_type ty) { step = st; if (!step) return; type = ty; switch(type) { case seconds: { tzset(); localtime_r(&start, &now_tm); now_t = ((start + now_tm.tm_gmtoff + step) / step) * step - now_tm.tm_gmtoff; break; } case weeks: tzset(); localtime_r(&start, &now_tm); step *= 3600*24*7; now_tm.tm_sec = now_tm.tm_min = now_tm.tm_hour = 0; now_tm.tm_mday -= now_tm.tm_wday - (now_tm.tm_wday == 0 ? 1 : 8); now_t = mktime(&now_tm); break; case month: tzset(); localtime_r(&start, &now_tm); now_tm.tm_sec = now_tm.tm_min = now_tm.tm_hour = 0; if (now_tm.tm_mon == 11) { now_tm.tm_mon = 0; ++now_tm.tm_year; } else { ++now_tm.tm_mon; } now_tm.tm_mday = 1; now_t = mktime(&now_tm); break; case years: tzset(); localtime_r(&start, &now_tm); now_tm.tm_sec = now_tm.tm_min = now_tm.tm_hour = 0; now_tm.tm_mon = 0; now_tm.tm_mday = 1; ++now_tm.tm_year; now_tm.tm_isdst = 0; now_t = mktime(&now_tm); break; } } time_iterator &time_iterator::operator++() { switch(type) { case seconds: case weeks: now_t += step; break; case month: // max step is 12! now_tm.tm_mon += step; if (now_tm.tm_mon >= 12) { now_tm.tm_mon -= 12; ++now_tm.tm_year; } now_t = mktime(&now_tm); break; case years: now_tm.tm_year += step; now_t = mktime(&now_tm); break; } return *this; } time_iterator &time_iterator::operator--() { switch(type) { case seconds: case weeks: now_t -= step; break; case month: // max step is 12! now_tm.tm_mon -= step; if (now_tm.tm_mon < 1) { now_tm.tm_mon += 12; --now_tm.tm_year; } now_t = mktime(&now_tm); break; case years: now_tm.tm_year -= step; now_t = mktime(&now_tm); break; } return *this; } time_t time_iterator::interval() { switch(type) { case seconds: case weeks: return step; case month: return step * 3600*24*30; case years: return step * 3600*24*365; } return 0; } const struct tm *time_iterator::tm() { switch(type) { case seconds: case weeks: tzset(); localtime_r(&now_t, &now_tm); break; case month: case years: break; } return &now_tm; } kcollectd-0.9/kcollectd/kcollectd.xml0000644001345300001440000000051111211014674017451 0ustar berbericusers kcollectd graphdescription kcollectd Graphbeschreibung kcollectd-0.9/kcollectd/graph.cc0000644001345300001440000006660611331347212016414 0ustar berbericusers/* Constructs a font object that uses the application's default font. * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include "rrd_interface.h" #include "misc.h" #include "timeaxis.h" #include "graph.moc" // some magic numbers // colors static const double colortable[][3] = { { 0, 255, 0}, { 255, 0, 255 }, { 0, 128, 255 }, { 255, 128, 0 }, { 0, 255, 191}, { 64, 0, 255 }, { 255, 0, 64 }, { 191,255,0 } }; // magnification for the header-font static const double header_font_mag = 1.2; // distance between elements const int marg = 2; inline double norm(const QPointF &a) { return sqrt(a.x()*a.x() + a.y()*a.y()); } /** * draw an arrow * origin: IRC:peppe */ void drawArrow(QPainter &p, const QPoint &first, const QPoint &second) { p.save(); QPen pen = p.pen(); const int width = pen.width(); p.translate(second); QPointF difference = second - first; double angle = atan2(difference.y(), difference.x()); angle *= 180.0/M_PI; // to degrees p.rotate(angle); static const QPointF arrow[] = { QPoint(0.0, 0.0), QPoint(-5.0*width, -2.0*width), QPoint(-4.0*width, 0.0), QPoint(-5.0*width, 2.0*width) }; p.setBrush(QBrush(pen.color(), Qt::SolidPattern)); p.drawLine(-4.0*width, 0.0, -norm(difference), 0.0); pen.setWidth(0); p.setPen(pen); p.drawPolygon(arrow, 4); p.restore(); } /** * */ Graph::Graph(QWidget *parent) : QFrame(parent), data_is_valid(false), start(time(0)-3600*24), span(3600*24), step(1), dragging(false), font(KGlobalSettings::generalFont()), small_font(KGlobalSettings::smallestReadableFont()), color_major(140, 115, 60), color_minor(80, 65, 34), color_graph_bg(0, 0, 0), //color_major(255, 180, 180), color_minor(220, 220, 220), //color_graph_bg(255, 255, 255), //color_minmax(180, 255, 180, 200), color_line(0, 170, 0), autoUpdateTimer(-1) { setFrameStyle(QFrame::StyledPanel|QFrame::Plain); setMinimumWidth(300); setMinimumHeight(150); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setAcceptDrops(true); // setup color-tables for (int i=0; i<8; ++i) { color_line[i].setRgb(colortable[i][0], colortable[i][1], colortable[i][2]); color_minmax[i].setRgb(0.5*colortable[i][0], 0.5*colortable[i][1], 0.5*colortable[i][2], 160); } // idiotic case-differentiation on point or pixelsize necessary :( if (header_font.pixelSize() == -1) { header_font.setPointSizeF(header_font_mag * header_font.pointSizeF()); } else { header_font.setPixelSize(header_font_mag * header_font.pixelSize()); } struct timezone tz; struct timeval tv; gettimeofday(&tv, &tz); tz_off = tz.tz_minuteswest * 60; } /** * get average, min and max data * * set start end to the values get_rrd_data returns * don't change span, because it can shrink */ bool Graph::fetchAllData () { if (data_is_valid) return (true); if (empty()) return (false); for(graph_list::iterator i = begin(); i != end(); ++i) { for(GraphInfo::iterator j = i->begin(); j != i->end(); ++j) { const std::string file(j->rrd.toUtf8().data()); const std::string ds(j->ds.toUtf8().data()); data_start = start; data_end = start + span; step = 1; get_rrd_data (file, ds, &data_start, &data_end, &step, "MIN", &j->min_data); data_start = start; data_end = start + span; step = 1; get_rrd_data (file, ds, &data_start, &data_end, &step, "MAX", &j->max_data); data_start = start; data_end = start + span; step = 1; get_rrd_data (file, ds, &data_start, &data_end, &step, "AVERAGE", &j->avg_data); } } data_is_valid = true; return (true); } /** * */ void Graph::clear() { glist.clear(); data_is_valid = false; layout(); update(); } int Graph::calcLegendHeights(int box_size, int width) { const QFontMetrics &fontmetric = fontMetrics(); int total_legend_height = 0; for(graph_list::iterator i = begin(); i != end(); ++i) { if (i->empty()) { i->legend_lines(0); continue; } std::vector label_width; for(GraphInfo::const_iterator gi = i->begin(); gi != i->end(); ++gi) label_width.push_back(fontmetric.width(gi->label) + box_size + marg); const int n = label_width.size(); int r; for(r = 1; r < n; ++r) { const int col = (n+r-1)/r; int total_width = 0, i=0; for (int j=0; jlegend_lines(r); total_legend_height += r * fontmetric.lineSpacing(); } return total_legend_height; } void Graph::drawLegend(QPainter &paint, int left, int y, int box_size, const GraphInfo &ginfo) { const QFontMetrics &fontmetric = fontMetrics(); int n = 0, cy = y, cx = left, max_width = 0; int lines = ginfo.legend_lines(); if (lines) { for(GraphInfo::const_iterator i = ginfo.begin(); i != ginfo.end(); ++i) { paint.drawRect(cx, cy-box_size, box_size-1, box_size-1); paint.fillRect(cx+1, cy-box_size+1, box_size-2, box_size-2, color_line[n % 8]); paint.drawText(cx + box_size + marg, cy, i->label); int w = box_size + marg + fontmetric.width(i->label); if (w>max_width) max_width = w; cy += fontmetric.lineSpacing(); ++n; if (n % lines == 0) { cx += max_width + 4*marg; max_width = 0; cy = y; } } } } void Graph::drawHeader(QPainter &paint) { paint.save(); paint.setFont(header_font); const QFontMetrics &fontmetric = paint.fontMetrics(); QString format; time_t time_span = data_end - data_start; if (time_span > 3600*24*356) format = i18n("%Y-%m"); else if (time_span > 3600*24*31) format = i18n("%A %Y-%m-%d"); else if (time_span > 3600*24) format = i18n("%A %Y-%m-%d %H:%M"); else format = i18n("%A %Y-%m-%d %H:%M:%S"); QString buffer_from = Qstrftime(format.toAscii(), localtime(&data_start)); QString buffer_to = Qstrftime(format.toAscii(), localtime(&data_end)); QString label = QString(i18n("from %1 to %2")) .arg(buffer_from) .arg(buffer_to); int x = (contentsRect().left()+contentsRect().right())/2 - fontmetric.width(label)/2; int y = fontmetric.ascent() + marg; paint.drawText(x, y, label); paint.restore(); } void Graph::drawFooter(QPainter &paint, int left, int right) { paint.save(); paint.setFont(header_font); const QFontMetrics &fontmetric = paint.fontMetrics(); QString format; time_t time_span = data_end - data_start; if (time_span > 3600*24*356) format = i18n("%Y-%m"); else if (time_span > 3600*24*31) format = i18n("%A %Y-%m-%d"); else if (time_span > 3600*24) format = i18n("%A %Y-%m-%d %H:%M"); else format = i18n("%A %Y-%m-%d %H:%M:%S"); QString buffer_from = Qstrftime(format.toAscii(), localtime(&data_start)); QString buffer_to = Qstrftime(format.toAscii(), localtime(&data_end)); QString label = QString(i18n("from %1 to %2")) .arg(buffer_from) .arg(buffer_to); fontmetric.width(label); paint.drawText((left+right)/2-fontmetric.width(label)/2, label_y2, label); paint.restore(); } void Graph::drawXLines(QPainter &paint, const QRect &rect, time_iterator i, QColor color) { if (!i.valid()) return; // setting up linear mappings const linMap xmap(data_start, rect.left(), data_end, rect.right()); // if lines are to close draw nothing if (i.interval() * xmap.m() < 3) return; // draw lines paint.save(); paint.setPen(color); for(; *i <= data_end; ++i) { int x = xmap(*i); paint.drawLine(x, rect.top(), x, rect.bottom()); } paint.restore(); } void Graph::drawXLabel(QPainter &paint, int y, int left, int right, time_iterator i, QString format, bool center) { if (!i.valid()) return; paint.save(); paint.setFont(small_font); // setting up linear mappings const linMap xmap(data_start, left, data_end, right); // draw labels paint.setPen(palette().windowText().color()); if (center) --i; for(; *i <= data_end; ++i) { // special handling for localtime/mktime on DST time_t t = center ? *i + i.interval() / 2 : *i; tm tm; localtime_r(&t, &tm); QString label = Qstrftime(i18n(format.toAscii()).toAscii(), &tm); if(! label.isNull()) { const int width = paint.fontMetrics().width(label); int x = center ? xmap(*i + i.interval() / 2) - width / 2 : xmap(*i) - width / 2; if (x > left && x + width < right) paint.drawText(x, y, label); } } paint.restore(); } void Graph::findXGrid(int width, QString &format, bool ¢er, time_iterator &minor_x, time_iterator &major_x, time_iterator &label_x) { const time_t min = 60; const time_t hour = 3600; const time_t day = 24*hour; const time_t week = 7*day; const time_t month = 31*day; const time_t year = 365*day; enum bla { align_tzalign, align_week, align_month }; struct { time_t maxspan; time_t major; time_t minor; const char *format; bool center; bla align; } axis_params[] = { { day, 1*min, 10, "%H:%M", false, align_tzalign }, { day, 2*min, 30, "%H:%M", false, align_tzalign }, { day, 5*min, min, "%H:%M", false, align_tzalign }, { day, 10*min, min, "%H:%M", false, align_tzalign }, { day, 30*min, 10*min, "%H:%M", false, align_tzalign }, { day, hour, 10*min, "%H:%M", false, align_tzalign }, { day, 2*hour, 30*min, "%H:%M", false, align_tzalign }, { day, 3*hour, hour, "%H:%M", false, align_tzalign }, { day, 6*hour, hour, "%H:%M", false, align_tzalign }, { day, 12*hour, 3*hour, "%H:%M", false, align_tzalign }, { week, 12*hour, 3*hour, "%a %H:%M", false, align_tzalign }, { week, day, 3*hour, "%a", true, align_tzalign }, { week, 2*day, 6*hour, "%a", true, align_tzalign }, { month, day, 6*hour, "%a %d", true, align_tzalign }, { month, day, 6*hour, "%d", true, align_tzalign }, { year, week, day, I18N_NOOP("week %V"), true, align_week }, { year, month, day, "%b", true, align_month }, { 0, 0, 0, 0, true, align_tzalign }, }; const QFontMetrics fontmetric(font); const time_t time_span = data_end - data_start; const time_t now = time(0); for(int i=0; axis_params[i].maxspan; ++i) { if (time_span < axis_params[i].maxspan) { QString label = Qstrftime(axis_params[i].format, localtime(&now)); if(!label.isNull()) { const int textwidth = fontmetric.width(label) * time_span / axis_params[i].major * 3 / 2; if (textwidth < width) { switch(axis_params[i].align) { case align_tzalign: minor_x.set(data_start, axis_params[i].minor); major_x.set(data_start, axis_params[i].major); label_x.set(data_start, axis_params[i].major); format = axis_params[i].format; center = axis_params[i].center; break; case align_week: minor_x.set(data_start, day); major_x.set(data_start, 1, time_iterator::weeks); label_x.set(data_start, 1, time_iterator::weeks); format = axis_params[i].format; center = axis_params[i].center; break; case align_month: minor_x.set(data_start, axis_params[i].minor); major_x.set(data_start, 1, time_iterator::month); label_x.set(data_start, 1, time_iterator::month); format = axis_params[i].format; center = axis_params[i].center; break; } return; } } } } QString label = Qstrftime("%Y", localtime(&now)); if(!label.isNull()) { const int textwidth = fontmetric.width(label) * 3 / 2; // fixed-point calculation with 16 bit fraction. int num = (time_span * textwidth * 16) / ( year * width); if (num < 16 ) { minor_x.set(data_start, 1, time_iterator::month); major_x.set(data_start, 1, time_iterator::years); label_x.set(data_start, 1, time_iterator::years); format = "%Y"; center = true; } else { minor_x.set(data_start, 1, time_iterator::years); major_x.set(data_start, (num+15)/16, time_iterator::years); label_x.set(data_start, (num+15)/16, time_iterator::years); format = "%Y"; center = false; } } } void Graph::drawYLabel(QPainter &paint, const QRect &rect, const Range &y_range, double base) { // setting up linear mappings const linMap ymap(y_range.min(), rect.bottom(), y_range.max(), rect.top()); const QFontMetrics fontmetric(font); // SI Unit for nice display std::string SI; double mag; si_char(y_range.max(), SI, mag); // make sure labels don not overlap const int fontheight = fontmetric.height(); while(rect.height() < fontheight * (y_range.max()-y_range.min())/base) if (rect.height() > fontheight * (y_range.max()-y_range.min())/base/2) base *= 2; else if (rect.height() > fontheight * (y_range.max()-y_range.min())/base/5) base *= 5; else base *= 10; // draw labels double min = ceil(y_range.min()/base)*base; double max = floor(y_range.max()/base)*base; for(double i = min; i <= max; i += base) { const std::string label = si_number(i, 6, SI, mag); const int x = rect.left() - fontmetric.width(label.c_str()) - 4; paint.drawText(x, ymap(i) + fontmetric.ascent()/2, label.c_str()); } } void Graph::drawYLines(QPainter &paint, const QRect &rect, const Range &y_range, double base, QColor color) { // setting up linear mappings const linMap ymap(y_range.min(), rect.bottom(), y_range.max(), rect.top()); const QFontMetrics fontmetric(font); // adjust linespacing if (base * -ymap.m() < 5.0) { if (2.0 * base * -ymap.m() > 5.0) base = base * 2.0; else base = base * 5.0; } // and return if unsufficient if (base * -ymap.m() < 5) return; // draw lines paint.save(); paint.setPen(color); double min = ceil(y_range.min()/base)*base; double max = y_range.max(); for(double i = min; i < max; i += base) { paint.drawLine(rect.left(), ymap(i), rect.right(), ymap(i)); } paint.restore(); } /** * draw the graph itself */ void Graph::drawGraph(QPainter &paint, const QRect &rect, const GraphInfo &ginfo, double min, double max) { const linMap ymap(min, rect.bottom(), max, rect.top()); // define once use many QPolygon points; paint.save(); //paint.setRenderHint(QPainter::Antialiasing); // draw all min/max backshadows int color_nr = 0; for(GraphInfo::const_iterator gi = ginfo.begin(); gi != ginfo.end(); ++gi) { const std::vector &min_data = gi->min_data; const std::vector &max_data = gi->max_data; if (min_data.empty() || max_data.empty()) continue; const int size = gi->min_data.size(); // setting up linear mappings const linMap xmap(0, rect.left(), size-1, rect.right()); if (!min_data.empty() && !max_data.empty()) { paint.setPen(Qt::NoPen); paint.setBrush(QBrush(color_minmax[color_nr++ % 8])); for(int i=0; i &avg_data = gi->avg_data; if (avg_data.empty()) continue; const int size = avg_data.size(); // setting up linear mappings const linMap xmap(0, rect.left(), size-1, rect.right()); // draw ing if (!avg_data.empty()) { paint.setPen(color_line[color_nr++ % 8]); for(int i=0; itop() - contentsRect().top(); const int bottom = i->bottom() - contentsRect().top(); // y-scaling double base; Range y_range = i->minmax_adj(&base); if (!y_range.isValid()) continue; // geometry const int xlabel_base = bottom + marg + smallmetric.ascent(); const int legend_base = top + graph_height + fontmetric.ascent(); // panel area QRect panelrect(graph_rect.left(), top, graph_rect.width(), bottom-top); // graph-background paint.fillRect(panelrect, color_graph_bg); // draw minor, major, graph drawXLabel(paint, xlabel_base, graph_rect.left(), graph_rect.right(), label_x, format_x, center_x); drawXLines(paint, panelrect, minor_x, color_minor); drawYLines(paint, panelrect, y_range, base/10, color_minor); drawXLines(paint, panelrect, major_x, color_major); drawYLines(paint, panelrect, y_range, base, color_major); drawYLabel(paint, panelrect, y_range, base); drawGraph(paint, panelrect, *i, y_range.min(), y_range.max()); drawLegend(paint, marg, legend_base, box_size, *i); } paint.end(); // copy to screen QPainter(this).drawPixmap(contentsRect(), offscreen); } else { QPainter paint(this); paint.eraseRect(contentsRect()); const QString label(i18n("Drop sensors from list here")); const int labelwidth = paint.fontMetrics().width(label); paint.drawText((width()-labelwidth)/2, height()/2, label); paint.end(); } } void Graph::layout() { const int numgraphs = glist.size(); if (!numgraphs) return; // resize offscreen-map to widget-size offscreen = QPixmap(contentsRect().width(), contentsRect().height()); QPainter paint(&offscreen); paint.setFont(font); // margin calculations // place for labels at the left and two line labels below const QFontMetrics fontmetric = QFontMetrics(font); const QFontMetrics smallmetric = QFontMetrics(small_font); const QFontMetrics headermetric = QFontMetrics(header_font); const int labelwidth = fontmetric.boundingRect("888.888 M").width(); box_size = fontmetric.ascent()-2; // area for graphs (including legends) graph_rect.setRect(labelwidth + marg, headermetric.height() + 2*marg, offscreen.width() - labelwidth - marg, offscreen.height() - headermetric.height() - 2*marg); const int total_legend_height = calcLegendHeights(box_size, offscreen.width() - 2*marg); graph_height = (graph_rect.height() - total_legend_height - marg*(2*numgraphs-1)) / numgraphs; int top = graph_rect.top(); for(graph_list::iterator i = begin(); i != end(); ++i) { int bottom = top + graph_height - marg - smallmetric.lineSpacing(); i->top(top + contentsRect().top()); i->bottom(bottom + contentsRect().top()); top += graph_height + i->legend_lines()*fontmetric.lineSpacing() + 2*marg; } } /** * Qt (re)paint event */ void Graph::paintEvent(QPaintEvent *e) { QFrame::paintEvent(e); drawAll(); } void Graph::resizeEvent(QResizeEvent *e) { layout(); } Graph::graph_list::iterator Graph::graphAt(const QPoint &pos) { for(graph_list::iterator i = begin(); i != end(); ++i) { if (i->top() < pos.y() && i->bottom() > pos.y()) return i; } return end(); } Graph::graph_list::const_iterator Graph::graphAt(const QPoint &pos) const { for(graph_list::const_iterator i = begin(); i != end(); ++i) { if (i->top() < pos.y() && i->bottom() > pos.y()) return i; } return end(); } /** * switch auto-update on or off * * Auto-update does a update every 10 sec. */ void Graph::autoUpdate(bool active) { if (active == true) { if (autoUpdateTimer == -1) { autoUpdateTimer = startTimer(10000); timer_diff = 0.99 * span; start = time(0) - timer_diff; data_is_valid = false; update(); } } else { if (autoUpdateTimer != -1) { killTimer(autoUpdateTimer); autoUpdateTimer = -1; } } } /** * */ void Graph::removeGraph() { const int numgraphs = glist.size(); if (!numgraphs) return; graph_list::iterator target = graphAt(QPoint(0, origin_y)); if (target != end()) { glist.erase(target); changed(true); } layout(); update(); } /** * */ void Graph::splitGraph() { add(); layout(); update(); } /** * Qt mouse-press-event */ void Graph::mousePressEvent(QMouseEvent *e) { origin_x = e->x (); origin_y = e->y (); origin_start = data_start; origin_end = data_end; // context-menu if (e->button() == Qt::RightButton) { // map for delete-datasource-options typedef std::map actionmap; actionmap acts; // context-menu KMenu menu(this); graph_list::iterator s_graph = graphAt(e->pos()); menu.addAction(KIcon("list-add"), i18n("add new subgraph"), this, SLOT(splitGraph())); if (s_graph != end()) { menu.addAction(KIcon("edit-delete"), i18n("delete this subgraph"), this, SLOT(removeGraph())); menu.addSeparator(); // generate entries to remove datasources for(GraphInfo::iterator i = s_graph->begin(); i != s_graph->end(); ++i) { QAction *T = menu.addAction(KIcon("list-remove"), i18n("remove ") + i->label); acts[T] = i; } } QAction *action = menu.exec(e->globalPos()); actionmap::iterator result = acts.find(action); if (result != acts.end()) { s_graph->erase(result->second); layout(); update(); } } } /** * Qt mouse-event * * handle dragging of mouse in graph */ void Graph::mouseMoveEvent(QMouseEvent *e) { if (e->buttons() == Qt::LeftButton) { if (autoUpdateTimer != -1) return; int x = e->x(); int y = e->y(); if ((x < graph_rect.left()) || (x >= graph_rect.right())) return; if ((y < 0) || (y >= height())) return; int offset = (x - origin_x) * (origin_end - origin_start) / graph_rect.width(); start = origin_start - offset; const time_t now = time(0); if (start + span > now + span * 2 / 3 ) start = now - span / 3; if (autoUpdateTimer != -1) timer_diff = time(0) - start; data_is_valid = false; update(); } else if (e->buttons() == Qt::MidButton){ dragging = true; update(); } else { e->ignore(); } } /** * */ void Graph::wheelEvent(QWheelEvent *e) { if (e->delta() < 0) zoom(1.259921050); else zoom(1.0/1.259921050); } /** * */ void Graph::timerEvent(QTimerEvent *event) { data_is_valid = false; start = time(0) - timer_diff; update(); } /** * */ void Graph::dragEnterEvent(QDragEnterEvent *event) { const GraphMimeData *mimeData = qobject_cast(event->mimeData()); if (mimeData) event->acceptProposedAction(); else event->ignore(); } /** *hermione•load•load•longterm */ void Graph::dragMoveEvent(QDragMoveEvent *event) { const GraphMimeData *mimeData = qobject_cast(event->mimeData()); if (!mimeData) return; if(glist.size() == 0) { event->accept(contentsRect()); } else { graph_list::iterator i = graphAt(event->pos()); if(i != end()) { QRect g; g.setCoords(contentsRect().left(), i->top(), contentsRect().right(), i->bottom()); event->accept(g); } else { event->ignore(); } } } /** * */ void Graph::dropEvent(QDropEvent *event) { const GraphMimeData *mimeData = qobject_cast(event->mimeData()); if (!mimeData) return; event->acceptProposedAction(); const int numgraphs = glist.size(); if (numgraphs) { graph_list::iterator target = graphAt(event->pos()); if (target != end()) { target->add(mimeData->rrd(), mimeData->ds(), mimeData->label()); } else { add(mimeData->rrd(), mimeData->ds(), mimeData->label()); } } else { add(mimeData->rrd(), mimeData->ds(), mimeData->label()); } data_is_valid = false; layout(); update(); } /** * set the graph to display the last new_span seconds */ void Graph::last(time_t new_span) { span = new_span; if (autoUpdateTimer != -1) { timer_diff = 0.99 * span; start = time(0) - timer_diff; } else { start = time(0) - 0.99 * span; } data_is_valid = false; update(); } /** * zoom graph with factor */ void Graph::zoom(double factor) { // don't zoom to wide if (factor < 1 && span*factor < width()) return; time_t time_center = data_end - span / 2; if (time_center < 0) return; span *= factor; start = time_center - (span / 2); const time_t now = time(0); if (start + span > now + span * 2 / 3 ) start = now - span / 3; if (autoUpdateTimer != -1) { timer_diff = 0.99 * span; start = time(0) - timer_diff; } data_is_valid = false; update(); } /** * returns range for y-values */ Range GraphInfo::minmax() { Range r; for(const_iterator i = begin(); i != end(); ++i) { Range a = ds_minmax(i->avg_data, i->min_data, i->max_data); if (a.isValid()) { if (r.isValid()) r = range_max(r, a); else r = a; } } return r; } /** * returns adjusted range for y-values */ Range GraphInfo::minmax_adj(double *base) { Range y = minmax(); return range_adj(y, base); } kcollectd-0.9/kcollectd/kcollectd.cc0000644001345300001440000000477011331347212017251 0ustar berbericusers/* * This file is part of the source of kcollectd, a viewer for * rrd-databases created by collectd * * Copyright (C) 2008 M G Berberich * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include "../config.h" #include "gui.h" int main(int argc, char **argv) { using namespace boost::filesystem; std::vector rrds; KAboutData about("kcollectd", "kcollectd", ki18n("KCollectd"), VERSION, ki18n("Viewer for Collectd-databases"), KAboutData::License_GPL, ki18n("© 2008, 2009 M G Berberich"), ki18n("Maintainer and developer"), "http://www.forwiss.uni-passau.de/~berberic/Linux/kcollectd.html", "berberic@fmi.uni-passau.de"); about.addAuthor(ki18n("M G Berberich"), KLocalizedString(), "M G Berberich ", "http://www.forwiss.uni-passau.de/~berberic"); about.setTranslator(ki18nc("NAME OF TRANSLATORS", "Your names"), ki18nc("EMAIL OF TRANSLATORS", "Your emails")); KCmdLineArgs::init(argc, argv, &about); KCmdLineOptions options; options.add("+[file]", ki18n("A kcollectd-file to open")); KCmdLineArgs::addCmdLineOptions( options ); KApplication application; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); try { if (application.isSessionRestored()) { kRestoreMainWindows(); } else { KCollectdGui *gui = new KCollectdGui; // handling arguments if(args->count() == 1) gui->load(args->arg(0)); gui->setObjectName("kcollectd#"); gui->show(); } } catch(basic_filesystem_error &e) { KMessageBox::error(0, i18n("Failed to read collectd-structure at \'%1\'\n" "Terminating.", QString(RRD_BASEDIR))); exit(1); } return application.exec(); }