What is Diagsnap in Oracle 12c
Diagsnap is a new feature introduced in 12.1.0.2 GI, which manages the diagsnap resource, which collects additional operating system statistics that are not normally collected by CHM (Cluster Health Monitor) osysmod.
Diagsnap metric collection automatically runs every 15 minutes to collect baseline metrics.
Which events trigger Diagsnap?
- if cssd process reports missing network heartbeats
- if one or more interfaces of the gipcd process are down
- if the rank events of the gipcd process occur
Diagsnap runs the following operating system commands
- iostat
- netstat
- lsof {gipcd pid | ocssd pid | ocssd pid | crsd pid | ohasd pid}
- arp
- ifconfig
- ping (over private interconnect)
- tcpdump
- top
Where is Diagsnap Logs in 12c?
The diagsnap logs are located in the $ORACLE_BASE/diagsnap directory for 12.1 and 12.2.0.1
Where is Diagsnap Logs in 18c?
The diagsnap logs are located in the $ORACLE_BASE/crsdata/crf/diagsnap directory for 18.1 and later.
How To Read Diagsnap Logs?
You can read the diagsnap logs as below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
[oracle@orcl01 ]$ cd /u01/app/oracle/diagsnap/orcldb01.localdomain [oracle@orcl01 ]$ tail -n 40 diagsnap_orcldb01.localdomain.log 2017-05-12 11:02:17.609: [62334][MSG] Spawned process 200080 for : ping_orcldb02_ib0_192_168_10_3 2017-05-12 11:02:17.610: [62334][MSG] Spawned process 200083 for : ping_orcldb08_ib0_192_168_10_15 2017-05-12 11:02:17.610: [62334][MSG] Spawned process 200085 for : ping_orcldb05_bondeth0-4_10_124_1_125 2017-05-12 11:02:17.611: [62334][MSG] Spawned process 200087 for : lsof_22188_ohasd_bin 2017-05-12 11:02:17.611: [62334][MSG] Spawned process 200090 for : traceroute_orcldb01_ib0_192_168_10_1 2017-05-12 11:02:17.612: [62334][MSG] Spawned process 200092 for : netstat_s 2017-05-12 11:15:52.666: [248239][MSG] diagsnap.pl invoked with stop option in CHM mode 2017-05-12 11:15:52.785: [248239][MSG] [stop] The deamon (167169) is not running. 2017-06-15 14:34:13.539: [75495][MSG] diagsnap.pl invoked with stop option in CHM mode 2017-06-15 14:34:13.668: [75495][WRN] Failed stopping the resource 2017-06-15 14:36:31.834: [86352][MSG] diagsnap.pl invoked with stop option in CHM mode 2017-06-15 14:36:31.968: [86352][WRN] Failed stopping the resource 2017-07-10 11:37:29.282: [319803][MSG] diagsnap.pl invoked with stop option in CHM mode 2017-07-10 11:37:29.412: [319803][WRN] Failed stopping the resource 2017-07-10 14:00:37.135: [133362][MSG] diagsnap.pl invoked with stop option in CHM mode 2017-07-10 14:00:37.284: [133362][WRN] Failed stopping the resource 2018-09-12 19:11:33.450: [373119][MSG] diagsnap.pl invoked with stop option in CHM mode 2018-09-12 19:11:33.590: [373119][WRN] Failed stopping the resource 2018-09-12 19:17:02.905: [46277][MSG] diagsnap.pl invoked with stop option in CHM mode 2018-09-12 19:17:03.059: [46277][WRN] Failed stopping the resource 2018-10-05 22:35:59.949: [245601][MSG] diagsnap.pl invoked with stop option in CHM mode 2018-10-05 22:36:00.099: [245601][MSG] [stop] The deamon (167169) is not running. 2018-10-05 22:36:02.939: [245944][MSG] diagsnap.pl invoked with stop option in CHM mode 2018-10-05 22:36:03.075: [245944][MSG] [stop] The deamon (167169) is not running. 2018-10-29 01:55:09.765: [199565][MSG] diagsnap.pl invoked with stop option in CHM mode 2018-10-29 01:55:09.910: [199565][MSG] [stop] The deamon (167169) is not running. 2018-10-29 01:55:12.712: [199636][MSG] diagsnap.pl invoked with stop option in CHM mode 2018-10-29 01:55:12.844: [199636][MSG] [stop] The deamon (167169) is not running. 2018-11-21 05:14:16.082: [50548][MSG] diagsnap.pl invoked with stop option in CHM mode 2018-11-21 05:14:16.215: [50548][MSG] [stop] The deamon (167169) is not running. 2018-11-21 05:14:18.801: [50588][MSG] diagsnap.pl invoked with stop option in CHM mode 2018-11-21 05:14:18.928: [50588][MSG] [stop] The deamon (167169) is not running. 2018-12-14 08:33:21.734: [267245][MSG] diagsnap.pl invoked with stop option in CHM mode 2018-12-14 08:33:21.880: [267245][MSG] [stop] The deamon (167169) is not running. 2018-12-14 08:33:24.914: [267926][MSG] diagsnap.pl invoked with stop option in CHM mode 2018-12-14 08:33:25.045: [267926][MSG] [stop] The deamon (167169) is not running. 2019-01-06 11:52:33.963: [325988][MSG] diagsnap.pl invoked with stop option in CHM mode 2019-01-06 11:52:34.089: [325988][MSG] [stop] The deamon (167169) is not running. 2019-01-06 11:52:37.082: [326054][MSG] diagsnap.pl invoked with stop option in CHM mode 2019-01-06 11:52:37.210: [326054][MSG] [stop] The deamon (167169) is not running. |
It is possible to disable and enable Diagsnap.
How To Enable Diagsnap
1 2 3 4 5 6 7 8 9 10 |
[oracle@orcldb01 ]$ oclumon manage -enable diagsnap Diagsnap option is successfully Enabled on orcldb01 Diagsnap option is successfully Enabled on orcldb02 Diagsnap option is successfully Enabled on orcldb03 Diagsnap option is successfully Enabled on orcldb04 Diagsnap option is successfully Enabled on orcldb05 Diagsnap option is successfully Enabled on orcldb06 Diagsnap option is successfully Enabled on orcldb07 Diagsnap option is successfully Enabled on orcldb08 Successfully Enabled diagsnap |
How To Disable Diagsnap
1 2 3 4 5 6 7 8 9 10 |
[oracle@orcldb01 ]$ oclumon manage -disable diagsnap Diagsnap option is successfully Disabled on orcldb01 Diagsnap option is successfully Disabled on orcldb02 Diagsnap option is successfully Disabled on orcldb03 Diagsnap option is successfully Disabled on orcldb04 Diagsnap option is successfully Disabled on orcldb05 Diagsnap option is successfully Disabled on orcldb06 Diagsnap option is successfully Disabled on orcldb07 Diagsnap option is successfully Disabled on orcldb08 Successfully Disabled diagsnap |
How To Check Whether the Diagsnap is Disabled or Enabled?
1 2 3 |
[oracle@orcld01 ]$ egrep '^DIAGSNAP|^PSTACK' $GRID_HOME/crf/admin/crf$(hostname -s).ora PSTACK=Disable DIAGSNAP=Disable |