Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] Having trouble with the 'servicewatcher' script and its cron job

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] Having trouble with the 'servicewatcher' script and its cron job


Chronological Thread 
  • From: Phil Reese <>
  • To: "Garnizov, Ivan" <>, Phil Reese <>, Andrew Lake <>, "" <>
  • Subject: Re: [perfsonar-user] Having trouble with the 'servicewatcher' script and its cron job
  • Date: Thu, 4 Jun 2020 15:53:26 -0700

More data on the issue:

I was basing the 'no cron job running' by looking at the output of 'crontab -l', I've since learned that properly formatted files, put in /etc/cron.d/ will run as if part of the crontab system.  In all the cases I've looked at there has been a properly formatted 'cron-service_watcher' file in that directory.

Test cases:

1)  Built a system from scratch with Centos7, updated it to Cento7.8.
Followed the PS documentation pages for loading bundles.

Loaded:
yum install perfsonar-testpoint
yum install perfsonar-toolkit-servicewatcher

The results look like all of my endpoint setups.  (see above: No cron job (when looking at crontab -l.)  No .conf files in the location the servicewatcher script looks for them in.  Initially no servicewatcher log files in the /var/log/perfsonar directory.  However looking again in an hour or so, the servicewatcher_error.log, of zero length did appear.  (this tipped me that some type of cron job was, in fact, running)

2)  Next I rebuilt a standard Centos7 from scratch again, as above.
Followed the PS docs to load bundles.

Loaded:
yum install perfsonar-toolkit

Only!

The same results were found.  No config files in /etc/perfsonar/{servicewatcher.log, servicewatcher_error.log}, there was a file in /etc/cron.d, and the empty /var/log/perfsonar/servicewatcher_error.log only appears after the cron job runs.

I'm pretty sure I'm on solid ground to suggest there is a bug in the servicewatcher function in general.

Phil

---
This is the start of script that is launched by cron:
/usr/lib/perfsonar/scripts/service_watcher

#!/usr/bin/perl
...
my ( $status, $res );

my $default_config             = "/etc/perfsonar/servicewatcher.conf";
my $default_logger_config      = "/etc/perfsonar/servicewatcher-logger.conf";
...

$CONFIG_FILE = $default_config unless ($CONFIG_FILE);
$LOGGER_CONF = $default_logger_config unless ($LOGGER_CONF);

(for brevity, '...' is used to cut out some code lines)



On 6/4/20 7:38 AM, Garnizov, Ivan wrote:

Please note the location of the configuration file should be in:

/etc/perfsonar/toolkit/servicewatcher.conf

 

And the cron file: /etc/cron.d/cron-service_watcher





Archive powered by MHonArc 2.6.19.

Top of Page