Skip to Content.
Sympa Menu

perfsonar-user - R: [perfsonar-user] Posthook command line parameters

Subject: perfSONAR User Q&A and Other Discussion

List archive

R: [perfsonar-user] Posthook command line parameters


Chronological Thread 
  • From: Gaetano Vocca <>
  • To: Aaron Brown <>
  • Cc:
  • Subject: R: [perfsonar-user] Posthook command line parameters
  • Date: Tue, 13 Jan 2015 18:16:59 +0100

I understand, thank you.

Actually I was trying to investigate about how to change the code in order to let posthook support command line options. I see that, currently, the strtok acts on the configuration line, detecting tokens by means of the blank character.

In order to allow command line options, I suppose that this behavior should be changed to grab the whole line, detect the executable name, the parameters and the eventual following comment.

This new behavior could have a bad side effect in case bwctld.conf supports lists of values for one single configuration attribute, this was the idea behind my question (poorly worded, sorry).

 

Currently I worked around this point by creating a symlink to my original posthook executable, detecting this name within the script and acting consequentially.

 

Thanks again

Gaetano

 

Da: Aaron Brown [mailto:]
Inviato: martedì 13 gennaio 2015 17:50
A: Gaetano Vocca
Cc:
Oggetto: Re: [perfsonar-user] Posthook command line parameters

 

Hey Gaetano,

 

If you’re asking if there’s a syntax problem with having a posthook like “/path/to/posthook -i -w 1024”, then no, there isn’t. The “syntax error” thing is a poor error message. bwctld tries to execute the script with the “—validate” flag when it starts up, and since it doesn’t support the parameters, it’s bombing out and printing out a syntax error message.

 

Cheers,

Aaron

 

On Jan 13, 2015, at 9:34 AM, Gaetano Vocca <> wrote:

 

Thank you Aaron.

Do you know if any of the bwctld.conf options foresee a blank separated list of values? In this case any change to support the command line parameters would impact this functionality.

 

Cheers

Gaetano

 

Da: Aaron Brown [mailto:] 
Inviato: martedì 13 gennaio 2015 14:15
A: Gaetano Vocca
Cc: 
Oggetto: Re: [perfsonar-user] Posthook command line parameters

 

Hey Gaetano, 

 

The posthook currently doesn’t support command-line parameters, unfortunately. It’d probably be straight-forward to add, though.

 

Cheers,

Aaron

 

On Jan 12, 2015, at 11:12 AM, Gaetano Vocca <> wrote:

 

Hi all,

is it possible to use command line parameters in a posthook definition?

Currently, if I add any, I get

 

/usr/local/bin/bwctld -c /etc/bwctld -R /var/run

/etc/bwctld/bwctld.conf:233 Problem parsing config file

/etc/init.d/bwctld start: bwctld could not be started

 

When restarting bwctld. Is it as expected?

 

Thank you

Gaetano

 




Archive powered by MHonArc 2.6.16.

Top of Page