<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.qnap.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Smokeping</id>
	<title>Smokeping - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.qnap.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Smokeping"/>
	<link rel="alternate" type="text/html" href="https://wiki.qnap.com/mediawiki/index.php?title=Smokeping&amp;action=history"/>
	<updated>2026-04-04T09:06:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.qnap.com/mediawiki/index.php?title=Smokeping&amp;diff=953&amp;oldid=prev</id>
		<title>Glenn: +Category:Adding new optware services</title>
		<link rel="alternate" type="text/html" href="https://wiki.qnap.com/mediawiki/index.php?title=Smokeping&amp;diff=953&amp;oldid=prev"/>
		<updated>2015-10-26T10:04:44Z</updated>

		<summary type="html">&lt;p&gt;+&lt;a href=&quot;/wiki/Category:Adding_new_optware_services&quot; title=&quot;Category:Adding new optware services&quot;&gt;Category:Adding new optware services&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:04, 26 October 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l204&quot;&gt;Line 204:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 204:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For more information about smokeping and the command-line switches of the script please go to [http://oss.oetiker.ch/smokeping/doc/index.en.html]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For more information about smokeping and the command-line switches of the script please go to [http://oss.oetiker.ch/smokeping/doc/index.en.html]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Adding new optware services]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Glenn</name></author>
	</entry>
	<entry>
		<id>https://wiki.qnap.com/mediawiki/index.php?title=Smokeping&amp;diff=124&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;= Installation guide for Smokeping on a QNAP NAS.  =  Please note that the following disciplines will be touched;   &lt;br&gt;   *Minimum Linux shell skills via SSH/Telnet session.&lt;...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.qnap.com/mediawiki/index.php?title=Smokeping&amp;diff=124&amp;oldid=prev"/>
		<updated>2015-06-16T10:14:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Installation guide for Smokeping on a QNAP NAS.  =  Please note that the following disciplines will be touched;   &amp;lt;br&amp;gt;   *Minimum Linux shell skills via SSH/Telnet session.&amp;lt;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Installation guide for Smokeping on a QNAP NAS.  =&lt;br /&gt;
&lt;br /&gt;
Please note that the following disciplines will be touched; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*Minimum Linux shell skills via SSH/Telnet session.&amp;lt;br&amp;gt; &lt;br /&gt;
*Compiling from source &lt;br /&gt;
*Editing custom virtual hosts under Apache&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== What is Smokeping  ==&lt;br /&gt;
&lt;br /&gt;
Smokeping is a tool that will graph network latency. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Smtp last 10800.png|Smokeping sample graph]] &lt;br /&gt;
&lt;br /&gt;
== Pre-requisites  ==&lt;br /&gt;
&lt;br /&gt;
The installation of smokeping requires quite a few pre-requisites as well does fping.&amp;amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
=== Downloading and installing Optware  ===&lt;br /&gt;
&lt;br /&gt;
Please follow the Optware [[Install Optware IPKG|guide]] to have Optware installed on your NAS first.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Installing the Optware pre-requisites  ===&lt;br /&gt;
&lt;br /&gt;
Update your ipkg repository before installing&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;# ipkg update&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;line-height: 1.5em;&amp;quot;&amp;gt;Next install the files required to compile sources on your QNAP&amp;lt;/span&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;# ipkg install optware-devel gawk perl&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Downloading Smokeping  ===&lt;br /&gt;
&lt;br /&gt;
Go to&amp;amp;nbsp;[http://oss.oetiker.ch/smokeping/pub/ http://oss.oetiker.ch/smokeping/pub/] and download the latest version of smokeping. Smokeping is also dependent on fping for it probing. We will need to compile a binary of fping as well. At the creation date of this Wiki page the latest versions are Smokeping 2.6.8 and Fping 2.4.b2 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;line-height: 1.5em;&amp;quot;&amp;gt;&lt;br /&gt;
Download the files in a temporary area on your QNAP (eg. /share/Public/tmp) and uncompress the tarballs.&amp;lt;/span&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;# cd /share/Public&lt;br /&gt;
# mkdir tmp&lt;br /&gt;
# cd tmp&lt;br /&gt;
# wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.8.tar.gz&lt;br /&gt;
# tar zxvf smokeping-2.6.8.tar.gz&amp;lt;/pre&amp;gt; &lt;br /&gt;
Repeat the same for fping; &lt;br /&gt;
&amp;lt;pre&amp;gt;# wget http://oss.oetiker.ch/smokeping/pub/fping-2.4b2_to4-ipv6.tar.gz&lt;br /&gt;
# tar zxvf fping-2.4b2_to4-ipv6.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Building the Perl modules and Fping executable  ===&lt;br /&gt;
&lt;br /&gt;
Before Smokeping can be compiled it will require a few Perl pre-requisites. To install these pre-requisites run the following; &lt;br /&gt;
&amp;lt;pre&amp;gt;#  cd /share/Public/tmp/smokeping-2.6.8/setup&lt;br /&gt;
#  ./build-perl-modules.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Now we can start building smokeping; &lt;br /&gt;
&amp;lt;pre&amp;gt;# export LC_ALL=&lt;br /&gt;
# export PERL5LIB=/opt/lib/perl5/5.10.0&lt;br /&gt;
# export PATH = /opt/bin:/opt/sbin:$PATH&lt;br /&gt;
# cd ..&lt;br /&gt;
# ./configure --prefix=/opt&lt;br /&gt;
# make install&amp;lt;/pre&amp;gt; &lt;br /&gt;
Before configuring smokeping we still need to configure and compile fping from source; &lt;br /&gt;
&amp;lt;pre&amp;gt;# cd /share/Public/tmp/ fping-2.4b2_to4-ipv6&lt;br /&gt;
# ./configure --prefix=/opt&lt;br /&gt;
# make install&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Preparing Apache  ==&lt;br /&gt;
&lt;br /&gt;
Please make sure you have a virtual host configuration in place as described in this HOWTO&amp;amp;nbsp;[http://forum.qnap.com/viewtopic.php?f=32&amp;amp;t=15540 forum.qnap.com/viewtopic.php] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For security reasons the virtual host configuration will require that the script alias is not physically located below the document root of the Apache host. A typical folder structure looks something like this; &lt;br /&gt;
&amp;lt;pre&amp;gt;/&lt;br /&gt;
|-backups/&lt;br /&gt;
|-cgi-bin/&lt;br /&gt;
|-htdocs/&lt;br /&gt;
|-logs/&lt;br /&gt;
|-tmp/&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*Copy the smokeping.fcgi file from the /opt/local/smokeping/htdocs folder to your /cgi-bin folder of your virtual host &lt;br /&gt;
*Copy the cropper folder from the /opt/local/smokeping/htdocs folder to your htdocs folder of your virtual host &lt;br /&gt;
*Create a folder called imgcache in your htdocs folder of your virtual host&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Make sure the folders all have the permssions set so the Apache user can write files in the imgcache folder. E.g. &amp;amp;nbsp; &lt;br /&gt;
&amp;lt;pre&amp;gt;# chown -R httpdusr:administrators /share/MD0_DATA/vhosts/mydomain.com/htdocs&amp;lt;/pre&amp;gt; &lt;br /&gt;
Edit the smokeping.fcgi file in your cgi-bin folder to have the following content; &lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
/opt/local/smokeping/bin/smokeping_cgi /opt/local/smokeping/etc/config&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Setting the Apache Directives  ===&lt;br /&gt;
&lt;br /&gt;
The QNAP Apache configuration does not support CGI executables out of the box, to add support for CGI execution add the following directives to your customized.conf in the appropriate vhost section below your last &amp;amp;lt;/Directory&amp;amp;gt; closing tag. &amp;#039;&amp;#039;&amp;#039;Edit paths where necessary&amp;#039;&amp;#039;&amp;#039;.&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;AddHandler cgi-script .fcgi .cgi .pl&lt;br /&gt;
Options +ExecCGI&lt;br /&gt;
ScriptAlias /cgi-bin/ /share/MD0_DATA/vhosts/yourdomain.com/cgi-bin/&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;Directory /share/MD0_DATA/vhosts/yourdomain.com/cgi-bin&amp;amp;gt;&lt;br /&gt;
Options +ExecCGI -Indexes&lt;br /&gt;
Order allow,deny&lt;br /&gt;
Allow from all&lt;br /&gt;
&amp;amp;lt;/Directory&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
To reflect the changes made restart the Apache daemon; &lt;br /&gt;
&amp;lt;pre&amp;gt;# /etc/init.d/Qthttpd.sh restart&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Configuring Smokeping  ==&lt;br /&gt;
&lt;br /&gt;
For smokeping to run properly a few directories need to be created;&amp;amp;nbsp;&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;# mkdir -p /opt/local/smokeping/data&lt;br /&gt;
# mkdir -p /opt/local/smokeping/logs&lt;br /&gt;
# mkdir -p /opt/local/smokeping/var&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Then copy the distributed configuration example from etc folder; &lt;br /&gt;
&amp;lt;pre&amp;gt;# cp /opt/local/smokeping/etc/config.dist /opt/local/smokeping/etc/config&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Comment out the syslog feature in the /opt/local/smokeping/etc/config file with a # sign; &lt;br /&gt;
&amp;lt;pre&amp;gt;#syslogfacility = local0&amp;lt;/pre&amp;gt; &lt;br /&gt;
Edit the paths accordingly to your needs; &lt;br /&gt;
&amp;lt;pre&amp;gt;imgcache = /share/MD0_DATA/vhosts/yourdomain.com/htdocs/imgcache&lt;br /&gt;
imgurl = /imgcache&lt;br /&gt;
datadir = /opt/local/smokeping/data&lt;br /&gt;
piddir = /opt/local/smokeping/var&lt;br /&gt;
cgiurl = http://yourdomain.com/cgi-bin/smokeping.fcgi&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Make sure the imgcache folder is writeable by the Apache user.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Point the FPing binary to its proper path;&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;+FPing&lt;br /&gt;
&lt;br /&gt;
binary = /opt/sbin/fping&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; Sample probe menu; &lt;br /&gt;
&amp;lt;pre&amp;gt;menu = Top&lt;br /&gt;
title = Network Latency Grapher&lt;br /&gt;
remark = Welcome to the yourdomain.com SmokePing website.&lt;br /&gt;
&lt;br /&gt;
+ provider&lt;br /&gt;
menu = PROVIDER&lt;br /&gt;
title = Provider targetted hosts for tracking quality of overall latency in their network&lt;br /&gt;
&lt;br /&gt;
++ gateway&lt;br /&gt;
host = mysamplehost.com&lt;br /&gt;
++ smtp&lt;br /&gt;
host = smtp.mysamplehost.com&lt;br /&gt;
++ primarydns&lt;br /&gt;
host = ns1.mysamplehost.com&lt;br /&gt;
++ secondarydns&lt;br /&gt;
host = ns2.mysamplehost.com&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Fixing the default template  ==&lt;br /&gt;
&lt;br /&gt;
The default template located in /opt/local/smokeping/etc will try to load the cropper javascript from a relative location (eg. /cgi-bin/). This needs to be changed to the Apache document root of the virtual host we are connecting to. &lt;br /&gt;
&lt;br /&gt;
Edit the /opt/local/smokeping/etc/basepage.html.dist and alter the following lines; &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;script src=&amp;quot;cropper/lib/prototype.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;script src=&amp;quot;cropper/lib/scriptaculous.js?load=builder,effects,dragdrop&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;script src=&amp;quot;cropper/cropper.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;script src=&amp;quot;cropper/smokeping-zoom.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
to &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;script src=&amp;quot;../cropper/lib/prototype.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;script src=&amp;quot;../cropper/lib/scriptaculous.js?load=builder,effects,dragdrop&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;script src=&amp;quot;../cropper/cropper.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;script src=&amp;quot;../cropper/smokeping-zoom.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Testing your probes  ==&lt;br /&gt;
&lt;br /&gt;
To run the smokeping perl script properly you need to clear the LC_ALL variable to prevent conflicts. The final script that will launch the daemonized version of smokeping will have this declaration included in the script.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;To manually do this to enable debugging and testing your scripts you can; &lt;br /&gt;
&amp;lt;pre&amp;gt;# export LC_ALL=&lt;br /&gt;
./opt/local/smokeping/smokeping --config=/opt/smokeping/etc/config --debug&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Once everything runs to wish you can create a script that daemonizes the process; &lt;br /&gt;
&amp;lt;pre&amp;gt;# touch /opt/bin/smoked.sh&lt;br /&gt;
# chmod 755 /opt/bin/smoked.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
smoked.sh should contain; &lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
export LC_ALL=&lt;br /&gt;
cd /opt/local/smokeping/bin&lt;br /&gt;
./smokeping --config=../etc/config --logfile=/opt/smokeping/logs/smoke.log&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
= Troubleshooting  =&lt;br /&gt;
&lt;br /&gt;
Q: There are no graphs yet, what is going on?&amp;lt;br&amp;gt;A: The tool updates in intervals of 5 minutes, please give it some time to populate it with data&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Q: I have added a new host on the config file while the daemon was running, now it won&amp;#039;t update the graph for the new host&amp;lt;br&amp;gt;A: Terminate the current smokeping process and start the script again &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
= Additional reading  =&lt;br /&gt;
&lt;br /&gt;
For more information about smokeping and the command-line switches of the script please go to [http://oss.oetiker.ch/smokeping/doc/index.en.html]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>