Giter Site home page Giter Site logo

Comments (3)

goodwinos avatar goodwinos commented on July 20, 2024

Committed draft patch for review in the "libpcp-pmOpenLog" branch of https://github.com/goodwinos/osd-monitor-poc.git

Note it requires corresponding change in libpcp (not yet merged upstream), see performancecopilot/pcp#365

Mark Goodwin (1):
      pmcd: log to "stderr" rather than "/dev/no-such-file"

 pcp-bayesian-central-logger/pmmgr+pmcd.sh |    2 +-
 pcp-central-logger/pmmgr+pmcd.sh          |    2 +-
 pcp-node-collector/run-pmcd.sh            |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Details :

commit b7169c5e18639691408a1bc0f061106ff8d9b822
Author: Mark Goodwin <[email protected]>
Date:   Fri Apr 27 14:32:28 2018 +1000

    pmcd: log to "stderr" rather than "/dev/no-such-file"
    
    GH #13 activate pcp pmcd+pmda logging to stderr
    
    When running pmcd+whatever as a background process, send all logging
    to stderr, which is now handled specially in libpcp::pmLogOpen().
    This includes messages written to stderr by DSO PMDAs loaded by pmcd.
    
    Requires patched libpcp from https://github.com/goodwinos/pcp.git libpcp-pmOpenLog
    (note branch, this is a draft patch).
    
    modified:   pcp-bayesian-central-logger/pmmgr+pmcd.sh
    modified:   pcp-central-logger/pmmgr+pmcd.sh
    modified:   pcp-node-collector/run-pmcd.sh

from osd-monitor-poc.

goodwinos avatar goodwinos commented on July 20, 2024

PCP #365 logging to stderr should be hitting upstream pcp later today

from osd-monitor-poc.

goodwinos avatar goodwinos commented on July 20, 2024

committed upstream for pcp-4.1.0, merged to master. See following commit and related updates:

commit 7fdf7b348efade0a25c0493c16d445a6aa036080
Author: Mark Goodwin [email protected]
Date: Wed May 23 10:06:51 2018 +1000

libpcp: pmOpenLog() support logging to existing stream (usually stderr)

This adds special handling to pmOpenLog() if the logname argument is "-".
Do not freopen the existing stream and do not rotate the log. The preamble
and atexit handler to write the footer on exit remain the same. There is
no effective change if the logname argument is not "-". See pmOpenLog(3)
for details.

All existing utilities and PMDAs using pmOpenLog(), i.e. supporting the
"-l logname" option can now write log messages to their existing stderr
stream by specifying -l-

Note that for PMDAs, if pmdaroot(1) is configured in pmcd.conf then it
will be the parent process and so any PMDA specifying -l- will write to
the root PMDA log stream, which may itself be stderr, in which case log
messages will appear in pmcd's log (which may also be stderr). If the
root PMDA is not in use, then pmcd will normally be the parent process.

Doc updates to pmOpenLog(3) and tested with qa/1255.

modified:   man/man3/pmopenlog.3
modified:   src/libpcp/src/util.c

from osd-monitor-poc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.