Classement général – Tour du lac de Neuchâtel 2015 (populaire)

Après avoir rapidement généré une API pour extraire le contenu, voici un fichier excel qui doit donner un résultat un peu près correct. Il est mieux de downloader le fichier pour le visionner avec excel ou un autre tableur.

Classement général – tour du lac de Neuchâtel 2015

A noter que cette feuille est tout à fait non-officielle et n’est aucunement relié à un quelconque organisme.

Monitor your cron jobs with Jenkins

Have you found yourself having some cron jobs failing for a while before you realize it when checking the user’s mailbox on that machine? How about having a web dashboard that will give you an “at a glance” status of these?

Here comes Jenkins — http://jenkins-ci.org . The tool is java-based. It is a tool that actually monitors automatic builds of java code for example, or watch over cron jobs. It is meant to be part of the Continuous Integration concept.

Let’s create a simple example; We will use this job to capture the console output of a trivial command, ls -l. This is on mac OSX.
Download jenkins from the homepage. Installation is fairly straight forward, and on mac anyway, your browser opens up automatically with http://localhost:8080 to present you with the Jenkins dashboard.

Let’s create a new job in this interface. Select “Monitor an external job” and give a meaningful name. Press OK.
Jenkins job creation
On the next screen, enter a description then save.

If you go back to the dashboard, your newly created job appears and do not present any data yet.
dashboard

– Open a terminal.
– Set JENKINS_HOME
[sourcecode language=’bash’]export JENKINS_HOME=http:/@localhost:8080/[/sourcecode]

– Find out where your “jenkins-core” file is. The exact name depends on the version you downloaded.
On Max OSX, and in my particular case, it is located at
[sourcecode language=’bash’]/Users/Shared/Jenkins/Home/war/WEB-INF/lib/jenkins-core-1.500.jar[/sourcecode]

Now, we will prepend the actual command we want to monitor with the jenkins java command, and associate it with the job name we created above.
[sourcecode language=’bash’]java -jar /Users/Shared/Jenkins/Home/war/WEB-INF/lib/jenkins-core-1.500.jar “List home directory” ls -l[/sourcecode]
command line

If you now go back to the dashboard and hit refresh, you will see the status change.
Status update dashboard

Click on the job, and then on the permalink “last build” (if you hover the link, a small pop-up appears)
build output

And there you can see your console output
console output

Therefore, if you were to have a cron jobs that you want to monitor you would just have to follow the same steps, making sure JENKINS_HOME is exported, and the output under the right job name.
And you have it all in a web dashboard!

If you want an example of a well fed dashboard, you can visit apache’s at Apache’s builds website

Disabling USB in BIOS, but still interrupts?

Disabled USB in bios altogether to try to get rid of high interrupts, making computer nearly unusable:

%CPU PID USER COMMAND
6.5 11361 root [kworker/0:0]
4.6 11479 root [kworker/1:0]
2.9 2727 fblaise /usr/lib/thunderbird-9.0/thunderbird-bin
2.2 10609 root [kworker/0:2]
1.8 2301 fblaise /usr/bin/knotify4
1.6 10025 root [kworker/1:3]
1.0 8615 root [kworker/1:1]
10.5 1373 root /usr/bin/X :0 vt7 -nr -nolisten tcp -auth /var/run/xauth/A:0-CDTMZa
0.9 9577 root [kworker/0:1]

(see http://ironman.darthgibus.net/?p=153#comments)

but procinfo still shows interrupts on usb? Is it not honoring the BIOS settings?

irq 0: 23907 timer irq 21: 0 uhci_hcd:usb4
irq 1: 171 i8042 irq 22: 2 ehci_hcd:usb1

Kernel is 3.0.0-13-generic-pae.

Any feedback welcome.

Update: From powertop:

Top causes for wakeups:
47.0% (359.8) PS/2 keyboard/mouse/touchpad interrupt
20.5% (156.8) [Rescheduling interrupts]

It’s driving me nuts… Now on opensuse 12.1 64bits.

KDE broken after latest updates

I don’t know what broke my openSUSE 11.4 KDE.

After the latest updates, including a kernel update, KDE would not display my windows anymore, fglrx driver seemed lost despite compiling successfully. Wanted to revert back to older kernel to see, but as usual and for years now, updates actually delete the previous kernel — this is really annoying.

So on IceWM. If anyone has an idea why latest updates/FGLRX/KDE is broken, please shoot me an email.

Linux fstab: mount a path containing spaces

Just ran across that, so here it is.

Let’s say you want to CIFS mount a windows share — say “//server01/it stuff$”, but your Windows admin put spaces in the path.
Replace the spaces with 40.

So, in your /etc/fstab, the line would give:

[sourcecode language=’bash’]//server01/it40stuff$ /home/fblaise/mnt/MyITDrive cifs username=fblaise,password=yoursinhere,uid=1000,gid=100,_netdev 0 0[/sourcecode]

It will then work, and your linux apps which cannot see beyond your local filesystems will have a new life 😉

HOWTO: Bonita and LDAP authentication

This how-to is written in the hope that it will help souls in achieving basic LDAP login with Bonita User Experience, using EJB3. This how-to is written based on the thread at http://www.bonitasoft.org/forum/viewtopic.php?id=2397.

It is working for me, but it may not for you. Please post your questions on the Bonita forums, many eyes will look at your issue and try to help you.

Here is a dirty PDF for those who wants. However, if you do use this howto, always refer to the online version for updates and up-to-date content.
Bonita LDAP howto

It may not render well in this blog, so I’d advise in pasting the code in your favorite editor to see clearly.

My environment at this time is:

  • Centos 5.4 latest updates
  • Jboss 5.1 GA
  • BOS 5.0.1
  • Java JDK 1.6.0 update 18
  • Active Directory 2003

To give a reference, here is how my base directory look like. I will refer to it when editing some files.

Under /opt:

[sourcecode language=’plain’]
lrwxrwxrwx 1 root root 9 Feb 23 11:39 BOS -> BOS-5.0.1
drwxr-xr-x 5 root root 4096 Feb 15 19:33 BOS-5.0.1
lrwxrwxrwx 1 root root 11 Feb 23 13:58 java-jdk-6 -> jdk1.6.0_18
lrwxrwxrwx 1 root root 14 Feb 23 16:19 jboss -> jboss-5.1.0.GA
drwxr-xr-x 9 root root 4096 Mar 4 09:57 jboss-5.1.0.GA
drwxr-xr-x 10 root root 4096 Feb 23 13:57 jdk1.6.0_18
[/sourcecode]

We will use the org.jboss.security.auth.spi.LdapExtLoginModule, as it will allow us to bind to the ActiveDirectory server. If you can allow for anonymous LDAP requests, then you may also try the Sun LDAPLoginModule.

jBoss configuration and EAR generation

JAVA_OPTS

In the run.sh file of jboss /opt/jboss/bin/run.sh) , edit it to configure your JAVA_OPTS:

[sourcecode language=’plain’]JAVA_OPTS=”-Dorg.ow2.bonita.api-type=EJB3 -server -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m”
[/sourcecode]

Alongside specifying the EJB3 for Bonita, I am setting reasonable settings for jBoss java memory, and possible avoid Permgen out of memory errors.

Extra: For quick and unsecure monitoring using jconsole, also add the following.
[sourcecode language=’plain’]JAVA_OPTS=”$JAVA_OPTS -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=10001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false”
[/sourcecode]

bonita-environment.xml

… under the /opt/BOS/runtime/conf directory directly. It will be used when building the EAR file.

So, we can already specify the implementation of the AuthenticationService interface, which we will call SimpleLdapAuth.
Edit the file /opt/BOS/runtime/bonita-environment.xml. It should look like the following:

[sourcecode language=’xml’]

[/sourcecode]

Of course, your package path will vary.
A sample, simple, implementation of the interface follows later on.

Generating bonita.ear

We now need to go ahead and generate our bonita.ear file, which will then be used by jBoss.

[sourcecode language=’plain’]cd/opt/BOS/runtime[/sourcecode]

Now, build your ejb3.

[sourcecode language=’plain’]ant ear.ejb3[/sourcecode]

You should get something like this:

[sourcecode language=’plain’][root@bonita-test runtime]# ant ear.ejb3

Buildfile: build.xml

ear.genBonitaConfJar:

ear.ejb3:

ear:

[mkdir] Created dir: /opt/BOS-5.0.1/runtime/ear/tmp

[unjar] Expanding: /opt/BOS-5.0.1/runtime/lib/server/bonita-server-5.0.1.jar into /opt/BOS-5.0.1/runtime/ear/tmp

[copy] Copying 1 file to /opt/BOS-5.0.1/runtime/ear/tmp/META-INF

ear.copyJeeDD:

[copy] Copying 1 file to /opt/BOS-5.0.1/runtime/ear/tmp/META-INF

[jar] Building jar: /opt/BOS-5.0.1/runtime/ear/ejb3/bonita-ejbjar.jar

[delete] Deleting directory /opt/BOS-5.0.1/runtime/ear/tmp

[ear] Building ear: /opt/BOS-5.0.1/runtime/ear/ejb3/bonita.ear

[echo] EJB3 ear has been generated in ear/ejb3 directory.

[echo] You can use it in the easybeans container, jonas 5 and jboss 5 application server.

BUILD SUCCESSFUL

Total time: 4 seconds
[/sourcecode]

Now, copy the bonita.ear file into your jboss deploy directory.

[sourcecode language=’plain’]cp /opt/BOS-5.0.1/runtime/ear/ejb3/bonita.ear
/opt/jboss/server/default/deploy/[/sourcecode]

login-config.xml

Add the 2 stanzas to the end of your login-config.xml, before the end tag. It is valid for an AD server (ie: (sAMAccountName={0}) is typically AD).)

[sourcecode language=’xml’]

ldap://your_ldap_server:389

simple

DC=domain,DC=com

DOMAINldapbrowser

(sAMAccountName={0})

SUBTREE_SCOPE

false

true

DC=domain,DC=com

(sAMAccountName={0})

memberOf

true

cn

follow

useFirstPass

[/sourcecode]

Your jaas-standard.cfg will then not be used anymore. You can comment everything out.

Implementation of AuthentionService interface

Java Code

Here you need to develop a little piece of java. Here is an example that will get you through for starters.

[sourcecode language=’java’]package com.domain.bonita.auth;

/**
* @author chapeaurouge
* @date 04/03/2010
* @version 0.1
*/

import org.ow2.bonita.facade.exception.UserNotFoundException;
import org.ow2.bonita.services.AuthenticationService;

public class SimpleLdapAuth implements AuthenticationService {

private String persistenceServiceName;

public SimpleLdapAuth(String persistenceServiceName) {
super();
this.persistenceServiceName = persistenceServiceName;
}

/**
* Determines if the user should have amdin accesses to the bonita interface
* Let’s say that Domain Admins have that privilege
*/
public boolean isUserAdmin(String username) throws UserNotFoundException {
if (username.equals(“MyAdmin”)) {
return true;
} else {
return false;
}
}

/**
* @return always true. If the LDAP request failed before, it doesn’t matter (?)
* Necessary to implement interface
*/
public boolean checkUserCredentials(String username, String password) {
return true;
}
}[/sourcecode]

Compiling

Compile the java code into a .class. Make sure the bonita jars are in your classpath.
[sourcecode language=’plain’]javac -cp ~/BOS-5.0.1/runtime/lib/server/bonita* SimpleLdapAuth.java[/sourcecode]
You should then have your .class file. If you did it locally, you can then upload it to your server.

Deploying

A manual way would be to do the following.
Go to your /opt/jboss/server/default/lib, create the directory hierarchy for your package name. So with our example, you could type

[sourcecode language=’plain’]mkdir -p com/domain/bonita/auth[/sourcecode]

Then copy, your .class in it. Now, still in your jboss lib directory, create a .jar file, as:

[sourcecode language=’plain’]jar -cvf domainLdapAuth.jar com/domain/bonita/auth/SimpleLdapAuth.class[/sourcecode]

Your jar will now be deployed on the next server startup.

Getting more verbose output

Edit /opt/jboss/server/default/conf/jboss-log4j.xml, and uncomment the following block:

[sourcecode language=’xml’]

[/sourcecode]

Conclusion

This should be it. I may have forgotten some things, or overlooked some steps. Hopefully, this was of some help for some of you.
You can now (re)start your jBoss server for the changes to take effect. Don’t forget to tail -f server.log to see how it looks like.
Your feedback and comments are welcome.
Thanks to rlg and abirembaut for their help in the forums.