Archive

Archive for February, 2015

Memoria sobre el uso de STAR-CCM+ en 2014

February 26th, 2015

Con el objetivo de apoyar el área de Dinámica Computacional de Fluidos (CFD por sus siglas en inglés) por el alto valor añadido que aporta a la investigación y el desarrollo de proyectos de ingeniería, la UPV/EHU a través del Servicio de Informática aplicada a la Investigación (Cálculo Científico), IZO-SGI, adquiere una licencia de STAR-CCM+ como software corporativo. Esta adquisición se deriva de la necesidad presentada por varios grupos de investigación.

Este software tiene una larga trayectoria en la UPV/EHU y el nuevo modo de licenciamiento del mismo, que permite un mayor conocimiento de su uso, ha motivado esta memoria para el seguimiento del mismo y análisis de su uso.

Reparto del uso de STAR-CCM+

El uso de STAR-CCM+ tiene varias vertientes. Por un lado tenemos derecho de uso para docencia y para investigación y dentro de la investigación se los investigadores lo pueden usar en sus propios equipos o en el cluster de cálculo del Servicio de Cálculo (IZO-SGI) de la UPV/EHU.

La implantación en la docencia de este software como herramienta es cada vez mayor, aparentemente una de sus grandes ventajas es la relativa facilidad de uso a través de su interfaz gráfica en comparación con otros programas. En docencia se han empleado 3.919 horas de licencia repartidas en 4 asignaturas y dos proyectos de master. Estas asignaturas se imparten en la Escuela Técnica Superior de Ingeniería de Bilbao y en la Escuela Universitaria de Ingeniería de Gasteiz. La docencia representa el 17% de uso de la licencia.

Para investigación se han empleado 19.688 horas de licencia repartidas en varios grupos y departamentos, siendo el mayor usuario el Green Energy Taldea que también usa el software en el IZO-SGI. El uso en equipos personales ha sido de 14.749 horas que representa el 75 % del total de investigación y su uso en el IZO-SGI ha sido de 4.939 horas que representa el 25 % restante. En el gráfico adjunto se detalla el reparto del tiempo de licencia.

star-ccm+

Memoría económica

El IZO-SGI gestiona por motivos de eficiencia la compra de software en general para su uso por cualquier investigador en el Servicio, pero no es tarea del Servicio la financiación de software corporativo. El gasto de software del Servicio está computado en la tarifa general del mismo dentro del uso de CPU.

La licencia de software permite su uso gratuito en docencia que se explota. Por la peculiaridad de este software es necesaria y posible su instalación en equipos personales de investigadores, es decir, el uso de la licencia se comparte entre los equipos personales y los del IZO-SGI. Por ello el Servicio también se apoya  en el uso personal de los investigadores para repartir el costo de la licencia. El uso de la licencia en equipos personales de los investigadores representa el 75 % del tiempo y estos aportan el 25 % de la financiación de la licencia. Por el contrario, el IZO-SGI aporta el 75 % de la financiación en la adquisición de la licencia y pero solo realiza el 25 % del uso de la misma en sus máquinas.

Memoría científica

Publicaciones

U. Fernández-Gámiz et al 2014 J. Phys.: Conf. Ser. 524 012024 doi:10.1088/1742-6596/524/1/012024

Congresos

Wake equilibrium parameters on a symmetric airfoil from numerical simulations, Gorka Zamorano, Unai Fernandez , Ekaitz Zulueta. 11th World Congress on Computational Mechanics (WCCM XI). Barcelona.

Proyectos fin de carrera

Desarrollo de una válvula de alivio para equipo prototipo de generación de energía undiomotriz tipo OWC. Iñigo Souto. ETSI Bilbao.

Modelización transitoria y optimización de fachada ventilada con PCM mediante software CFD. Jose Maria Mendibil. Escuela Universitaria de Ingeniería Técnica de Minas y de Obras Públicas (EUITMyOP).

Conclusión

STAR-CCM+ tiene un uso bastante estable a lo largo de los años, pero para ser el CFD un área de gran potencial dentro de la computación de altas prestaciones (HPC), su uso a este nivel no termina de despegar y adoptar las ventajas que el HPC puede aportar . Nos gustaría que dado que existe licencia corporativa de este software su uso fuese mayor, no obstante, el cambio desde otros programas que actualmente se están usando siempre es un paso más o menos tedioso o costoso. Desde un punto de vista económico el reparto del gasto de la licencia no está muy equilibrado en función de su uso y desde el punto de vista científico este año no se ha recogido ningún trabajo, lo cual es un importante punto negro.

 

IZO-SGI

Adapting Logwatch scripts

February 26th, 2015

Logwatch is a linux tool that usually runs automathicaly through cron parsing through servers logs to creates a customized report analyzing specified areas about the activity of a server.

Recently we got a new server, hereinafter NewServer, and we realized that logwatch was behaving weirdly. We were not getting the desired information as we did on other servers, hereinafter OldServer, so many information given by logwatch in other servers was not present. To make a long story short, it turned out that the /var/log/ files format (secure, syslog,...) was different. We have not identify yet where does this difference come from. It could be because the operative system in NewServer is a newer version, but why the new logwatch is not compatible? Hereinafter, you will find more information about the problem and how did we fixed it.

On one hand the information given by OldServer is shown bellow:

################### Logwatch 7.3 (03/24/06) ####################
 Processing Initiated: Mon Feb 16 04:02:07 2015
  Date Range Processed: yesterday
   ( 2015-Feb-15 )
    Period is day.
 Detail Level of Output: 0
 Type of Output: unformatted
 Logfiles for Host: OldServer
##################################################################
 --------------------- sendmail-largeboxes (large mail spool files) Begin ------------------------
  Large Mailbox threshold: 40MB (41943040 bytes)
  Warning: Large mailbox: bsmuser (51198120)
  Warning: Large mailbox: nagios (51199606)
 ---------------------- sendmail-largeboxes (large mail spool files) End -------------------------
 --------------------- SSHD Begin ------------------------
  Users logging in through sshd:
  user1:
 xxx.xxx.xxx.x.111: 2 times
  user2:
 xxx.xxx.xxx.x.119: 2 times
    Received disconnect:
 11: Bye Bye : 2 Time(s)
 11: Closed due to user request. : 10 Time(s)
 11: disconnected by user : 6 Time(s)
 SFTP subsystem requests: 16 Time(s)
 ---------------------- SSHD End -------------------------
 --------------------- Disk Space Begin ------------------------
   Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/VolGroup00-LogVol01
 142G  102G   34G  76% /
  /dev/mapper/VolGroup00-LogVol03
   95G   44G   47G  49% /opt
    /dev/mapper/VolGroup00-LogVol05
 98G   35G   58G  38% /usr
  ---------------------- Disk Space End -------------------------

Therefore, the information given by logwatch on the OldServer was just related with disk space, sshd, pam and mail services. In the other hand, in the information given by the NewServer only disk space is shown while other information was missed:

################### Logwatch 7.3.6 (05/19/07) ####################
 Processing Initiated: Sun Feb 15 03:40:02 2015
 Date Range Processed: yesterday
 ( 2015-Feb-14 )
 Period is day.
 Detail Level of Output: 0
 Type of Output: unformatted
 Logfiles for Host: OldServer
 ##################################################################
   --------------------- Disk Space Begin ------------------------
    Filesystem            Size  Used Avail Use% Mounted on
 /dev/mapper/vg_n0-lv_root
 188G   28G  151G  16% /
 /dev/sda1             485M   81M  379M  18% /boot
 /dev/mapper/vg_n0-lv_opt
 375G  1.2G  355G   1% /opt
 /dev/mapper/vg_n0-lv_usr
 472G   29G  419G   7% /usr
 /dev/mapper/vg_n0-lv_var
 375G   40G  316G  12% /var
  ---------------------- Disk Space End -------------------------
 ###################### Logwatch End #########################

In the sake of clarity we are going to define the variable:

TMP_PATH=/usr/share/logwatch/scripts

We compared the logwatch filters on the different servers (/usr/share/logwatch/scripts), but all were identical, so it did not seem to be a logwatch problem, so, a deeper analysis seemed to be required in order to isolate the problem. Fortunately, this analysis turned to be quite simple because the logwatch’s “debug” option prints almost all the information that processes the command and allows you to execute it
line by line in the command line.

Part of the missed information was that related to ssh, so we choose that for debugging:

logwatch --service sendmail --range=Yesterday --debug 6

This command will print out many information on the screen but the important lines look like this:

cat /var/cache/logwatch/logwatch.aqP9adQd/secure | 
perl $TMP_PATH/shared/onlyservice 'sshd' |
perl $TMP_PATH/shared/removeheaders '' |
perl $TMP_PATH/services/sshd

 

Knowing this, we can now run those commands on the command line. For comparison purposes, we run it on NewServer and OldServer :

cat /var/log/secure | perl $TMP_PATH/shared/onlyservice 'sshd'

The first command provided some information on OldServer but none on NewServer. onlyservice script was identical on both servers, so obviously the problem was the /var/log/secure. It turned out that the format of this file was different on NewServer and that most of the logwatch scripts where not able to deal with it.

NewServer /var/log/secure looks like this:

1424159876 2015 Feb 17 08:57:56 newserver authpriv info sshd Accepted publickey for ...

while OldServer /var/log/secure:

Feb 17 10:33:47 s_sys@oldserver sshd[14805]: Accepted password for ....

Logwatch scripts are able to process the OldServer format, but not NewServer one. The first step then was to modify the $TMP_PATH/shared/onlyservice filter. It turned out to be a perl script and adding the proper regExp fixed the firsts step. In our case we added this line:

elsif ($ThisLine =~ m/^.......... .... ... .. ..:..:.. [ ]*[^ ]* [^ ]* [^ ]* $ServiceName/io){
    print $ThisLine

After this fix, we continue executing the second filter of the command:

cat /var/log/secure | perl $TMP_PATH/shared/onlyservice 'sshd' |
perl $TMP_PATH/shared/removeheaders

In this case the the filter was not removing the corresponding information, again, because the format was different. In this case, we added the following line to $TMP_PATH/shared/ remove headers

ThisLine =~ s/^.......... .... ... .. ..:..:.. .. ........ [^ ]* [^ ]* //;

Finally, we run the last filter from the command line:

cat /var/log/secure | perl $TMP_PATH/shared/onlyservice 'sshd' |
perl $TMP_PATH/shared/removeheaders |
perl $TMP_PATH/services/sshd

And now, we got a nice sshd logwatch output as the one we where getting on OldServer.

Failed logins from:
xxx.xxx.xxx.41 (xxx.xxx.xxx.es): 1 time
Illegal users from:
xxx.xxx.xxx.178 (xxx.xxx.xxx.es): 3 times
Users logging in through sshd:
   user1:
   xxx.xxx.xxx.254 (xxx.xxx.xxx.es): 14 times

In our case, we also modified $TMP_PATH/services/pam_unix, $TMP_PATH/services/secure/filters and added some strings to be ignored in /etc/logwatch/conf/ignore.conf.

Comandos Avanzados, General, Linux, Scripting