Bug 199431 - tog-pegasus is not generating runtime log files
Summary: tog-pegasus is not generating runtime log files
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: tog-pegasus
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-19 15:40 UTC by Michael DeHaan
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-07-19 20:00:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael DeHaan 2006-07-19 15:40:24 UTC
Description of problem:

Pegasus does not generate log files other than in
'/var/lib/Pegasus/install.log', thus removing the ability to debug the actions
of various providers, such as those in the sblim packages.  Usage of "cimconfig
-s logLevel=DEBUG" has no effect. 

Version-Release number of selected component (if applicable):

2.51

How reproducible:

locate 'Pegasus' | grep log
locate 'pegasus' | grep log


Steps to Reproduce:
1.  use wbem CLI to exercise providers that have known debug statements
2.  try to find for a pegasus log file
  
Actual results:
No log file for Pegasus is found on the system.  

Expected results:
Would be able to find the Pegasus log file, possibly in /var/log or
/var/lib/Pegasus/log.  Service startup and stopping, including auth failures,
are listed in /var/log/messages, though informational messages from providers do
not show up.  This URL (http://docs.hp.com/en/B8465-90027/ch01s09.html) seems to
indicate a /var/log/Pegasus should exist.

Comment 1 Jason Vas Dias 2006-07-19 16:20:54 UTC
Actually, the pegasus debug log files are found in /var/lib/Pegasus/cache/trace,
and are enabled by setting 'traceLevel=[0-4]', eg:
  # cimconfig -p -s 'traceLevel=4'; service tog-pegasus restart
Yes, it doesn't really make much sense to me either, but historically the 
/var/lib/Pegasus/log/ directory has been used ONLY for the install logs,
while the trace files go into /var/lib/Pegasus/cache/trace/
(/var/lib/Pegasus/cache is the current working directory of cimserver).

Each provider may have separate trace files created when tracing
is enabled, in /var/lib/Pegasus/cache/trace/.

Setting logLevel=DEBUG controls the level of log messages logged to syslog.

You can also set logLevel=TRACE, and when traceLevel is set > 0, debug messages
will be logged to the syslog in /var/log/messages.

I hope the above addresses your problem - if not, then please re-open this bug -
thanks.

Comment 2 Michael DeHaan 2006-07-19 19:11:51 UTC
Doesn't work for me.  I've set logLevel=TRACE and traceLevel=4 (and restarted)
and did not see anything in /var/lib/Pegasus/cache/trace ... however i did see
new entries in syslog.  Enabling forceProcess=TRUE allowed syslog statements in
the provider I'm testing to work, so this is a suitable workaround for me.

I'm not sure of the intended behavior of /cache/trace, though I'm not seeing
anything in that directory through use of any of the sblim providers with the
above settings.  I'll probably continue to use forceProcess=TRUE and just syslog
directly from the provider now that works.

If there's a reasonable test case for checking that something gets traced, that
I can, let me know.


Comment 3 Jason Vas Dias 2006-07-19 20:00:28 UTC
Yes, the documentation for the cimserver trace feature is woefully inadequate -
the only way I've been able to figure out how to use it is by reading the source
code - see pegasus/src/Pegasus/Config/TracePropertyOwner.cpp  .

It turns out that just setting traceLevel is not enough - you need to do:
 # cimconfig -p -s 'traceLevel=4' 'traceComponents=ALL' 
(or set traceCompoents to the trace component you want to enable - again,
 you can find out which traceComponents there are only by reading the source).
Then, once some traceComponents have been enabled, cimserver creates the file
/var/lib/Pegasus/cache/trace/cimserver.trc containing the debug messages.

The SBLIM providers require an 'SBLIM_TRACE=[1...4]' environment variable to
be set - you must also set the SBLIM_TRACE_FILE to a file name to enable
SBLIM provider tracing to that file.

This is the default upstream behaviour, however nasty, and it is working 
as designed - I've just confirmed this by testing with tog-pegasus-2.5.1-10.FC6
and with tog-pegasus-2.5.1-6.FC5.


Note You need to log in before you can comment on or make changes to this bug.