def check_journal_commits_in_wl(con, warning, critical, perf_data):
 warning = (warning or 10)
 critical = (critical or 40)
 try:
  data = get_server_status(con)
  j_commits_in_wl = data['dur']['commitsInWriteLock']
  message = ('Journal commits in DB write lock : %d' % j_commits_in_wl)
  message += performance_data(perf_data, [(j_commits_in_wl, 'j_commits_in_wl', warning, critical)])
  return check_levels(j_commits_in_wl, warning, critical, message)
 except Exception as e:
  return exit_with_general_critical(e)

def check_journal_commits_in_wl ( con , warning , critical , perf_data ) : warning = ( warning or 10 ) critical = ( critical or 40 ) try : data = get_server_status ( con ) j_commits_in_wl = data [ 'dur' ] [ 'commitsInWriteLock' ] message = ( 'Journal commits in DB write lock : %d' % j_commits_in_wl ) message += performance_data ( perf_data , [ ( j_commits_in_wl , 'j_commits_in_wl' , warning , critical ) ] ) return check_levels ( j_commits_in_wl , warning , critical , message ) except Exception as e : return exit_with_general_critical ( e )
checking the number of commits which occurred in the dbs write lock .