Did anybody know these appliance? OWL USB Power Meter?

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

Maybe a copy/paste syntax error in my script?
Attachments
003.JPG
003.JPG (88.66 KiB) Viewed 3563 times
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by noname »

Brenner wrote:websrv01:/# /usr/bin/php /usr/share/cacti/site/scripts/owl.php
could not find driver

Driver???
That script uses PDO(PHP Data Objects) driver to read SQLite database from PHP.
- http://www.php.net/manual/en/book.pdo.php

From your PM, it seems that only PDO_MYSQL is enabled.
PDO

PDO support => enabled
PDO drivers => mysql

pdo_mysql

PDO Driver for MySQL, client library version => 5.0.51a
Please check your 'php.ini' and add extension if not existed.

Code: Select all

extension=pdo.so
extension=pdo_mysql.so
...
extension=pdo_sqlite.so
After modified php.ini, restart Apache.
Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

Ok,

the extension part in ./etc/php5/apache2/php.ini now looks this way

Code: Select all

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
;   extension=modulename.extension
;
; For example, on Windows:
;
;   extension=msql.dll
;
; ... or under UNIX:
;
;   extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here.  Specify the location of the extension with the
; extension_dir directive above.


; Example lines:

;extension=mysql.so
;extension=gd.so
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so



I restart the apache with /etc/init.d/apache2 restart

Now I have to wait and hope?
Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

Hmmm, no success I think

Code: Select all

websrv01:~# /usr/bin/php /usr/share/cacti/site/scripts/owl.php
could not find driverwebsrv01:~#
Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

oh,

I found another php.ini in another folder. I modify it and restart apache.

Now there is another view
could not find driverwebsrv01:~# /usr/bin/php /usr/share/cacti/site/scripts/owl.php
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/pdo_sqlite.so' - /usr/lib/php5/20060613+lfs/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
could not find driverwebsrv01:~#
Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

I try to install the PDO stuff :-(

Code: Select all

websrv01:/# find . -name pdo_sqlite.so
websrv01:/# # apt-get install dh-make-php dh-make-php
websrv01:/# # pecl install pdo
websrv01:/# # pecl install pdo_mysql
websrv01:/# # pecl install pdo_sqlite
websrv01:/# apt-get install dh-make-php dh-make-php
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Lese Status-Informationen ein... Fertig
Die folgenden zusätzlichen Pakete werden installiert:
  autotools-dev cdbs debhelper gettext html2text intltool-debian
  libcompress-raw-zlib-perl libcompress-zlib-perl libdigest-hmac-perl
  libdigest-sha1-perl libfile-remove-perl libio-compress-base-perl
  libio-compress-zlib-perl libio-stringy-perl libmail-box-perl
  libmail-sendmail-perl libmailtools-perl libmime-types-perl
  libobject-realize-later-perl libsys-hostname-long-perl libuser-identity-perl
  php-pear po-debconf
Vorgeschlagene Pakete:
  devscripts doc-base dh-make cvs gettext-doc libmime-tools-perl
  libhtml-format-perl spamassassin libmail-imapclient-perl php5-dev php4-dev
Die folgenden NEUEN Pakete werden installiert:
  autotools-dev cdbs debhelper dh-make-php gettext html2text intltool-debian
  libcompress-raw-zlib-perl libcompress-zlib-perl libdigest-hmac-perl
  libdigest-sha1-perl libfile-remove-perl libio-compress-base-perl
  libio-compress-zlib-perl libio-stringy-perl libmail-box-perl
  libmail-sendmail-perl libmailtools-perl libmime-types-perl
  libobject-realize-later-perl libsys-hostname-long-perl libuser-identity-perl
  php-pear po-debconf
0 aktualisiert, 24 neu installiert, 0 zu entfernen und 7 nicht aktualisiert.
Es müssen 6719kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 19,6MB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren [J/n]? J
Hole:1 http://ftp2.de.debian.org lenny/main autotools-dev 20080123.1 [63,0kB]
Hole:2 http://ftp2.de.debian.org lenny/main html2text 1.3.2a-5 [91,5kB]
Hole:3 http://ftp2.de.debian.org lenny/main gettext 0.17-4 [2672kB]
Hole:4 http://ftp2.de.debian.org lenny/main intltool-debian 0.35.0+20060710.1 [30,8kB]
Hole:5 http://ftp2.de.debian.org lenny/main po-debconf 1.0.15 [237kB]
Hole:6 http://ftp2.de.debian.org lenny/main debhelper 7.0.15 [554kB]
Hole:7 http://ftp2.de.debian.org lenny/main cdbs 0.4.52 [921kB]
Hole:8 http://ftp2.de.debian.org lenny/main php-pear 5.2.6.dfsg.1-1+lenny13 [335kB]
Hole:9 http://ftp2.de.debian.org lenny/main dh-make-php 0.2.12 [32,4kB]
Hole:10 http://ftp2.de.debian.org lenny/main libcompress-raw-zlib-perl 2.012-1lenny1 [55,5kB]
Hole:11 http://ftp2.de.debian.org lenny/main libio-compress-base-perl 2.012-1 [59,4kB]
Hole:12 http://ftp2.de.debian.org lenny/main libio-compress-zlib-perl 2.012-1 [148kB]
Hole:13 http://ftp2.de.debian.org lenny/main libcompress-zlib-perl 2.012-1 [36,7kB]
Hole:14 http://ftp2.de.debian.org lenny/main libdigest-sha1-perl 2.11-2+b1 [24,6kB]
Hole:15 http://ftp2.de.debian.org lenny/main libdigest-hmac-perl 1.01-7 [10,5kB]
Hole:16 http://ftp2.de.debian.org lenny/main libfile-remove-perl 1.42-1 [12,9kB]
Hole:17 http://ftp2.de.debian.org lenny/main libio-stringy-perl 2.110-4 [99,7kB]
Hole:18 http://ftp2.de.debian.org lenny/main libmime-types-perl 1.24-1 [30,8kB]
Hole:19 http://ftp2.de.debian.org lenny/main libmailtools-perl 2.03-1 [96,6kB]
Hole:20 http://ftp2.de.debian.org lenny/main libobject-realize-later-perl 0.18-1 [17,7kB]
Hole:21 http://ftp2.de.debian.org lenny/main libuser-identity-perl 0.92-2 [75,5kB]
Hole:22 http://ftp2.de.debian.org lenny/main libmail-box-perl 2.082-2 [1078kB]
Hole:23 http://ftp2.de.debian.org lenny/main libsys-hostname-long-perl 1.4-2 [11,3kB]
Hole:24 http://ftp2.de.debian.org lenny/main libmail-sendmail-perl 0.79-5 [23,4kB]
Es wurden 6719kB in 11s geholt (568kB/s)
Wähle vormals abgewähltes Paket autotools-dev.
(Lese Datenbank ... 88130 Dateien und Verzeichnisse sind derzeit installiert.)
Entpacke autotools-dev (aus .../autotools-dev_20080123.1_all.deb) ...
Wähle vormals abgewähltes Paket html2text.
Entpacke html2text (aus .../html2text_1.3.2a-5_i386.deb) ...
Wähle vormals abgewähltes Paket gettext.
Entpacke gettext (aus .../gettext_0.17-4_i386.deb) ...
Wähle vormals abgewähltes Paket intltool-debian.
Entpacke intltool-debian (aus .../intltool-debian_0.35.0+20060710.1_all.deb) ...
Wähle vormals abgewähltes Paket po-debconf.
Entpacke po-debconf (aus .../po-debconf_1.0.15_all.deb) ...
Wähle vormals abgewähltes Paket debhelper.
Entpacke debhelper (aus .../debhelper_7.0.15_all.deb) ...
Wähle vormals abgewähltes Paket cdbs.
Entpacke cdbs (aus .../archives/cdbs_0.4.52_all.deb) ...
Wähle vormals abgewähltes Paket php-pear.
Entpacke php-pear (aus .../php-pear_5.2.6.dfsg.1-1+lenny13_all.deb) ...
Wähle vormals abgewähltes Paket dh-make-php.
Entpacke dh-make-php (aus .../dh-make-php_0.2.12_all.deb) ...
Wähle vormals abgewähltes Paket libcompress-raw-zlib-perl.
Entpacke libcompress-raw-zlib-perl (aus .../libcompress-raw-zlib-perl_2.012-1lenny1_i386.deb) ...
Wähle vormals abgewähltes Paket libio-compress-base-perl.
Entpacke libio-compress-base-perl (aus .../libio-compress-base-perl_2.012-1_all.deb) ...
Wähle vormals abgewähltes Paket libio-compress-zlib-perl.
Entpacke libio-compress-zlib-perl (aus .../libio-compress-zlib-perl_2.012-1_all.deb) ...
Wähle vormals abgewähltes Paket libcompress-zlib-perl.
Entpacke libcompress-zlib-perl (aus .../libcompress-zlib-perl_2.012-1_all.deb) ...
Wähle vormals abgewähltes Paket libdigest-sha1-perl.
Entpacke libdigest-sha1-perl (aus .../libdigest-sha1-perl_2.11-2+b1_i386.deb) ...
Wähle vormals abgewähltes Paket libdigest-hmac-perl.
Entpacke libdigest-hmac-perl (aus .../libdigest-hmac-perl_1.01-7_all.deb) ...
Wähle vormals abgewähltes Paket libfile-remove-perl.
Entpacke libfile-remove-perl (aus .../libfile-remove-perl_1.42-1_all.deb) ...
Wähle vormals abgewähltes Paket libio-stringy-perl.
Entpacke libio-stringy-perl (aus .../libio-stringy-perl_2.110-4_all.deb) ...
Wähle vormals abgewähltes Paket libmime-types-perl.
Entpacke libmime-types-perl (aus .../libmime-types-perl_1.24-1_all.deb) ...
Wähle vormals abgewähltes Paket libmailtools-perl.
Entpacke libmailtools-perl (aus .../libmailtools-perl_2.03-1_all.deb) ...
Wähle vormals abgewähltes Paket libobject-realize-later-perl.
Entpacke libobject-realize-later-perl (aus .../libobject-realize-later-perl_0.18-1_all.deb) ...
Wähle vormals abgewähltes Paket libuser-identity-perl.
Entpacke libuser-identity-perl (aus .../libuser-identity-perl_0.92-2_all.deb) ...
Wähle vormals abgewähltes Paket libmail-box-perl.
Entpacke libmail-box-perl (aus .../libmail-box-perl_2.082-2_all.deb) ...
Wähle vormals abgewähltes Paket libsys-hostname-long-perl.
Entpacke libsys-hostname-long-perl (aus .../libsys-hostname-long-perl_1.4-2_all.deb) ...
Wähle vormals abgewähltes Paket libmail-sendmail-perl.
Entpacke libmail-sendmail-perl (aus .../libmail-sendmail-perl_0.79-5_all.deb) ...
Verarbeite Trigger für man-db ...
Richte autotools-dev ein (20080123.1) ...
Richte html2text ein (1.3.2a-5) ...
Richte gettext ein (0.17-4) ...
Richte intltool-debian ein (0.35.0+20060710.1) ...
Richte po-debconf ein (1.0.15) ...
Richte debhelper ein (7.0.15) ...
Richte cdbs ein (0.4.52) ...
Richte php-pear ein (5.2.6.dfsg.1-1+lenny13) ...
Richte dh-make-php ein (0.2.12) ...
Richte libcompress-raw-zlib-perl ein (2.012-1lenny1) ...
Richte libio-compress-base-perl ein (2.012-1) ...
Richte libio-compress-zlib-perl ein (2.012-1) ...
Richte libcompress-zlib-perl ein (2.012-1) ...
Richte libdigest-sha1-perl ein (2.11-2+b1) ...
Richte libdigest-hmac-perl ein (1.01-7) ...
Richte libfile-remove-perl ein (1.42-1) ...
Richte libio-stringy-perl ein (2.110-4) ...
Richte libmime-types-perl ein (1.24-1) ...
Richte libmailtools-perl ein (2.03-1) ...
Richte libobject-realize-later-perl ein (0.18-1) ...
Richte libuser-identity-perl ein (0.92-2) ...
Richte libmail-box-perl ein (2.082-2) ...
Richte libsys-hostname-long-perl ein (1.4-2) ...
Richte libmail-sendmail-perl ein (0.79-5) ...
websrv01:/# pecl install pdo
WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO"
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
12 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed
websrv01:/# pecl install pdo_mysql
WARNING: "pecl/PDO_MYSQL" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo_mysql//ext/pdo_mysql"
WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO"
downloading PDO_MYSQL-1.0.2.tgz ...
Starting to download PDO_MYSQL-1.0.2.tgz (14,778 bytes)
.....done: 14,778 bytes
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
...done: 52,613 bytes
12 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed
7 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed
websrv01:/# pecl install pdo_sqlite
WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO"
downloading PDO_SQLITE-1.0.1.tgz ...
Starting to download PDO_SQLITE-1.0.1.tgz (868,469 bytes)
.............................................................................................................................................................................done: 868,469 bytes
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
...done: 52,613 bytes
12 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed
111 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed

noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by noname »

Brenner wrote: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/pdo_sqlite.so' - /usr/lib/php5/20060613+lfs/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
Check "extension_dir = ..." in php.ini and make sure if pdo_sqlite.so exists.

See also: http://forums.cacti.net/viewtopic.php?f=2&t=24980
Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

I don´t want to stress you to much! :oops:

Because of that /and not to crash my webserver) I´m have installed a new Debian VM and now I´m going to install a new cacti version from the repo. Its not the newest but 0.8.7g is newer than 0.8.7b

After that I will do all the steps you told me and hope that this works without spamming you.
Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

Wow,

I was able to update manual to the newest version :-)
Attachments
004.JPG
004.JPG (11.56 KiB) Viewed 3554 times
Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

The 0.8.7i wasn´t able to work so I took the "g" from the repo again and do all your steps.


Driver problem still available, but after install additional packages, some value appears if I call the script :D
root@cacti01:~# apt-get install php5-common php5-mysql php5-sqlite
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Statusinformationen werden eingelesen... Fertig
php5-common ist schon die neueste Version.
php5-mysql ist schon die neueste Version.
php5-mysql wurde als manuell installiert festgelegt.
Die folgenden zusätzlichen Pakete werden installiert:
libsqlite0
Die folgenden NEUEN Pakete werden installiert:
libsqlite0 php5-sqlite
0 aktualisiert, 2 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 225 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 623 kB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren [J/n]? J
Hole:1 http://ftp.de.debian.org/debian/ squeeze/main libsqlite0 i386 2.8.17-6 [1 77 kB]
Hole:2 http://ftp.de.debian.org/debian/ squeeze/main php5-sqlite i386 5.3.3-7+sq ueeze3 [48,5 kB]
Es wurden 225 kB in 0 s geholt (310 kB/s)
Vormals abgewähltes Paket libsqlite0 wird gewählt.
(Lese Datenbank ... 31822 Dateien und Verzeichnisse sind derzeit installiert.)
Entpacken von libsqlite0 (aus .../libsqlite0_2.8.17-6_i386.deb) ...
Vormals abgewähltes Paket php5-sqlite wird gewählt.
Entpacken von php5-sqlite (aus .../php5-sqlite_5.3.3-7+squeeze3_i386.deb) ...
Trigger für libapache2-mod-php5 werden verarbeitet ...
Reloading web server config: apache2.
libsqlite0 (2.8.17-6) wird eingerichtet ...
php5-sqlite (5.3.3-7+squeeze3) wird eingerichtet ...
root@cacti01:~# /usr/bin/php /usr/share/cacti/site/scripts/owl.php
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_sqlite' already loaded in Unknown on line 0
ch1_amps_avg:0.042 ch1_amps_max:0.042 ch1_amps_min:0.042 ch1_kw_avg:0.009576 ch1 root@cacti01:~#


and if I delete the php.ini modifications I get only values without errormessages. I´m to be anxious to see if something will shown into the graph later.
Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

Yeah,

on the new machine I see results :D :D :D :D :D :D



On the old I do the modification and will wait some minutes
Attachments
005.JPG
005.JPG (69.65 KiB) Viewed 3553 times
Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

And on the old one too :o :D :D :) :) :D :D :D


Awesome and thanks sooo much again!!!



Now I have to take two additional challenge.

1.)
Modifiy cacti or the owl.php to show the correct values (not 0.000xxx).

2.)
Find a good way to synchronice the owl database for example every minute so that i can have a graph with minimum delay.
The original software for creating the database is only for windows. Very poor :-( I I know no other way. I think best way is to connect the owl device directly to the linux and poll it live with cacti...
Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

2.) ...is solved I think. A cifs mount to the windows and modify the owl.php should work... (hope so)

1.) I´m going to sleep now (00:13 o´clock in germany)

gn8
Brenner
Posts: 29
Joined: Thu Apr 19, 2007 9:58 am

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by Brenner »

Looks very good now. Thank you again :D

...and happy new year
Attachments
owl.JPG
owl.JPG (127.84 KiB) Viewed 3542 times
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Did anybody know these appliance? OWL USB Power Meter?

Post by noname »

Congratulations on your succeed!
I'm glad to hear that, and I respect all your efforts. :D
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests