Re: [devel] [PATCH 1/1] dtm: change trace config var name to _PATHNAME [#2792]

2018-03-08 Thread Anders Widell
Ack. Note that you ought to send the document as an E-mail attachment 
along with the review request, and then update it with review comments 
(if any) before pushing it.


regards,

Anders Widell


On 03/05/2018 11:14 AM, Srinivas Mangipudy wrote:

Hi Vu,

I updated OpenSAF_IMMsv_PR.odt and the document is at:
https://sourceforge.net/p/opensaf/documentation/ci/default/tree/OpenSAF_IMMSv_PR.odt

Can you please review.

Thank you
Srinivas




-Original Message-
From: Vu Minh Nguyen [mailto:vu.m.ngu...@dektech.com.au]
Sent: Thursday, March 1, 2018 1:30 PM
To: srinivas ; anders.wid...@ericsson.com
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [PATCH 1/1] dtm: change trace config var name to _PATHNAME [#2792]

Ack with a  minor comment, with [Vu].

Regards, Vu


-Original Message-
From: srinivas [mailto:srinivas.mangip...@oracle.com]
Sent: Thursday, March 1, 2018 2:31 PM
To: anders.wid...@ericsson.com; vu.m.ngu...@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net; srinivas

Subject: [PATCH 1/1] dtm: change trace config var name to _PATHNAME
[#2792]

---
  src/imm/README  | 9 ++---
  src/imm/immloadd/imm_loader.cc  | 2 +-
  src/imm/immnd/immnd.conf| 2 +-
  src/imm/immpbed/immpbe.cc   | 2 +-
  src/imm/tools/imm_dumper.cc | 2 +-
  src/ntf/README  | 7 +--
  src/ntf/ntfd/ntfd.conf  | 2 +-
  src/ntf/ntfimcnd/ntfimcn_main.c | 2 +-
  8 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/imm/README b/src/imm/README index ee5f8e8..750d811
100644
--- a/src/imm/README
+++ b/src/imm/README
@@ -3206,12 +3206,12 @@ in immd.conf/immnd.conf and restart the cluster.

  Errors, warnings and notice level messages are logged to the syslog.

-To enable traces in the IMM library, export the variable
IMMA_TRACE_FILENAME
+To enable traces in the IMM library, export the variable
IMMA_TRACE_PATHNAME
  with a valid pathname before starting the application using the IMM

library.
[Vu] It may be good information for user to state here fixed location of trace 
file as you already did for NTF README as below.
+Traces are always stored in $PKGLOGDIR directory and the directory
component
+of the path name (if any) is ignored.

In OpenSAF_IMMsv_PR.odt
(https://urldefense.proofpoint.com/v2/url?u=https-3A__sourceforge.net_p_opensaf_documentation_ci_default_tree_OpenSAF-5FIMM=DwICAg=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE=rU6x356sikQZSi7Ttc2DuiqAgbc0QIeANg72N5AllVc=JgHty7D6Tv9zeykUciK5bglWJyc6T9fA5EnNFw1Mm7Q=A7QbkwCI_4xr19yJ5_fLor10DmmuVrubaAkDIvQF2yc=
Sv_PR.odt),
There is a statement regarding agent trace, I guess we should consider to 
update it too, chapter 3.6.2 Configuration:
" Tracing of he IMMA library is possible by defining the environment variable 
IMMA_TRACE_PATHNAME. The variable should have a legal file path and the trace will be 
appended to the file identified by that path"


  For example:

-$ export IMMA_TRACE_FILENAME=imm.trace
+$ export IMMA_TRACE_PATHNAME=imm.trace
  $ ./immomtest
  $ cat $pkglogdir/imm.trace

@@ -3220,8 +3220,11 @@ It is also possible to trace slave processes
forked by the IMMND.
  This would be processes for loading, sync and dump/pbe.
  To enable such trace uncomment:

-#export IMMSV_TRACE_FILENAME=osafimmnd
+#export IMMSV_TRACE_PATHNAME=osafimmnd

+It is recommended to use osaflog command as it takes care of flushing
+unwritten trace messages from memory to disk, as well as
+concatenating the pieces that may have resulted from log rotation of the trace 
stream.

  TEST

diff --git a/src/imm/immloadd/imm_loader.cc
b/src/imm/immloadd/imm_loader.cc index 13fb417..de5a575 100644
--- a/src/imm/immloadd/imm_loader.cc
+++ b/src/imm/immloadd/imm_loader.cc
@@ -2507,7 +2507,7 @@ int main(int argc, char *argv[]) {
  exit(1);
}

-  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {
+  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
  category_mask = 0x; /* TODO: set using env variable ? */
} else {
  logPath = defaultLog;
diff --git a/src/imm/immnd/immnd.conf b/src/imm/immnd/immnd.conf index
9172677..b6a4823 100644
--- a/src/imm/immnd/immnd.conf
+++ b/src/imm/immnd/immnd.conf
@@ -12,7 +12,7 @@
  # they attach as IMMA clients. These processes will also route trace
to

the

  # IMMND trace-file as define here. Traces are always stored in
$PKGLOGDIR  # directory and the directory component of the path name
(if any) is

ignored.

-#export IMMSV_TRACE_FILENAME=osafimmnd
+#export IMMSV_TRACE_PATHNAME=osafimmnd

  # The directory where the imm.xml files and persistend backend files
are  # stored. Imm dump files may also be stored here or in a subdirectory.
diff --git a/src/imm/immpbed/immpbe.cc b/src/imm/immpbed/immpbe.cc
index 6e9b933..964086f 100644
--- a/src/imm/immpbed/immpbe.cc
+++ b/src/imm/immpbed/immpbe.cc
@@ -118,7 +118,7 @@ int main(int argc, char* argv[]) {
const SaImmAdminOperationParamsT_2* params[] = {NULL};
 

Re: [devel] [PATCH 1/1] dtm: change trace config var name to _PATHNAME [#2792]

2018-03-08 Thread Anders Widell

Ack.

regards,

Anders Widell


On 03/01/2018 08:30 AM, srinivas wrote:

---
  src/imm/README  | 9 ++---
  src/imm/immloadd/imm_loader.cc  | 2 +-
  src/imm/immnd/immnd.conf| 2 +-
  src/imm/immpbed/immpbe.cc   | 2 +-
  src/imm/tools/imm_dumper.cc | 2 +-
  src/ntf/README  | 7 +--
  src/ntf/ntfd/ntfd.conf  | 2 +-
  src/ntf/ntfimcnd/ntfimcn_main.c | 2 +-
  8 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/imm/README b/src/imm/README
index ee5f8e8..750d811 100644
--- a/src/imm/README
+++ b/src/imm/README
@@ -3206,12 +3206,12 @@ in immd.conf/immnd.conf and restart the cluster.
  
  Errors, warnings and notice level messages are logged to the syslog.
  
-To enable traces in the IMM library, export the variable IMMA_TRACE_FILENAME

+To enable traces in the IMM library, export the variable IMMA_TRACE_PATHNAME
  with a valid pathname before starting the application using the IMM library.
  
  For example:
  
-$ export IMMA_TRACE_FILENAME=imm.trace

+$ export IMMA_TRACE_PATHNAME=imm.trace
  $ ./immomtest
  $ cat $pkglogdir/imm.trace
  
@@ -3220,8 +3220,11 @@ It is also possible to trace slave processes forked by the IMMND.

  This would be processes for loading, sync and dump/pbe.
  To enable such trace uncomment:
  
-#export IMMSV_TRACE_FILENAME=osafimmnd

+#export IMMSV_TRACE_PATHNAME=osafimmnd
  
+It is recommended to use osaflog command as it takes care of flushing

+unwritten trace messages from memory to disk, as well as concatenating
+the pieces that may have resulted from log rotation of the trace stream.
  
  TEST
  
diff --git a/src/imm/immloadd/imm_loader.cc b/src/imm/immloadd/imm_loader.cc

index 13fb417..de5a575 100644
--- a/src/imm/immloadd/imm_loader.cc
+++ b/src/imm/immloadd/imm_loader.cc
@@ -2507,7 +2507,7 @@ int main(int argc, char *argv[]) {
  exit(1);
}
  
-  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {

+  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
  category_mask = 0x; /* TODO: set using env variable ? */
} else {
  logPath = defaultLog;
diff --git a/src/imm/immnd/immnd.conf b/src/imm/immnd/immnd.conf
index 9172677..b6a4823 100644
--- a/src/imm/immnd/immnd.conf
+++ b/src/imm/immnd/immnd.conf
@@ -12,7 +12,7 @@
  # they attach as IMMA clients. These processes will also route trace to the
  # IMMND trace-file as define here. Traces are always stored in $PKGLOGDIR
  # directory and the directory component of the path name (if any) is ignored.
-#export IMMSV_TRACE_FILENAME=osafimmnd
+#export IMMSV_TRACE_PATHNAME=osafimmnd
  
  # The directory where the imm.xml files and persistend backend files are

  # stored. Imm dump files may also be stored here or in a subdirectory.
diff --git a/src/imm/immpbed/immpbe.cc b/src/imm/immpbed/immpbe.cc
index 6e9b933..964086f 100644
--- a/src/imm/immpbed/immpbe.cc
+++ b/src/imm/immpbed/immpbe.cc
@@ -118,7 +118,7 @@ int main(int argc, char* argv[]) {
const SaImmAdminOperationParamsT_2* params[] = {NULL};
SaImmAdminOperationParamsT_2** retParams = NULL;
  
-  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {

+  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
  category_mask = 0x; /* TODO: set using -t flag ? */
} else {
  logPath = defaultLog;
diff --git a/src/imm/tools/imm_dumper.cc b/src/imm/tools/imm_dumper.cc
index 5e5dd00..0365fc7 100644
--- a/src/imm/tools/imm_dumper.cc
+++ b/src/imm/tools/imm_dumper.cc
@@ -123,7 +123,7 @@ int main(int argc, char* argv[]) {
 * osaf_extended_name_* before saImmOmInitialize and saImmOiInitialize */
osaf_extended_name_init();
  
-  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {

+  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
  category_mask = 0x; /* TODO: set using -t flag ? */
} else {
  logPath = defaultLog;
diff --git a/src/ntf/README b/src/ntf/README
index ce78b10..6dd5173 100644
--- a/src/ntf/README
+++ b/src/ntf/README
@@ -260,17 +260,20 @@ in ntfd.conf (see CONFIGURATION above) and restart the 
cluster.
  
  For fatal errors syslog is used.
  
-To enable traces in the NTF library, export the variable NTFSV_TRACE_FILENAME

+To enable traces in the NTF library, export the variable NTFSV_TRACE_PATHNAME
  with a valid filename before starting the application using the NTF library.
  Traces are always stored in $PKGLOGDIR directory and the directory component
  of the path name (if any) is ignored.
  
  For example:
  
-$ export NTFSV_TRACE_FILENAME=ntf.trace

+$ export NTFSV_TRACE_PATHNAME=ntf.trace
  $ ntfsend
  $ cat $pkglogdir/ntf.trace
  
+It is recommended to use osaflog command as it takes care of flushing

+unwritten trace messages from memory to disk, as well as concatenating
+the pieces that may have resulted from log rotation of the trace stream.
  
  TEST
  
diff --git a/src/ntf/ntfd/ntfd.conf b/src/ntf/ntfd/ntfd.conf

index 07d90d5..56bb3d3 100644
--- a/src/ntf/ntfd/ntfd.conf
+++ b/src/ntf/ntfd/ntfd.conf
@@ -22,4 +22,4 @@ export 

Re: [devel] [PATCH 1/1] dtm: change trace config var name to _PATHNAME [#2792]

2018-03-06 Thread Vu Minh Nguyen
Hi Srinivas,

Looks good to me. Thanks!

Regards, Vu

> -Original Message-
> From: Srinivas Mangipudy [mailto:srinivas.mangip...@oracle.com]
> Sent: Monday, March 5, 2018 5:14 PM
> To: Vu Minh Nguyen ;
> anders.wid...@ericsson.com
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: RE: [PATCH 1/1] dtm: change trace config var name to _PATHNAME
> [#2792]
> 
> Hi Vu,
> 
> I updated OpenSAF_IMMsv_PR.odt and the document is at:
> https://sourceforge.net/p/opensaf/documentation/ci/default/tree/OpenSAF_I
> MMSv_PR.odt
> 
> Can you please review.
> 
> Thank you
> Srinivas
> 
> 
> 
> 
> -Original Message-
> From: Vu Minh Nguyen [mailto:vu.m.ngu...@dektech.com.au]
> Sent: Thursday, March 1, 2018 1:30 PM
> To: srinivas ; anders.wid...@ericsson.com
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: RE: [PATCH 1/1] dtm: change trace config var name to _PATHNAME
> [#2792]
> 
> Ack with a  minor comment, with [Vu].
> 
> Regards, Vu
> 
> > -Original Message-
> > From: srinivas [mailto:srinivas.mangip...@oracle.com]
> > Sent: Thursday, March 1, 2018 2:31 PM
> > To: anders.wid...@ericsson.com; vu.m.ngu...@dektech.com.au
> > Cc: opensaf-devel@lists.sourceforge.net; srinivas
> > 
> > Subject: [PATCH 1/1] dtm: change trace config var name to _PATHNAME
> > [#2792]
> >
> > ---
> >  src/imm/README  | 9 ++---
> >  src/imm/immloadd/imm_loader.cc  | 2 +-
> >  src/imm/immnd/immnd.conf| 2 +-
> >  src/imm/immpbed/immpbe.cc   | 2 +-
> >  src/imm/tools/imm_dumper.cc | 2 +-
> >  src/ntf/README  | 7 +--
> >  src/ntf/ntfd/ntfd.conf  | 2 +-
> >  src/ntf/ntfimcnd/ntfimcn_main.c | 2 +-
> >  8 files changed, 17 insertions(+), 11 deletions(-)
> >
> > diff --git a/src/imm/README b/src/imm/README index ee5f8e8..750d811
> > 100644
> > --- a/src/imm/README
> > +++ b/src/imm/README
> > @@ -3206,12 +3206,12 @@ in immd.conf/immnd.conf and restart the
> cluster.
> >
> >  Errors, warnings and notice level messages are logged to the syslog.
> >
> > -To enable traces in the IMM library, export the variable
> > IMMA_TRACE_FILENAME
> > +To enable traces in the IMM library, export the variable
> > IMMA_TRACE_PATHNAME
> >  with a valid pathname before starting the application using the IMM
> library.
> [Vu] It may be good information for user to state here fixed location of
trace
> file as you already did for NTF README as below.
> +Traces are always stored in $PKGLOGDIR directory and the directory
> component
> +of the path name (if any) is ignored.
> 
> In OpenSAF_IMMsv_PR.odt
> (https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__sourceforge.net_p_opensaf_documentation_ci_default_tree_OpenSAF-
> 5FIMM=DwICAg=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE
> =rU6x356sikQZSi7Ttc2DuiqAgbc0QIeANg72N5AllVc=JgHty7D6Tv9zeykUc
> iK5bglWJyc6T9fA5EnNFw1Mm7Q=A7QbkwCI_4xr19yJ5_fLor10DmmuVruba
> AkDIvQF2yc=
> Sv_PR.odt),
> There is a statement regarding agent trace, I guess we should consider to
> update it too, chapter 3.6.2 Configuration:
> " Tracing of he IMMA library is possible by defining the environment
variable
> IMMA_TRACE_PATHNAME. The variable should have a legal file path and the
> trace will be appended to the file identified by that path"
> 
> >
> >  For example:
> >
> > -$ export IMMA_TRACE_FILENAME=imm.trace
> > +$ export IMMA_TRACE_PATHNAME=imm.trace
> >  $ ./immomtest
> >  $ cat $pkglogdir/imm.trace
> >
> > @@ -3220,8 +3220,11 @@ It is also possible to trace slave processes
> > forked by the IMMND.
> >  This would be processes for loading, sync and dump/pbe.
> >  To enable such trace uncomment:
> >
> > -#export IMMSV_TRACE_FILENAME=osafimmnd
> > +#export IMMSV_TRACE_PATHNAME=osafimmnd
> >
> > +It is recommended to use osaflog command as it takes care of flushing
> > +unwritten trace messages from memory to disk, as well as
> > +concatenating the pieces that may have resulted from log rotation of
the
> trace stream.
> >
> >  TEST
> >
> > diff --git a/src/imm/immloadd/imm_loader.cc
> > b/src/imm/immloadd/imm_loader.cc index 13fb417..de5a575 100644
> > --- a/src/imm/immloadd/imm_loader.cc
> > +++ b/src/imm/immloadd/imm_loader.cc
> > @@ -2507,7 +2507,7 @@ int main(int argc, char *argv[]) {
> >  exit(1);
> >}
> >
> > -  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {
> > +  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
> >  category_mask = 0x; /* TODO: set using env variable ? */
> >} else {
> >  logPath = defaultLog;
> > diff --git a/src/imm/immnd/immnd.conf b/src/imm/immnd/immnd.conf
> index
> > 9172677..b6a4823 100644
> > --- a/src/imm/immnd/immnd.conf
> > +++ b/src/imm/immnd/immnd.conf
> > @@ -12,7 +12,7 @@
> >  # they attach as IMMA clients. These processes will also route trace
> > to
> the
> >  # IMMND trace-file as define here. Traces are always stored in
> > $PKGLOGDIR  # directory and the directory component of the path name
> > (if 

Re: [devel] [PATCH 1/1] dtm: change trace config var name to _PATHNAME [#2792]

2018-03-05 Thread Srinivas Mangipudy
Hi Vu,

I updated OpenSAF_IMMsv_PR.odt and the document is at:
https://sourceforge.net/p/opensaf/documentation/ci/default/tree/OpenSAF_IMMSv_PR.odt

Can you please review.

Thank you
Srinivas




-Original Message-
From: Vu Minh Nguyen [mailto:vu.m.ngu...@dektech.com.au] 
Sent: Thursday, March 1, 2018 1:30 PM
To: srinivas ; anders.wid...@ericsson.com
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [PATCH 1/1] dtm: change trace config var name to _PATHNAME [#2792]

Ack with a  minor comment, with [Vu].

Regards, Vu

> -Original Message-
> From: srinivas [mailto:srinivas.mangip...@oracle.com]
> Sent: Thursday, March 1, 2018 2:31 PM
> To: anders.wid...@ericsson.com; vu.m.ngu...@dektech.com.au
> Cc: opensaf-devel@lists.sourceforge.net; srinivas 
> 
> Subject: [PATCH 1/1] dtm: change trace config var name to _PATHNAME 
> [#2792]
> 
> ---
>  src/imm/README  | 9 ++---
>  src/imm/immloadd/imm_loader.cc  | 2 +-
>  src/imm/immnd/immnd.conf| 2 +-
>  src/imm/immpbed/immpbe.cc   | 2 +-
>  src/imm/tools/imm_dumper.cc | 2 +-
>  src/ntf/README  | 7 +--
>  src/ntf/ntfd/ntfd.conf  | 2 +-
>  src/ntf/ntfimcnd/ntfimcn_main.c | 2 +-
>  8 files changed, 17 insertions(+), 11 deletions(-)
> 
> diff --git a/src/imm/README b/src/imm/README index ee5f8e8..750d811 
> 100644
> --- a/src/imm/README
> +++ b/src/imm/README
> @@ -3206,12 +3206,12 @@ in immd.conf/immnd.conf and restart the cluster.
> 
>  Errors, warnings and notice level messages are logged to the syslog.
> 
> -To enable traces in the IMM library, export the variable 
> IMMA_TRACE_FILENAME
> +To enable traces in the IMM library, export the variable
> IMMA_TRACE_PATHNAME
>  with a valid pathname before starting the application using the IMM
library.
[Vu] It may be good information for user to state here fixed location of trace 
file as you already did for NTF README as below.
+Traces are always stored in $PKGLOGDIR directory and the directory
component
+of the path name (if any) is ignored.

In OpenSAF_IMMsv_PR.odt
(https://urldefense.proofpoint.com/v2/url?u=https-3A__sourceforge.net_p_opensaf_documentation_ci_default_tree_OpenSAF-5FIMM=DwICAg=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE=rU6x356sikQZSi7Ttc2DuiqAgbc0QIeANg72N5AllVc=JgHty7D6Tv9zeykUciK5bglWJyc6T9fA5EnNFw1Mm7Q=A7QbkwCI_4xr19yJ5_fLor10DmmuVrubaAkDIvQF2yc=
Sv_PR.odt),
There is a statement regarding agent trace, I guess we should consider to 
update it too, chapter 3.6.2 Configuration:
" Tracing of he IMMA library is possible by defining the environment variable 
IMMA_TRACE_PATHNAME. The variable should have a legal file path and the trace 
will be appended to the file identified by that path"

> 
>  For example:
> 
> -$ export IMMA_TRACE_FILENAME=imm.trace
> +$ export IMMA_TRACE_PATHNAME=imm.trace
>  $ ./immomtest
>  $ cat $pkglogdir/imm.trace
> 
> @@ -3220,8 +3220,11 @@ It is also possible to trace slave processes 
> forked by the IMMND.
>  This would be processes for loading, sync and dump/pbe.
>  To enable such trace uncomment:
> 
> -#export IMMSV_TRACE_FILENAME=osafimmnd
> +#export IMMSV_TRACE_PATHNAME=osafimmnd
> 
> +It is recommended to use osaflog command as it takes care of flushing 
> +unwritten trace messages from memory to disk, as well as 
> +concatenating the pieces that may have resulted from log rotation of the 
> trace stream.
> 
>  TEST
> 
> diff --git a/src/imm/immloadd/imm_loader.cc 
> b/src/imm/immloadd/imm_loader.cc index 13fb417..de5a575 100644
> --- a/src/imm/immloadd/imm_loader.cc
> +++ b/src/imm/immloadd/imm_loader.cc
> @@ -2507,7 +2507,7 @@ int main(int argc, char *argv[]) {
>  exit(1);
>}
> 
> -  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {
> +  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
>  category_mask = 0x; /* TODO: set using env variable ? */
>} else {
>  logPath = defaultLog;
> diff --git a/src/imm/immnd/immnd.conf b/src/imm/immnd/immnd.conf index 
> 9172677..b6a4823 100644
> --- a/src/imm/immnd/immnd.conf
> +++ b/src/imm/immnd/immnd.conf
> @@ -12,7 +12,7 @@
>  # they attach as IMMA clients. These processes will also route trace 
> to
the
>  # IMMND trace-file as define here. Traces are always stored in 
> $PKGLOGDIR  # directory and the directory component of the path name 
> (if any) is
ignored.
> -#export IMMSV_TRACE_FILENAME=osafimmnd
> +#export IMMSV_TRACE_PATHNAME=osafimmnd
> 
>  # The directory where the imm.xml files and persistend backend files 
> are  # stored. Imm dump files may also be stored here or in a subdirectory.
> diff --git a/src/imm/immpbed/immpbe.cc b/src/imm/immpbed/immpbe.cc 
> index 6e9b933..964086f 100644
> --- a/src/imm/immpbed/immpbe.cc
> +++ b/src/imm/immpbed/immpbe.cc
> @@ -118,7 +118,7 @@ int main(int argc, char* argv[]) {
>const SaImmAdminOperationParamsT_2* params[] = {NULL};
>SaImmAdminOperationParamsT_2** retParams = NULL;
> 
> -  if ((logPath = 

Re: [devel] [PATCH 1/1] dtm: change trace config var name to _PATHNAME [#2792]

2018-03-01 Thread Vu Minh Nguyen
Ack with a  minor comment, with [Vu].

Regards, Vu

> -Original Message-
> From: srinivas [mailto:srinivas.mangip...@oracle.com]
> Sent: Thursday, March 1, 2018 2:31 PM
> To: anders.wid...@ericsson.com; vu.m.ngu...@dektech.com.au
> Cc: opensaf-devel@lists.sourceforge.net; srinivas
> 
> Subject: [PATCH 1/1] dtm: change trace config var name to _PATHNAME
> [#2792]
> 
> ---
>  src/imm/README  | 9 ++---
>  src/imm/immloadd/imm_loader.cc  | 2 +-
>  src/imm/immnd/immnd.conf| 2 +-
>  src/imm/immpbed/immpbe.cc   | 2 +-
>  src/imm/tools/imm_dumper.cc | 2 +-
>  src/ntf/README  | 7 +--
>  src/ntf/ntfd/ntfd.conf  | 2 +-
>  src/ntf/ntfimcnd/ntfimcn_main.c | 2 +-
>  8 files changed, 17 insertions(+), 11 deletions(-)
> 
> diff --git a/src/imm/README b/src/imm/README
> index ee5f8e8..750d811 100644
> --- a/src/imm/README
> +++ b/src/imm/README
> @@ -3206,12 +3206,12 @@ in immd.conf/immnd.conf and restart the cluster.
> 
>  Errors, warnings and notice level messages are logged to the syslog.
> 
> -To enable traces in the IMM library, export the variable
> IMMA_TRACE_FILENAME
> +To enable traces in the IMM library, export the variable
> IMMA_TRACE_PATHNAME
>  with a valid pathname before starting the application using the IMM
library.
[Vu] It may be good information for user to state here fixed location of
trace file as you already did for NTF README as below.
+Traces are always stored in $PKGLOGDIR directory and the directory
component
+of the path name (if any) is ignored.

In OpenSAF_IMMsv_PR.odt
(https://sourceforge.net/p/opensaf/documentation/ci/default/tree/OpenSAF_IMM
Sv_PR.odt),
There is a statement regarding agent trace, I guess we should consider to
update it too, chapter 3.6.2 Configuration:
" Tracing of he IMMA library is possible by defining the environment
variable IMMA_TRACE_PATHNAME. The variable should have a legal file path and
the trace will be appended to the file identified by that path"

> 
>  For example:
> 
> -$ export IMMA_TRACE_FILENAME=imm.trace
> +$ export IMMA_TRACE_PATHNAME=imm.trace
>  $ ./immomtest
>  $ cat $pkglogdir/imm.trace
> 
> @@ -3220,8 +3220,11 @@ It is also possible to trace slave processes forked
> by the IMMND.
>  This would be processes for loading, sync and dump/pbe.
>  To enable such trace uncomment:
> 
> -#export IMMSV_TRACE_FILENAME=osafimmnd
> +#export IMMSV_TRACE_PATHNAME=osafimmnd
> 
> +It is recommended to use osaflog command as it takes care of flushing
> +unwritten trace messages from memory to disk, as well as concatenating
> +the pieces that may have resulted from log rotation of the trace stream.
> 
>  TEST
> 
> diff --git a/src/imm/immloadd/imm_loader.cc
> b/src/imm/immloadd/imm_loader.cc
> index 13fb417..de5a575 100644
> --- a/src/imm/immloadd/imm_loader.cc
> +++ b/src/imm/immloadd/imm_loader.cc
> @@ -2507,7 +2507,7 @@ int main(int argc, char *argv[]) {
>  exit(1);
>}
> 
> -  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {
> +  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
>  category_mask = 0x; /* TODO: set using env variable ? */
>} else {
>  logPath = defaultLog;
> diff --git a/src/imm/immnd/immnd.conf b/src/imm/immnd/immnd.conf
> index 9172677..b6a4823 100644
> --- a/src/imm/immnd/immnd.conf
> +++ b/src/imm/immnd/immnd.conf
> @@ -12,7 +12,7 @@
>  # they attach as IMMA clients. These processes will also route trace to
the
>  # IMMND trace-file as define here. Traces are always stored in $PKGLOGDIR
>  # directory and the directory component of the path name (if any) is
ignored.
> -#export IMMSV_TRACE_FILENAME=osafimmnd
> +#export IMMSV_TRACE_PATHNAME=osafimmnd
> 
>  # The directory where the imm.xml files and persistend backend files are
>  # stored. Imm dump files may also be stored here or in a subdirectory.
> diff --git a/src/imm/immpbed/immpbe.cc b/src/imm/immpbed/immpbe.cc
> index 6e9b933..964086f 100644
> --- a/src/imm/immpbed/immpbe.cc
> +++ b/src/imm/immpbed/immpbe.cc
> @@ -118,7 +118,7 @@ int main(int argc, char* argv[]) {
>const SaImmAdminOperationParamsT_2* params[] = {NULL};
>SaImmAdminOperationParamsT_2** retParams = NULL;
> 
> -  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {
> +  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
>  category_mask = 0x; /* TODO: set using -t flag ? */
>} else {
>  logPath = defaultLog;
> diff --git a/src/imm/tools/imm_dumper.cc b/src/imm/tools/imm_dumper.cc
> index 5e5dd00..0365fc7 100644
> --- a/src/imm/tools/imm_dumper.cc
> +++ b/src/imm/tools/imm_dumper.cc
> @@ -123,7 +123,7 @@ int main(int argc, char* argv[]) {
> * osaf_extended_name_* before saImmOmInitialize and saImmOiInitialize
> */
>osaf_extended_name_init();
> 
> -  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {
> +  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
>  category_mask = 0x; /* TODO: set using -t flag ? */
>} else {
>  logPath = defaultLog;
> diff 

[devel] [PATCH 1/1] dtm: change trace config var name to _PATHNAME [#2792]

2018-02-28 Thread srinivas
---
 src/imm/README  | 9 ++---
 src/imm/immloadd/imm_loader.cc  | 2 +-
 src/imm/immnd/immnd.conf| 2 +-
 src/imm/immpbed/immpbe.cc   | 2 +-
 src/imm/tools/imm_dumper.cc | 2 +-
 src/ntf/README  | 7 +--
 src/ntf/ntfd/ntfd.conf  | 2 +-
 src/ntf/ntfimcnd/ntfimcn_main.c | 2 +-
 8 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/imm/README b/src/imm/README
index ee5f8e8..750d811 100644
--- a/src/imm/README
+++ b/src/imm/README
@@ -3206,12 +3206,12 @@ in immd.conf/immnd.conf and restart the cluster.
 
 Errors, warnings and notice level messages are logged to the syslog.
 
-To enable traces in the IMM library, export the variable IMMA_TRACE_FILENAME
+To enable traces in the IMM library, export the variable IMMA_TRACE_PATHNAME
 with a valid pathname before starting the application using the IMM library.
 
 For example:
 
-$ export IMMA_TRACE_FILENAME=imm.trace
+$ export IMMA_TRACE_PATHNAME=imm.trace
 $ ./immomtest
 $ cat $pkglogdir/imm.trace
 
@@ -3220,8 +3220,11 @@ It is also possible to trace slave processes forked by 
the IMMND.
 This would be processes for loading, sync and dump/pbe.
 To enable such trace uncomment:
 
-#export IMMSV_TRACE_FILENAME=osafimmnd
+#export IMMSV_TRACE_PATHNAME=osafimmnd
 
+It is recommended to use osaflog command as it takes care of flushing
+unwritten trace messages from memory to disk, as well as concatenating
+the pieces that may have resulted from log rotation of the trace stream.
 
 TEST
 
diff --git a/src/imm/immloadd/imm_loader.cc b/src/imm/immloadd/imm_loader.cc
index 13fb417..de5a575 100644
--- a/src/imm/immloadd/imm_loader.cc
+++ b/src/imm/immloadd/imm_loader.cc
@@ -2507,7 +2507,7 @@ int main(int argc, char *argv[]) {
 exit(1);
   }
 
-  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {
+  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
 category_mask = 0x; /* TODO: set using env variable ? */
   } else {
 logPath = defaultLog;
diff --git a/src/imm/immnd/immnd.conf b/src/imm/immnd/immnd.conf
index 9172677..b6a4823 100644
--- a/src/imm/immnd/immnd.conf
+++ b/src/imm/immnd/immnd.conf
@@ -12,7 +12,7 @@
 # they attach as IMMA clients. These processes will also route trace to the
 # IMMND trace-file as define here. Traces are always stored in $PKGLOGDIR
 # directory and the directory component of the path name (if any) is ignored.
-#export IMMSV_TRACE_FILENAME=osafimmnd
+#export IMMSV_TRACE_PATHNAME=osafimmnd
 
 # The directory where the imm.xml files and persistend backend files are
 # stored. Imm dump files may also be stored here or in a subdirectory.
diff --git a/src/imm/immpbed/immpbe.cc b/src/imm/immpbed/immpbe.cc
index 6e9b933..964086f 100644
--- a/src/imm/immpbed/immpbe.cc
+++ b/src/imm/immpbed/immpbe.cc
@@ -118,7 +118,7 @@ int main(int argc, char* argv[]) {
   const SaImmAdminOperationParamsT_2* params[] = {NULL};
   SaImmAdminOperationParamsT_2** retParams = NULL;
 
-  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {
+  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
 category_mask = 0x; /* TODO: set using -t flag ? */
   } else {
 logPath = defaultLog;
diff --git a/src/imm/tools/imm_dumper.cc b/src/imm/tools/imm_dumper.cc
index 5e5dd00..0365fc7 100644
--- a/src/imm/tools/imm_dumper.cc
+++ b/src/imm/tools/imm_dumper.cc
@@ -123,7 +123,7 @@ int main(int argc, char* argv[]) {
* osaf_extended_name_* before saImmOmInitialize and saImmOiInitialize */
   osaf_extended_name_init();
 
-  if ((logPath = getenv("IMMSV_TRACE_FILENAME"))) {
+  if ((logPath = getenv("IMMSV_TRACE_PATHNAME"))) {
 category_mask = 0x; /* TODO: set using -t flag ? */
   } else {
 logPath = defaultLog;
diff --git a/src/ntf/README b/src/ntf/README
index ce78b10..6dd5173 100644
--- a/src/ntf/README
+++ b/src/ntf/README
@@ -260,17 +260,20 @@ in ntfd.conf (see CONFIGURATION above) and restart the 
cluster.
 
 For fatal errors syslog is used.
 
-To enable traces in the NTF library, export the variable NTFSV_TRACE_FILENAME
+To enable traces in the NTF library, export the variable NTFSV_TRACE_PATHNAME
 with a valid filename before starting the application using the NTF library.
 Traces are always stored in $PKGLOGDIR directory and the directory component
 of the path name (if any) is ignored.
 
 For example:
 
-$ export NTFSV_TRACE_FILENAME=ntf.trace
+$ export NTFSV_TRACE_PATHNAME=ntf.trace
 $ ntfsend
 $ cat $pkglogdir/ntf.trace
 
+It is recommended to use osaflog command as it takes care of flushing
+unwritten trace messages from memory to disk, as well as concatenating
+the pieces that may have resulted from log rotation of the trace stream.
 
 TEST
 
diff --git a/src/ntf/ntfd/ntfd.conf b/src/ntf/ntfd/ntfd.conf
index 07d90d5..56bb3d3 100644
--- a/src/ntf/ntfd/ntfd.conf
+++ b/src/ntf/ntfd/ntfd.conf
@@ -22,4 +22,4 @@ export NTFSV_ENV_HEALTHCHECK_KEY="Default"
 # The process will also route trace to the NTF trace-file as define here.
 # Traces are always stored in