Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Gnuplot generated png files not displayed in html files. (http://www.linux-archive.org/debian-user/451094-gnuplot-generated-png-files-not-displayed-html-files.html)

Roman Khomasuridze 11-11-2010 12:36 PM

Gnuplot generated png files not displayed in html files.
 
Hello kind people.
I'm setting up small asterisk/SS7 server, and writing simple monitoring script.
It basically pulls data from Asterisk to .dat file and then gnuplot is plotting it to .png which itself is displayed in .html file.

Problem is that generated png files are not displayed in any web browser.
At first I thought it was problem with web server (lighttpd in my case, also tried dhttpd), but it displays other image files, pngs, gifs and jpgs.

Am I missing some package? I compared package list to my other servers (they're also running debian lenny), it looks same, and also, this script, works perfectly on ther machines, gnuplot generated png files are perfectly displayed on web page.


ae11:~/scripts/e1monitor# dpkg -l | grep gnuplot
ii* gnuplot************************** 4.2.2-1.2*************** A command-line driven interactive plotting program
ii* gnuplot-nox********************** 4.2.2-1.2*************** A command-line driven interactive plotting program

ii* gnuplot-x11********************** 4.2.2-1.2*************** X11-terminal driver for gnuplot


ae11:~/scripts/e1monitor# dpkg -l | grep png***
ii* libpng12-0*********************** 1.2.27-2+lenny4********* PNG library - runtime

ii* libpng12-dev********************* 1.2.27-2+lenny4********* PNG library - development
ii* libpng3************************** 1.2.27-2+lenny4********* PNG library - runtime


ae11:~/scripts/e1monitor# dpkg -l | grep lighttpd

ii* lighttpd************************* 1.4.19-5+lenny1********* A fast webserver with minimal memory footprint


ae11:~/scripts/e1monitor# cat graph.plt
set terminal png
set output "graph.png"

set xdata time
set timefmt "%H:%M:%S"
set format x "%H:%M"
set xrange ["00:00:00": "23:59:59"]
set yrange [ 0 : 30 ]


Here is access.log. png.png is downloaded file from internet whis is displayed, graph png is gnuplot generated file.

::ffff:80.83.131.71 domain.com - [11/Nov/2010:16:53:59 +0400] "GET /graph.png HTTP/1.1" 200 0 "http://ae11.gphone.ge/status.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.16) Gecko/2009121610 Iceweasel/3.0.6 (Debian-3.0.6-3)"

::ffff:80.83.131.71 domain.com - [11/Nov/2010:16:54:05 +0400] "GET /graph.png HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.16) Gecko/2009121610 Iceweasel/3.0.6 (Debian-3.0.6-3)"

::ffff:80.83.131.71 domain.com - [11/Nov/2010:17:16:19 +0400] "GET /status.html HTTP/1.1" 200 150 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.16) Gecko/2009121610 Iceweasel/3.0.6 (Debian-3.0.6-3)"

::ffff:80.83.131.71 domain.com - [11/Nov/2010:17:16:20 +0400] "GET /png.png HTTP/1.1" 200 59494 "http://ae11.gphone.ge/status.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.16) Gecko/2009121610 Iceweasel/3.0.6 (Debian-3.0.6-3)"


Error log is empty.


Any help will be appreciated.



Regards
-----------
Roman

Camaleón 11-11-2010 02:21 PM

Gnuplot generated png files not displayed in html files.
 
On Thu, 11 Nov 2010 17:36:05 +0400, Roman Khomasuridze wrote:

> I'm setting up small asterisk/SS7 server, and writing simple monitoring
> script.
> It basically pulls data from Asterisk to .dat file and then gnuplot is
> plotting it to .png which itself is displayed in .html file. Problem is
> that generated png files are not displayed in any web browser.

(...)

Make a basic test... can you get/download file (i.e., via FTP) and
display it within any standard image viewer? Maybe the file is corrupted
somehow and can be fetched but fails to be displayed.

Also, "file graph.png" go get additional info about the png properties.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.11.11.15.21.30@gmail.com">http://lists.debian.org/pan.2010.11.11.15.21.30@gmail.com

Bob Proulx 11-11-2010 04:12 PM

Gnuplot generated png files not displayed in html files.
 
Roman Khomasuridze wrote:
> Problem is that generated png files are not displayed in any web browser.

Are the generated files readable by the web server?

Does the URL used in the html match the location where the png is
being generated?

Start with accessing the html page which contains the png files. Does
it display? Look at the source to that page in the browser. Usually
Control-U will display the source. Find the URL for the png that is
not being displayed. Then look for that URL directly. Then debug why
that URL is not displaying an image.

> Here is access.log. png.png is downloaded file from internet whis is
> displayed, graph png is gnuplot generated file.

Unfortunately your word wrapping of the logs made reading it very
difficult.

Bob

Roman Khomasuridze 11-11-2010 06:22 PM

Gnuplot generated png files not displayed in html files.
 
I figured it out. My bad. It was error in plot file, thats why gnuplot was generating empty png.Sorry for such*inconvenience (i'm idiot!)* and thanks very much!!





Regards-----------Roman


All times are GMT. The time now is 06:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.