EGEE-II INFSO-RI-031688 Enabling Grids for E-sciencE www.eu-egee.org EGEE and gLite are registered trademarks Practicals on RGMA Valeria Ardizzone INFN.

Slides:



Advertisements
Similar presentations
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Introduction to EGEE hands-on Gergely Sipos.
Advertisements

1 Generic logging layer for the distributed computing by Gene Van Buren Valeri Fine Jerome Lauret.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE Tutorial Getting started with GILDA.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE Tutorial How to get started.
SSL Man in the Middle Proxy Srinivas Inguva Dan Boneh Ian Baker Stanford University.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Introduction to R-GMA: Relational Grid Monitoring Architecture.
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
Logging Best Practices Dubna 2012 Benedicto Fernandez Software Engineer CERN / GS-AIS.
Logging with Log4j. Introduction Logging - chronological and systematic record of data processing events in a program. Possible goals: Create an audit.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Security Packages Dependencies Joni Hahkala.
SelfDiagnose “who is to blame” ernest micklei, April 2007.
Enabling Grids for E-sciencE EGEE-II INFSO-RI BG induction to GRID Computing and EGEE project – Sofia, 2006 Practical: Porting applications.
LogBox Enterprise Logging Brad Wood
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Simply monitor a grid site with Nagios J.
INFSO-RI Enabling Grids for E-sciencE GILDA Praticals GILDA Tutors INFN Catania ICTP/INFM-Democritos Workshop on Porting Scientific.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks gLite IPv6 compliance project tests Further.
LAB 1CSIS04021 Briefing on Assignment One & RMI Programming February 13, 2007.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Information System on gLite middleware Vincent.
E-infrastructure shared between Europe and Latin America Usage of R-GMA and Grid Application Monitoring Valeria Ardizzone INFN-Catania 1° EELA Grid School.
Enabling Grids for E-sciencE EGEE-II INFSO-RI Introduction to Grid Computing, EGEE and Bulgarian Grid Initiatives Plovdiv, 2006.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks R-GMA Now With Added Authorization Steve.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Provenance Challenge gLite Job Provenance.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Using gLite API Vladimir Dimitrov IPP-BAS “gLite middleware Application Developers.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks WMSMonitor: a tool to monitor gLite WMS/LB.
Sonic EventMonitor Monitoring your Sonic environment Tako Grijpma Progaia Resource Solutions 09 november 2006.
INFSO-RI Enabling Grids for E-sciencE WMS + LB Installation Emidio Giorgio Giuseppe La Rocca INFN EGEE Tutorial, Rome November.2005.
INFSO-RI Enabling Grids for E-sciencE How to join GILDA Riccardo Bruno INFN gLite Tutorial at the First EGEE User Forum CERN,
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks AMGA PHP API Claudio Cherubino INFN - Catania.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Introduction to GILDA and gaining access.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Next steps with EGEE EGEE training community.
Conveying Information to Users. Outline Types of information in GridChem Inconsistency = confusion Appropriate UI for different information types Examples.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Grid Site Monitoring with Nagios E. Imamagic,
EGEE-II INFSO-RI Enabling Grids for E-sciencE The GILDA training infrastructure.
INFSO-RI Enabling Grids for E-sciencE
INFSO-RI Enabling Grids for E-sciencE Running ECCE on EGEE clusters Olav Vahtras KTH.
The Log4E logging plug-in David Gallardo. What is logging good for? Tracing program execution during development Debugging Providing an audit trail for.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks The GILDA t-Infrastructure Roberto Barbera.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks PASSTORE: safe certs & password management.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Progress on first user scenarios Stephen.
INFSO-RI Enabling Grids for E-sciencE Job Submission Tutorial (material from INFN Catania)
INFSO-RI Enabling Grids for E-sciencE /10/20054th EGEE Conference - Pisa1 gLite Configuration and Deployment Models JRA1 Integration.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks APEL CPU Accounting in the EGEE/WLCG infrastructure.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Computational chemistry with ECCE on EGEE.
INFSO-RI Enabling Grids for E-sciencE GILDA Praticals Giuseppe La Rocca INFN – Catania gLite Tutorial at the EGEE User Forum CERN.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Grid Monitoring Tools E. Imamagic, SRCE CE.
INFSO-RI Enabling Grids for E-sciencE Information System Valeria Ardizzone INFN EGEE NA4 Generic Applications Meeting Catania,
EGEE-II INFSO-RI Enabling Grids for E-sciencE P-GRADE overview and introduction: workflows & parameter sweeps (Advanced features)
Enabling Grids for E-sciencE EGEE-II INFSO-RI Porting an application to the EGEE Grid & Data management for Application Rachel Chen.
Module 6: Administering Reporting Services. Overview Server Administration Performance and Reliability Monitoring Database Administration Security Administration.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks WMS tricks & tips – further scripting Giuseppe.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Practical using WMProxy advanced job submission.
INFSO-RI Enabling Grids for E-sciencE R-GMA Gergely Sipos and Péter Kacsuk MTA SZTAKI Credit to Valeria Ardizzone.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks gLite – UNICORE interoperability Daniel Mallmann.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Information System Tutorial Laurence Field.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Interfacing gLite services with the Kepler.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Practical using R-GMA.
INFSO-RI Enabling Grids for E-sciencE gLite Information System: R-GMA Tony Calanducci INFN Catania gLite tutorial at the EGEE User.
EGEE-II INFSO-RI Enabling Grids for E-sciencE More on gLite: 2 services you have not seen! Mike Mineter.
INFSO-RI Enabling Grids for E-sciencE File Transfer Software and Service SC3 Gavin McCance – JRA1 Data Management Cluster Service.
© 2001 By Default! A Free sample background from Slide 1 Motivation CMW logging Real-Time Task CMW Server Logging thread.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Job Management Claudio Grandi.
Enabling Grids for E-sciencE Work Load Management & Simple Job Submission Practical Shu-Ting Liao APROC, ASGC EGEE Tutorial.
Enabling Grids for E-sciencE Claudio Cherubino INFN DGAS (Distributed Grid Accounting System)
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Argus: command line usage and banning Christoph.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Nagios Grid Monitor E. Imamagic, SRCE OAT.
Information System Valeria Ardizzone INFN
Workload Management System ( WMS )
CST8177 Scripting 2: What?.
Corporate Training Center
Presentation transcript:

EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Practicals on RGMA Valeria Ardizzone INFN Catania gLite Application Developers Course CERN,

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, Exercise: USER Application: HANOI Apache Log4jframework RGMA appende r Scripts file JDL file

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, Application Tower of Hanoi will be the application to use like example. The aim is to move the discs, one at a time, from one pole to another, such that a larger disc is never placed on top of a smaller disc, until all the discs are arranged on one of the initially empty poles.

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, Apache Log4j framework Log4j has three main components: 1.Loggers 2.Appenders 3.Layouts These three types of components work together to enable developers to log messages according to message type and level, and to control at runtime how these messages are formatted and where they are reported.

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, Apache Log4j Logger Loggers may be assigned levels. The set of possible levels is DEBUG, INFO, WARN, ERROR and FATAL. Basic Selection Rule: A log request of level p in a logger with (either assigned or inherited, whichever is appropriate) level q, is enabled if p > q. ….. static Logger logger = Logger.getLogger(HanoiLog.class.getName()); ….. logger.info("Move the disk " + n + " from pole " + p1 + " to pole " + p2 + "."); ….. logger.debug("Entering application."); ….. logger.warn("Disk: " + n + " Initial Pole: " + p1 + " Final Pole: " + p2 + " Total steps: "+count);

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, Apache Log4j Appender Log4j allows logging requests to print to multiple destinations. In log4j speak, an output destination is called an appender. Currently, appenders exist for the console, file, GUI components, remote socket servers, JMS, NTEvent Loggers and remote UIX Syslog daemon. The R-GMA log4j appender allows you to to publish the logging events into R-GMA instead of the standard log4j appender. This utility is built on top of the log4j framework by providing a customized appender that slots into R- GMA.

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, Configuration file: log4jRGMA.properties Normally, the user defines a properties file that defines the verbosity level of logging and where logging information will be placed. The user may route logging output to stdout, to file or to a socket and so on. log4j.rootLogger=DEBUG, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=[%t] %d %-5p - %m%n log4j.logger.HanoiLog=INFO, rgma, file log4j.appender.rgma=MyAppender log4j.appender.rgma.JobName=HanoiLog log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.File=HanoiLog.log log4j.appender.file.MaxFileSize=100KB log4j.appender.file.MaxBackupIndex=1 ……

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, MyAppender(1) This method called by the log4j system once all the properties have been initialised from the config file. The Producer is created here because the predicate depends upon the JobName thats parsed from the log4j properties file. public void activateOptions() { if ((jobName == null) || jobName.equals("")) { errorHandler.error(MyErrors.UNDEFINED_JOBNAME); } else { createProducer(); } }

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, MyAppender(2) The MyAppender Class traps any log4j calls and then publishes them using an R-GMA 'Database' Primary Producer. private void createProducer() { try { …. ProducerFactory factory = (ProducerFactory) factoryClass.newInstance(); ProducerProperties props = new ProducerProperties(Storage.DATABASE, ProducerProperties.LATEST); TimeInterval ti = new TimeInterval(20, Units.MINUTES); producer = factory.createPrimaryProducer(ti, props); TimeInterval retenPeriod = new TimeInterval(1, Units.HOURS); String predicate = "WHERE JobName = '" + jobName + "'"; producer.declareTable(MyConstants.TABLE_NAME, predicate, retenPeriod, retenPeriod); } catch (Exception e) { errorHandler.error(MyErrors.FAILED_CREATE_PROD, e, ErrorCode.GENERIC_FAILURE); } }

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, MyAppender(3) Log4j calls the append method when a logging event is generated. public void append(LoggingEvent event) { …. try { StringBuffer msg = new StringBuffer(); msg.append(event.getMessage()); if (layout.ignoresThrowable()) { msg.append(formatException(event)); } if (msg.length() > MyConstants.MAX_VARCHAR_SIZE) { msg.setLength(MyConstants.MAX_VARCHAR_SIZE); } producer.insert("INSERT INTO " + MyConstants.TABLE_NAME + " VALUES ('" + jobName + "', '" + millis + "', '" + threadName + "', '" + level + "', '" + className + "', '" + msg + "')"); } catch (Exception e)

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, Stdout Appender log messages ….. [main] :06:27,064 DEBUG - entering PropertyGetter::getProperty - PrimaryProducer [main] :06:27,066 DEBUG - using property file: /opt/glite/etc/rgma/rgma.conf [main] :06:27,067 DEBUG - entering PropertyGetter::parse [main] :06:27,068 DEBUG - looking for key value: PrimaryProducer [main] :06:27,085 DEBUG - exiting PropertyGetter::parse - [ [main] :06:27,085 DEBUG - exiting PropertyGetter::getProperty - [main] :06:27,102 DEBUG - Connect using GET to: GMA/PrimaryProducerServlet/createPrimaryProducer?terminationIntervalSec=1200 &type=database&isLatest=true&isHistory=false [main] :06:27,103 DEBUG - Trust properties file: null [main] :06:27,103 DEBUG - Grid proxy file: /tmp/x509up_u515 [main] :06:27,103 DEBUG - CA dir: null [main] :06:27,103 DEBUG - X509_USER_PROXY: /tmp/x509up_u515 …..

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, HanoiLog.log INFO main HanoiLog - Move the ring 1 from rung 2 to rung 1. INFO main HanoiLog - Move the ring 2 from rung 2 to rung 3. INFO main HanoiLog - Move the ring 1 from rung 1 to rung 3. INFO main HanoiLog - Move the ring 3 from rung 2 to rung 1. INFO main HanoiLog - Move the ring 1 from rung 3 to rung 2. INFO main HanoiLog - Move the ring 2 from rung 3 to rung 1. INFO main HanoiLog - Move the ring 1 from rung 2 to rung 1. WARN main HanoiLog - Rings: 3 First Rung: 2 Last Rung: 1 Total steps: 7

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, HanoiLog on RGMALogs table (1)

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, HanoiLog on RGMALogs table (2)

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, RGMA: Environment #!/bin/sh export RGMA_HOME=$GLITE_LOCATION TEST_CLASSPATH="$RGMA_HOME/share/java/glite-rgma-log4j.jar:$RGMA_HOME/libexec/rgma- log4j/" TRUSTMANAGER_CLASSPATH="$RGMA_HOME/share/java/glite-security-trustmanager.jar" SECURITY_UTIL_CLASSPATH="$RGMA_HOME/share/java/glite-security-util-java.jar" BOUNCYCASTLE_CLASSPATH="$RGMA_HOME/share/glite-security-trustmanager/bcprov-jdk jar" SECURITY_CLASSPATH=$TRUSTMANAGER_CLASSPATH:$SECURITY_UTIL_CLASSPATH:$BOUN CYCASTLE_CLASSPATH SECURITY_PROPERTIES="-DX509_USER_PROXY=$X509_USER_PROXY" RGMA_CLASSPATH="$TEST_CLASSPATH:$RGMA_HOME/share/java/glite-rgma-api- java.jar:$RGMA_HOME/share/java/glite-rgma-stubs-servlet-java.jar" export RGMA_PROPERTIES="-DRGMA_HOME=$RGMA_HOME" LOG4J_CLASSPATH="$RGMA_HOME/externals/share/java/log4j jar:$RGMA_HOME/externals/share/java/log4j.jar" export LOG4J_PROPERTIES="-Dlog4j.configuration=file:./log4jRGMA.properties" export CLASSPATH="$RGMA_CLASSPATH:$LOG4J_CLASSPATH:$SECURITY_CLASSPATH:./RGMA Log.jar"

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, JDL File If you want to run this application on grid element, you need to prepare the following jdl file to submit: Type = "Job"; JobType = "Normal"; Executable="script.sh"; Arguments = "3 2 1"; StdOutput="stdout.log"; StdError="stderr.log"; InputSandbox={"script.sh","RGMALog.jar","log4jRGMA.properties"}; OutputSandbox={"stdout.log","stderr.log","HanoiLog.log"};

Enabling Grids for E-sciencE EGEE-II INFSO-RI gLite Application Developers Course, CERN, More information R-GMA overview page. – R-GMA documentation in EGEE – R-GMA in GILDA Testbed –