# rrdtool (Could not save png to)



## AlbyVA (Jun 22, 2013)

I recently installed rrdtool and I'm getting the following error when I attempt to create a .png chart:


```
hostname# /usr/local/bin/rrdtool graph latency_graph.png \
? -w 785 -h 120 -a PNG \
? --slope-mode \
? --start -86400 --end now \
? --font DEFAULT:7: \
? --title "ping default gateway" \
? --watermark "`date`" \
? --vertical-label "latency(ms)" \
? --right-axis-label "latency(ms)" \
? --lower-limit 0 \
? --right-axis 1:0 \
? --x-grid MINUTE:10:HOUR:1:MINUTE:120:0:%R \
? --alt-y-grid --rigid \
? DEF:roundtrip=latency_db.rrd:rtt:MAX \
? DEF:packetloss=latency_db.rrd:pl:MAX \
? CDEF:PLNone=packetloss,0,0,LIMIT,UN,UNKN,INF,IF \
? CDEF:PL10=packetloss,1,10,LIMIT,UN,UNKN,INF,IF \
? CDEF:PL25=packetloss,10,25,LIMIT,UN,UNKN,INF,IF \
? CDEF:PL50=packetloss,25,50,LIMIT,UN,UNKN,INF,IF \
? CDEF:PL100=packetloss,50,100,LIMIT,UN,UNKN,INF,IF \
? LINE1:roundtrip#0000FF:"latency(ms)" \
? GPRINT:roundtrip:LAST:"Cur\: %5.2lf" \
? GPRINT:roundtrip:AVERAGE:"Avg\: %5.2lf" \
? GPRINT:roundtrip:MAX:"Max\: %5.2lf" \
GPRINT:roundtrip:MIN:"Min\: %5.2lf\t\t\t" \
? GPRINT:roundtrip:MIN:"Min\: %5.2lf\t\t\t" \
? COMMENT:"pkt loss\:" \
? AREA:PLNone#FFFFFF:"0%":STACK \
? AREA:PL10#FFFF00:"1-10%":STACK \
? AREA:PL25#FFCC00:"10-25%":STACK \
? AREA:PL50#FF8000:"25-50%":STACK \
? AREA:PL100#FF0000:"50-100%":STACK



930x199
ERROR: Could not save png to 'latency_graph.png'
```

What is causing rrdtool to have issues saving a graph as .png?


----------



## wblock@ (Jun 22, 2013)

Outdated PNG dependency?  Install sysutils/bsdadminscripts and run `pkg_libchk`.  If it reports problems, you'll have to rebuild the software that is depending on missing libraries.


----------



## AlbyVA (Jun 22, 2013)

Here are the errors I got. None of them seem related to rrdtool.

```
hostname# /usr/local/sbin/pkg_libchk
diablo-jdk-1.6.0.07.02_17: /usr/local/diablo-jdk1.6.0/bin/unpack200 misses libz.so.4
diablo-jdk-1.6.0.07.02_17: /usr/local/diablo-jdk1.6.0/jre/bin/unpack200 misses libz.so.4
diablo-jdk-1.6.0.07.02_17: /usr/local/diablo-jdk1.6.0/jre/lib/amd64/libzip.so misses libz.so.4
gnuplot-4.4.3: /usr/local/bin/gnuplot misses libpdf.so.8
```
Are you suggesting I deinstall and reinstall rrdtool? Or is there something else I should do to fix up my library issues?


----------



## AlbyVA (Jun 23, 2013)

As a side note, I thought "maybe" gnuplot could be related so I did a reinstall, but no luck. I got the same error when I ran `rrdtool` again to create a .png file.


----------



## fonz (Jun 23, 2013)

AlbyVA said:
			
		

> ```
> diablo-jdk-1.6.0.07.02_17: /usr/local/diablo-jdk1.6.0/bin/unpack200 misses libz.so.4
> diablo-jdk-1.6.0.07.02_17: /usr/local/diablo-jdk1.6.0/jre/bin/unpack200 misses libz.so.4
> diablo-jdk-1.6.0.07.02_17: /usr/local/diablo-jdk1.6.0/jre/lib/amd64/libzip.so misses libz.so.4
> ```


Diablo is a port too and it's apparently either misconfigured or outdated. You may want to try updating java/diablo-jdk16.

P.S. Please note that initially Diablo will fail because you need to fetch some files manually. Download the files and try to build again.


----------

