MySQL  8.0.19
Source Code Documentation
srv0mon.h
Go to the documentation of this file.
1 /***********************************************************************
2 
3 Copyright (c) 2010, 2019, Oracle and/or its affiliates. All Rights Reserved.
4 Copyright (c) 2012, Facebook Inc.
5 
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License, version 2.0,
8 as published by the Free Software Foundation.
9 
10 This program is also distributed with certain software (including
11 but not limited to OpenSSL) that is licensed under separate terms,
12 as designated in a particular file or component or in included license
13 documentation. The authors of MySQL hereby grant you an additional
14 permission to link the program and your derivative works with the
15 separately licensed software that they have included with MySQL.
16 
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License, version 2.0, for more details.
21 
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 
26 ***********************************************************************/
27 
28 /** @file include/srv0mon.h
29  Server monitor counter related defines
30 
31  Created 12/15/2009 Jimmy Yang
32  *******************************************************/
33 
34 #ifndef srv0mon_h
35 #define srv0mon_h
36 
37 #include "univ.i"
38 
39 #ifndef __STDC_LIMIT_MACROS
40 /* Required for FreeBSD so that INT64_MAX is defined. */
41 #define __STDC_LIMIT_MACROS
42 #endif /* __STDC_LIMIT_MACROS */
43 
44 #include <stdint.h>
45 
46 /** Possible status values for "mon_status" in "struct monitor_value" */
48  MONITOR_STARTED = 1, /*!< Monitor has been turned on */
49  MONITOR_STOPPED = 2 /*!< Monitor has been turned off */
50 };
51 
53 
54 /** Monitor counter value type */
55 typedef int64_t mon_type_t;
56 
57 /** Two monitor structures are defined in this file. One is
58 "monitor_value_t" which contains dynamic counter values for each
59 counter. The other is "monitor_info_t", which contains
60 static information (counter name, desc etc.) for each counter.
61 In addition, an enum datatype "monitor_id_t" is also defined,
62 it identifies each monitor with an internally used symbol, whose
63 integer value indexes into above two structure for its dynamic
64 and static information.
65 Developer who intend to add new counters would require to
66 fill in counter information as described in "monitor_info_t" and
67 create the internal counter ID in "monitor_id_t". */
68 
69 /** Structure containing the actual values of a monitor counter. */
71  ib_time_t mon_start_time; /*!< Start time of monitoring */
72  ib_time_t mon_stop_time; /*!< Stop time of monitoring */
73  ib_time_t mon_reset_time; /*!< Time counter resetted */
74  mon_type_t mon_value; /*!< Current counter Value */
75  mon_type_t mon_max_value; /*!< Current Max value */
76  mon_type_t mon_min_value; /*!< Current Min value */
77  mon_type_t mon_value_reset; /*!< value at last reset */
78  mon_type_t mon_max_value_start; /*!< Max value since start */
79  mon_type_t mon_min_value_start; /*!< Min value since start */
80  mon_type_t mon_start_value; /*!< Value at the start time */
81  mon_type_t mon_last_value; /*!< Last set of values */
82  monitor_running_t mon_status; /* whether monitor still running */
83 };
84 
85 /** Follwoing defines are possible values for "monitor_type" field in
86 "struct monitor_info" */
88  MONITOR_NONE = 0, /*!< No monitoring */
89  MONITOR_MODULE = 1, /*!< This is a monitor module type,
90  not a counter */
91  MONITOR_EXISTING = 2, /*!< The monitor carries information from
92  an existing system status variable */
93  MONITOR_NO_AVERAGE = 4, /*!< Set this status if we don't want to
94  calculate the average value for the counter */
95  MONITOR_DISPLAY_CURRENT = 8, /*!< Display current value of the
96  counter, rather than incremental value
97  over the period. Mostly for counters
98  displaying current resource usage */
99  MONITOR_GROUP_MODULE = 16, /*!< Monitor can be turned on/off
100  only as a module, but not individually */
101  MONITOR_DEFAULT_ON = 32, /*!< Monitor will be turned on by default at
102  server start up */
103  MONITOR_SET_OWNER = 64, /*!< Owner of "monitor set", a set of
104  monitor counters */
105  MONITOR_SET_MEMBER = 128, /*!< Being part of a "monitor set" */
106  MONITOR_HIDDEN = 256 /*!< Do not display this monitor in the
107  metrics table */
108 };
109 
110 /** Counter minimum value is initialized to be max value of
111  mon_type_t (int64_t) */
112 #define MIN_RESERVED INT64_MAX
113 #define MAX_RESERVED (~MIN_RESERVED)
114 
115 /** This enumeration defines internal monitor identifier used internally
116 to identify each particular counter. Its value indexes into two arrays,
117 one is the "innodb_counter_value" array which records actual monitor
118 counter values, the other is "innodb_counter_info" array which describes
119 each counter's basic information (name, desc etc.). A couple of
120 naming rules here:
121 1) If the monitor defines a module, it starts with MONITOR_MODULE
122 2) If the monitor uses exisitng counters from "status variable", its ID
123 name shall start with MONITOR_OVLD
124 
125 Please refer to "innodb_counter_info" in srv/srv0mon.cc for detail
126 information for each monitor counter */
127 
129  /* This is to identify the default value set by the metrics
130  control global variables */
132 
133  /* Start of Metadata counter */
138 
139  /* Lock manager related counters */
160 
161  /* Buffer and I/O realted counters. */
192 
196 
202 
206 
209 
244 
245  /* Buffer Page I/O specific counters. */
284 
285  /* OS level counters (I/O) */
296 
297  /* Transaction related counters */
314 
315  /* Purge related counters */
326 
327  /* Undo tablespace truncation */
337 
338  /* Recovery related counters */
353 
358 
366 
372 
376 
380 
384 
386 
401 
402  /* Page Manager related counters */
408 
409  /* Index related counters */
417 
418  /* Adaptive Hash Index related counters */
428 
429  /* Tablespace related counters */
432 
433  /* InnoDB Change Buffer related counters */
443 
444  /* Counters for server operations */
468 
469  /* Data DML related counters */
479 
480  /* Sampling related counters */
484 
485  /* Data DDL related counters */
492 
498 
499  /* Mutex/RW-Lock related counters */
502 
503  /* CPU usage information */
510 
516 
517  /* This is used only for control system to turn
518  on/off and reset all monitor counters */
520 
521  /* This must be the last member */
523 };
524 
525 /** This informs the monitor control system to turn
526 on/off and reset monitor counters through wild card match */
527 #define MONITOR_WILDCARD_MATCH (NUM_MONITOR + 1)
528 
529 /** Cannot find monitor counter with a specified name */
530 #define MONITOR_NO_MATCH (NUM_MONITOR + 2)
531 
532 /** struct monitor_info describes the basic/static information
533 about each monitor counter. */
535  const char *monitor_name; /*!< Monitor name */
536  const char *monitor_module; /*!< Sub Module the monitor
537  belongs to */
538  const char *monitor_desc; /*!< Brief desc of monitor counter */
539  monitor_type_t monitor_type; /*!< Type of Monitor Info */
540  monitor_id_t monitor_related_id; /*!< Monitor ID of counter that
541  related to this monitor. This is
542  set when the monitor belongs to
543  a "monitor set" */
544  monitor_id_t monitor_id; /*!< Monitor ID as defined in enum
545  monitor_id_t */
546 };
547 
548 /** Following are the "set_option" values allowed for
549 srv_mon_process_existing_counter() and srv_mon_process_existing_counter()
550 functions. To turn on/off/reset the monitor counters. */
552  MONITOR_TURN_ON = 1, /*!< Turn on the counter */
553  MONITOR_TURN_OFF, /*!< Turn off the counter */
554  MONITOR_RESET_VALUE, /*!< Reset current values */
555  MONITOR_RESET_ALL_VALUE, /*!< Reset all values */
556  MONITOR_GET_VALUE /*!< Option for
557  srv_mon_process_existing_counter()
558  function */
559 };
560 
561 #ifndef UNIV_HOTBACKUP
562 /** Number of bit in a ulint datatype */
563 #define NUM_BITS_ULINT (sizeof(ulint) * CHAR_BIT)
564 
565 /** This "monitor_set_tbl" is a bitmap records whether a particular monitor
566 counter has been turned on or off */
567 extern ulint
569 
570 /** Macros to turn on/off the control bit in monitor_set_tbl for a monitor
571 counter option. */
572 #define MONITOR_ON(monitor) \
573  (monitor_set_tbl[monitor / NUM_BITS_ULINT] |= \
574  ((ulint)1 << (monitor % NUM_BITS_ULINT)))
575 
576 #define MONITOR_OFF(monitor) \
577  (monitor_set_tbl[monitor / NUM_BITS_ULINT] &= \
578  ~((ulint)1 << (monitor % NUM_BITS_ULINT)))
579 
580 /** Check whether the requested monitor is turned on/off */
581 #define MONITOR_IS_ON(monitor) \
582  (monitor_set_tbl[monitor / NUM_BITS_ULINT] & \
583  ((ulint)1 << (monitor % NUM_BITS_ULINT)))
584 
585 /** The actual monitor counter array that records each monintor counter
586 value */
588 
589 /** Following are macro defines for basic montior counter manipulations.
590 Please note we do not provide any synchronization for these monitor
591 operations due to performance consideration. Most counters can
592 be placed under existing mutex protections in respective code
593 module. */
594 
595 /** Macros to access various fields of a monitor counters */
596 #define MONITOR_FIELD(monitor, field) (innodb_counter_value[monitor].field)
597 
598 #define MONITOR_VALUE(monitor) MONITOR_FIELD(monitor, mon_value)
599 
600 #define MONITOR_MAX_VALUE(monitor) MONITOR_FIELD(monitor, mon_max_value)
601 
602 #define MONITOR_MIN_VALUE(monitor) MONITOR_FIELD(monitor, mon_min_value)
603 
604 #define MONITOR_VALUE_RESET(monitor) MONITOR_FIELD(monitor, mon_value_reset)
605 
606 #define MONITOR_MAX_VALUE_START(monitor) \
607  MONITOR_FIELD(monitor, mon_max_value_start)
608 
609 #define MONITOR_MIN_VALUE_START(monitor) \
610  MONITOR_FIELD(monitor, mon_min_value_start)
611 
612 #define MONITOR_LAST_VALUE(monitor) MONITOR_FIELD(monitor, mon_last_value)
613 
614 #define MONITOR_START_VALUE(monitor) MONITOR_FIELD(monitor, mon_start_value)
615 
616 #define MONITOR_VALUE_SINCE_START(monitor) \
617  (MONITOR_VALUE(monitor) + MONITOR_VALUE_RESET(monitor))
618 
619 #define MONITOR_STATUS(monitor) MONITOR_FIELD(monitor, mon_status)
620 
621 #define MONITOR_SET_START(monitor) \
622  do { \
623  MONITOR_STATUS(monitor) = MONITOR_STARTED; \
624  MONITOR_FIELD((monitor), mon_start_time) = time(NULL); \
625  } while (0)
626 
627 #define MONITOR_SET_OFF(monitor) \
628  do { \
629  MONITOR_STATUS(monitor) = MONITOR_STOPPED; \
630  MONITOR_FIELD((monitor), mon_stop_time) = time(NULL); \
631  } while (0)
632 
633 #define MONITOR_INIT_ZERO_VALUE 0
634 
635 /** Max and min values are initialized when we first turn on the monitor
636 counter, and set the MONITOR_STATUS. */
637 #define MONITOR_MAX_MIN_NOT_INIT(monitor) \
638  (MONITOR_STATUS(monitor) == MONITOR_INIT_ZERO_VALUE && \
639  MONITOR_MIN_VALUE(monitor) == MONITOR_INIT_ZERO_VALUE && \
640  MONITOR_MAX_VALUE(monitor) == MONITOR_INIT_ZERO_VALUE)
641 
642 #define MONITOR_INIT(monitor) \
643  if (MONITOR_MAX_MIN_NOT_INIT(monitor)) { \
644  MONITOR_MIN_VALUE(monitor) = MIN_RESERVED; \
645  MONITOR_MIN_VALUE_START(monitor) = MIN_RESERVED; \
646  MONITOR_MAX_VALUE(monitor) = MAX_RESERVED; \
647  MONITOR_MAX_VALUE_START(monitor) = MAX_RESERVED; \
648  }
649 
650 /** Macros to increment/decrement the counters. The normal
651 monitor counter operation expects appropriate synchronization
652 already exists. No additional mutex is necessary when operating
653 on the counters */
654 #define MONITOR_INC(monitor) \
655  if (MONITOR_IS_ON(monitor)) { \
656  MONITOR_VALUE(monitor)++; \
657  if (MONITOR_VALUE(monitor) > MONITOR_MAX_VALUE(monitor)) { \
658  MONITOR_MAX_VALUE(monitor) = MONITOR_VALUE(monitor); \
659  } \
660  }
661 
662 /** Atomically increment a monitor counter.
663 Use MONITOR_INC if appropriate mutex protection exists.
664 @param monitor monitor to be incremented by 1 */
665 #define MONITOR_ATOMIC_INC(monitor) \
666  if (MONITOR_IS_ON(monitor)) { \
667  ib_uint64_t value; \
668  value = \
669  os_atomic_increment_uint64((ib_uint64_t *)&MONITOR_VALUE(monitor), 1); \
670  /* Note: This is not 100% accurate because of the \
671  inherent race, we ignore it due to performance. */ \
672  if (value > (ib_uint64_t)MONITOR_MAX_VALUE(monitor)) { \
673  MONITOR_MAX_VALUE(monitor) = value; \
674  } \
675  }
676 
677 /** Atomically decrement a monitor counter.
678 Use MONITOR_DEC if appropriate mutex protection exists.
679 @param monitor monitor to be decremented by 1 */
680 #define MONITOR_ATOMIC_DEC(monitor) \
681  if (MONITOR_IS_ON(monitor)) { \
682  ib_uint64_t value; \
683  value = \
684  os_atomic_decrement_uint64((ib_uint64_t *)&MONITOR_VALUE(monitor), 1); \
685  /* Note: This is not 100% accurate because of the \
686  inherent race, we ignore it due to performance. */ \
687  if (value < (ib_uint64_t)MONITOR_MIN_VALUE(monitor)) { \
688  MONITOR_MIN_VALUE(monitor) = value; \
689  } \
690  }
691 
692 #define MONITOR_DEC(monitor) \
693  if (MONITOR_IS_ON(monitor)) { \
694  MONITOR_VALUE(monitor)--; \
695  if (MONITOR_VALUE(monitor) < MONITOR_MIN_VALUE(monitor)) { \
696  MONITOR_MIN_VALUE(monitor) = MONITOR_VALUE(monitor); \
697  } \
698  }
699 
700 #ifdef UNIV_DEBUG_VALGRIND
701 #define MONITOR_CHECK_DEFINED(value) \
702  do { \
703  mon_type_t m = value; \
704  UNIV_MEM_ASSERT_RW(&m, sizeof m); \
705  } while (0)
706 #else /* UNIV_DEBUG_VALGRIND */
707 #define MONITOR_CHECK_DEFINED(value) (void)0
708 #endif /* UNIV_DEBUG_VALGRIND */
709 
710 #define MONITOR_INC_VALUE(monitor, value) \
711  MONITOR_CHECK_DEFINED(value); \
712  if (MONITOR_IS_ON(monitor)) { \
713  MONITOR_VALUE(monitor) += (mon_type_t)(value); \
714  if (MONITOR_VALUE(monitor) > MONITOR_MAX_VALUE(monitor)) { \
715  MONITOR_MAX_VALUE(monitor) = MONITOR_VALUE(monitor); \
716  } \
717  }
718 
719 #define MONITOR_DEC_VALUE(monitor, value) \
720  MONITOR_CHECK_DEFINED(value); \
721  if (MONITOR_IS_ON(monitor)) { \
722  ut_ad(MONITOR_VALUE(monitor) >= (mon_type_t) (value); \
723  MONITOR_VALUE(monitor) -= (mon_type_t) (value); \
724  if (MONITOR_VALUE(monitor) < MONITOR_MIN_VALUE(monitor)) { \
725  MONITOR_MIN_VALUE(monitor) = MONITOR_VALUE(monitor);\
726  } \
727  }
728 
729 /* Increment/decrement counter without check the monitor on/off bit, which
730 could already be checked as a module group */
731 #define MONITOR_INC_NOCHECK(monitor) \
732  do { \
733  MONITOR_VALUE(monitor)++; \
734  if (MONITOR_VALUE(monitor) > MONITOR_MAX_VALUE(monitor)) { \
735  MONITOR_MAX_VALUE(monitor) = MONITOR_VALUE(monitor); \
736  } \
737  } while (0)
738 
739 #define MONITOR_DEC_NOCHECK(monitor) \
740  do { \
741  MONITOR_VALUE(monitor)--; \
742  if (MONITOR_VALUE(monitor) < MONITOR_MIN_VALUE(monitor)) { \
743  MONITOR_MIN_VALUE(monitor) = MONITOR_VALUE(monitor); \
744  } \
745  } while (0)
746 
747 /** Directly set a monitor counter's value */
748 #define MONITOR_SET(monitor, value) \
749  MONITOR_CHECK_DEFINED(value); \
750  if (MONITOR_IS_ON(monitor)) { \
751  MONITOR_VALUE(monitor) = (mon_type_t)(value); \
752  if (MONITOR_VALUE(monitor) > MONITOR_MAX_VALUE(monitor)) { \
753  MONITOR_MAX_VALUE(monitor) = MONITOR_VALUE(monitor); \
754  } \
755  if (MONITOR_VALUE(monitor) < MONITOR_MIN_VALUE(monitor)) { \
756  MONITOR_MIN_VALUE(monitor) = MONITOR_VALUE(monitor); \
757  } \
758  }
759 
760 /** Add time difference between now and input "value" (in seconds) to the
761 monitor counter
762 @param monitor monitor to update for the time difference
763 @param value the start time value */
764 #define MONITOR_INC_TIME_IN_MICRO_SECS(monitor, value) \
765  MONITOR_CHECK_DEFINED(value); \
766  if (MONITOR_IS_ON(monitor)) { \
767  uintmax_t old_time = (value); \
768  value = ut_time_monotonic_us(); \
769  MONITOR_VALUE(monitor) += (mon_type_t)(value - old_time); \
770  }
771 
772 /** This macro updates 3 counters in one call. However, it only checks the
773 main/first monitor counter 'monitor', to see it is on or off to decide
774 whether to do the update.
775 @param monitor the main monitor counter to update. It accounts for
776  the accumulative value for the counter.
777 @param monitor_n_calls counter that counts number of times this macro is
778  called
779 @param monitor_per_call counter that records the current and max value of
780  each incremental value
781 @param value incremental value to record this time */
782 #define MONITOR_INC_VALUE_CUMULATIVE(monitor, monitor_n_calls, \
783  monitor_per_call, value) \
784  MONITOR_CHECK_DEFINED(value); \
785  if (MONITOR_IS_ON(monitor)) { \
786  MONITOR_VALUE(monitor_n_calls)++; \
787  MONITOR_VALUE(monitor_per_call) = (mon_type_t)(value); \
788  if (MONITOR_VALUE(monitor_per_call) > \
789  MONITOR_MAX_VALUE(monitor_per_call)) { \
790  MONITOR_MAX_VALUE(monitor_per_call) = (mon_type_t)(value); \
791  } \
792  MONITOR_VALUE(monitor) += (mon_type_t)(value); \
793  if (MONITOR_VALUE(monitor) > MONITOR_MAX_VALUE(monitor)) { \
794  MONITOR_MAX_VALUE(monitor) = MONITOR_VALUE(monitor); \
795  } \
796  }
797 
798 /** Directly set a monitor counter's value, and if the value
799 is monotonically increasing, only max value needs to be updated */
800 #define MONITOR_SET_UPD_MAX_ONLY(monitor, value) \
801  MONITOR_CHECK_DEFINED(value); \
802  if (MONITOR_IS_ON(monitor)) { \
803  MONITOR_VALUE(monitor) = (mon_type_t)(value); \
804  if (MONITOR_VALUE(monitor) > MONITOR_MAX_VALUE(monitor)) { \
805  MONITOR_MAX_VALUE(monitor) = MONITOR_VALUE(monitor); \
806  } \
807  }
808 
809 /** Some values such as log sequence number are montomically increasing
810 number, do not need to record max/min values */
811 #define MONITOR_SET_SIMPLE(monitor, value) \
812  MONITOR_CHECK_DEFINED(value); \
813  if (MONITOR_IS_ON(monitor)) { \
814  MONITOR_VALUE(monitor) = (mon_type_t)(value); \
815  }
816 
817 /** Reset the monitor value and max/min value to zero. The reset
818 operation would only be conducted when the counter is turned off */
819 #define MONITOR_RESET_ALL(monitor) \
820  do { \
821  MONITOR_VALUE(monitor) = MONITOR_INIT_ZERO_VALUE; \
822  MONITOR_MAX_VALUE(monitor) = MAX_RESERVED; \
823  MONITOR_MIN_VALUE(monitor) = MIN_RESERVED; \
824  MONITOR_VALUE_RESET(monitor) = MONITOR_INIT_ZERO_VALUE; \
825  MONITOR_MAX_VALUE_START(monitor) = MAX_RESERVED; \
826  MONITOR_MIN_VALUE_START(monitor) = MIN_RESERVED; \
827  MONITOR_LAST_VALUE(monitor) = MONITOR_INIT_ZERO_VALUE; \
828  MONITOR_FIELD(monitor, mon_start_time) = MONITOR_INIT_ZERO_VALUE; \
829  MONITOR_FIELD(monitor, mon_stop_time) = MONITOR_INIT_ZERO_VALUE; \
830  MONITOR_FIELD(monitor, mon_reset_time) = MONITOR_INIT_ZERO_VALUE; \
831  } while (0)
832 
833 /** Following four macros defines necessary operations to fetch and
834 consolidate information from existing system status variables. */
835 
836 /** Save the passed-in value to mon_start_value field of monitor
837 counters */
838 #define MONITOR_SAVE_START(monitor, value) \
839  do { \
840  MONITOR_CHECK_DEFINED(value); \
841  (MONITOR_START_VALUE(monitor) = \
842  (mon_type_t)(value)-MONITOR_VALUE_RESET(monitor)); \
843  } while (0)
844 
845 /** Save the passed-in value to mon_last_value field of monitor
846 counters */
847 #define MONITOR_SAVE_LAST(monitor) \
848  do { \
849  MONITOR_LAST_VALUE(monitor) = MONITOR_VALUE(monitor); \
850  MONITOR_START_VALUE(monitor) += MONITOR_VALUE(monitor); \
851  } while (0)
852 
853 /** Set monitor value to the difference of value and mon_start_value
854 compensated by mon_last_value if accumulated value is required. */
855 #define MONITOR_SET_DIFF(monitor, value) \
856  MONITOR_SET_UPD_MAX_ONLY(monitor, ((value)-MONITOR_VALUE_RESET(monitor) - \
857  MONITOR_FIELD(monitor, mon_start_value) + \
858  MONITOR_FIELD(monitor, mon_last_value)))
859 
860 /** Get monitor's monitor_info_t by its monitor id (index into the
861  innodb_counter_info array
862  @return Point to corresponding monitor_info_t, or NULL if no such
863  monitor */
865  monitor_id_t monitor_id); /*!< id index into the
866  innodb_counter_info array */
867 /** Get monitor's name by its monitor id (index into the
868  innodb_counter_info array
869  @return corresponding monitor name, or NULL if no such
870  monitor */
871 const char *srv_mon_get_name(
872  monitor_id_t monitor_id); /*!< id index into the
873  innodb_counter_info array */
874 
875 /** Turn on/off/reset monitor counters in a module. If module_value
876  is NUM_MONITOR then turn on all monitor counters. */
878  monitor_id_t module_id, /*!< in: Module ID as in
879  monitor_counter_id. If it is
880  set to NUM_MONITOR, this means
881  we shall turn on all the counters */
882  mon_option_t set_option); /*!< in: Turn on/off reset the
883  counter */
884 /** This function consolidates some existing server counters used
885  by "system status variables". These existing system variables do not have
886  mechanism to start/stop and reset the counters, so we simulate these
887  controls by remembering the corresponding counter values when the
888  corresponding monitors are turned on/off/reset, and do appropriate
889  mathematics to deduct the actual value. */
891  monitor_id_t monitor_id, /*!< in: the monitor's ID as in
892  monitor_counter_id */
893  mon_option_t set_option); /*!< in: Turn on/off reset the
894  counter */
895 /** This function is used to calculate the maximum counter value
896  since the start of monitor counter
897  @return max counter value since start. */
898 UNIV_INLINE
900  monitor_id_t monitor); /*!< in: monitor id */
901 /** This function is used to calculate the minimum counter value
902  since the start of monitor counter
903  @return min counter value since start. */
904 UNIV_INLINE
906  monitor_id_t monitor); /*!< in: monitor id*/
907 /** Reset a monitor, create a new base line with the current monitor
908  value. This baseline is recorded by MONITOR_VALUE_RESET(monitor) */
909 void srv_mon_reset(monitor_id_t monitor); /*!< in: monitor id*/
910 /** This function resets all values of a monitor counter */
911 UNIV_INLINE
912 void srv_mon_reset_all(monitor_id_t monitor); /*!< in: monitor id*/
913 /** Turn on monitor counters that are marked as default ON. */
914 void srv_mon_default_on(void);
915 
916 #include "srv0mon.ic"
917 #else /* !UNIV_HOTBACKUP */
918 #define MONITOR_INC(x) ((void)0)
919 #define MONITOR_DEC(x) ((void)0)
920 #endif /* !UNIV_HOTBACKUP */
921 
922 #define MONITOR_INC_WAIT_STATS_EX(monitor_prefix, monitor_sufix, wait_stats) \
923  if ((wait_stats).wait_loops == 0) { \
924  MONITOR_INC(monitor_prefix##NO_WAITS##monitor_sufix); \
925  } else { \
926  MONITOR_INC(monitor_prefix##WAITS##monitor_sufix); \
927  MONITOR_INC_VALUE(monitor_prefix##WAIT_LOOPS##monitor_sufix, \
928  (wait_stats).wait_loops); \
929  }
930 
931 #define MONITOR_INC_WAIT_STATS(monitor_prefix, wait_stats) \
932  MONITOR_INC_WAIT_STATS_EX(monitor_prefix, , wait_stats);
933 
934 #endif
NUM_MONITOR
@ NUM_MONITOR
Definition: srv0mon.h:522
MONITOR_FLUSH_NEIGHBOR_TOTAL_PAGE
@ MONITOR_FLUSH_NEIGHBOR_TOTAL_PAGE
Definition: srv0mon.h:188
MONITOR_LRU_BATCH_EVICT_TOTAL_PAGE
@ MONITOR_LRU_BATCH_EVICT_TOTAL_PAGE
Definition: srv0mon.h:230
MONITOR_RSEG_CUR_SIZE
@ MONITOR_RSEG_CUR_SIZE
Definition: srv0mon.h:313
MONITOR_MASTER_IDLE_LOOPS
@ MONITOR_MASTER_IDLE_LOOPS
Definition: srv0mon.h:449
monitor_info_t::monitor_id
monitor_id_t monitor_id
Monitor ID as defined in enum monitor_id_t.
Definition: srv0mon.h:544
MONITOR_LRU_SINGLE_FLUSH_SCANNED
@ MONITOR_LRU_SINGLE_FLUSH_SCANNED
Definition: srv0mon.h:233
MONITOR_UNDO_LOG_PAGE_WRITTEN
@ MONITOR_UNDO_LOG_PAGE_WRITTEN
Definition: srv0mon.h:268
MONITOR_MODULE_FIL_SYSTEM
@ MONITOR_MODULE_FIL_SYSTEM
Definition: srv0mon.h:430
monitor_value_t::mon_min_value
mon_type_t mon_min_value
Current Min value.
Definition: srv0mon.h:76
MONITOR_OVLD_IBUF_MERGE_DISCARD_INSERT
@ MONITOR_OVLD_IBUF_MERGE_DISCARD_INSERT
Definition: srv0mon.h:438
MONITOR_OLVD_SYSTEM_ROW_DELETED
@ MONITOR_OLVD_SYSTEM_ROW_DELETED
Definition: srv0mon.h:477
MONITOR_OLVD_ROW_READ
@ MONITOR_OLVD_ROW_READ
Definition: srv0mon.h:471
MONITOR_LRU_BATCH_FLUSH_TOTAL_PAGE
@ MONITOR_LRU_BATCH_FLUSH_TOTAL_PAGE
Definition: srv0mon.h:227
MONITOR_LOG_WRITER_WAIT_LOOPS
@ MONITOR_LOG_WRITER_WAIT_LOOPS
Definition: srv0mon.h:369
MONITOR_LRU_SEARCH_SCANNED_PER_CALL
@ MONITOR_LRU_SEARCH_SCANNED_PER_CALL
Definition: srv0mon.h:240
MONITOR_LOCKREC_WAIT
@ MONITOR_LOCKREC_WAIT
Definition: srv0mon.h:146
MONITOR_FLUSH_AVG_TIME
@ MONITOR_FLUSH_AVG_TIME
Definition: srv0mon.h:201
MONITOR_LRU_BATCH_SCANNED_NUM_CALL
@ MONITOR_LRU_BATCH_SCANNED_NUM_CALL
Definition: srv0mon.h:225
MONITOR_TRX_NL_RO_COMMIT
@ MONITOR_TRX_NL_RO_COMMIT
Definition: srv0mon.h:301
MONITOR_RESET_ALL_VALUE
@ MONITOR_RESET_ALL_VALUE
Reset all values.
Definition: srv0mon.h:555
MONITOR_LOG_CONCURRENCY_MARGIN
@ MONITOR_LOG_CONCURRENCY_MARGIN
Definition: srv0mon.h:365
MONITOR_OVLD_SERVER_ACTIVITY
@ MONITOR_OVLD_SERVER_ACTIVITY
Definition: srv0mon.h:447
monitor_running_status
monitor_running_status
Possible status values for "mon_status" in "struct monitor_value".
Definition: srv0mon.h:47
MONITOR_OVLD_RWLOCK_X_OS_WAITS
@ MONITOR_OVLD_RWLOCK_X_OS_WAITS
Definition: srv0mon.h:466
MONITOR_NONE
@ MONITOR_NONE
No monitoring.
Definition: srv0mon.h:88
MONITOR_INDEX_REORG_SUCCESSFUL
@ MONITOR_INDEX_REORG_SUCCESSFUL
Definition: srv0mon.h:415
MONITOR_NO_AVERAGE
@ MONITOR_NO_AVERAGE
Set this status if we don't want to calculate the average value for the counter.
Definition: srv0mon.h:93
MONITOR_NUM_RECLOCK
@ MONITOR_NUM_RECLOCK
Definition: srv0mon.h:151
MONITOR_FLUSH_BATCH_COUNT
@ MONITOR_FLUSH_BATCH_COUNT
Definition: srv0mon.h:186
MONITOR_LOG_FLUSH_MAX_TIME
@ MONITOR_LOG_FLUSH_MAX_TIME
Definition: srv0mon.h:355
MONITOR_OLVD_ROW_DELETED
@ MONITOR_OLVD_ROW_DELETED
Definition: srv0mon.h:473
MONITOR_GROUP_MODULE
@ MONITOR_GROUP_MODULE
Monitor can be turned on/off only as a module, but not individually.
Definition: srv0mon.h:99
MONITOR_N_UPD_EXIST_EXTERN
@ MONITOR_N_UPD_EXIST_EXTERN
Definition: srv0mon.h:318
MONITOR_ALTER_TABLE_SORT_FILES
@ MONITOR_ALTER_TABLE_SORT_FILES
Definition: srv0mon.h:490
MONITOR_OVLD_SRV_DBLWR_PAGES_WRITTEN
@ MONITOR_OVLD_SRV_DBLWR_PAGES_WRITTEN
Definition: srv0mon.h:457
MONITOR_MODULE_PURGE
@ MONITOR_MODULE_PURGE
Definition: srv0mon.h:316
MONITOR_DEADLOCK_FALSE_POSITIVES
@ MONITOR_DEADLOCK_FALSE_POSITIVES
Definition: srv0mon.h:142
MONITOR_LRU_BATCH_FLUSH_COUNT
@ MONITOR_LRU_BATCH_FLUSH_COUNT
Definition: srv0mon.h:228
MONITOR_FLUSH_SYNC_WAITS
@ MONITOR_FLUSH_SYNC_WAITS
Definition: srv0mon.h:214
monitor_value_t::mon_max_value
mon_type_t mon_max_value
Current Max value.
Definition: srv0mon.h:75
MONITOR_OVLD_BUF_POOL_WRITE_REQUEST
@ MONITOR_OVLD_BUF_POOL_WRITE_REQUEST
Definition: srv0mon.h:166
MONITOR_LOG_ON_BUFFER_SPACE_WAITS
@ MONITOR_LOG_ON_BUFFER_SPACE_WAITS
Definition: srv0mon.h:396
MONITOR_OVLD_RWLOCK_S_OS_WAITS
@ MONITOR_OVLD_RWLOCK_S_OS_WAITS
Definition: srv0mon.h:465
MONITOR_SET_OWNER
@ MONITOR_SET_OWNER
Owner of "monitor set", a set of monitor counters.
Definition: srv0mon.h:103
monitor_value_t::mon_last_value
mon_type_t mon_last_value
Last set of values.
Definition: srv0mon.h:81
MONITOR_PURGE_TRUNCATE_HISTORY_MICROSECOND
@ MONITOR_PURGE_TRUNCATE_HISTORY_MICROSECOND
Definition: srv0mon.h:325
MONITOR_ICP_ATTEMPTS
@ MONITOR_ICP_ATTEMPTS
Definition: srv0mon.h:494
MONITOR_DEFAULT_ON
@ MONITOR_DEFAULT_ON
Monitor will be turned on by default at server start up.
Definition: srv0mon.h:101
MONITOR_OVLD_BUF_POOL_BYTES_DIRTY
@ MONITOR_OVLD_BUF_POOL_BYTES_DIRTY
Definition: srv0mon.h:175
MONITOR_PAD_DECREMENTS
@ MONITOR_PAD_DECREMENTS
Definition: srv0mon.h:407
MONITOR_MASTER_ACTIVE_LOOPS
@ MONITOR_MASTER_ACTIVE_LOOPS
Definition: srv0mon.h:448
MONITOR_OVLD_IBUF_MERGE_DISCARD_PURGE
@ MONITOR_OVLD_IBUF_MERGE_DISCARD_PURGE
Definition: srv0mon.h:440
MONITOR_MODULE_LOCK
@ MONITOR_MODULE_LOCK
Definition: srv0mon.h:140
MONITOR_SYSTEM_PAGE_READ
@ MONITOR_SYSTEM_PAGE_READ
Definition: srv0mon.h:255
MONITOR_OVLD_RWLOCK_SX_OS_WAITS
@ MONITOR_OVLD_RWLOCK_SX_OS_WAITS
Definition: srv0mon.h:467
MONITOR_UNDO_TRUNCATE_SWEEP_MICROSECOND
@ MONITOR_UNDO_TRUNCATE_SWEEP_MICROSECOND
Definition: srv0mon.h:331
MONITOR_IBUF_BITMAP_PAGE_WRITTEN
@ MONITOR_IBUF_BITMAP_PAGE_WRITTEN
Definition: srv0mon.h:271
MONITOR_MODULE_TRX
@ MONITOR_MODULE_TRX
Definition: srv0mon.h:298
MONITOR_LOG_CHECKPOINTS
@ MONITOR_LOG_CHECKPOINTS
Definition: srv0mon.h:363
MONITOR_ADAPTIVE_HASH_PAGE_ADDED
@ MONITOR_ADAPTIVE_HASH_PAGE_ADDED
Definition: srv0mon.h:422
MONITOR_INDEX_NON_LEAF_PAGE_WRITTEN
@ MONITOR_INDEX_NON_LEAF_PAGE_WRITTEN
Definition: srv0mon.h:265
MONITOR_PURGE_RESUME_COUNT
@ MONITOR_PURGE_RESUME_COUNT
Definition: srv0mon.h:323
MONITOR_FLUSH_BATCH_SCANNED_NUM_CALL
@ MONITOR_FLUSH_BATCH_SCANNED_NUM_CALL
Definition: srv0mon.h:183
MONITOR_ICP_NO_MATCH
@ MONITOR_ICP_NO_MATCH
Definition: srv0mon.h:495
MONITOR_LOG_ON_FLUSH_NO_WAITS
@ MONITOR_LOG_ON_FLUSH_NO_WAITS
Definition: srv0mon.h:390
MONITOR_BACKGROUND_DROP_TABLE
@ MONITOR_BACKGROUND_DROP_TABLE
Definition: srv0mon.h:487
MONITOR_LOG_PADDED
@ MONITOR_LOG_PADDED
Definition: srv0mon.h:361
MONITOR_OVLD_IBUF_MERGE_PURGE
@ MONITOR_OVLD_IBUF_MERGE_PURGE
Definition: srv0mon.h:437
srv_mon_get_info
monitor_info_t * srv_mon_get_info(monitor_id_t monitor_id)
Get monitor's monitor_info_t by its monitor id (index into the innodb_counter_info array.
Definition: srv0mon.cc:1430
MONITOR_PAGE_COMPRESS
@ MONITOR_PAGE_COMPRESS
Definition: srv0mon.h:404
MONITOR_TURN_OFF
@ MONITOR_TURN_OFF
Turn off the counter.
Definition: srv0mon.h:553
MONITOR_OVLD_BUF_POOL_WAIT_FREE
@ MONITOR_OVLD_BUF_POOL_WAIT_FREE
Definition: srv0mon.h:167
MONITOR_OVLD_BUF_POOL_PAGES_DIRTY
@ MONITOR_OVLD_BUF_POOL_PAGES_DIRTY
Definition: srv0mon.h:174
MONITOR_FLUSH_NEIGHBOR_COUNT
@ MONITOR_FLUSH_NEIGHBOR_COUNT
Definition: srv0mon.h:189
MONITOR_OVLD_IBUF_MERGE_DISCARD_DELETE
@ MONITOR_OVLD_IBUF_MERGE_DISCARD_DELETE
Definition: srv0mon.h:439
MONITOR_UNDO_TRUNCATE_COUNT
@ MONITOR_UNDO_TRUNCATE_COUNT
Definition: srv0mon.h:329
MONITOR_OLVD_SYSTEM_ROW_READ
@ MONITOR_OLVD_SYSTEM_ROW_READ
Definition: srv0mon.h:475
MONITOR_TRX_SYSTEM_PAGE_READ
@ MONITOR_TRX_SYSTEM_PAGE_READ
Definition: srv0mon.h:256
MONITOR_ALL_COUNTER
@ MONITOR_ALL_COUNTER
Definition: srv0mon.h:519
MONITOR_OVLD_OS_FILE_READ
@ MONITOR_OVLD_OS_FILE_READ
Definition: srv0mon.h:287
MONITOR_INDEX_IBUF_LEAF_PAGE_WRITTEN
@ MONITOR_INDEX_IBUF_LEAF_PAGE_WRITTEN
Definition: srv0mon.h:266
MONITOR_EXISTING
@ MONITOR_EXISTING
The monitor carries information from an existing system status variable.
Definition: srv0mon.h:91
MONITOR_MODULE_REDO_LOG
@ MONITOR_MODULE_REDO_LOG
Definition: srv0mon.h:339
MONITOR_OVLD_MAX_AGE_ASYNC
@ MONITOR_OVLD_MAX_AGE_ASYNC
Definition: srv0mon.h:348
MONITOR_LOG_WRITER_ON_FREE_SPACE_WAITS
@ MONITOR_LOG_WRITER_ON_FREE_SPACE_WAITS
Definition: srv0mon.h:370
MONITOR_STOPPED
@ MONITOR_STOPPED
Monitor has been turned off.
Definition: srv0mon.h:49
MONITOR_MODULE_INDEX
@ MONITOR_MODULE_INDEX
Definition: srv0mon.h:410
MONITOR_PURGE_N_PAGE_HANDLED
@ MONITOR_PURGE_N_PAGE_HANDLED
Definition: srv0mon.h:320
MONITOR_ADAPTIVE_HASH_ROW_ADDED
@ MONITOR_ADAPTIVE_HASH_ROW_ADDED
Definition: srv0mon.h:424
MONITOR_LOG_FLUSH_NOTIFIER_WAITS
@ MONITOR_LOG_FLUSH_NOTIFIER_WAITS
Definition: srv0mon.h:382
mon_option_t
mon_option_t
Following are the "set_option" values allowed for srv_mon_process_existing_counter() and srv_mon_proc...
Definition: srv0mon.h:551
monitor_value_t::mon_reset_time
ib_time_t mon_reset_time
Time counter resetted.
Definition: srv0mon.h:73
monitor_id_t
monitor_id_t
This enumeration defines internal monitor identifier used internally to identify each particular coun...
Definition: srv0mon.h:128
MONITOR_OVLD_BUFFER_POOL_SIZE
@ MONITOR_OVLD_BUFFER_POOL_SIZE
Definition: srv0mon.h:163
MONITOR_LRU_BATCH_FLUSH_AVG_TIME_EST
@ MONITOR_LRU_BATCH_FLUSH_AVG_TIME_EST
Definition: srv0mon.h:200
monitor_value_t::mon_min_value_start
mon_type_t mon_min_value_start
Min value since start.
Definition: srv0mon.h:79
MONITOR_MODULE_OS
@ MONITOR_MODULE_OS
Definition: srv0mon.h:286
MONITOR_INDEX_REORG_ATTEMPTS
@ MONITOR_INDEX_REORG_ATTEMPTS
Definition: srv0mon.h:414
MONITOR_OVLD_BUF_OLDEST_LSN_APPROX
@ MONITOR_OVLD_BUF_OLDEST_LSN_APPROX
Definition: srv0mon.h:346
MONITOR_OVLD_BUF_POOL_READS
@ MONITOR_OVLD_BUF_POOL_READS
Definition: srv0mon.h:164
monitor_value_t::mon_start_value
mon_type_t mon_start_value
Value at the start time.
Definition: srv0mon.h:80
MONITOR_INDEX_IBUF_LEAF_PAGE_READ
@ MONITOR_INDEX_IBUF_LEAF_PAGE_READ
Definition: srv0mon.h:249
MONITOR_NUM_UNDO_SLOT_USED
@ MONITOR_NUM_UNDO_SLOT_USED
Definition: srv0mon.h:311
MONITOR_LRU_GET_FREE_LOOPS
@ MONITOR_LRU_GET_FREE_LOOPS
Definition: srv0mon.h:207
MONITOR_ALTER_TABLE_LOG_FILES
@ MONITOR_ALTER_TABLE_LOG_FILES
Definition: srv0mon.h:491
MONITOR_OTHER_PAGE_WRITTEN
@ MONITOR_OTHER_PAGE_WRITTEN
Definition: srv0mon.h:280
MONITOR_FLUSH_BACKGROUND_PAGES
@ MONITOR_FLUSH_BACKGROUND_PAGES
Definition: srv0mon.h:223
MONITOR_INDEX_LEAF_PAGE_READ
@ MONITOR_INDEX_LEAF_PAGE_READ
Definition: srv0mon.h:247
MONITOR_ADAPTIVE_HASH_PAGE_REMOVED
@ MONITOR_ADAPTIVE_HASH_PAGE_REMOVED
Definition: srv0mon.h:423
MONITOR_ZBLOB_PAGE_WRITTEN
@ MONITOR_ZBLOB_PAGE_WRITTEN
Definition: srv0mon.h:277
MONITOR_MASTER_THREAD_SLEEP
@ MONITOR_MASTER_THREAD_SLEEP
Definition: srv0mon.h:446
MONITOR_RSEG_ARRAY_PAGE_WRITTEN
@ MONITOR_RSEG_ARRAY_PAGE_WRITTEN
Definition: srv0mon.h:279
MONITOR_LRU_BATCH_SCANNED_PER_CALL
@ MONITOR_LRU_BATCH_SCANNED_PER_CALL
Definition: srv0mon.h:226
MONITOR_LATCHES
@ MONITOR_LATCHES
Definition: srv0mon.h:501
MONITOR_TRX_ACTIVE
@ MONITOR_TRX_ACTIVE
Definition: srv0mon.h:306
MONITOR_LOG_WRITER_ON_ARCHIVER_WAITS
@ MONITOR_LOG_WRITER_ON_ARCHIVER_WAITS
Definition: srv0mon.h:371
MONITOR_PAD_INCREMENTS
@ MONITOR_PAD_INCREMENTS
Definition: srv0mon.h:406
MONITOR_FLUSH_SYNC_COUNT
@ MONITOR_FLUSH_SYNC_COUNT
Definition: srv0mon.h:219
MONITOR_FSP_HDR_PAGE_WRITTEN
@ MONITOR_FSP_HDR_PAGE_WRITTEN
Definition: srv0mon.h:274
MONITOR_MODULE_ADAPTIVE_HASH
@ MONITOR_MODULE_ADAPTIVE_HASH
Definition: srv0mon.h:419
MONITOR_OVLD_LOCK_AVG_WAIT_TIME
@ MONITOR_OVLD_LOCK_AVG_WAIT_TIME
Definition: srv0mon.h:159
MONITOR_CPU_UTIME_ABS
@ MONITOR_CPU_UTIME_ABS
Definition: srv0mon.h:505
MONITOR_LRU_GET_FREE_SEARCH
@ MONITOR_LRU_GET_FREE_SEARCH
Definition: srv0mon.h:237
innodb_counter_value
monitor_value_t innodb_counter_value[NUM_MONITOR]
The actual monitor counter array that records each monintor counter value.
Definition: srv0mon.cc:1420
MONITOR_OVLD_LOCK_WAIT_TIME
@ MONITOR_OVLD_LOCK_WAIT_TIME
Definition: srv0mon.h:156
MONITOR_PURGE_INVOKED
@ MONITOR_PURGE_INVOKED
Definition: srv0mon.h:319
MONITOR_LOG_ON_RECENT_WRITTEN_WAIT_LOOPS
@ MONITOR_LOG_ON_RECENT_WRITTEN_WAIT_LOOPS
Definition: srv0mon.h:393
monitor_type_t
monitor_type_t
Follwoing defines are possible values for "monitor_type" field in "struct monitor_info".
Definition: srv0mon.h:87
MONITOR_OVLD_IBUF_MERGES
@ MONITOR_OVLD_IBUF_MERGES
Definition: srv0mon.h:441
MONITOR_LRU_BATCH_FLUSH_PAGES
@ MONITOR_LRU_BATCH_FLUSH_PAGES
Definition: srv0mon.h:229
MONITOR_OVLD_BUF_POOL_READ_AHEAD_EVICTED
@ MONITOR_OVLD_BUF_POOL_READ_AHEAD_EVICTED
Definition: srv0mon.h:169
MONITOR_NUM_TABLELOCK
@ MONITOR_NUM_TABLELOCK
Definition: srv0mon.h:154
MONITOR_FLUSH_NEIGHBOR_PAGES
@ MONITOR_FLUSH_NEIGHBOR_PAGES
Definition: srv0mon.h:190
NUM_BITS_ULINT
#define NUM_BITS_ULINT
Number of bit in a ulint datatype.
Definition: srv0mon.h:563
MONITOR_FLUSH_SYNC_TOTAL_PAGE
@ MONITOR_FLUSH_SYNC_TOTAL_PAGE
Definition: srv0mon.h:218
MONITOR_LOG_ON_WRITE_WAITS
@ MONITOR_LOG_ON_WRITE_WAITS
Definition: srv0mon.h:388
MONITOR_CPU_N
@ MONITOR_CPU_N
Definition: srv0mon.h:509
MONITOR_INDEX_IBUF_NON_LEAF_PAGE_WRITTEN
@ MONITOR_INDEX_IBUF_NON_LEAF_PAGE_WRITTEN
Definition: srv0mon.h:267
MONITOR_BLOB_PAGE_WRITTEN
@ MONITOR_BLOB_PAGE_WRITTEN
Definition: srv0mon.h:276
MONITOR_OVLD_ADAPTIVE_HASH_SEARCH
@ MONITOR_OVLD_ADAPTIVE_HASH_SEARCH
Definition: srv0mon.h:420
MONITOR_LOG_FULL_BLOCK_WRITES
@ MONITOR_LOG_FULL_BLOCK_WRITES
Definition: srv0mon.h:359
MONITOR_SRV_BACKGROUND_DROP_TABLE_MICROSECOND
@ MONITOR_SRV_BACKGROUND_DROP_TABLE_MICROSECOND
Definition: srv0mon.h:450
MONITOR_LOG_ON_BUFFER_SPACE_WAIT_LOOPS
@ MONITOR_LOG_ON_BUFFER_SPACE_WAIT_LOOPS
Definition: srv0mon.h:397
MONITOR_ADAPTIVE_HASH_ROW_UPDATED
@ MONITOR_ADAPTIVE_HASH_ROW_UPDATED
Definition: srv0mon.h:427
MONITOR_INODE_PAGE_WRITTEN
@ MONITOR_INODE_PAGE_WRITTEN
Definition: srv0mon.h:269
MONITOR_NUM_RECLOCK_REQ
@ MONITOR_NUM_RECLOCK_REQ
Definition: srv0mon.h:148
MONITOR_MODULE_BUF_PAGE
@ MONITOR_MODULE_BUF_PAGE
Definition: srv0mon.h:246
MONITOR_OVLD_BUF_OLDEST_LSN_LWM
@ MONITOR_OVLD_BUF_OLDEST_LSN_LWM
Definition: srv0mon.h:347
MONITOR_IBUF_FREELIST_PAGE_READ
@ MONITOR_IBUF_FREELIST_PAGE_READ
Definition: srv0mon.h:253
MONITOR_OVLD_BYTE_WRITTEN
@ MONITOR_OVLD_BYTE_WRITTEN
Definition: srv0mon.h:181
MONITOR_LOG_ON_FLUSH_WAIT_LOOPS
@ MONITOR_LOG_ON_FLUSH_WAIT_LOOPS
Definition: srv0mon.h:392
MONITOR_OVLD_LSN_ARCHIVED
@ MONITOR_OVLD_LSN_ARCHIVED
Definition: srv0mon.h:343
MONITOR_LRU_GET_FREE_WAITS
@ MONITOR_LRU_GET_FREE_WAITS
Definition: srv0mon.h:208
MONITOR_MODULE_PAGE_TRACK
@ MONITOR_MODULE_PAGE_TRACK
Definition: srv0mon.h:511
MONITOR_LOG_ON_FILE_SPACE_NO_WAITS
@ MONITOR_LOG_ON_FILE_SPACE_NO_WAITS
Definition: srv0mon.h:398
MONITOR_TRX_COMMIT_UNDO
@ MONITOR_TRX_COMMIT_UNDO
Definition: srv0mon.h:302
MONITOR_DML_PURGE_DELAY
@ MONITOR_DML_PURGE_DELAY
Definition: srv0mon.h:321
MONITOR_N_DEL_ROW_PURGE
@ MONITOR_N_DEL_ROW_PURGE
Definition: srv0mon.h:317
srv_mon_set_module_control
void srv_mon_set_module_control(monitor_id_t module_id, mon_option_t set_option)
Turn on/off/reset monitor counters in a module.
Definition: srv0mon.cc:1457
MONITOR_OVLD_OS_FILE_WRITE
@ MONITOR_OVLD_OS_FILE_WRITE
Definition: srv0mon.h:288
MONITOR_ON_LOG_WAIT_LOOPS_PAGE_WRITTEN
@ MONITOR_ON_LOG_WAIT_LOOPS_PAGE_WRITTEN
Definition: srv0mon.h:283
MONITOR_LRU_UNZIP_SEARCH_SCANNED_PER_CALL
@ MONITOR_LRU_UNZIP_SEARCH_SCANNED_PER_CALL
Definition: srv0mon.h:243
MONITOR_LOG_FLUSH_AVG_TIME
@ MONITOR_LOG_FLUSH_AVG_TIME
Definition: srv0mon.h:356
MONITOR_OVLD_BUF_POOL_BYTES_DATA
@ MONITOR_OVLD_BUF_POOL_BYTES_DATA
Definition: srv0mon.h:173
MONITOR_DEADLOCK_ROUNDS
@ MONITOR_DEADLOCK_ROUNDS
Definition: srv0mon.h:143
MONITOR_LOG_FLUSHER_WAITS
@ MONITOR_LOG_FLUSHER_WAITS
Definition: srv0mon.h:374
MONITOR_TRX_ON_LOG_NO_WAITS
@ MONITOR_TRX_ON_LOG_NO_WAITS
Definition: srv0mon.h:307
srv_mon_default_on
void srv_mon_default_on(void)
Turn on monitor counters that are marked as default ON.
Definition: srv0mon.cc:2112
MONITOR_ZBLOB2_PAGE_WRITTEN
@ MONITOR_ZBLOB2_PAGE_WRITTEN
Definition: srv0mon.h:278
MONITOR_LOG_FREE_SPACE
@ MONITOR_LOG_FREE_SPACE
Definition: srv0mon.h:364
MONITOR_UNDO_TRUNCATE_SWEEP_COUNT
@ MONITOR_UNDO_TRUNCATE_SWEEP_COUNT
Definition: srv0mon.h:330
monitor_info_t::monitor_module
const char * monitor_module
Sub Module the monitor belongs to.
Definition: srv0mon.h:536
MONITOR_LOG_NEXT_FILE
@ MONITOR_LOG_NEXT_FILE
Definition: srv0mon.h:362
MONITOR_CPU_UTIME_PCT
@ MONITOR_CPU_UTIME_PCT
Definition: srv0mon.h:507
MONITOR_OVLD_PAGES_READ
@ MONITOR_OVLD_PAGES_READ
Definition: srv0mon.h:179
MONITOR_PAGE_TRACK_FULL_BLOCK_WRITES
@ MONITOR_PAGE_TRACK_FULL_BLOCK_WRITES
Definition: srv0mon.h:514
MONITOR_OVLD_BUF_POOL_PAGE_TOTAL
@ MONITOR_OVLD_BUF_POOL_PAGE_TOTAL
Definition: srv0mon.h:170
MONITOR_BLOB_PAGE_READ
@ MONITOR_BLOB_PAGE_READ
Definition: srv0mon.h:259
MONITOR_LOG_ON_FILE_SPACE_WAIT_LOOPS
@ MONITOR_LOG_ON_FILE_SPACE_WAIT_LOOPS
Definition: srv0mon.h:400
MONITOR_PENDING_ALTER_TABLE
@ MONITOR_PENDING_ALTER_TABLE
Definition: srv0mon.h:489
MONITOR_OVLD_RWLOCK_S_SPIN_ROUNDS
@ MONITOR_OVLD_RWLOCK_S_SPIN_ROUNDS
Definition: srv0mon.h:462
MONITOR_UNDO_TRUNCATE_FLUSH_MICROSECOND
@ MONITOR_UNDO_TRUNCATE_FLUSH_MICROSECOND
Definition: srv0mon.h:334
MONITOR_FLUSH_N_TO_FLUSH_REQUESTED
@ MONITOR_FLUSH_N_TO_FLUSH_REQUESTED
Definition: srv0mon.h:191
MONITOR_OVLD_OS_LOG_PENDING_WRITES
@ MONITOR_OVLD_OS_LOG_PENDING_WRITES
Definition: srv0mon.h:295
MONITOR_OLVD_ROW_UPDTATED
@ MONITOR_OLVD_ROW_UPDTATED
Definition: srv0mon.h:474
MONITOR_FLUSH_BATCH_SCANNED
@ MONITOR_FLUSH_BATCH_SCANNED
Definition: srv0mon.h:182
MONITOR_LRU_SINGLE_FLUSH_FAILURE_COUNT
@ MONITOR_LRU_SINGLE_FLUSH_FAILURE_COUNT
Definition: srv0mon.h:236
MONITOR_MODULE_METADATA
@ MONITOR_MODULE_METADATA
Definition: srv0mon.h:134
MONITOR_ICP_MATCH
@ MONITOR_ICP_MATCH
Definition: srv0mon.h:497
MONITOR_OVLD_RWLOCK_X_SPIN_ROUNDS
@ MONITOR_OVLD_RWLOCK_X_SPIN_ROUNDS
Definition: srv0mon.h:463
MONITOR_FLUSH_PCT_FOR_LSN
@ MONITOR_FLUSH_PCT_FOR_LSN
Definition: srv0mon.h:213
monitor_value_t::mon_start_time
ib_time_t mon_start_time
Start time of monitoring
Definition: srv0mon.h:71
MONITOR_TRX_RW_COMMIT
@ MONITOR_TRX_RW_COMMIT
Definition: srv0mon.h:299
MONITOR_INDEX_LEAF_PAGE_WRITTEN
@ MONITOR_INDEX_LEAF_PAGE_WRITTEN
Definition: srv0mon.h:264
MONITOR_PAGE_TRACK_PARTIAL_BLOCK_WRITES
@ MONITOR_PAGE_TRACK_PARTIAL_BLOCK_WRITES
Definition: srv0mon.h:513
MONITOR_OVLD_BUF_POOL_READ_AHEAD
@ MONITOR_OVLD_BUF_POOL_READ_AHEAD
Definition: srv0mon.h:168
MONITOR_FLUSH_BACKGROUND_COUNT
@ MONITOR_FLUSH_BACKGROUND_COUNT
Definition: srv0mon.h:222
MONITOR_DEADLOCK
@ MONITOR_DEADLOCK
Definition: srv0mon.h:141
MONITOR_STARTED
@ MONITOR_STARTED
Monitor has been turned on.
Definition: srv0mon.h:48
MONITOR_INODE_PAGE_READ
@ MONITOR_INODE_PAGE_READ
Definition: srv0mon.h:252
MONITOR_SET_MEMBER
@ MONITOR_SET_MEMBER
Being part of a "monitor set".
Definition: srv0mon.h:105
MONITOR_FLUSH_N_TO_FLUSH_BY_AGE
@ MONITOR_FLUSH_N_TO_FLUSH_BY_AGE
Definition: srv0mon.h:193
MONITOR_LOCK_THREADS_WAITING
@ MONITOR_LOCK_THREADS_WAITING
Definition: srv0mon.h:144
MONITOR_DEFAULT_START
@ MONITOR_DEFAULT_START
Definition: srv0mon.h:131
srv_mon_process_existing_counter
void srv_mon_process_existing_counter(monitor_id_t monitor_id, mon_option_t set_option)
This function consolidates some existing server counters used by "system status variables".
Definition: srv0mon.cc:1594
MONITOR_UNDO_TRUNCATE_MICROSECOND
@ MONITOR_UNDO_TRUNCATE_MICROSECOND
Definition: srv0mon.h:336
MONITOR_PAGE_TRACK_CHECKPOINT_PARTIAL_FLUSH_REQUEST
@ MONITOR_PAGE_TRACK_CHECKPOINT_PARTIAL_FLUSH_REQUEST
Definition: srv0mon.h:515
MONITOR_XDES_PAGE_READ
@ MONITOR_XDES_PAGE_READ
Definition: srv0mon.h:258
MONITOR_LRU_SEARCH_SCANNED_NUM_CALL
@ MONITOR_LRU_SEARCH_SCANNED_NUM_CALL
Definition: srv0mon.h:239
MONITOR_ON_LOG_WAITS_PAGE_WRITTEN
@ MONITOR_ON_LOG_WAITS_PAGE_WRITTEN
Definition: srv0mon.h:282
MONITOR_LRU_BATCH_SCANNED
@ MONITOR_LRU_BATCH_SCANNED
Definition: srv0mon.h:224
MONITOR_OVLD_BUF_POOL_PAGES_DATA
@ MONITOR_OVLD_BUF_POOL_PAGES_DATA
Definition: srv0mon.h:172
MONITOR_LOG_WRITER_NO_WAITS
@ MONITOR_LOG_WRITER_NO_WAITS
Definition: srv0mon.h:367
MONITOR_INDEX_IBUF_NON_LEAF_PAGE_READ
@ MONITOR_INDEX_IBUF_NON_LEAF_PAGE_READ
Definition: srv0mon.h:250
MONITOR_LOG_FLUSH_NOTIFIER_NO_WAITS
@ MONITOR_LOG_FLUSH_NOTIFIER_NO_WAITS
Definition: srv0mon.h:381
MONITOR_OVLD_N_FILE_OPENED
@ MONITOR_OVLD_N_FILE_OPENED
Definition: srv0mon.h:431
MONITOR_MODULE_SAMPLING_STATS
@ MONITOR_MODULE_SAMPLING_STATS
Definition: srv0mon.h:481
MONITOR_FSP_HDR_PAGE_READ
@ MONITOR_FSP_HDR_PAGE_READ
Definition: srv0mon.h:257
MONITOR_GET_VALUE
@ MONITOR_GET_VALUE
Option for srv_mon_process_existing_counter() function.
Definition: srv0mon.h:556
MONITOR_SAMPLED_PAGES_READ
@ MONITOR_SAMPLED_PAGES_READ
Definition: srv0mon.h:482
MONITOR_OVLD_PAGE_CREATED
@ MONITOR_OVLD_PAGE_CREATED
Definition: srv0mon.h:177
MONITOR_ZBLOB_PAGE_READ
@ MONITOR_ZBLOB_PAGE_READ
Definition: srv0mon.h:260
MONITOR_SYSTEM_PAGE_WRITTEN
@ MONITOR_SYSTEM_PAGE_WRITTEN
Definition: srv0mon.h:272
MONITOR_LRU_SINGLE_FLUSH_SCANNED_PER_CALL
@ MONITOR_LRU_SINGLE_FLUSH_SCANNED_PER_CALL
Definition: srv0mon.h:235
MONITOR_FLUSH_SYNC_PAGES
@ MONITOR_FLUSH_SYNC_PAGES
Definition: srv0mon.h:220
MONITOR_OLVD_SYSTEM_ROW_INSERTED
@ MONITOR_OLVD_SYSTEM_ROW_INSERTED
Definition: srv0mon.h:476
monitor_value_t::mon_value
mon_type_t mon_value
Current counter Value.
Definition: srv0mon.h:74
MONITOR_PURGE_STOP_COUNT
@ MONITOR_PURGE_STOP_COUNT
Definition: srv0mon.h:322
MONITOR_PURGE_TRUNCATE_HISTORY_COUNT
@ MONITOR_PURGE_TRUNCATE_HISTORY_COUNT
Definition: srv0mon.h:324
MONITOR_RESET_VALUE
@ MONITOR_RESET_VALUE
Reset current values.
Definition: srv0mon.h:554
MONITOR_LOG_WRITE_NOTIFIER_WAIT_LOOPS
@ MONITOR_LOG_WRITE_NOTIFIER_WAIT_LOOPS
Definition: srv0mon.h:379
MONITOR_FLUSH_AVG_PAGE_RATE
@ MONITOR_FLUSH_AVG_PAGE_RATE
Definition: srv0mon.h:210
MONITOR_OVLD_ROW_LOCK_WAIT
@ MONITOR_OVLD_ROW_LOCK_WAIT
Definition: srv0mon.h:158
srv_mon_calc_max_since_start
UNIV_INLINE mon_type_t srv_mon_calc_max_since_start(monitor_id_t monitor)
This function is used to calculate the maximum counter value since the start of monitor counter.
MONITOR_FLUSH_BATCH_SCANNED_PER_CALL
@ MONITOR_FLUSH_BATCH_SCANNED_PER_CALL
Definition: srv0mon.h:184
MONITOR_OVLD_OS_FSYNC
@ MONITOR_OVLD_OS_FSYNC
Definition: srv0mon.h:289
MONITOR_FLUSH_ADAPTIVE_AVG_TIME_SLOT
@ MONITOR_FLUSH_ADAPTIVE_AVG_TIME_SLOT
Definition: srv0mon.h:194
MONITOR_FLUSH_PCT_FOR_DIRTY
@ MONITOR_FLUSH_PCT_FOR_DIRTY
Definition: srv0mon.h:212
MONITOR_SRV_IBUF_MERGE_MICROSECOND
@ MONITOR_SRV_IBUF_MERGE_MICROSECOND
Definition: srv0mon.h:451
MONITOR_LOG_ON_FLUSH_WAITS
@ MONITOR_LOG_ON_FLUSH_WAITS
Definition: srv0mon.h:391
MONITOR_TURN_ON
@ MONITOR_TURN_ON
Turn on the counter.
Definition: srv0mon.h:552
MONITOR_CPU_STIME_PCT
@ MONITOR_CPU_STIME_PCT
Definition: srv0mon.h:508
MONITOR_LRU_SEARCH_SCANNED
@ MONITOR_LRU_SEARCH_SCANNED
Definition: srv0mon.h:238
MONITOR_OVLD_LOG_WRITE_REQUEST
@ MONITOR_OVLD_LOG_WRITE_REQUEST
Definition: srv0mon.h:351
MONITOR_HIDDEN
@ MONITOR_HIDDEN
Do not display this monitor in the metrics table.
Definition: srv0mon.h:106
MONITOR_LOG_FLUSHER_NO_WAITS
@ MONITOR_LOG_FLUSHER_NO_WAITS
Definition: srv0mon.h:373
MONITOR_SRV_DICT_LRU_MICROSECOND
@ MONITOR_SRV_DICT_LRU_MICROSECOND
Definition: srv0mon.h:454
MONITOR_OVLD_OS_LOG_FSYNC
@ MONITOR_OVLD_OS_LOG_FSYNC
Definition: srv0mon.h:293
MONITOR_XDES_PAGE_WRITTEN
@ MONITOR_XDES_PAGE_WRITTEN
Definition: srv0mon.h:275
MONITOR_PAGE_TRACK_RESETS
@ MONITOR_PAGE_TRACK_RESETS
Definition: srv0mon.h:512
MONITOR_OVLD_LSN_CHECKPOINT
@ MONITOR_OVLD_LSN_CHECKPOINT
Definition: srv0mon.h:341
MONITOR_OLVD_ROW_INSERTED
@ MONITOR_OLVD_ROW_INSERTED
Definition: srv0mon.h:472
MONITOR_OVLD_LSN_FLUSHDISK
@ MONITOR_OVLD_LSN_FLUSHDISK
Definition: srv0mon.h:340
MONITOR_LOG_ON_WRITE_WAIT_LOOPS
@ MONITOR_LOG_ON_WRITE_WAIT_LOOPS
Definition: srv0mon.h:389
MONITOR_LOG_WRITE_NOTIFIER_NO_WAITS
@ MONITOR_LOG_WRITE_NOTIFIER_NO_WAITS
Definition: srv0mon.h:377
MONITOR_NUM_UNDO_SLOT_CACHED
@ MONITOR_NUM_UNDO_SLOT_CACHED
Definition: srv0mon.h:312
MONITOR_OVLD_ADAPTIVE_HASH_SEARCH_BTREE
@ MONITOR_OVLD_ADAPTIVE_HASH_SEARCH_BTREE
Definition: srv0mon.h:421
MONITOR_TRX_ROLLBACK_SAVEPOINT
@ MONITOR_TRX_ROLLBACK_SAVEPOINT
Definition: srv0mon.h:304
MONITOR_LRU_UNZIP_SEARCH_SCANNED
@ MONITOR_LRU_UNZIP_SEARCH_SCANNED
Definition: srv0mon.h:241
MONITOR_MODULE_CPU
@ MONITOR_MODULE_CPU
Definition: srv0mon.h:504
MONITOR_OTHER_PAGE_READ
@ MONITOR_OTHER_PAGE_READ
Definition: srv0mon.h:263
MONITOR_LRU_BATCH_EVICT_PAGES
@ MONITOR_LRU_BATCH_EVICT_PAGES
Definition: srv0mon.h:232
MONITOR_SRV_DICT_LRU_EVICT_COUNT
@ MONITOR_SRV_DICT_LRU_EVICT_COUNT
Definition: srv0mon.h:455
MONITOR_CPU_STIME_ABS
@ MONITOR_CPU_STIME_ABS
Definition: srv0mon.h:506
srv_mon_calc_min_since_start
UNIV_INLINE mon_type_t srv_mon_calc_min_since_start(monitor_id_t monitor)
This function is used to calculate the minimum counter value since the start of monitor counter.
MONITOR_LOG_ON_FILE_SPACE_WAITS
@ MONITOR_LOG_ON_FILE_SPACE_WAITS
Definition: srv0mon.h:399
MONITOR_MODULE_BUFFER
@ MONITOR_MODULE_BUFFER
Definition: srv0mon.h:162
MONITOR_OVLD_LSN_BUF_DIRTY_PAGES_ADDED
@ MONITOR_OVLD_LSN_BUF_DIRTY_PAGES_ADDED
Definition: srv0mon.h:345
MONITOR_MODULE_PAGE
@ MONITOR_MODULE_PAGE
Definition: srv0mon.h:403
MONITOR_MODULE_DML_STATS
@ MONITOR_MODULE_DML_STATS
Definition: srv0mon.h:470
MONITOR_LOG_FLUSH_NOTIFIER_WAIT_LOOPS
@ MONITOR_LOG_FLUSH_NOTIFIER_WAIT_LOOPS
Definition: srv0mon.h:383
MONITOR_INDEX_MERGE_SUCCESSFUL
@ MONITOR_INDEX_MERGE_SUCCESSFUL
Definition: srv0mon.h:413
MONITOR_TRX_RO_COMMIT
@ MONITOR_TRX_RO_COMMIT
Definition: srv0mon.h:300
MONITOR_MODULE_IBUF_SYSTEM
@ MONITOR_MODULE_IBUF_SYSTEM
Definition: srv0mon.h:434
MONITOR_ADAPTIVE_HASH_ROW_REMOVED
@ MONITOR_ADAPTIVE_HASH_ROW_REMOVED
Definition: srv0mon.h:425
srv_mon_get_name
const char * srv_mon_get_name(monitor_id_t monitor_id)
Get monitor's name by its monitor id (index into the innodb_counter_info array.
Definition: srv0mon.cc:1443
MONITOR_OVLD_RWLOCK_X_SPIN_WAITS
@ MONITOR_OVLD_RWLOCK_X_SPIN_WAITS
Definition: srv0mon.h:460
MONITOR_ADAPTIVE_HASH_ROW_REMOVE_NOT_FOUND
@ MONITOR_ADAPTIVE_HASH_ROW_REMOVE_NOT_FOUND
Definition: srv0mon.h:426
MONITOR_MODULE_LATCHES
@ MONITOR_MODULE_LATCHES
Definition: srv0mon.h:500
MONITOR_FLUSH_AVG_PASS
@ MONITOR_FLUSH_AVG_PASS
Definition: srv0mon.h:205
MONITOR_OVLD_OS_LOG_PENDING_FSYNC
@ MONITOR_OVLD_OS_LOG_PENDING_FSYNC
Definition: srv0mon.h:294
MONITOR_OS_PENDING_WRITES
@ MONITOR_OS_PENDING_WRITES
Definition: srv0mon.h:291
MONITOR_RECLOCK_REMOVED
@ MONITOR_RECLOCK_REMOVED
Definition: srv0mon.h:150
MONITOR_RECLOCK_CREATED
@ MONITOR_RECLOCK_CREATED
Definition: srv0mon.h:149
MONITOR_MODULE
@ MONITOR_MODULE
This is a monitor module type, not a counter.
Definition: srv0mon.h:89
MONITOR_MODULE_SERVER
@ MONITOR_MODULE_SERVER
Definition: srv0mon.h:445
monitor_info_t::monitor_desc
const char * monitor_desc
Brief desc of monitor counter.
Definition: srv0mon.h:538
MONITOR_LOG_ON_WRITE_NO_WAITS
@ MONITOR_LOG_ON_WRITE_NO_WAITS
Definition: srv0mon.h:387
monitor_value_t
Two monitor structures are defined in this file.
Definition: srv0mon.h:70
monitor_info_t
struct monitor_info describes the basic/static information about each monitor counter.
Definition: srv0mon.h:534
MONITOR_TABLELOCK_REMOVED
@ MONITOR_TABLELOCK_REMOVED
Definition: srv0mon.h:153
MONITOR_ON_LOG_NO_WAITS_PAGE_WRITTEN
@ MONITOR_ON_LOG_NO_WAITS_PAGE_WRITTEN
Definition: srv0mon.h:281
MONITOR_TIMEOUT
@ MONITOR_TIMEOUT
Definition: srv0mon.h:145
MONITOR_LOG_ON_RECENT_CLOSED_WAIT_LOOPS
@ MONITOR_LOG_ON_RECENT_CLOSED_WAIT_LOOPS
Definition: srv0mon.h:394
MONITOR_PAGE_DECOMPRESS
@ MONITOR_PAGE_DECOMPRESS
Definition: srv0mon.h:405
MONITOR_OVLD_RWLOCK_SX_SPIN_ROUNDS
@ MONITOR_OVLD_RWLOCK_SX_SPIN_ROUNDS
Definition: srv0mon.h:464
MONITOR_SRV_MEM_VALIDATE_MICROSECOND
@ MONITOR_SRV_MEM_VALIDATE_MICROSECOND
Definition: srv0mon.h:452
MONITOR_LOG_FLUSH_TOTAL_TIME
@ MONITOR_LOG_FLUSH_TOTAL_TIME
Definition: srv0mon.h:354
MONITOR_FLUSH_BACKGROUND_TOTAL_PAGE
@ MONITOR_FLUSH_BACKGROUND_TOTAL_PAGE
Definition: srv0mon.h:221
MONITOR_OVLD_RWLOCK_S_SPIN_WAITS
@ MONITOR_OVLD_RWLOCK_S_SPIN_WAITS
Definition: srv0mon.h:459
MONITOR_OVLD_LSN_CHECKPOINT_AGE
@ MONITOR_OVLD_LSN_CHECKPOINT_AGE
Definition: srv0mon.h:344
MONITOR_INDEX_NON_LEAF_PAGE_READ
@ MONITOR_INDEX_NON_LEAF_PAGE_READ
Definition: srv0mon.h:248
MONITOR_ICP_OUT_OF_RANGE
@ MONITOR_ICP_OUT_OF_RANGE
Definition: srv0mon.h:496
MONITOR_OVLD_RWLOCK_SX_SPIN_WAITS
@ MONITOR_OVLD_RWLOCK_SX_SPIN_WAITS
Definition: srv0mon.h:461
MONITOR_TABLE_CLOSE
@ MONITOR_TABLE_CLOSE
Definition: srv0mon.h:136
MONITOR_INDEX_SPLIT
@ MONITOR_INDEX_SPLIT
Definition: srv0mon.h:411
MONITOR_TRX_ON_LOG_WAITS
@ MONITOR_TRX_ON_LOG_WAITS
Definition: srv0mon.h:308
MONITOR_UNDO_TRUNCATE_START_LOGGING_COUNT
@ MONITOR_UNDO_TRUNCATE_START_LOGGING_COUNT
Definition: srv0mon.h:332
MONITOR_FLUSH_BATCH_PAGES
@ MONITOR_FLUSH_BATCH_PAGES
Definition: srv0mon.h:187
MONITOR_LRU_BATCH_EVICT_COUNT
@ MONITOR_LRU_BATCH_EVICT_COUNT
Definition: srv0mon.h:231
MONITOR_OVLD_LOG_WRITES
@ MONITOR_OVLD_LOG_WRITES
Definition: srv0mon.h:352
monitor_value_t::mon_max_value_start
mon_type_t mon_max_value_start
Max value since start.
Definition: srv0mon.h:78
monitor_set_tbl
ulint monitor_set_tbl[(NUM_MONITOR+NUM_BITS_ULINT - 1)/NUM_BITS_ULINT]
This "monitor_set_tbl" is a bitmap records whether a particular monitor counter has been turned on or...
Definition: srv0mon.cc:1424
MONITOR_DISPLAY_CURRENT
@ MONITOR_DISPLAY_CURRENT
Display current value of the counter, rather than incremental value over the period.
Definition: srv0mon.h:95
MONITOR_INDEX_MERGE_ATTEMPTS
@ MONITOR_INDEX_MERGE_ATTEMPTS
Definition: srv0mon.h:412
monitor_info_t::monitor_type
monitor_type_t monitor_type
Type of Monitor Info.
Definition: srv0mon.h:539
MONITOR_SRV_PURGE_MICROSECOND
@ MONITOR_SRV_PURGE_MICROSECOND
Definition: srv0mon.h:453
mon_type_t
int64_t mon_type_t
Monitor counter value type.
Definition: srv0mon.h:55
monitor_running_t
enum monitor_running_status monitor_running_t
Definition: srv0mon.h:52
MONITOR_RSEG_HISTORY_LEN
@ MONITOR_RSEG_HISTORY_LEN
Definition: srv0mon.h:310
MONITOR_IBUF_FREELIST_PAGE_WRITTEN
@ MONITOR_IBUF_FREELIST_PAGE_WRITTEN
Definition: srv0mon.h:270
MONITOR_LRU_BATCH_FLUSH_AVG_PASS
@ MONITOR_LRU_BATCH_FLUSH_AVG_PASS
Definition: srv0mon.h:204
MONITOR_OVLD_IBUF_SIZE
@ MONITOR_OVLD_IBUF_SIZE
Definition: srv0mon.h:442
MONITOR_ZBLOB2_PAGE_READ
@ MONITOR_ZBLOB2_PAGE_READ
Definition: srv0mon.h:261
MONITOR_TRX_ROLLBACK_ACTIVE
@ MONITOR_TRX_ROLLBACK_ACTIVE
Definition: srv0mon.h:305
MONITOR_LOG_ON_BUFFER_SPACE_NO_WAITS
@ MONITOR_LOG_ON_BUFFER_SPACE_NO_WAITS
Definition: srv0mon.h:395
MONITOR_OVLD_SRV_PAGE_SIZE
@ MONITOR_OVLD_SRV_PAGE_SIZE
Definition: srv0mon.h:458
MONITOR_OVLD_MAX_AGE_SYNC
@ MONITOR_OVLD_MAX_AGE_SYNC
Definition: srv0mon.h:349
MONITOR_FLUSH_ADAPTIVE_COUNT
@ MONITOR_FLUSH_ADAPTIVE_COUNT
Definition: srv0mon.h:216
MONITOR_MODULE_DDL_STATS
@ MONITOR_MODULE_DDL_STATS
Definition: srv0mon.h:486
MONITOR_TABLELOCK_CREATED
@ MONITOR_TABLELOCK_CREATED
Definition: srv0mon.h:152
MONITOR_LOG_FLUSH_LSN_AVG_RATE
@ MONITOR_LOG_FLUSH_LSN_AVG_RATE
Definition: srv0mon.h:357
MONITOR_LRU_BATCH_FLUSH_AVG_TIME_SLOT
@ MONITOR_LRU_BATCH_FLUSH_AVG_TIME_SLOT
Definition: srv0mon.h:195
monitor_value_t::mon_value_reset
mon_type_t mon_value_reset
value at last reset
Definition: srv0mon.h:77
MONITOR_LOG_WRITE_NOTIFIER_WAITS
@ MONITOR_LOG_WRITE_NOTIFIER_WAITS
Definition: srv0mon.h:378
MONITOR_LOG_FLUSHER_WAIT_LOOPS
@ MONITOR_LOG_FLUSHER_WAIT_LOOPS
Definition: srv0mon.h:375
monitor_info_t::monitor_name
const char * monitor_name
Monitor name.
Definition: srv0mon.h:535
MONITOR_LRU_SINGLE_FLUSH_SCANNED_NUM_CALL
@ MONITOR_LRU_SINGLE_FLUSH_SCANNED_NUM_CALL
Definition: srv0mon.h:234
MONITOR_OVLD_LOCK_MAX_WAIT_TIME
@ MONITOR_OVLD_LOCK_MAX_WAIT_TIME
Definition: srv0mon.h:157
MONITOR_LOG_PARTIAL_BLOCK_WRITES
@ MONITOR_LOG_PARTIAL_BLOCK_WRITES
Definition: srv0mon.h:360
MONITOR_TRX_ROLLBACK
@ MONITOR_TRX_ROLLBACK
Definition: srv0mon.h:303
MONITOR_TABLE_OPEN
@ MONITOR_TABLE_OPEN
Definition: srv0mon.h:135
MONITOR_OVLD_LSN_CURRENT
@ MONITOR_OVLD_LSN_CURRENT
Definition: srv0mon.h:342
MONITOR_OS_PENDING_READS
@ MONITOR_OS_PENDING_READS
Definition: srv0mon.h:290
MONITOR_OVLD_PAGES_WRITTEN
@ MONITOR_OVLD_PAGES_WRITTEN
Definition: srv0mon.h:178
MONITOR_TRX_SYSTEM_PAGE_WRITTEN
@ MONITOR_TRX_SYSTEM_PAGE_WRITTEN
Definition: srv0mon.h:273
MONITOR_OVLD_BUF_POOL_READ_REQUESTS
@ MONITOR_OVLD_BUF_POOL_READ_REQUESTS
Definition: srv0mon.h:165
MONITOR_OVLD_ROW_LOCK_CURRENT_WAIT
@ MONITOR_OVLD_ROW_LOCK_CURRENT_WAIT
Definition: srv0mon.h:155
MONITOR_OVLD_OS_LOG_WRITTEN
@ MONITOR_OVLD_OS_LOG_WRITTEN
Definition: srv0mon.h:292
MONITOR_TABLELOCK_WAIT
@ MONITOR_TABLELOCK_WAIT
Definition: srv0mon.h:147
MONITOR_UNDO_TRUNCATE_FLUSH_COUNT
@ MONITOR_UNDO_TRUNCATE_FLUSH_COUNT
Definition: srv0mon.h:333
MONITOR_FLUSH_ADAPTIVE_TOTAL_PAGE
@ MONITOR_FLUSH_ADAPTIVE_TOTAL_PAGE
Definition: srv0mon.h:215
MONITOR_SAMPLED_PAGES_SKIPPED
@ MONITOR_SAMPLED_PAGES_SKIPPED
Definition: srv0mon.h:483
MONITOR_FLUSH_LSN_AVG_RATE
@ MONITOR_FLUSH_LSN_AVG_RATE
Definition: srv0mon.h:211
MONITOR_OVLD_BUF_POOL_PAGE_MISC
@ MONITOR_OVLD_BUF_POOL_PAGE_MISC
Definition: srv0mon.h:171
srv_mon_reset_all
UNIV_INLINE void srv_mon_reset_all(monitor_id_t monitor)
This function resets all values of a monitor counter.
MONITOR_LOG_WRITER_WAITS
@ MONITOR_LOG_WRITER_WAITS
Definition: srv0mon.h:368
MONITOR_FLUSH_ADAPTIVE_AVG_TIME_EST
@ MONITOR_FLUSH_ADAPTIVE_AVG_TIME_EST
Definition: srv0mon.h:199
MONITOR_OLVD_SYSTEM_ROW_UPDATED
@ MONITOR_OLVD_SYSTEM_ROW_UPDATED
Definition: srv0mon.h:478
MONITOR_FLUSH_ADAPTIVE_AVG_TIME_THREAD
@ MONITOR_FLUSH_ADAPTIVE_AVG_TIME_THREAD
Definition: srv0mon.h:197
MONITOR_RSEG_ARRAY_PAGE_READ
@ MONITOR_RSEG_ARRAY_PAGE_READ
Definition: srv0mon.h:262
MONITOR_FLUSH_ADAPTIVE_AVG_PASS
@ MONITOR_FLUSH_ADAPTIVE_AVG_PASS
Definition: srv0mon.h:203
srv_mon_reset
void srv_mon_reset(monitor_id_t monitor)
Reset a monitor, create a new base line with the current monitor value.
Definition: srv0mon.cc:2070
MONITOR_OVLD_IBUF_MERGE_INSERT
@ MONITOR_OVLD_IBUF_MERGE_INSERT
Definition: srv0mon.h:435
MONITOR_OVLD_IBUF_MERGE_DELETE
@ MONITOR_OVLD_IBUF_MERGE_DELETE
Definition: srv0mon.h:436
MONITOR_UNDO_TRUNCATE_DONE_LOGGING_COUNT
@ MONITOR_UNDO_TRUNCATE_DONE_LOGGING_COUNT
Definition: srv0mon.h:335
MONITOR_UNDO_LOG_PAGE_READ
@ MONITOR_UNDO_LOG_PAGE_READ
Definition: srv0mon.h:251
MONITOR_LRU_BATCH_FLUSH_AVG_TIME_THREAD
@ MONITOR_LRU_BATCH_FLUSH_AVG_TIME_THREAD
Definition: srv0mon.h:198
monitor_value_t::mon_stop_time
ib_time_t mon_stop_time
Stop time of monitoring.
Definition: srv0mon.h:72
MONITOR_FLUSH_ADAPTIVE_PAGES
@ MONITOR_FLUSH_ADAPTIVE_PAGES
Definition: srv0mon.h:217
ib_time_t
time_t ib_time_t
Time stamp.
Definition: ut0ut.h:85
MONITOR_TABLE_REFERENCE
@ MONITOR_TABLE_REFERENCE
Definition: srv0mon.h:137
MONITOR_OVLD_LOG_WAITS
@ MONITOR_OVLD_LOG_WAITS
Definition: srv0mon.h:350
monitor_info_t::monitor_related_id
monitor_id_t monitor_related_id
Monitor ID of counter that related to this monitor.
Definition: srv0mon.h:540
MONITOR_INDEX_DISCARD
@ MONITOR_INDEX_DISCARD
Definition: srv0mon.h:416
MONITOR_UNDO_TRUNCATE
@ MONITOR_UNDO_TRUNCATE
Definition: srv0mon.h:328
MONITOR_TRX_ON_LOG_WAIT_LOOPS
@ MONITOR_TRX_ON_LOG_WAIT_LOOPS
Definition: srv0mon.h:309
MONITOR_FLUSH_BATCH_TOTAL_PAGE
@ MONITOR_FLUSH_BATCH_TOTAL_PAGE
Definition: srv0mon.h:185
MONITOR_OVLD_BUF_POOL_PAGES_FREE
@ MONITOR_OVLD_BUF_POOL_PAGES_FREE
Definition: srv0mon.h:176
MONITOR_LOG_WRITE_TO_FILE_REQUESTS_INTERVAL
@ MONITOR_LOG_WRITE_TO_FILE_REQUESTS_INTERVAL
Definition: srv0mon.h:385
MONITOR_LRU_UNZIP_SEARCH_SCANNED_NUM_CALL
@ MONITOR_LRU_UNZIP_SEARCH_SCANNED_NUM_CALL
Definition: srv0mon.h:242
MONITOR_IBUF_BITMAP_PAGE_READ
@ MONITOR_IBUF_BITMAP_PAGE_READ
Definition: srv0mon.h:254
monitor_value_t::mon_status
monitor_running_t mon_status
Definition: srv0mon.h:82
MONITOR_ONLINE_CREATE_INDEX
@ MONITOR_ONLINE_CREATE_INDEX
Definition: srv0mon.h:488
MONITOR_MODULE_ICP
@ MONITOR_MODULE_ICP
Definition: srv0mon.h:493
MONITOR_OVLD_SRV_DBLWR_WRITES
@ MONITOR_OVLD_SRV_DBLWR_WRITES
Definition: srv0mon.h:456
MONITOR_OVLD_BYTE_READ
@ MONITOR_OVLD_BYTE_READ
Definition: srv0mon.h:180