Jboss
Obtenir la version Jboss
- Via la commande twiddle
twiddle.sh get jboss.system:type=Server VersionName VersionNumber
- Via le run.sh
run.sh -V
- Via la log boot.log
egrep 'Release ID:' log/boot.log
- Via la console jmx :
http://hostname:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system%3Atype%3DServer
Supprimer le mode cluster
Voici les actions mené sur l'instance de Jboss pour supprimer le mode cluster de cette instance : 1) Dans conf/bootstrap/profile.xml remplacer : <bean name="BootstrapProfileFactory" class="org.jboss.system.server.profileservice.StaticClusteredProfileFactory"> par <bean name="BootstrapProfileFactory" class="org.jboss.system.server.profileservice.repository.StaticProfileFactory"> Supprimer les propriete farmURIs :
<property name="farmURIs"> <list elementClass="java.net.URI"> <value>${jboss.server.home.url}farm</value> </list> </property>
2) Dans deploy/messaging/hsqldb-persistence-service.xml supprimer <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>
3) Remplacer deploy/httpha-invoker.sar par http-invoker.sar présent dans default
4) Dans deployers/clustering-deployer-jboss-beans.xml, supprimer la partie WebAppClusteringDependencyDeployer
5) Supprimer les repertoires : farm/ deploy-hasingleton/ deploy/cluster/
L'instance n'essaiera plus de s'initialiser en cluster.
Récupération du PermGen via twiddle (format csv)
export JMX_ENTRY="Perm Gen"
out=$(./twiddle.sh -s $(hostname) -u admin -pxxxxxx invoke "jboss.system:type=ServerInfo" listMemoryPools false); out=${out#*$JMX_ENTRY}; out=${out%%<\/blockquote*}; out=${out#*Current Usage :}; echo $out | awk -F',' '{split($1,a,":"); split($2,b,":"); split($3,c,":"); printf "%s;%s;%s\n",a[2],b[2],c[2]}'
Récupération du OldGen via twiddle (format csv)
export JMX_ENTRY="Old Gen"
out=$(./twiddle.sh -s $(hostname) -u admin -pxxxxx invoke "jboss.system:type=ServerInfo" listMemoryPools false); out=${out#*$JMX_ENTRY}; out=${out%%<\/blockquote*}; out=${out#*Current Usage :}; echo $out | awk -F',' '{split($1,a,":"); split($2,b,":"); split($3,c,":"); printf "%s;%s;%s\n",a[2],b[2],c[2]}'
Divers commandes twiddle.sh
twiddle.sh -s $(hostname) -u admin -pxxxxx get "jboss.system:type=ServerInfo" FreeMemory TotalMemory MaxMemory ActiveThreadCount
twiddle.sh -s $(hostname) -u admin -pxxxxx get jboss.web:type=Manager,path=/MAEA,host=localhost activeSessions
twiddle.sh -s $(hostname) -u admin -pxxxxx get jboss.system:service=ThreadPool QueueSize
twiddle.sh -s $(hostname) -u admin -pxxxxx get jboss.web:type=ThreadPool,name=http-0.0.0.0-8080 currentThreadCount currentThreadsBusy
twiddle.sh -s $(hostname) -u admin -pxxxxx get "jboss.jca:name=Maea,service=ManagedConnectionPool" AvailableConnectionCount ConnectionCount