ACS Logging System Concepts and Example H.Sommer (Restructured, based on slides from previous years) UTFSM Valparaiso, Chile, Nov. 2009 ACS Logging System.

Slides:



Advertisements
Similar presentations
Chapter 6 Server-side Programming: Java Servlets
Advertisements

Operating-System Structures
1 Generic logging layer for the distributed computing by Gene Van Buren Valeri Fine Jerome Lauret.
13-Jul-15 Logging. What is logging? “Logging” is producing messages that tell you what your program is doing It’s not much different than using System.out.println(...)
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Object Oriented Software Development
A First Program Using C#
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
Christopher Jeffers August 2012
Institute of Computer and Communication Network Engineering OFC/NFOEC, 6-10 March 2011, Los Angeles, CA Lessons Learned From Implementing a Path Computation.
Designing For Testability. Incorporate design features that facilitate testing Include features to: –Support test automation at all levels (unit, integration,
IEEE R lmap 23 Feb 2015.
6st ACS Workshop UTFSM ACS Course Component, Container, Lifecycle Management 6st ACS Workshop UTFSM, Valparaiso, Chile H. Sommer, G. Chiozzi.
SAN DIEGO SUPERCOMPUTER CENTER Working with Inca Reporters Jim Hayes Inca Workshop September 4-5, 2008.
OOI CyberInfrastructure: Technology Overview - Hyrax January 2009 Claudiu Farcas OOI CI Architecture & Design Team UCSD/Calit2.
Magnetic Field Measurement System as Part of a Software Family Jerzy M. Nogiec Joe DiMarco Fermilab.
Module 10: Monitoring ISA Server Overview Monitoring Overview Configuring Alerts Configuring Session Monitoring Configuring Logging Configuring.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
1 Software Construction and Evolution - CSSE 375 Exception Handling – Logging & Special Situations Steve Chenoweth Office: Moench Room F220 Phone: (812)
SunGuide® Software Development Project Release 4.3 Express Lanes Enhancements Design Review December 15, 2009 December 15, 20091R4.3 Design Review.
1 Software Construction and Evolution - CSSE 375 Exception Handling - Principles Steve Chenoweth, RHIT Above – Exception handling on the ENIAC. From
ACS Logging System APIs: C++ Bogdan Jeram European Southern Observatory July 2004NRAO.
Chapter 6 Server-side Programming: Java Servlets
ICALEPCS Archamp 08 – 09 October, 2005 ACS Alarm system prototype Alessandro Caproni.
Introduction to Exception Handling and Defensive Programming.
ALMA Common Software Basic Track Logging and Error Systems.
ACS Error System APIs: C++ Bogdan Jeram European Southern Observatory July 2005ESO.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
WSM Administrator Training. WSM Administrator Discussion of WSM Administrator responsibilities Discussion of WSM administrative interfaces Detailed discussion.
AtacamaLargeMillimeterArray ACS Training Notification Channels (last updated by Heiko Sommer, Nov. 2009)
ALMA Common Software Basic Track A walk through ACS functionality.
Debugging and Profiling With some help from Software Carpentry resources.
Logging1. 2 Introduction Ships must keep a written log telling speed, direction, destination, etc. –A kind of diary of the ship. Large programs should.
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
Running ACS Bogdan Jeram European Southern Observatory July 2005NAOJ.
Eclipse 24-Apr-17.
ABone Architecture and Operation ABCd — ABone Control Daemon Server for remote EE management On-demand EE initiation and termination Automatic EE restart.
ICALEPCS’ GenevaACS in ALMA1 Allen Farris National Radio Astronomy Observatory Lead, ALMA Control System.
The TANGO Logging Service Status Implementation details Possible enhancements.
Managed by UT-Battelle for the Department of Energy CSS Update Matthias Clausen, Helge Rickens, Jan Hatje and DESY Delphy Armstrong, Xihui Chen,
The Log4E logging plug-in David Gallardo. What is logging good for? Tracing program execution during development Debugging Providing an audit trail for.
MuSL Builder Handcrafting custom Mu Scenarios. MuSL in the Mu Scenario Editor.
ICALEPCS 2005 Geneva, Oct. 12 The ALMA Telescope Control SystemA. Farris The ALMA Telescope Control System Allen Farris Ralph Marson Jeff Kern National.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Garching - 15th - 19th January, 2007 ACS: status and latest development The ACS Team.
1st ACS Workshop UTFSM, Valparaiso, Chile ACS Course The Big Picture of ACS H. Sommer, G.Chiozzi.
The ATLAS DAQ System Online Configurations Database Service Challenge J. Almeida, M. Dobson, A. Kazarov, G. Lehmann-Miotto, J.E. Sloper, I. Soloviev and.
CSCI-383 Object-Oriented Programming & Design Lecture 25.
1 Channel Access Concepts – IHEP EPICS Training – K.F – Aug EPICS Channel Access Concepts Kazuro Furukawa, KEK (Bob Dalesio, LANL)
ESO - Garching 08 – 09 March, st ALMA Common Software Workshop ACS Container/Component Model.
13 Copyright © 2007, Oracle. All rights reserved. Using the Data Recovery Advisor.
© 2001 By Default! A Free sample background from Slide 1 Motivation CMW logging Real-Time Task CMW Server Logging thread.
Maintaining and Updating Windows Server 2008 Lesson 8.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Architecture Review 10/11/2004
Monitoring Windows Server 2012
Collectd 101.
Collectd 101.
Chapter 11 Designing Inputs, Outputs, and Controls.
ACS Alarm System A. Caproniac
Chapter 2: System Structures
Using the Python Logging System
Debugging & Logging.
Training Module Introduction to the TB9100/P25 CG/P25 TAG Customer Service Software (CSS) Describes Release 3.95 for Trunked TB9100 and P25 TAG Release.
Channel Access Concepts
System Reengineering Restructuring or rewriting part or all of a system without changing its functionality Applicable when some (but not all) subsystems.
Channel Access Concepts
CS 240 – Advanced Programming Concepts
Presentation transcript:

ACS Logging System Concepts and Example H.Sommer (Restructured, based on slides from previous years) UTFSM Valparaiso, Chile, Nov ACS Logging System

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System2 Why Logging? ACS itself, and the software built with ACS, produce logs. The purpose of logs is to publish any kind of status and diagnostic information for interested clients and archival. –Logs are essential for post-mortem analysis of hardware or software problems. –For normal logs, the intended audience are developers. –Optional “audience” set for individual logs. It can be used for filtering of logs, orthogonal to log levels. Mainly “OPERATOR” used by Alma.

ALMA Project ACS Log Service UTFSM Valparaiso, Chile, Oct 2009ACS Logging System3 Conceptual Overview your Java ACS Java logger DEBUG INFO ERROR ACS C++ logger your C++ ERROR INFO DEBUG INFO ERROR DEBUG INFO ERROR stdout: { ERROR } { ERROR, INFO, DEBUG } Log archive (RDB) Log GUI (“jlog”) Log to file

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System4 Log Forwarding Logs can be output locally on the console. Logs can be sent to a central Log service, coming from many components / clients in different languages (C++, Java, Py). From the Log service, all logs can be viewed together and analyzed live in a GUI, or written to file, or to a database and be processed later.

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System5 Logger Objects & Filters Containers, components and some larger tools use separate ACS logger objects. Logs are prioritized with log levels, which allows filtering, to process only sufficiently important logs. Filtering can be configured per process or per logger. Log level filters are applied at the source, before the log is sent to the network. Log receiver tools have additional throw-away filtering capabilities, which work the same for all logs.

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System6 Hidden Benefits For high performance and robustness, ACS transparently caches logs, and sends them asynchronously in batches. ACS transparently inserts additional data, such as the host / container names, or the current thread name.

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System7 Special Log types Domain-specific concepts, e.g. fields for “Antenna” and “Array” in Alma, can be added as parameters w/o affecting other projects. Optionally, “type-safe logs” can be code-generated from XML configuration files –To ensure identical messages across files and implementation languages. –Modify log level or message text centrally. –Keep a catalog of logs, for system documentation.

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System8 Log system technology (1) From the log producers to the Log service, and from there to the receiving clients, logs are transmitted in XML format. The ACS central Log service –Receives batches of log records through its IDL interface. –Is based on the CORBA (“Telecom”) Log service. –Forwards to a CORBA Notification Channel (NC), to deliver logs to registered clients. –That NC runs in a separate process, to not interfere with the applications’ notification channels.

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System9 Log Repeat Guards ACS offers “repeat guard” classes that can be used to conveniently reduce the number of executions of some identical activity such as logging. –Repeat guards are configurable based on the number of skipped executions, or skipping time, or combinations. –There are both log-specific and generic repeat guards. Real world example (from the CDB, skipping logs for the same recordID ): MultipleRepeatGuard recordNotExistLogRepeatGuard = new …; if (recordNotExistLogRepeatGuard.checkAndIncrement(recordID)) { String msg = “Record '" + recordID + "' does not exist.“; int repeatCount = recordNotExistLogRepeatGuard. counterAtLastExecution(recordID); if (repeatCount > 1) { msg += " (" + repeatCount + " identical logs reduced to this log)“; } m_logger.log(AcsLogLevel.NOTICE, msg); }

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System10 Log system technology (2) ACS logger objects appear like the “native” APIs –C++ ACE logging –Java: java.util.logging –JDK-inspired Python logging API

ALMA Project ACS Course, Jan 2007ACS Logging System APIs: C++ & java11 Log system technology (3) Plain JDK Logger with ACS behind the scenes java.util.logging.Logger info(String msg) log(Level, String msg, Throwable) ContainerServices#getLogger() Application code (component or comp-client) creates & configures getLogger uses VM-local ACS log handler forwards messages remote ACS Log Service forwards (XML)

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System12 Log system technology (4) XML syntax of a log entry Log entry type (Debug, Info, Trace...) Timestamp (ISO format) Source code info (File, Line, Routine) Runtime context info (Host, Process, Thread, StackLevel) Identification (LogId, Uri) Priority (1-11; default is 2) Data ( ), incl. exceptions Message

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System13 Example of a log message <Debug TimeStamp=" T13:44:16.530" Host=“te1.hq.eso.org“ Process="baciTestServer“ Thread="main" Context="“ File="baciTestClassImpl.cpp“ Line="205" Routine="BaciTestClass::~BaciTestClass > Great debug message!

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System14 Log entry type and numerical value Trace (2) Delouse (will be new in ACS 8.2) Debug (3) Info (4) Notice (5) Warning (6) Error (8) Critical (9) Alert (10) Emergency (11) Off (99)

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System15 Logging Configuration Overview Without anything else, an ACS logger is configured to log TRACE and above levels. Optional environment variables can set per-process default log levels. The CDB can set per-process log levels and per-logger levels –For example, loggers for ACS container and for some stable component log only WARNING and higher, but logger for some unstable component should l og DEBUG and higher. –Per-logger levels in the CDB “beat” the env vars, while the env vars override the CDB per-process default Tools to dynamically change log levels in the running system.

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System16 Logging Configuration Environment Vars $ACS_LOG_STDOUT sets default values, you can limit which logs are printed to standard out. –$ACS_LOG_STDOUT must be between 2 and 11. Lesser values imply that more logs get printed / forwarded. Likewise, $ACS_LOG_CENTRAL sets the default log level for central logging to the ACS Log service. $ACS_LOG_FILE (or default $ACS_TMP/ / acs_local_log_, when not set) - location and root file name for additional stdout-like ACS log files. Most processes generate a unique file name by appending process name and PID to the root file name.

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System17 Logging Configuration in the CDB Details are described at hemas-cosylab-com_LoggingConfig_1.0/complexType/LoggingConfig.html Default log levels Special levels for a named logger (here: the jacorb logger)

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System18 Logging Configuration At Runtime (1) Runtime log level changes override both env var and CDB settings (for both per-process and per-logger settings). They are lost after restarting the process though. Cmd line tool “maciContainerLogLevel” to get or set log levels. Example: maciContainerLogLevel frodo get Container: frodo Log levels for logger useDefault : false minLogLevel : 9 minLogLevelLocal: 6

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System19 Logging Configuration At Runtime (2) GUI “logLevelPanel”

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System20 Logging clients (receivers) Jlog: A GUI to browse and filter logs. See separate presentation. loggingClient: Command-line tool that dumps all logs to a file –TAT tests can run it via “acsutilTATPrologue –l”. Archive logger (from Alma Archive subsystem) Custom clients can be written. They must subscribe to the logs on the notification channel. Warning: Every logging client slows down the logging system considerably! Congestions can lead to Log service crashes!

ALMA Project UTFSM Valparaiso, Chile, Oct 2009ACS Logging System21 References Logging and Archiving: cs/OnlineDocs/Logging_and_Archiving.pdf cs/OnlineDocs/Logging_and_Archiving.pdf Documentation for the APIs in the online documentation.