Discussion:
[smokeping-users] A beginner's problems - I can't run smokeping
Henrik Rosenø
2018-04-09 12:13:59 UTC
Permalink
Hi Smokeping-users


I am new to Linux. I use Ubuntu 17.10.
First I downloaded and extracted the smokeping-2.7.1.tar.gz archive and
extracted it and tried to find something to run directly without luck.
Note: logging to syslog as local0/info.
Daemonizing /usr/sbin/smokeping ...
creating /var/run/smokeping/smokeping.pid: Permission denied
Configuration file '/etc/smokeping/config' syntax OK.
Note: logging to syslog as local0/info.
Daemonizing /usr/sbin/smokeping ...
creating /var/run/smokeping/smokeping.pid: Permission denied
As you can see I got a "Permission denied".
I want to monitor my ISP because at arbitrary times both Ubuntu and
Windows can't seem to connect to the Internet.
So what do I do now?
Desktop examples.desktop Pictures snap
Documents Exodus-linux-x64 Public Templates
Downloads Music smokeping-2.7.1 Videos
bash: cd: smokping-2.7.1: No such file or directory
sudo apt install smokeping
Reading package lists... Done
Building dependency tree
Reading state information... Done
apache2 apache2-bin apache2-data apache2-utils echoping fping libapr1
libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libconfig-grammar-perl
libdbi1 libjs-cropper libjs-prototype libjs-scriptaculous librrd8
librrds-perl libsnmp-session-perl postfix
apache2-doc apache2-suexec-pristine | apache2-suexec-custom procmail
postfix-mysql postfix-pgsql postfix-ldap postfix-pcre postfix-lmdb
postfix-sqlite sasl2-bin dovecot-common resolvconf postfix-cdb postfix-doc
curl libauthen-radius-perl libnet-ldap-perl libnet-telnet-perl
apache2 apache2-bin apache2-data apache2-utils echoping fping libapr1
libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libconfig-grammar-perl
libdbi1 libjs-cropper libjs-prototype libjs-scriptaculous librrd8
librrds-perl libsnmp-session-perl postfix smokeping
0 upgraded, 20 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,720 kB of archives.
After this operation, 13.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 libapr1 amd64 1.6.2-1 [90.9 kB]
Get:2 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 libaprutil1 amd64 1.6.0-2 [84.2 kB]
Get:3 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.0-2 [10.5 kB]
Get:4 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 libaprutil1-ldap amd64 1.6.0-2 [8,660 B]
Get:5 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 apache2-bin amd64 2.4.27-2ubuntu3 [968 kB]
Get:6 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 apache2-utils amd64 2.4.27-2ubuntu3 [82.5 kB]
Get:7 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 apache2-data all 2.4.27-2ubuntu3 [161 kB]
Get:8 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 apache2 amd64 2.4.27-2ubuntu3 [95.8 kB]
Get:9 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 echoping amd64 6.0.2-10 [63.1 kB]
Get:10 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 fping amd64 4.0-2 [29.1 kB]
Get:11 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 libconfig-grammar-perl all 1.12-1 [21.6 kB]
Get:12 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 libdbi1 amd64 0.9.0-4 [27.8 kB]
Get:13 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 libjs-prototype all 1.7.1-3 [44.2 kB]
Get:14 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 libjs-scriptaculous all 1.9.0-2 [107 kB]
Get:15 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 libjs-cropper all 1.2.2-1 [139 kB]
Get:16 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 librrd8 amd64 1.6.0-1ubuntu2 [153 kB]
Get:17 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 postfix amd64 3.2.3-1 [1,159 kB]
Get:18 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 librrds-perl amd64 1.6.0-1ubuntu2 [22.9 kB]
Get:19 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 libsnmp-session-perl all 1.13-2 [64.7 kB]
Get:20 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 smokeping all 2.6.11-3 [386 kB]
Fetched 3,720 kB in 1s (3,121 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libapr1:amd64.
(Reading database ... 215895 files and directories currently installed.)
Preparing to unpack .../00-libapr1_1.6.2-1_amd64.deb ...
Unpacking libapr1:amd64 (1.6.2-1) ...
Selecting previously unselected package libaprutil1:amd64.
Preparing to unpack .../01-libaprutil1_1.6.0-2_amd64.deb ...
Unpacking libaprutil1:amd64 (1.6.0-2) ...
Selecting previously unselected package libaprutil1-dbd-sqlite3:amd64.
Preparing to unpack .../02-libaprutil1-dbd-sqlite3_1.6.0-2_amd64.deb ...
Unpacking libaprutil1-dbd-sqlite3:amd64 (1.6.0-2) ...
Selecting previously unselected package libaprutil1-ldap:amd64.
Preparing to unpack .../03-libaprutil1-ldap_1.6.0-2_amd64.deb ...
Unpacking libaprutil1-ldap:amd64 (1.6.0-2) ...
Selecting previously unselected package apache2-bin.
Preparing to unpack .../04-apache2-bin_2.4.27-2ubuntu3_amd64.deb ...
Unpacking apache2-bin (2.4.27-2ubuntu3) ...
Selecting previously unselected package apache2-utils.
Preparing to unpack .../05-apache2-utils_2.4.27-2ubuntu3_amd64.deb ...
Unpacking apache2-utils (2.4.27-2ubuntu3) ...
Selecting previously unselected package apache2-data.
Preparing to unpack .../06-apache2-data_2.4.27-2ubuntu3_all.deb ...
Unpacking apache2-data (2.4.27-2ubuntu3) ...
Selecting previously unselected package apache2.
Preparing to unpack .../07-apache2_2.4.27-2ubuntu3_amd64.deb ...
Unpacking apache2 (2.4.27-2ubuntu3) ...
Selecting previously unselected package echoping.
Preparing to unpack .../08-echoping_6.0.2-10_amd64.deb ...
Unpacking echoping (6.0.2-10) ...
Selecting previously unselected package fping.
Preparing to unpack .../09-fping_4.0-2_amd64.deb ...
Unpacking fping (4.0-2) ...
Selecting previously unselected package libconfig-grammar-perl.
Preparing to unpack .../10-libconfig-grammar-perl_1.12-1_all.deb ...
Unpacking libconfig-grammar-perl (1.12-1) ...
Selecting previously unselected package libdbi1:amd64.
Preparing to unpack .../11-libdbi1_0.9.0-4_amd64.deb ...
Unpacking libdbi1:amd64 (0.9.0-4) ...
Selecting previously unselected package libjs-prototype.
Preparing to unpack .../12-libjs-prototype_1.7.1-3_all.deb ...
Unpacking libjs-prototype (1.7.1-3) ...
Selecting previously unselected package libjs-scriptaculous.
Preparing to unpack .../13-libjs-scriptaculous_1.9.0-2_all.deb ...
Unpacking libjs-scriptaculous (1.9.0-2) ...
Selecting previously unselected package libjs-cropper.
Preparing to unpack .../14-libjs-cropper_1.2.2-1_all.deb ...
Unpacking libjs-cropper (1.2.2-1) ...
Selecting previously unselected package librrd8:amd64.
Preparing to unpack .../15-librrd8_1.6.0-1ubuntu2_amd64.deb ...
Unpacking librrd8:amd64 (1.6.0-1ubuntu2) ...
Selecting previously unselected package postfix.
Preparing to unpack .../16-postfix_3.2.3-1_amd64.deb ...
Unpacking postfix (3.2.3-1) ...
Selecting previously unselected package librrds-perl:amd64.
Preparing to unpack .../17-librrds-perl_1.6.0-1ubuntu2_amd64.deb ...
Unpacking librrds-perl:amd64 (1.6.0-1ubuntu2) ...
Selecting previously unselected package libsnmp-session-perl.
Preparing to unpack .../18-libsnmp-session-perl_1.13-2_all.deb ...
Unpacking libsnmp-session-perl (1.13-2) ...
Selecting previously unselected package smokeping.
Preparing to unpack .../19-smokeping_2.6.11-3_all.deb ...
Unpacking smokeping (2.6.11-3) ...
Setting up libconfig-grammar-perl (1.12-1) ...
Setting up libapr1:amd64 (1.6.2-1) ...
Processing triggers for ufw (0.35-5) ...
Setting up libdbi1:amd64 (0.9.0-4) ...
Processing triggers for ureadahead (0.100.0-20) ...
ureadahead will be reprofiled on next reboot
Setting up libsnmp-session-perl (1.13-2) ...
Setting up echoping (6.0.2-10) ...
Setting up apache2-data (2.4.27-2ubuntu3) ...
Setting up librrd8:amd64 (1.6.0-1ubuntu2) ...
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Setting up fping (4.0-2) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Setting up libaprutil1:amd64 (1.6.0-2) ...
Processing triggers for systemd (234-2ubuntu12.3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libjs-prototype (1.7.1-3) ...
Processing triggers for rsyslog (8.16.0-1ubuntu9) ...
Setting up postfix (3.2.3-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /lib/systemd/system/postfix.service.
Adding group `postfix' (GID 130) ...
Done.
Adding system user `postfix' (UID 123) ...
Adding new user `postfix' (UID 123) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding group `postdrop' (GID 131) ...
Done.
/etc/aliases does not exist, creating it.
Postfix (main.cf) was not set up. Start with
cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf
. If you need to make changes, edit /etc/postfix/main.cf (and others) as
needed. To view Postfix configuration values, see postconf(1).
After modifying main.cf, be sure to run 'service postfix reload'.
Setting up libaprutil1-ldap:amd64 (1.6.0-2) ...
Setting up libaprutil1-dbd-sqlite3:amd64 (1.6.0-2) ...
Setting up apache2-utils (2.4.27-2ubuntu3) ...
Setting up apache2-bin (2.4.27-2ubuntu3) ...
Setting up librrds-perl:amd64 (1.6.0-1ubuntu2) ...
Setting up libjs-scriptaculous (1.9.0-2) ...
Setting up libjs-cropper (1.2.2-1) ...
Setting up smokeping (2.6.11-3) ...
Adding system user `smokeping' (UID 124) ...
Adding new group `smokeping' (GID 132) ...
Adding new user `smokeping' (UID 124) with group `smokeping' ...
Not creating home directory `/var/lib/smokeping'.
Package apache2 is not configured yet. Will defer actions by package smokeping.
Setting up apache2 (2.4.27-2ubuntu3) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
info: Executing deferred 'a2enmod cgi' for package smokeping
Your MPM seems to be threaded. Selecting cgid instead of cgi.
Enabling module cgid.
info: Executing deferred 'a2enconf smokeping' for package smokeping
Enabling conf smokeping.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Processing triggers for systemd (234-2ubuntu12.3) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for rsyslog (8.16.0-1ubuntu9) ...
Processing triggers for ufw (0.35-5) ...
Note: logging to syslog as local0/info.
Daemonizing /usr/sbin/smokeping ...
creating /var/run/smokeping/smokeping.pid: Permission denied
Configuration file '/etc/smokeping/config' syntax OK.
Note: logging to syslog as local0/info.
Daemonizing /usr/sbin/smokeping ...
creating /var/run/smokeping/smokeping.pid: Permission denied
Best regards,
Henrik RosenÞ
--
Henrik RosenÞ, M.Sc (civilingeniÞr)
Website: www.Transformation.DK
Spiritual, psychological, ethical, and political subjects.

English: The path to eternal life is spiritual and sexual transformation.dk
Dansk: Vejen til evigt liv er åndelig og seksuel transformation.dk
goZoom SysAdmin
2018-04-09 12:20:10 UTC
Permalink
This is not a smokeping problem.  You are trying to run smokeping as
Your user on Linux and You do not have write access to the directory. 
Run smokeping as a service, not as a standalone program.

sudo service smokeping start

sudo service smokeping status

Ian
creating /var/run/smokeping/smokeping.pid: Permission denied
goZoom SysAdmin
2018-04-09 18:50:22 UTC
Permalink
You configure your monitored hosts in the Targets file.  In my install
that is here :

sudo vi /etc/smokeping/config.d/Targets

You can find the Targets file by using the find command or by installing
the locate utility - I like locate.

sudo apt install locate

and then running

sudo updatedb

sudo locate Targets

(if you don't 'sudo locate' you will not see some directories because of
permissions)

and you can view the plotted data in at this url assuming you don't
change the cgi path in the 'General' file:
(yourwebserverip)/cgi-bin/smokeping.cgi?target=(your system config name)

You can change the url path  in  /etc/smokeping/config.d/General

You need to make sure that appropriate permissions are set for the paths
that are specified in /etc/smokeping/config.d/pathnames

You might also need to fiddle with your webserver's config file to
ensure it can execute the scripts.

And keep plugging away at it......  I found Smokeping challenging to
configure when I first installed it and I am a Linux guy..... that was
10  or 12 years ago I think, but it is a /very /handy tool once you get
to understand how it works and what it can do. It now monitors a
half-dozen services on 200+ targets for us.

Regards,

Ian
OK. Thank you!
I discovered that Ctrl-C gets me back to the prompt.
And "ps -ef | grep -c smokeping" gives output "2" just like in your case.
But how can I see or access the results of the monitoring?
Best regards,
Henrik R.
You probably have multiple copies of smokeping running.
Count the instances
2
2 is normal as shown below
smokepi+ 17602     1  0 Apr05 ?        00:01:06 /usr/sbin/smokeping
[FPing]
ian      29551 29487  0 09:57 pts/0    00:00:00 grep --color=auto
smokeping
if you have multiple instances it's probably easiest just to reboot
And You probably need to find a beginners guide to Linux.
Ian
Hi goZoom
Thank you for your very fast answer.
So far so good. Now my problem is getting 20 copies of a status
message. Below I have inserted the first and the last copy.
The cursor is blinking next to "lines 1-18/18 (END)".
What do I do now?
● smokeping.service - LSB: Start or stop the smokeping latency
logging system daemon
enabled)
   Active: active (running) since Mon 2018-04-09 11:32:08 CEST; 3h
0min ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/smokeping.service
           └─9923 /usr/sbin/smokeping [FPing]
Apr 09 11:32:07 Henrik-L570 systemd[1]: Starting LSB: Start or stop
the smokeping latency logging syste
Apr 09 11:32:07 Henrik-L570 smokeping[9911]:  * Starting latency
logger daemon smokeping
Apr 09 11:32:08 Henrik-L570 smokeping[9918]: Starting syslog logging
Apr 09 11:32:08 Henrik-L570 smokeping[9919]: Note: logging to
syslog as local0/info.
Apr 09 11:32:08 Henrik-L570 smokeping[9919]: Daemonizing
/usr/sbin/smokeping ...
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: Smokeping version
2.006011 successfully launched.
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: Not entering
multiprocess mode for just a single probe.
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: FPing: probing 1
targets with step 300 s and offset 27 s.
Apr 09 11:32:08 Henrik-L570 smokeping[9911]:    ...done.
Apr 09 11:32:08 Henrik-L570 systemd[1]: Started LSB: Start or stop
the smokeping latency logging system
lines 1-18/18 (END)
● smokeping.service - LSB: Start or stop the smokeping latency
logging system daemon
enabled)
   Active: active (running) since Mon 2018-04-09 11:32:08 CEST; 3h
0min ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/smokeping.service
           └─9923 /usr/sbin/smokeping [FPing]
Apr 09 11:32:07 Henrik-L570 systemd[1]: Starting LSB: Start or stop
the smokeping latency logging system daemon...
Apr 09 11:32:07 Henrik-L570 smokeping[9911]:  * Starting latency
logger daemon smokeping
Apr 09 11:32:08 Henrik-L570 smokeping[9918]: Starting syslog logging
Apr 09 11:32:08 Henrik-L570 smokeping[9919]: Note: logging to
syslog as local0/info.
Apr 09 11:32:08 Henrik-L570 smokeping[9919]: Daemonizing
/usr/sbin/smokeping ...
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: Smokeping version
2.006011 successfully launched.
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: Not entering
multiprocess mode for just a single probe.
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: FPing: probing 1
targets with step 300 s and offset 27 s.
Apr 09 11:32:08 Henrik-L570 smokeping[9911]:    ...done.
Apr 09 11:32:08 Henrik-L570 systemd[1]: Started LSB: Start or stop
the smokeping latency logging system daemon.
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
lines 1-18/18 (END)
Henrik
--
Henrik RosenÞ, M.Sc (civilingeniÞr)
Website:www.Transformation.DK
Spiritual, psychological, ethical, and political subjects.
English: The path to eternal life is spiritual and sexual transformation.dk
Dansk: Vejen til evigt liv er åndelig og seksuel transformation.dk
This is not a smokeping problem.  You are trying to run smokeping
as Your user on Linux and You do not have write access to the
directory.  Run smokeping as a service, not as a standalone program.
sudo service smokeping start
sudo service smokeping status
Ian
creating /var/run/smokeping/smokeping.pid: Permission denied
_______________________________________________
smokeping-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
Fredrik Björk
2018-04-10 09:37:58 UTC
Permalink
Hi!

For starters, welcome to the wonderful world of Linux and Smokeping!
Lesson 1: You normally don't start services with a command line command
like that. In Debian/Ubuntu (siblings in terms of Linux distributions),
you normally start a service with i.e. /etc/init.d/smokeping start. You
can check a service with i.e. /etc/init.d/smokeping status to see if
it's running or not. There are otherw ways of doing this (part of the
buty with Linux), but this is the basic and most universal way and the
one I use. Others may pitch in with their favourite method ;)

Another handy command is "ps ax | grep smokeping". This will show you
any processes that are named smokeping (in this case).

Since you installed Smokeping, it shoud start with the system, so try a
reboot if it isn't already started. It should start as a part of the
installation.

Checking your ISP is the next task. Edit /etc/smokeping/config.d/Targets
and add the hosts you want to check. I usually take a traceroute to the
ISP's own web site and monitor all (or the first) in the traceroute
list. This way you can see if the ISP has a routing issue inside their
network (at least in some cases), and not only if your access is dropped.

Some examples:

++ PingBahnhofSe
menu = ping.bahnhof.se
title = ping.bahnhof.se
host = ping.bahnhof.se

++ PingLuSe
menu = ping.lu.se
title = ping.lu.se
host = ping.lu.se

++ PingSunetSe
menu = ping.sunet.se
title = ping.sunet.se
host = ping.sunet.se

If your traceroute looks like this:

~$  traceroute www.eniig.dk
traceroute to www.eniig.dk (92.246.13.174), 30 hops max, 60 byte packets
 1  10.67.11.1 (10.67.11.1)  0.380 ms  0.352 ms  0.338 ms
 2  213.80.87.72 (213.80.87.72)  3.670 ms  3.665 ms  3.654 ms
 3  213.80.86.253 (213.80.86.253)  3.900 ms  4.389 ms  4.365 ms
 4  dix.ip.nianet.net (192.38.7.58)  7.940 ms  5.856 ms  5.838 ms
 5  93.176.93.9 (93.176.93.9)  8.282 ms  8.241 ms  8.230 ms
 6  87.116.38.122 (87.116.38.122)  8.190 ms  8.152 ms  8.159 ms

... you might want to include hops 1-4 or so to the list of targets.
Also include my examples or other known targets on the Internet for
reference (1.1.1.1 (Cloudflare DNS), 8.8.8.8, 8.8.4.4 (Google DNS) might
be good ones).

Oh, by the way, Emacs is a far more superior editor than Vi, just in
case no one told you this yet. For beginners, pico or nano are good, and
even mcedit, included in the mc package, is a good option with less
functions than Emacs of course. mc is short for Midnight Commander, a
clone of Norton Commander if you're old enough to have run NC in DOS ;)

/Fredrik
Fredrik Björk
2018-04-10 09:47:39 UTC
Permalink
Hi again!

For reference hosts, you can use this (the first line gives you a
separate section for the refs):

+ References

++ Ref_1_1_1_1
menu = 1.1.1.1
title = 1.1.1.1
host = 1.1.1.1

++ Ref_8_8_8_8
menu = 8.8.8.8
title = 8.8.8.8
host = 8.8.8.8

++ Ref_8_8_4_4
menu = 8.8.4.4
title = 8.8.4.4
host = 8.8.4.4

/Fredrik

Loading...