mercredi 29 juin 2011
jeudi 23 juin 2011
JAVA - JMX
Tomcat
-Dcom.sun.management.jmxremote.port=10999
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
On peut activer ces paramètres sur Websphere 6.1 au travers de la console.
Utiliser Visual VM pour voir en direct l'occupation des ressources de la jvm en précisant dans l'interface, le Port + le Host de la jvm.
En local, il y a plus d'informations.
-Dcom.sun.management.jmxremote.port=10999
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
On peut activer ces paramètres sur Websphere 6.1 au travers de la console.
Utiliser Visual VM pour voir en direct l'occupation des ressources de la jvm en précisant dans l'interface, le Port + le Host de la jvm.
En local, il y a plus d'informations.
mardi 21 juin 2011
ORACLE - Database Link
Suppression d'un DB link
DROP [PUBLIC] DATABASE LINK link_name
Consulter les DB link
select * from DBA_DB_LINKS;
Creation d'un DB link
CREATE PUBLIC DATABASE LINK <DBLINK> CONNECT TO <username> identified by <password> USING 'ALIAS'
DROP [PUBLIC] DATABASE LINK link_name
Consulter les DB link
select * from DBA_DB_LINKS;
Creation d'un DB link
CREATE PUBLIC DATABASE LINK <DBLINK> CONNECT TO <username> identified by <password> USING 'ALIAS'
ORACLE - Algorithme de Copie
Algorithme de copie d'une base
Génération du script de création des controlfile
alter database backup controlfile to trace;
Ceci créera un fichier texte (avec suffixe.trc) dans le répertoire USERDUMP. Ce fichier devra être édité pour convenir à l'action envisagée.
Création de l'environnement cible.
Copie des fichiers dans l'environnement cible
Copiez les fichiers datafile
Modification du script
Renommer les fichiers redo et les répertoires.
*
Remplacer l'option REUSE_DATABASE avec SET DATABASE , ou est le nom de la base source et est le nouveau nom.
*
Remplacer NORESETLOGS avec RESETLOGS, nécessaire lors de l’option SET DATABASE.
*
Vérifier l'option ARCHIVELOG ou NOARCHIVELOG.
*
Note: ARCHIVELOG est nécessaire avec un backup online.
*
Enlever les autres commentaires et commandes. Ceci inclut RECOVER DATABASE ainsi que ALTER DATABASE OPEN.
*
Sauvegardez ce script sous le nom r.sql
Modifier init.ora
A ce point, soit nous utiliserons l'ancien init.ora, soit nous en recréons un. Dans les deux cas, vérifier ou bien modifier les noms de répertoires, le paramètre "db_name", les paramètres mts.
(NT) créer le service !
set ORACLE_SID=PROD
ORADIM -new -SID PROD -startmode auto -intpwd manager -pfile f:\oracle81\database\PFile\InitPROD.ora
pause
Renommer la base cible
Création du nouveau fichier de contrôle et renommer la base, vérifier $PATH, $ORACLE_HOME et $ORACLE_SID.
cd $ORACLE_HOME/dbs
svrmgrl
SVRMGR> connect internal
SVRMGR> @new_control.sql
Ouvrir la base
Si full Backup à l’étape initiale:
SVRMGR> ALTER DATABASE OPEN RESETLOGS;
Si Online Backup:
SVRMGR> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
SVRMGR> recover database using backup controlfile until cancel;
ORA-00279: Change 7239 generated at 05/21/99 10:26:19 needed for thread 1
ORA-00289: Suggestion : /oracle/admin/copy7/arch/arch_9
ORA-00280: Change 7239 for thread 1 is in sequence #9
Specify log: {=suggested | filename | AUTO | CANCEL}
Log applied.
ORA-00279: Change 7244 generated at 05/21/99 10:39:07 needed for thread 1
ORA-00289: Suggestion : /oracle/admin/copy7/arch/arch_10
ORA-00280: Change 7244 for thread 1 is in sequence #10
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SVRMGR>
SVRMGR> ALTER DATABASE OPEN RESETLOGS;
A ce point, la base est fonctionnelle. Veillez à modifier le nom global de la base
ALTER DATABASE RENAME GLOBAL_NAME TO NOM.DOMAIN_NAME
Vérifiez les database links.
Effectuez un backup.
Divers
Mettre à jour oratab.
Mettre à jour les fichiers SQL*Net: sur le serveur listener.ora et tnsnames.ora, sur le client tnsnames.ora
Scripts
Exemple de r.sql
STARTUP NOMOUNT pfile=f:\oracle81\database\initPROD.ora
CREATE CONTROLFILE SET DATABASE "PROD" RESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 3
MAXDATAFILES 254
MAXINSTANCES 1
MAXLOGHISTORY 907
LOGFILE
GROUP 1 'F:\ORACLE81\ORADATA\PROD\REDO01.LOG' SIZE 1M,
GROUP 2 'F:\ORACLE81\ORADATA\PROD\REDO02.LOG' SIZE 1M,
GROUP 3 'F:\ORACLE81\ORADATA\PROD\REDO03.LOG' SIZE 1M
DATAFILE
'g:\ORACLE81\ORADATA\PROD\SYSTEM01.DBF',
'g:\ORACLE81\ORADATA\PROD\RBS01.DBF',
'g:\ORACLE81\ORADATA\PROD\USERS01.DBF',
'g:\ORACLE81\ORADATA\PROD\TEMP01.DBF',
'g:\ORACLE81\ORADATA\PROD\TOOLS01.DBF',
'g:\ORACLE81\ORADATA\PROD\INDX01.DBF',
'g:\ORACLE81\ORADATA\PROD\OEM_REPOSITORY.ORA'
CHARACTER SET WE8ISO8859P1 ;
Voici l’original
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "IRIS" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 3
MAXDATAFILES 254
MAXINSTANCES 1
MAXLOGHISTORY 907
LOGFILE
GROUP 1 'F:\ORACLE81\ORADATA\IRIS\REDO01.LOG' SIZE 1M,
GROUP 2 'F:\ORACLE81\ORADATA\IRIS\REDO02.LOG' SIZE 1M,
GROUP 3 'F:\ORACLE81\ORADATA\IRIS\REDO03.LOG' SIZE 1M
DATAFILE
'F:\ORACLE81\ORADATA\IRIS\SYSTEM01.DBF',
'F:\ORACLE81\ORADATA\IRIS\RBS01.DBF',
'F:\ORACLE81\ORADATA\IRIS\USERS01.DBF',
'F:\ORACLE81\ORADATA\IRIS\TEMP01.DBF',
'F:\ORACLE81\ORADATA\IRIS\TOOLS01.DBF',
'F:\ORACLE81\ORADATA\IRIS\INDX01.DBF',
'F:\ORACLE81\ORADATA\IRIS\OEM_REPOSITORY.ORA'
CHARACTER SET WE8ISO8859P1
;
RECOVER DATABASE
ALTER DATABASE OPEN;
Résultat
F:\oracle81\ADMIN\PROD\udump>set ORACLE_SID=PROD
F:\oracle81\ADMIN\PROD\udump>svrmgrl
Oracle Server Manager Release 3.1.6.0.0 - Production
Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production
SVRMGR> @r.sql
ORACLE instance started.
Total System Global Area 79475980 bytes
Fixed Size 70924 bytes
Variable Size 38367232 bytes
Database Buffers 40960000 bytes
Redo Buffers 77824 bytes
Statement processed.
SVRMGR> alter database open resetlogs;
Statement processed.
SVRMGR> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
PL/SQL Release 8.1.6.0.0 - Production
CORE 8.1.6.0.0 Production
TNS for 32-bit Windows: Version 8.1.6.0.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
5 rows selected.
SVRMGR> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
Génération du script de création des controlfile
alter database backup controlfile to trace;
Ceci créera un fichier texte (avec suffixe.trc) dans le répertoire USERDUMP. Ce fichier devra être édité pour convenir à l'action envisagée.
Création de l'environnement cible.
Copie des fichiers dans l'environnement cible
Copiez les fichiers datafile
Modification du script
Renommer les fichiers redo et les répertoires.
*
Remplacer l'option REUSE_DATABASE avec SET DATABASE , ou est le nom de la base source et est le nouveau nom.
*
Remplacer NORESETLOGS avec RESETLOGS, nécessaire lors de l’option SET DATABASE.
*
Vérifier l'option ARCHIVELOG ou NOARCHIVELOG.
*
Note: ARCHIVELOG est nécessaire avec un backup online.
*
Enlever les autres commentaires et commandes. Ceci inclut RECOVER DATABASE ainsi que ALTER DATABASE OPEN.
*
Sauvegardez ce script sous le nom r.sql
Modifier init.ora
A ce point, soit nous utiliserons l'ancien init.ora, soit nous en recréons un. Dans les deux cas, vérifier ou bien modifier les noms de répertoires, le paramètre "db_name", les paramètres mts.
(NT) créer le service !
set ORACLE_SID=PROD
ORADIM -new -SID PROD -startmode auto -intpwd manager -pfile f:\oracle81\database\PFile\InitPROD.ora
pause
Renommer la base cible
Création du nouveau fichier de contrôle et renommer la base, vérifier $PATH, $ORACLE_HOME et $ORACLE_SID.
cd $ORACLE_HOME/dbs
svrmgrl
SVRMGR> connect internal
SVRMGR> @new_control.sql
Ouvrir la base
Si full Backup à l’étape initiale:
SVRMGR> ALTER DATABASE OPEN RESETLOGS;
Si Online Backup:
SVRMGR> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
SVRMGR> recover database using backup controlfile until cancel;
ORA-00279: Change 7239 generated at 05/21/99 10:26:19 needed for thread 1
ORA-00289: Suggestion : /oracle/admin/copy7/arch/arch_9
ORA-00280: Change 7239 for thread 1 is in sequence #9
Specify log: {=suggested | filename | AUTO | CANCEL}
Log applied.
ORA-00279: Change 7244 generated at 05/21/99 10:39:07 needed for thread 1
ORA-00289: Suggestion : /oracle/admin/copy7/arch/arch_10
ORA-00280: Change 7244 for thread 1 is in sequence #10
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SVRMGR>
SVRMGR> ALTER DATABASE OPEN RESETLOGS;
A ce point, la base est fonctionnelle. Veillez à modifier le nom global de la base
ALTER DATABASE RENAME GLOBAL_NAME TO NOM.DOMAIN_NAME
Vérifiez les database links.
Effectuez un backup.
Divers
Mettre à jour oratab.
Mettre à jour les fichiers SQL*Net: sur le serveur listener.ora et tnsnames.ora, sur le client tnsnames.ora
Scripts
Exemple de r.sql
STARTUP NOMOUNT pfile=f:\oracle81\database\initPROD.ora
CREATE CONTROLFILE SET DATABASE "PROD" RESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 3
MAXDATAFILES 254
MAXINSTANCES 1
MAXLOGHISTORY 907
LOGFILE
GROUP 1 'F:\ORACLE81\ORADATA\PROD\REDO01.LOG' SIZE 1M,
GROUP 2 'F:\ORACLE81\ORADATA\PROD\REDO02.LOG' SIZE 1M,
GROUP 3 'F:\ORACLE81\ORADATA\PROD\REDO03.LOG' SIZE 1M
DATAFILE
'g:\ORACLE81\ORADATA\PROD\SYSTEM01.DBF',
'g:\ORACLE81\ORADATA\PROD\RBS01.DBF',
'g:\ORACLE81\ORADATA\PROD\USERS01.DBF',
'g:\ORACLE81\ORADATA\PROD\TEMP01.DBF',
'g:\ORACLE81\ORADATA\PROD\TOOLS01.DBF',
'g:\ORACLE81\ORADATA\PROD\INDX01.DBF',
'g:\ORACLE81\ORADATA\PROD\OEM_REPOSITORY.ORA'
CHARACTER SET WE8ISO8859P1 ;
Voici l’original
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "IRIS" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 3
MAXDATAFILES 254
MAXINSTANCES 1
MAXLOGHISTORY 907
LOGFILE
GROUP 1 'F:\ORACLE81\ORADATA\IRIS\REDO01.LOG' SIZE 1M,
GROUP 2 'F:\ORACLE81\ORADATA\IRIS\REDO02.LOG' SIZE 1M,
GROUP 3 'F:\ORACLE81\ORADATA\IRIS\REDO03.LOG' SIZE 1M
DATAFILE
'F:\ORACLE81\ORADATA\IRIS\SYSTEM01.DBF',
'F:\ORACLE81\ORADATA\IRIS\RBS01.DBF',
'F:\ORACLE81\ORADATA\IRIS\USERS01.DBF',
'F:\ORACLE81\ORADATA\IRIS\TEMP01.DBF',
'F:\ORACLE81\ORADATA\IRIS\TOOLS01.DBF',
'F:\ORACLE81\ORADATA\IRIS\INDX01.DBF',
'F:\ORACLE81\ORADATA\IRIS\OEM_REPOSITORY.ORA'
CHARACTER SET WE8ISO8859P1
;
RECOVER DATABASE
ALTER DATABASE OPEN;
Résultat
F:\oracle81\ADMIN\PROD\udump>set ORACLE_SID=PROD
F:\oracle81\ADMIN\PROD\udump>svrmgrl
Oracle Server Manager Release 3.1.6.0.0 - Production
Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production
SVRMGR> @r.sql
ORACLE instance started.
Total System Global Area 79475980 bytes
Fixed Size 70924 bytes
Variable Size 38367232 bytes
Database Buffers 40960000 bytes
Redo Buffers 77824 bytes
Statement processed.
SVRMGR> alter database open resetlogs;
Statement processed.
SVRMGR> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
PL/SQL Release 8.1.6.0.0 - Production
CORE 8.1.6.0.0 Production
TNS for 32-bit Windows: Version 8.1.6.0.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
5 rows selected.
SVRMGR> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE - Identifier les lignes de dépendances entre les tables lors d'une activation de FK
Identifier les lignes de dépendances entre les tables lors d'une activation de FK
Erreur suivante :
ORA-39083: Echec de la création du type d'objet REF_CONSTRAINT avec erreur :
ORA-02298: impossible de valider (GC901.CFK) - clés parents introuvables
--> dans le schéma correspondant, @rdbms/admin/utlexcpt.sql
cette fonction créée une table EXCEPTIONS
--> Lancer l'ordre de création de FK en ajoutant EXCEPTIONS INTO EXCEPTIONS à la fin:
ALTER TABLE TABLE_NAME ADD CONSTRAINT "FK" FOREIGN KEY ("COLUMN_NAME") REFERENCES TABLE_NAME_DIST ("COLUMN_NAME") ON DELETE CASCADE ENABLE EXCEPTIONS INTO EXCEPTIONS
--> Puis faire une requête sur la table EXCEPTIONS
SQL> select * from EXCEPTIONS;
ROW_ID OWNER TABLE_NAME CONSTRAINT
------------------------------------------------------------------------------------------------------------------------
AAIQZkAAAAAEBjpAAF GC901 TABLE_NAME FK
--> Faire un delete sur la ligne correspondante
delete from TABLE_NAME where ROWID='AAIQZkAAAAAEBjpAAF';
commit
--> et relancer l'ordre de création de la FK sans EXCEPTIONS
ALTER TABLE TABLE_NAME ADD CONSTRAINT "FK_NAME" FOREIGN KEY ("COLUMN_NAME") REFERENCES TABLE_NAME_DIST ("COLUMN_NAME") ON DELETE CASCADE ENABLE
normalement c'est ok
Erreur suivante :
ORA-39083: Echec de la création du type d'objet REF_CONSTRAINT avec erreur :
ORA-02298: impossible de valider (GC901.CFK) - clés parents introuvables
--> dans le schéma correspondant, @rdbms/admin/utlexcpt.sql
cette fonction créée une table EXCEPTIONS
--> Lancer l'ordre de création de FK en ajoutant EXCEPTIONS INTO EXCEPTIONS à la fin:
ALTER TABLE TABLE_NAME ADD CONSTRAINT "FK" FOREIGN KEY ("COLUMN_NAME") REFERENCES TABLE_NAME_DIST ("COLUMN_NAME") ON DELETE CASCADE ENABLE EXCEPTIONS INTO EXCEPTIONS
--> Puis faire une requête sur la table EXCEPTIONS
SQL> select * from EXCEPTIONS;
ROW_ID OWNER TABLE_NAME CONSTRAINT
------------------------------------------------------------------------------------------------------------------------
AAIQZkAAAAAEBjpAAF GC901 TABLE_NAME FK
--> Faire un delete sur la ligne correspondante
delete from TABLE_NAME where ROWID='AAIQZkAAAAAEBjpAAF';
commit
--> et relancer l'ordre de création de la FK sans EXCEPTIONS
ALTER TABLE TABLE_NAME ADD CONSTRAINT "FK_NAME" FOREIGN KEY ("COLUMN_NAME") REFERENCES TABLE_NAME_DIST ("COLUMN_NAME") ON DELETE CASCADE ENABLE
normalement c'est ok
ORACLE - Identifier les lignes qui générent une violation de contrainte
Identifier les lignes qui générent une violation de contrainte
Select (col1) from table1 where NOT EXISTS (select (col2) from table2);
Select (col1) from table1 where NOT EXISTS (select (col2) from table2);
ORACLE - Identifier les dépendances d'une table
Identifier les dépendances d'une table (identifier en premier la clé primaire de cette table)
select a.constraint_name,b.table_name from user_constraints a, user_cons_columns b where a.constraint_name=b.constraint_name and a.R_CONSTRAINT_NAME='PK_NAME';
select a.constraint_name,b.table_name from user_constraints a, user_cons_columns b where a.constraint_name=b.constraint_name and a.R_CONSTRAINT_NAME='PK_NAME';
ORACLE - Identifier les doublons
Identified les doublons pour ré-activer une contrainte:
select count(*),COLUMN_NAME from TABLE group by COLUMN_NAME having count(*) > 1;
select count(*),COLUMN_NAME from TABLE group by COLUMN_NAME having count(*) > 1;
MQSERIES - Purger une queue
Afficher les informations relatives à une queue
dis ql(CO.QL.XXXXXXXX) ALL
AMQ8409: Display Queue details.
DESCR(WebSphere MQ Default Local Queue)
PROCESS( ) BOQNAME( )
INITQ( ) TRIGDATA( )
CLUSTER( ) CLUSNL( )
QUEUE(CO.QL.XXXXXXXX) CRDATE(2008-05-30)
CRTIME(12.11.47) ALTDATE(2009-10-01)
ALTTIME(15.47.50) GET(ENABLED)
PUT(ENABLED) DEFPRTY(0)
DEFPSIST(NO) MAXDEPTH(15000)
MAXMSGL(4194304) BOTHRESH(0)
SHARE DEFSOPT(SHARED)
HARDENBO MSGDLVSQ(PRIORITY)
RETINTVL(999999999) USAGE(NORMAL)
NOTRIGGER TRIGTYPE(FIRST)
TRIGDPTH(1) TRIGMPRI(0)
QDEPTHHI(80) QDEPTHLO(20)
QDPMAXEV(ENABLED) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QSVCINT(999999999)
QSVCIEV(NONE) DISTL(NO)
NPMCLASS(NORMAL) DEFTYPE(PREDEFINED)
TYPE(QLOCAL) SCOPE(QMGR)
DEFBIND(OPEN) IPPROCS(0)
OPPROCS(0) CURDEPTH(15000)
Purger la queue
clear qlocal (CO.QL.XXXXXXX)
6 : clear qlocal (CO.QL.XXXXXXXX)
AMQ8022: WebSphere MQ queue cleared.
dis ql(CO.QL.XXXXXXXX) ALL
7 : dis ql(CO.QL.XXXXXXX) ALL
AMQ8409: Display Queue details.
DESCR(WebSphere MQ Default Local Queue)
PROCESS( ) BOQNAME( )
INITQ( ) TRIGDATA( )
CLUSTER( ) CLUSNL( )
QUEUE(CO.QL.XXXXXXXX) CRDATE(2008-05-30)
CRTIME(12.11.47) ALTDATE(2009-10-01)
ALTTIME(15.47.50) GET(ENABLED)
PUT(ENABLED) DEFPRTY(0)
DEFPSIST(NO) MAXDEPTH(15000)
MAXMSGL(4194304) BOTHRESH(0)
SHARE DEFSOPT(SHARED)
HARDENBO MSGDLVSQ(PRIORITY)
RETINTVL(999999999) USAGE(NORMAL)
NOTRIGGER TRIGTYPE(FIRST)
TRIGDPTH(1) TRIGMPRI(0)
QDEPTHHI(80) QDEPTHLO(20)
QDPMAXEV(ENABLED) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QSVCINT(999999999)
QSVCIEV(NONE) DISTL(NO)
NPMCLASS(NORMAL) DEFTYPE(PREDEFINED)
TYPE(QLOCAL) SCOPE(QMGR)
DEFBIND(OPEN) IPPROCS(0)
OPPROCS(0) CURDEPTH(0)
dis ql(CO.QL.XXXXXXXX) ALL
AMQ8409: Display Queue details.
DESCR(WebSphere MQ Default Local Queue)
PROCESS( ) BOQNAME( )
INITQ( ) TRIGDATA( )
CLUSTER( ) CLUSNL( )
QUEUE(CO.QL.XXXXXXXX) CRDATE(2008-05-30)
CRTIME(12.11.47) ALTDATE(2009-10-01)
ALTTIME(15.47.50) GET(ENABLED)
PUT(ENABLED) DEFPRTY(0)
DEFPSIST(NO) MAXDEPTH(15000)
MAXMSGL(4194304) BOTHRESH(0)
SHARE DEFSOPT(SHARED)
HARDENBO MSGDLVSQ(PRIORITY)
RETINTVL(999999999) USAGE(NORMAL)
NOTRIGGER TRIGTYPE(FIRST)
TRIGDPTH(1) TRIGMPRI(0)
QDEPTHHI(80) QDEPTHLO(20)
QDPMAXEV(ENABLED) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QSVCINT(999999999)
QSVCIEV(NONE) DISTL(NO)
NPMCLASS(NORMAL) DEFTYPE(PREDEFINED)
TYPE(QLOCAL) SCOPE(QMGR)
DEFBIND(OPEN) IPPROCS(0)
OPPROCS(0) CURDEPTH(15000)
Purger la queue
clear qlocal (CO.QL.XXXXXXX)
6 : clear qlocal (CO.QL.XXXXXXXX)
AMQ8022: WebSphere MQ queue cleared.
dis ql(CO.QL.XXXXXXXX) ALL
7 : dis ql(CO.QL.XXXXXXX) ALL
AMQ8409: Display Queue details.
DESCR(WebSphere MQ Default Local Queue)
PROCESS( ) BOQNAME( )
INITQ( ) TRIGDATA( )
CLUSTER( ) CLUSNL( )
QUEUE(CO.QL.XXXXXXXX) CRDATE(2008-05-30)
CRTIME(12.11.47) ALTDATE(2009-10-01)
ALTTIME(15.47.50) GET(ENABLED)
PUT(ENABLED) DEFPRTY(0)
DEFPSIST(NO) MAXDEPTH(15000)
MAXMSGL(4194304) BOTHRESH(0)
SHARE DEFSOPT(SHARED)
HARDENBO MSGDLVSQ(PRIORITY)
RETINTVL(999999999) USAGE(NORMAL)
NOTRIGGER TRIGTYPE(FIRST)
TRIGDPTH(1) TRIGMPRI(0)
QDEPTHHI(80) QDEPTHLO(20)
QDPMAXEV(ENABLED) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QSVCINT(999999999)
QSVCIEV(NONE) DISTL(NO)
NPMCLASS(NORMAL) DEFTYPE(PREDEFINED)
TYPE(QLOCAL) SCOPE(QMGR)
DEFBIND(OPEN) IPPROCS(0)
OPPROCS(0) CURDEPTH(0)
MQSERIES - Configuration d'une queue
Afficher les informations relatives à une queue
dis ql(CO.XXXXXXXXXX) ALL
AMQ8409: Display Queue details.
DESCR(WebSphere MQ Default Local Queue)
PROCESS( ) BOQNAME( )
INITQ( ) TRIGDATA( )
CLUSTER( ) CLUSNL( )
QUEUE(CO.XXXXXXXX) CRDATE(2008-05-30)
CRTIME(12.11.47) ALTDATE(2009-10-01)
ALTTIME(15.47.50) GET(ENABLED)
PUT(ENABLED) DEFPRTY(0)
DEFPSIST(NO) MAXDEPTH(15000)
MAXMSGL(4194304) BOTHRESH(0)
SHARE DEFSOPT(SHARED)
HARDENBO MSGDLVSQ(PRIORITY)
RETINTVL(999999999) USAGE(NORMAL)
NOTRIGGER TRIGTYPE(FIRST)
TRIGDPTH(1) TRIGMPRI(0)
QDEPTHHI(80) QDEPTHLO(20)
QDPMAXEV(ENABLED) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QSVCINT(999999999)
QSVCIEV(NONE) DISTL(NO)
NPMCLASS(NORMAL) DEFTYPE(PREDEFINED)
TYPE(QLOCAL) SCOPE(QMGR)
DEFBIND(OPEN) IPPROCS(0)
OPPROCS(0) CURDEPTH(15000)
dis ql(CO.XXXXXXXXXX) ALL
AMQ8409: Display Queue details.
DESCR(WebSphere MQ Default Local Queue)
PROCESS( ) BOQNAME( )
INITQ( ) TRIGDATA( )
CLUSTER( ) CLUSNL( )
QUEUE(CO.XXXXXXXX) CRDATE(2008-05-30)
CRTIME(12.11.47) ALTDATE(2009-10-01)
ALTTIME(15.47.50) GET(ENABLED)
PUT(ENABLED) DEFPRTY(0)
DEFPSIST(NO) MAXDEPTH(15000)
MAXMSGL(4194304) BOTHRESH(0)
SHARE DEFSOPT(SHARED)
HARDENBO MSGDLVSQ(PRIORITY)
RETINTVL(999999999) USAGE(NORMAL)
NOTRIGGER TRIGTYPE(FIRST)
TRIGDPTH(1) TRIGMPRI(0)
QDEPTHHI(80) QDEPTHLO(20)
QDPMAXEV(ENABLED) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QSVCINT(999999999)
QSVCIEV(NONE) DISTL(NO)
NPMCLASS(NORMAL) DEFTYPE(PREDEFINED)
TYPE(QLOCAL) SCOPE(QMGR)
DEFBIND(OPEN) IPPROCS(0)
OPPROCS(0) CURDEPTH(15000)
MQSERIES
Connexion au gestionnaire MQ
runmqsc
Démarrage Queue Manager
strmqm QUEUE_NAME
Contrôle queue Manager
crtmqm QUEUE_NAME
Status des Queues Manager
dspmq
runmqsc
Démarrage Queue Manager
strmqm QUEUE_NAME
Contrôle queue Manager
crtmqm QUEUE_NAME
Status des Queues Manager
dspmq
Java - Implémentation JMX
Tomcat
-Dcom.sun.management.jmxremote.port=10999
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
On peut activer ces paramètres sur Websphere 6.1 au travers de la console.
Utiliser Visual VM pour voir en direct l'occupation des ressources de la jvm en précisant dans l'interface, le Port + le Host de la jvm.
En local, il y a plus d'informations.
-Dcom.sun.management.jmxremote.port=10999
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
On peut activer ces paramètres sur Websphere 6.1 au travers de la console.
Utiliser Visual VM pour voir en direct l'occupation des ressources de la jvm en précisant dans l'interface, le Port + le Host de la jvm.
En local, il y a plus d'informations.
Java - Historique des Versions
Version
Java 1.0 - 1995
Java 1.1 - 1997
Java 1.2 - 1998 Code PlayGround devient Java 2
Java 1.3 - 2000 Code Kestrel (Java 2 version 1.3)
Java 1.4 - 2002 Code Merlin (Java 2 version 1.4)
Java 1.5 - 2004 Code Tiger (J2SE 5.0)
Java 1.6 - 2006 Code Mustang (J2SE 6.0)
Type de plateforme Java
JRE : Java Runtime Environment contient uniquement l'environnement d'exécution des programmes Java
JDK : Java Development Kit (ou J2SDK à partir de la version 1.2) contient tout l'environnement nécessaire au développement d'applications
J2ME : Java 2 Micro Edition destinée aux PDA, Téléphones portables, GPS etc ...
J2SE : Java 2 Standard Edition embarque le JRE de base pour développer des applers et reprend le JDK 1.0 et 1.1
J2EE : Java 2 Enterprise Edition embarque le J2SE pour fonctionner et contient tous les packages java pour développer des applications d'entreprises (Jdbc, EJB etc...)
Java 1.0 - 1995
Java 1.1 - 1997
Java 1.2 - 1998 Code PlayGround devient Java 2
Java 1.3 - 2000 Code Kestrel (Java 2 version 1.3)
Java 1.4 - 2002 Code Merlin (Java 2 version 1.4)
Java 1.5 - 2004 Code Tiger (J2SE 5.0)
Java 1.6 - 2006 Code Mustang (J2SE 6.0)
Type de plateforme Java
JRE : Java Runtime Environment contient uniquement l'environnement d'exécution des programmes Java
JDK : Java Development Kit (ou J2SDK à partir de la version 1.2) contient tout l'environnement nécessaire au développement d'applications
J2ME : Java 2 Micro Edition destinée aux PDA, Téléphones portables, GPS etc ...
J2SE : Java 2 Standard Edition embarque le JRE de base pour développer des applers et reprend le JDK 1.0 et 1.1
J2EE : Java 2 Enterprise Edition embarque le J2SE pour fonctionner et contient tous les packages java pour développer des applications d'entreprises (Jdbc, EJB etc...)
jeudi 16 juin 2011
HTTP - Liste des modules chargés
/usr/local/apache2/bin/httpd -M
Loaded Modules:
core_module (static)
authn_file_module (static)
authn_default_module (static)
authz_host_module (static)
authz_groupfile_module (static)
authz_user_module (static)
authz_default_module (static)
auth_basic_module (static)
include_module (static)
filter_module (static)
log_config_module (static)
env_module (static)
setenvif_module (static)
mpm_prefork_module (static)
http_module (static)
mime_module (static)
status_module (static)
autoindex_module (static)
asis_module (static)
cgi_module (static)
negotiation_module (static)
dir_module (static)
actions_module (static)
userdir_module (static)
alias_module (static)
so_module (static)
php5_module (shared)
Loaded Modules:
core_module (static)
authn_file_module (static)
authn_default_module (static)
authz_host_module (static)
authz_groupfile_module (static)
authz_user_module (static)
authz_default_module (static)
auth_basic_module (static)
include_module (static)
filter_module (static)
log_config_module (static)
env_module (static)
setenvif_module (static)
mpm_prefork_module (static)
http_module (static)
mime_module (static)
status_module (static)
autoindex_module (static)
asis_module (static)
cgi_module (static)
negotiation_module (static)
dir_module (static)
actions_module (static)
userdir_module (static)
alias_module (static)
so_module (static)
php5_module (shared)
HTTP - Liste des VirtualHosts
httpd -t -D DUMP_VHOSTS
VirtualHost configuration:
10.2.15.145:80 is a NameVirtualHost
default server jtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/jtomcat.re.cdc.fr.conf:4)
port 80 namevhost jtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/jtomcat.re.cdc.fr.conf:4)
port 80 namevhost itomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/itomcat.re.cdc.fr.conf:4)
port 80 namevhost iwebs.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/iwebs.re.cdc.fr.conf:4)
port 80 namevhost rwebs.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rwebs.re.cdc.fr.conf:4)
port 80 namevhost rslg.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rslg.re.cdc.fr.conf:4)
port 80 namevhost rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:4)
port 80 namevhost ztomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/ztomcat.re.cdc.fr.conf:4)
port 80 namevhost deidpi-outils.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/deidpi-outils.re.cdc.fr.conf:4)
10.2.15.145:443 is a NameVirtualHost
default server rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:9)
port 443 namevhost rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:9)
port 443 namevhost ztomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/ztomcat.re.cdc.fr.conf:9)
Syntax OK
httpd -S
VirtualHost configuration:
10.2.15.145:80 is a NameVirtualHost
default server jtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/jtomcat.re.cdc.fr.conf:4)
port 80 namevhost jtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/jtomcat.re.cdc.fr.conf:4)
port 80 namevhost itomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/itomcat.re.cdc.fr.conf:4)
port 80 namevhost iwebs.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/iwebs.re.cdc.fr.conf:4)
port 80 namevhost rwebs.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rwebs.re.cdc.fr.conf:4)
port 80 namevhost rslg.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rslg.re.cdc.fr.conf:4)
port 80 namevhost rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:4)
port 80 namevhost ztomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/ztomcat.re.cdc.fr.conf:4)
port 80 namevhost deidpi-outils.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/deidpi-outils.re.cdc.fr.conf:4)
10.2.15.145:443 is a NameVirtualHost
default server rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:9)
port 443 namevhost rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:9)
port 443 namevhost ztomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/ztomcat.re.cdc.fr.conf:9)
Syntax OK
VirtualHost configuration:
10.2.15.145:80 is a NameVirtualHost
default server jtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/jtomcat.re.cdc.fr.conf:4)
port 80 namevhost jtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/jtomcat.re.cdc.fr.conf:4)
port 80 namevhost itomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/itomcat.re.cdc.fr.conf:4)
port 80 namevhost iwebs.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/iwebs.re.cdc.fr.conf:4)
port 80 namevhost rwebs.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rwebs.re.cdc.fr.conf:4)
port 80 namevhost rslg.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rslg.re.cdc.fr.conf:4)
port 80 namevhost rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:4)
port 80 namevhost ztomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/ztomcat.re.cdc.fr.conf:4)
port 80 namevhost deidpi-outils.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/deidpi-outils.re.cdc.fr.conf:4)
10.2.15.145:443 is a NameVirtualHost
default server rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:9)
port 443 namevhost rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:9)
port 443 namevhost ztomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/ztomcat.re.cdc.fr.conf:9)
Syntax OK
httpd -S
VirtualHost configuration:
10.2.15.145:80 is a NameVirtualHost
default server jtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/jtomcat.re.cdc.fr.conf:4)
port 80 namevhost jtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/jtomcat.re.cdc.fr.conf:4)
port 80 namevhost itomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/itomcat.re.cdc.fr.conf:4)
port 80 namevhost iwebs.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/iwebs.re.cdc.fr.conf:4)
port 80 namevhost rwebs.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rwebs.re.cdc.fr.conf:4)
port 80 namevhost rslg.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rslg.re.cdc.fr.conf:4)
port 80 namevhost rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:4)
port 80 namevhost ztomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/ztomcat.re.cdc.fr.conf:4)
port 80 namevhost deidpi-outils.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/deidpi-outils.re.cdc.fr.conf:4)
10.2.15.145:443 is a NameVirtualHost
default server rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:9)
port 443 namevhost rtomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/rtomcat.re.cdc.fr.conf:9)
port 443 namevhost ztomcat.re.cdc.fr (/usr/product/apache/httpd-2.2.11/conf/ztomcat.re.cdc.fr.conf:9)
Syntax OK
HTTP - Server Status
Mise en place de la page de Server-status
Configuration au niveau du fichier httpd.conf
LoadModule status_module modules/mod_status.so
<IfModule mod_status.c>
ExtendedStatus On
</IfModule>
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
<Location /server-status>
SetHandler server-status
Order deny,allow
Allow from all
</Location>
+ un arrêt/relance
Accès à la page de contrôle:
http://servername/server-status
ou
http://servername/server-status?refresh=N avec un rafraichissement de la page toutes les N secondes
Contenu page
Current Time: Wednesday, 17-Mar-2010 15:19:12 CET
Restart Time: Wednesday, 17-Mar-2010 15:16:55 CET
Parent Server Generation: 7
Server uptime: 2 minutes 17 seconds
Total accesses: 4 - Total Traffic: 8 kB
CPU Usage: u0 s0 cu0 cs0
.0292 requests/sec - 59 B/second - 2048 B/request
1 requests currently being processed, 49 idle workers
W_________________________________________________..............
................................................................
................................................................
................................................................
../..
................................................................
................................................................
................................................................
................................................................
................................................................
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request
0-7 18632 1/1/1 W 0.00 0 0 0.0 0.00 0.00 10.2.54.16 iprefon.re.cdc.fr GET /server-status HTTP/1.1
0-7 18632 0/2/2 _ 0.00 35 0 0.0 0.00 0.00 10.2.54.16 iprefon.re.cdc.fr GET /favicon.ico HTTP/1.1
1-7 18633 0/1/1 _ 0.00 103 0 0.0 0.00 0.00 127.0.0.1 rldeva2.re.cdc.fr GET /server-status HTTP/1.0
Srv Child Server number - generation
PID OS process ID
Acc Number of accesses this connection / this child / this slot
M Mode of operation
Module Module active
CPU CPU usage, number of seconds
SS Seconds since beginning of most recent request
Req Milliseconds required to process most recent request
Conn Kilobytes transferred this connection
Child Megabytes transferred this child
Slot Total megabytes transferred this slot
IBM_HTTP_Server Server at rldeva2.re.cdc.fr Port 80
Configuration au niveau du fichier httpd.conf
LoadModule status_module modules/mod_status.so
<IfModule mod_status.c>
ExtendedStatus On
</IfModule>
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
<Location /server-status>
SetHandler server-status
Order deny,allow
Allow from all
</Location>
+ un arrêt/relance
Accès à la page de contrôle:
http://servername/server-status
ou
http://servername/server-status?refresh=N avec un rafraichissement de la page toutes les N secondes
Contenu page
Current Time: Wednesday, 17-Mar-2010 15:19:12 CET
Restart Time: Wednesday, 17-Mar-2010 15:16:55 CET
Parent Server Generation: 7
Server uptime: 2 minutes 17 seconds
Total accesses: 4 - Total Traffic: 8 kB
CPU Usage: u0 s0 cu0 cs0
.0292 requests/sec - 59 B/second - 2048 B/request
1 requests currently being processed, 49 idle workers
W_________________________________________________..............
................................................................
................................................................
................................................................
../..
................................................................
................................................................
................................................................
................................................................
................................................................
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request
0-7 18632 1/1/1 W 0.00 0 0 0.0 0.00 0.00 10.2.54.16 iprefon.re.cdc.fr GET /server-status HTTP/1.1
0-7 18632 0/2/2 _ 0.00 35 0 0.0 0.00 0.00 10.2.54.16 iprefon.re.cdc.fr GET /favicon.ico HTTP/1.1
1-7 18633 0/1/1 _ 0.00 103 0 0.0 0.00 0.00 127.0.0.1 rldeva2.re.cdc.fr GET /server-status HTTP/1.0
Srv Child Server number - generation
PID OS process ID
Acc Number of accesses this connection / this child / this slot
M Mode of operation
Module Module active
CPU CPU usage, number of seconds
SS Seconds since beginning of most recent request
Req Milliseconds required to process most recent request
Conn Kilobytes transferred this connection
Child Megabytes transferred this child
Slot Total megabytes transferred this slot
IBM_HTTP_Server Server at rldeva2.re.cdc.fr Port 80
HTTP - Liste des modules
Core Features and Multi-Processing Modules
core
Core Apache HTTP Server features that are always available
mpm_common
A collection of directives that are implemented by more than one multi-processing module (MPM)
beos
This Multi-Processing Module is optimized for BeOS.
event
An experimental variant of the standard worker MPM
mpm_netware
Multi-Processing Module implementing an exclusively threaded web server optimized for Novell NetWare
mpmt_os2
Hybrid multi-process, multi-threaded MPM for OS/2
prefork
Implements a non-threaded, pre-forking web server
mpm_winnt
This Multi-Processing Module is optimized for Windows NT.
worker
Multi-Processing Module implementing a hybrid multi-threaded multi-process web server
Other Modules
mod_actions
This module provides for executing CGI scripts based on media type or request method.
mod_alias
Provides for mapping different parts of the host filesystem in the document tree and for URL redirection
mod_asis
Sends files that contain their own HTTP headers
mod_auth_basic
Basic authentication
mod_auth_digest
User authentication using MD5 Digest Authentication.
mod_authn_alias
Provides the ability to create extended authentication providers based on actual providers
mod_authn_anon
Allows "anonymous" user access to authenticated areas
mod_authn_dbd
User authentication using an SQL database
mod_authn_dbm
User authentication using DBM files
mod_authn_default
Authentication fallback module
mod_authn_file
User authentication using text files
mod_authnz_ldap
Allows an LDAP directory to be used to store the database for HTTP Basic authentication.
mod_authz_dbm
Group authorization using DBM files
mod_authz_default
Authorization fallback module
mod_authz_groupfile
Group authorization using plaintext files
mod_authz_host
Group authorizations based on host (name or IP address)
mod_authz_owner
Authorization based on file ownership
mod_authz_user
User Authorization
mod_autoindex
Generates directory indexes, automatically, similar to the Unix ls command or the Win32 dir shell command
mod_cache
Content cache keyed to URIs.
mod_cern_meta
CERN httpd metafile semantics
mod_cgi
Execution of CGI scripts
mod_cgid
Execution of CGI scripts using an external CGI daemon
mod_charset_lite
Specify character set translation or recoding
mod_dav
Distributed Authoring and Versioning (WebDAV) functionality
mod_dav_fs
filesystem provider for mod_dav
mod_dav_lock
generic locking module for mod_dav
mod_dbd
Manages SQL database connections
mod_deflate
Compress content before it is delivered to the client
mod_dir
Provides for "trailing slash" redirects and serving directory index files
mod_disk_cache
Content cache storage manager keyed to URIs
mod_dumpio
Dumps all I/O to error log as desired.
mod_echo
A simple echo server to illustrate protocol modules
mod_env
Modifies the environment which is passed to CGI scripts and SSI pages
mod_example
Illustrates the Apache module API
mod_expires
Generation of Expires and Cache-Control HTTP headers according to user-specified criteria
mod_ext_filter
Pass the response body through an external program before delivery to the client
mod_file_cache
Caches a static list of files in memory
mod_filter
Context-sensitive smart filter configuration module
mod_headers
Customization of HTTP request and response headers
mod_ident
RFC 1413 ident lookups
mod_imagemap
Server-side imagemap processing
mod_include
Server-parsed html documents (Server Side Includes)
mod_info
Provides a comprehensive overview of the server configuration
mod_isapi
ISAPI Extensions within Apache for Windows
mod_ldap
LDAP connection pooling and result caching services for use by other LDAP modules
mod_log_config
Logging of the requests made to the server
mod_log_forensic
Forensic Logging of the requests made to the server
mod_logio
Logging of input and output bytes per request
mod_mem_cache
Content cache keyed to URIs
mod_mime
Associates the requested filename's extensions with the file's behavior (handlers and filters) and content (mime-type, language, character set and encoding)
mod_mime_magic
Determines the MIME type of a file by looking at a few bytes of its contents
mod_negotiation
Provides for content negotiation
mod_nw_ssl
Enable SSL encryption for NetWare
mod_proxy
HTTP/1.1 proxy/gateway server
mod_proxy_ajp
AJP support module for mod_proxy
mod_proxy_balancer
mod_proxy extension for load balancing
mod_proxy_connect
mod_proxy extension for CONNECT request handling
mod_proxy_ftp
FTP support module for mod_proxy
mod_proxy_http
HTTP support module for mod_proxy
mod_rewrite
Provides a rule-based rewriting engine to rewrite requested URLs on the fly
mod_setenvif
Allows the setting of environment variables based on characteristics of the request
mod_so
Loading of executable code and modules into the server at start-up or restart time
mod_speling
Attempts to correct mistaken URLs that users might have entered by ignoring capitalization and by allowing up to one misspelling
mod_ssl
Strong cryptography using the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols
mod_status
Provides information on server activity and performance
mod_substitute
Perform search and replace operations on response bodies
mod_suexec
Allows CGI scripts to run as a specified user and Group
mod_unique_id
Provides an environment variable with a unique identifier for each request
mod_userdir
User-specific directories
mod_usertrack
Clickstream logging of user activity on a site
mod_version
Version dependent configuration
mod_vhost_alias
Provides for dynamically configured mass virtual hosting
core
Core Apache HTTP Server features that are always available
mpm_common
A collection of directives that are implemented by more than one multi-processing module (MPM)
beos
This Multi-Processing Module is optimized for BeOS.
event
An experimental variant of the standard worker MPM
mpm_netware
Multi-Processing Module implementing an exclusively threaded web server optimized for Novell NetWare
mpmt_os2
Hybrid multi-process, multi-threaded MPM for OS/2
prefork
Implements a non-threaded, pre-forking web server
mpm_winnt
This Multi-Processing Module is optimized for Windows NT.
worker
Multi-Processing Module implementing a hybrid multi-threaded multi-process web server
Other Modules
mod_actions
This module provides for executing CGI scripts based on media type or request method.
mod_alias
Provides for mapping different parts of the host filesystem in the document tree and for URL redirection
mod_asis
Sends files that contain their own HTTP headers
mod_auth_basic
Basic authentication
mod_auth_digest
User authentication using MD5 Digest Authentication.
mod_authn_alias
Provides the ability to create extended authentication providers based on actual providers
mod_authn_anon
Allows "anonymous" user access to authenticated areas
mod_authn_dbd
User authentication using an SQL database
mod_authn_dbm
User authentication using DBM files
mod_authn_default
Authentication fallback module
mod_authn_file
User authentication using text files
mod_authnz_ldap
Allows an LDAP directory to be used to store the database for HTTP Basic authentication.
mod_authz_dbm
Group authorization using DBM files
mod_authz_default
Authorization fallback module
mod_authz_groupfile
Group authorization using plaintext files
mod_authz_host
Group authorizations based on host (name or IP address)
mod_authz_owner
Authorization based on file ownership
mod_authz_user
User Authorization
mod_autoindex
Generates directory indexes, automatically, similar to the Unix ls command or the Win32 dir shell command
mod_cache
Content cache keyed to URIs.
mod_cern_meta
CERN httpd metafile semantics
mod_cgi
Execution of CGI scripts
mod_cgid
Execution of CGI scripts using an external CGI daemon
mod_charset_lite
Specify character set translation or recoding
mod_dav
Distributed Authoring and Versioning (WebDAV) functionality
mod_dav_fs
filesystem provider for mod_dav
mod_dav_lock
generic locking module for mod_dav
mod_dbd
Manages SQL database connections
mod_deflate
Compress content before it is delivered to the client
mod_dir
Provides for "trailing slash" redirects and serving directory index files
mod_disk_cache
Content cache storage manager keyed to URIs
mod_dumpio
Dumps all I/O to error log as desired.
mod_echo
A simple echo server to illustrate protocol modules
mod_env
Modifies the environment which is passed to CGI scripts and SSI pages
mod_example
Illustrates the Apache module API
mod_expires
Generation of Expires and Cache-Control HTTP headers according to user-specified criteria
mod_ext_filter
Pass the response body through an external program before delivery to the client
mod_file_cache
Caches a static list of files in memory
mod_filter
Context-sensitive smart filter configuration module
mod_headers
Customization of HTTP request and response headers
mod_ident
RFC 1413 ident lookups
mod_imagemap
Server-side imagemap processing
mod_include
Server-parsed html documents (Server Side Includes)
mod_info
Provides a comprehensive overview of the server configuration
mod_isapi
ISAPI Extensions within Apache for Windows
mod_ldap
LDAP connection pooling and result caching services for use by other LDAP modules
mod_log_config
Logging of the requests made to the server
mod_log_forensic
Forensic Logging of the requests made to the server
mod_logio
Logging of input and output bytes per request
mod_mem_cache
Content cache keyed to URIs
mod_mime
Associates the requested filename's extensions with the file's behavior (handlers and filters) and content (mime-type, language, character set and encoding)
mod_mime_magic
Determines the MIME type of a file by looking at a few bytes of its contents
mod_negotiation
Provides for content negotiation
mod_nw_ssl
Enable SSL encryption for NetWare
mod_proxy
HTTP/1.1 proxy/gateway server
mod_proxy_ajp
AJP support module for mod_proxy
mod_proxy_balancer
mod_proxy extension for load balancing
mod_proxy_connect
mod_proxy extension for CONNECT request handling
mod_proxy_ftp
FTP support module for mod_proxy
mod_proxy_http
HTTP support module for mod_proxy
mod_rewrite
Provides a rule-based rewriting engine to rewrite requested URLs on the fly
mod_setenvif
Allows the setting of environment variables based on characteristics of the request
mod_so
Loading of executable code and modules into the server at start-up or restart time
mod_speling
Attempts to correct mistaken URLs that users might have entered by ignoring capitalization and by allowing up to one misspelling
mod_ssl
Strong cryptography using the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols
mod_status
Provides information on server activity and performance
mod_substitute
Perform search and replace operations on response bodies
mod_suexec
Allows CGI scripts to run as a specified user and Group
mod_unique_id
Provides an environment variable with a unique identifier for each request
mod_userdir
User-specific directories
mod_usertrack
Clickstream logging of user activity on a site
mod_version
Version dependent configuration
mod_vhost_alias
Provides for dynamically configured mass virtual hosting
HTTP - Génération fichier passwd
htpasswd -m ../conf/admin.passwd ihs
New password:
Re-type new password:
Updating password for user ihs
htpasswd -m <fichier_password> <user>
NB : mettre "-c" lors de la première création
New password:
Re-type new password:
Updating password for user ihs
htpasswd -m <fichier_password> <user>
NB : mettre "-c" lors de la première création
HTTP - Alias
Alias /logs/ "/logs/repertoire_voulu/"
<Directory "/logs/repertoire_voulu/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/logs/repertoire_voulu/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
HTTP - Mode d'installation PHP
Il y a deux moyen d'installer PHP avec apache:
Installation Statique
La manière statique consiste à charger la librairie du moteur PHP dans le noyau Apache.
L'option d'installation est --with-apache
L'installation se déroule de la manière suivante:
Configuration apache
Configuration PHP (--with-apache)
Compilation de PHP --> le make va déposer la librairie statique de PHP dans le moteur apache
Compilation de Apache --> la librairie est intégrée dans la compilation du httpd
Le php est ainsi natif dans le noyau Apache.
Installation Dynamique
(avec Apxs): -enable-module=so
La manière dynamique consiste à charge la librairie PHP (partagée) à partir du binaire httpd.
Cette partie est gérée par le binaire apxs.
L'installation se déroule de la manière suivante:
Configuration Apache (-enable-module=so) --> dynamique
Compilation de Apache ( La partie PHP n'existe pas à ce stade)
Configuration de PHP (--with-apxs)
Compilation de PHP (génération de la librairie partagée)
Pour que cela fonctionne, il faut ajouter les lignes suivantes dans le fichier httpd.conf:
AddType application/x-httpd-php .php
LoadModule php4_module libexec/libphp4.so
Au lancement d'Apache, le noyau apache ira charger la librairie PHP.
NB : nous pouvons supprimer tous les binaires PHP, seule la librairie /etc/http/modules/libphp4.so suffit à interpréter le PHP.
Installation Statique
La manière statique consiste à charger la librairie du moteur PHP dans le noyau Apache.
L'option d'installation est --with-apache
L'installation se déroule de la manière suivante:
Configuration apache
Configuration PHP (--with-apache)
Compilation de PHP --> le make va déposer la librairie statique de PHP dans le moteur apache
Compilation de Apache --> la librairie est intégrée dans la compilation du httpd
Le php est ainsi natif dans le noyau Apache.
Installation Dynamique
(avec Apxs): -enable-module=so
La manière dynamique consiste à charge la librairie PHP (partagée) à partir du binaire httpd.
Cette partie est gérée par le binaire apxs.
L'installation se déroule de la manière suivante:
Configuration Apache (-enable-module=so) --> dynamique
Compilation de Apache ( La partie PHP n'existe pas à ce stade)
Configuration de PHP (--with-apxs)
Compilation de PHP (génération de la librairie partagée)
Pour que cela fonctionne, il faut ajouter les lignes suivantes dans le fichier httpd.conf:
AddType application/x-httpd-php .php
LoadModule php4_module libexec/libphp4.so
Au lancement d'Apache, le noyau apache ira charger la librairie PHP.
NB : nous pouvons supprimer tous les binaires PHP, seule la librairie /etc/http/modules/libphp4.so suffit à interpréter le PHP.
Linux - Information HBA & MultiPath
Information Cartes HBA
[root@rltesa2 ]# cat /sys/bus/pci/drivers/qla2xxx/0000:24:00.0/host1/fc_host:host1/port_name
0x2100001b3294031f
[root@rltesa2 ]# cat /sys/bus/pci/drivers/qla2xxx/0000:24:00.1/host2/fc_host:host2/port_name
0x2101001b32b4031f
Mise en place du multipath LINUX
Le multipath est le mécanisme permettant d'accéder via deux chemins différents aux disques de la baie. Il est disponible sous la forme d'un service pré-installé dans RHEL 5 que nous le configurerons en « round robin ». Par ailleurs il est nécessaire d'exclure les disques internes du fonctionnement du multipath en ajoutant les lignes suivantes dans le fichier « /etc/multipath.conf » :
blacklist {
vendor "IBM-ESXS"
product "MBC2073RC"
}
Démarrage et configuration du service multipath :
service multipathd start
chkconfig --level 345 multipathd on
Vérification du bon fonctionnement du multipath
[root@rldeva1 tomcat]# multipath -ll
mpath2 (360060e800546fd00000046fd00000625) dm-39 HITACHI,OPEN-V
[size=150G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 1:0:0:0 sdc 8:32 [active][ready]
\_ 2:0:0:0 sdd 8:48 [active][ready]
[root@rldeva1 tomcat]#
[root@rltesa2 ]# cat /sys/bus/pci/drivers/qla2xxx/0000:24:00.0/host1/fc_host:host1/port_name
0x2100001b3294031f
[root@rltesa2 ]# cat /sys/bus/pci/drivers/qla2xxx/0000:24:00.1/host2/fc_host:host2/port_name
0x2101001b32b4031f
Mise en place du multipath LINUX
Le multipath est le mécanisme permettant d'accéder via deux chemins différents aux disques de la baie. Il est disponible sous la forme d'un service pré-installé dans RHEL 5 que nous le configurerons en « round robin ». Par ailleurs il est nécessaire d'exclure les disques internes du fonctionnement du multipath en ajoutant les lignes suivantes dans le fichier « /etc/multipath.conf » :
blacklist {
vendor "IBM-ESXS"
product "MBC2073RC"
}
Démarrage et configuration du service multipath :
service multipathd start
chkconfig --level 345 multipathd on
Vérification du bon fonctionnement du multipath
[root@rldeva1 tomcat]# multipath -ll
mpath2 (360060e800546fd00000046fd00000625) dm-39 HITACHI,OPEN-V
[size=150G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][active]
\_ 1:0:0:0 sdc 8:32 [active][ready]
\_ 2:0:0:0 sdd 8:48 [active][ready]
[root@rldeva1 tomcat]#
Linux - Version Système
Version de l'OS
cat /proc/version
uname -r
uname -a
cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
cat /proc/version
uname -r
uname -a
cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Linux - Etendre un PV (LUN SAN) sans reboot
1 - démonter tous les FS
2 - désactiver le VG
vgchange -a n vol01
3 - Etendre la partition
via fdisk supprimer la partition et la recréer avec la nouvelle taille
Attention mettre type 8E
4 - partprobe pour la prise en compte au niveau du système
5 - pvresize du disque (LVM)
6 - contrôler la nouvelle taille PV + VG
7 - Réactiver le VG
vgchange -a y vol01
8 - Remonter tous les FS
2 - désactiver le VG
vgchange -a n vol01
3 - Etendre la partition
via fdisk supprimer la partition et la recréer avec la nouvelle taille
Attention mettre type 8E
4 - partprobe pour la prise en compte au niveau du système
5 - pvresize du disque (LVM)
6 - contrôler la nouvelle taille PV + VG
7 - Réactiver le VG
vgchange -a y vol01
8 - Remonter tous les FS
mercredi 15 juin 2011
Modifier les partitions LVM
parted /dev/sdc
GNU Parted 1.8.1
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] prints general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on partititon NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [free|NUMBER|all] display the partition table, a partition, or all devices
quit exit program
rescue START END rescue a lost partition near START and END
resize NUMBER START END resize partition NUMBER and its file system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version displays the current version of GNU Parted and copyright information
GNU Parted 1.8.1
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] prints general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on partititon NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [free|NUMBER|all] display the partition table, a partition, or all devices
quit exit program
rescue START END rescue a lost partition near START and END
resize NUMBER START END resize partition NUMBER and its file system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version displays the current version of GNU Parted and copyright information
mardi 14 juin 2011
Increase Primary Partition On LVM2
pvresize --setphysicalvolumesize 30G /dev/sdc1
pvresize --setphysicalvolumesize 30G /dev/sdc1
WARNING: /dev/sdc1: Overriding real size. You could lose data.
Physical volume "/dev/sdc1" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
pvscan
PV /dev/sdc1 VG VGappli lvm2 [29.97 GB / 11.88 GB free]
PV /dev/sdb1 VG VGswap lvm2 [3.97 GB / 0 free]
PV /dev/sda2 VG VGsystem lvm2 [11.47 GB / 0 free]
Total: 3 [45.41 GB] / in use: 3 [45.41 GB] / in no VG: 0 [0 ]
pvresize --setphysicalvolumesize 30G /dev/sdc1
WARNING: /dev/sdc1: Overriding real size. You could lose data.
Physical volume "/dev/sdc1" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
pvscan
PV /dev/sdc1 VG VGappli lvm2 [29.97 GB / 11.88 GB free]
PV /dev/sdb1 VG VGswap lvm2 [3.97 GB / 0 free]
PV /dev/sda2 VG VGsystem lvm2 [11.47 GB / 0 free]
Total: 3 [45.41 GB] / in use: 3 [45.41 GB] / in no VG: 0 [0 ]
jeudi 9 juin 2011
JDBC Specification
JDBC Connection Pool
* Added by helenlong, last edited by grisdal on Feb 23, 2009 (view change)
Comment:
JDBC Connection Pool
The JDBC Connection Pool page provides information about the connection pool and plots change over time. Connection pool data will only be available if the JDBC resource is deployed and enabled on the server instance or cluster. Because most of the graphs plot change over time, a very lightly loaded system may show little activity. The JDBC connection pool graphs are very similar to the connector connection pool graphs and plot similar data (see Connector Connection Pool).
The following data is displayed.
* Maximum Pool Size. Maximum number of connections that can be created to satisfy client requests.
* Leak Reclaim Enabled. If enabled, connection will be reusable (put back into the pool) after connection leak timeout occurs.
* Datasource Classname. The vendor-specific class name that implements the DataSource and/or XADataSource APIs. This class is in the JDBC driver.
Connection Utilization
* # of Connections. (Graph) Current status of the connections in this pool.
Data plotted in this graph:
* Free. Number of connections in the pool available for incoming requests.
* In Use. Number of connections in the pool currently being used. When the number of in use connections goes up, the number of free connections will drop.
* In Queue. Number of requests in the queue waiting for available connections.
* Total Created. Total number of connections ever created for this pool since server startup. For example, if the number in use shows 3, but the total created shows 10, there was a load at some point that spiked to that level.
The Connection Utilization graph works in sync with the Wait Time graph described below. When requests start queueing up and wait times start increasing, that is a sign the pool is under stress. Consider changing the maximum pool size for this connection pool or performing other tuning, keeping in mind that increasing the maximum pool size might decrease the wait time, but it will also increase load on your database.
Wait Time
* Duration (ms). (Graph) How long users of this pool have been waiting for service in milliseconds. Wait time shows how overloaded the pool might be (if wait time is excessive.)
Data plotted in this graph:
* Wait Time. How long the last request to the pool waited to get a connection.
* Average Wait Time. Average wait time for all requests since the server started.
* Max Wait Time. Longest time a request waited for a connection since the server started. Similar to Total Created above.
Pool Utilization Rate
* Connections Per Second. (Graph) Plots both the reuse and recycle of connections.
Data plotted in this graph:
* Reused. Rate at which connections are being acquired (reused) instead of created.
* Recycled. Rate at which the pool must recycle connections, destroying connections and recreating them.
Pool Life Cycle
* Connections Per Interval. (Graph) Tracks connection creation and destruction over time for insight into leaks. Pool lifecycle indicates how often connections are being destroyed and recreated. Too often indicates poor pool utilization. If connections are leaking, that may also be revealed in this graph if the create/destroy numbers do not match up over time.
Data plotted in this graph:
* Created. Number of connections created during this particular interval since the last refresh of the view.
* Destroyed. Number of connections destroyed during this particular interval since the last refresh of the view.
* Potential Leaks. Number of connections created but not getting destroyed. Could indicate a leak. This should be zero. If you start seeing a value, further investigation is warranted.
See Also
Monitoring Components and Services
JDBC Resources
* Added by helenlong, last edited by grisdal on Feb 23, 2009 (view change)
Comment:
JDBC Connection Pool
The JDBC Connection Pool page provides information about the connection pool and plots change over time. Connection pool data will only be available if the JDBC resource is deployed and enabled on the server instance or cluster. Because most of the graphs plot change over time, a very lightly loaded system may show little activity. The JDBC connection pool graphs are very similar to the connector connection pool graphs and plot similar data (see Connector Connection Pool).
The following data is displayed.
* Maximum Pool Size. Maximum number of connections that can be created to satisfy client requests.
* Leak Reclaim Enabled. If enabled, connection will be reusable (put back into the pool) after connection leak timeout occurs.
* Datasource Classname. The vendor-specific class name that implements the DataSource and/or XADataSource APIs. This class is in the JDBC driver.
Connection Utilization
* # of Connections. (Graph) Current status of the connections in this pool.
Data plotted in this graph:
* Free. Number of connections in the pool available for incoming requests.
* In Use. Number of connections in the pool currently being used. When the number of in use connections goes up, the number of free connections will drop.
* In Queue. Number of requests in the queue waiting for available connections.
* Total Created. Total number of connections ever created for this pool since server startup. For example, if the number in use shows 3, but the total created shows 10, there was a load at some point that spiked to that level.
The Connection Utilization graph works in sync with the Wait Time graph described below. When requests start queueing up and wait times start increasing, that is a sign the pool is under stress. Consider changing the maximum pool size for this connection pool or performing other tuning, keeping in mind that increasing the maximum pool size might decrease the wait time, but it will also increase load on your database.
Wait Time
* Duration (ms). (Graph) How long users of this pool have been waiting for service in milliseconds. Wait time shows how overloaded the pool might be (if wait time is excessive.)
Data plotted in this graph:
* Wait Time. How long the last request to the pool waited to get a connection.
* Average Wait Time. Average wait time for all requests since the server started.
* Max Wait Time. Longest time a request waited for a connection since the server started. Similar to Total Created above.
Pool Utilization Rate
* Connections Per Second. (Graph) Plots both the reuse and recycle of connections.
Data plotted in this graph:
* Reused. Rate at which connections are being acquired (reused) instead of created.
* Recycled. Rate at which the pool must recycle connections, destroying connections and recreating them.
Pool Life Cycle
* Connections Per Interval. (Graph) Tracks connection creation and destruction over time for insight into leaks. Pool lifecycle indicates how often connections are being destroyed and recreated. Too often indicates poor pool utilization. If connections are leaking, that may also be revealed in this graph if the create/destroy numbers do not match up over time.
Data plotted in this graph:
* Created. Number of connections created during this particular interval since the last refresh of the view.
* Destroyed. Number of connections destroyed during this particular interval since the last refresh of the view.
* Potential Leaks. Number of connections created but not getting destroyed. Could indicate a leak. This should be zero. If you start seeing a value, further investigation is warranted.
See Also
Monitoring Components and Services
JDBC Resources
lundi 6 juin 2011
Inscription à :
Articles (Atom)