<commit_before>loggerb(){
  stamp=$(date '+%s')
  echo "${stamp} : $1" 2>&1 |tee -a $LOG_PATH
  #log to zabbix
  #zabbix_sender "hadoop.status $stamp $1"
}

get_date_folder(){
  echo "$(date +%Y%m%d_%H%M%S)"
}

zabbix_sender(){
  :
  #echo "al-1001 $1" | /home/pristine/share/aplic/zabbix/bin/zabbix_sender -c /home/pristine/share/aplic/zabbix/conf/zabbix_agentd_az.conf -T -i - 2>&1 > /dev/null
  #>> $LOG_PATH
}

restart_monit(){
  loggerb "Restarting Monit"

  stop_monit

  $DSH_C "mkdir -p $HDD" 2>&1 |tee -a $LOG_PATH
  $DSH_C "$vmstat -n 1 >> $HDD/vmstat-\$(hostname).log &" 2>&1 |tee -a $LOG_PATH
  $DSH_C "$bwm -o csv -I bond0,eth0,eth1,eth2,eth3,ib0,ib1 -u bytes -t 1000 >> $HDD/bwm-\$(hostname).log &" 2>&1 |tee -a $LOG_PATH
  $DSH_C "$sar -o $HDD/sar-\$(hostname).sar 1 >/dev/null 2>&1 &" 2>&1 |tee -a $LOG_PATH

  loggerb "Monit ready"
}

stop_monit(){
  loggerb "Stoping monit"
  $DSH_C "killall -9 $vmstat"   2> /dev/null |tee -a $LOG_PATH<commit_msg>Added get_cluster_disks()<commit_after>loggerb(){
  stamp=$(date '+%s')
  echo "${stamp} : $1" 2>&1 |tee -a $LOG_PATH
  #log to zabbix
  #zabbix_sender "hadoop.status $stamp $1"
}

get_date_folder(){
  echo "$(date +%Y%m%d_%H%M%S)"
}

zabbix_sender(){
  :
  #echo "al-1001 $1" | /home/pristine/share/aplic/zabbix/bin/zabbix_sender -c /home/pristine/share/aplic/zabbix/conf/zabbix_agentd_az.conf -T -i - 2>&1 > /dev/null
  #>> $LOG_PATH
}

get_cluster_disks() {
  if [ CLUSTER_DISKS ] ; then
    echo -e "$CLUSTER_DISKS"
  else
    logger "ERROR: CLUSTER_DISKS not set"
  fi
}


restart_monit(){
  loggerb "Restarting Monit"

  stop_monit

  $DSH_C "mkdir -p $HDD" 2>&1 |tee -a $LOG_PATH
  $DSH_C "$vmstat -n 1 >> $HDD/vmstat-\$(hostname).log &" 2>&1 |tee -a $LOG_PATH
  $DSH_C "$bwm -o csv -I bond0,eth0,eth1,eth2,eth3,ib0,ib1 -u bytes -t 1000 >> $HDD/bwm-\$(hostname).log &" 2>&1 |tee -a $LOG_PATH
  $DSH_C "$sar -o $HDD/sar-\$(hostname).sar 1 >/dev/null 2>&1 &" 2>&1 |tee -a $LOG_PATH

  loggerb "Monit ready"
}

stop_monit(){
  loggerb "Stoping monit"
  $DSH_C "killall -9 $vmstat"   2> /dev/null |tee -a $LOG_PATH
{'fraction_non_alphanumeric': 0.19779164666346616, 'fraction_numerical': 0.03456553048487758, 'mean_word_length': 3.6106194690265485, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6254514', 'n_tokens_mistral': 1032, 'n_tokens_neox': 982, 'n_words': 208}