GithubHelp home page GithubHelp logo

aureamunoz / fobos Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 16 KB

tool that parse logfiles. Each line represents connection from a host (left) to another host (right) at a given time. The lines are roughly sorted by timestamp.

Java 100.00%

fobos's Introduction

Fobos

name: fobos

version: 1.0.0-SNAPSHOT

description:

Tool that parse logfiles. Each line represents connection from a host (left) to another host (right) at a given time. The lines are roughly sorted by timestamp. t input from a new logfile while it’s being written and run indefinitely. For example:

1366815793 quark garak
1366815795 brunt quark
1366815811 lilac garak

The script will output, once every hour: a list of hostnames connected to a given (configurable) host during the last hour a list of hostnames received connections from a given (configurable) host during the last hour the hostname that generated most connections in the last hour

Prerequisites

The logfile is supposed to exist in /tmp/log

How to use :

git clone https://github.com/aureamunoz/fobos.git

cd fobos

mvn clean package

The program is called in command line:

java -jar target/fobos-{version}.jar

or mvn spring-boot:run

  • By default, the generated files containing the statisques of connections will be available in /tmp

  • By default, the stats are generated once every hour

  • The hosts to monitore for stats are specified by keys bellow:

    • fobos.stats.to.hostname (Ex : fobos.stats.to.hostname=quark)
    • fobos.stats.from.hostname (Ex : fobos.stats.from.hostname=lilac)
    • fobos.stats.cron (Ex :fobos.stats.cron=0/5 * * * * ?)

Mejoras/Notas

  • Implementar la lectura del fichero en tiempo real: in progress. No consigo leer las líneas añadidas al fichero una vez el programa está corriendo. He probado varias estrategias y no funcionan, sigo mirando (por curiosidad) qué es lo que bloquea.
  • Implementar filtro sobre las fechas de los mensajes.
  • Optimizar la cache usando otra persistente, tipo redis.
  • Afinar el tamaño de la cache en función de la velocidad a la que llegan los datos de conexiones entre hosts.
  • Para optimizar los accesos y la memoria usada podría reflexionar más sobre el tipo de datos almacenado en la cache, utilizando alguna forma más compacta. Ademas usando librerias como fastutil se consiguen accesos más rápidos.
  • Añadir test unitarios/integración
  • Hacer tests de performance
  • Añadir log4j para tener trazas sobre el funcionamiento de la aplicación.
  • Más javadoc
  • Gestion de errores
  • Tests, tests, tests

fobos's People

Contributors

aureamunoz avatar

Watchers

 avatar  avatar  avatar

Forkers

karesti

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.