-echo "Converting pkl files to phpserial"
-#########################
-# 4. convert pkl to php serialize format.
-${MONITOR_SCRIPT_ROOT}/pkl2php.py -i findbadpcus2 -o findbadpcus
-for f in act_all plcdb_hn2lb ; do
- if [ -f ${MONITOR_DATA_ROOT}/production.$f.pkl ]; then
- ${MONITOR_SCRIPT_ROOT}/pkl2php.py -i $f -o $f
- else
- echo "Warning: ${MONITOR_DATA_ROOT}/production.$f.pkl does not exist."
- fi
-done
-${MONITOR_SCRIPT_ROOT}/pkl2php.py -i findbad -o findbadnodes
-#${MONITOR_SCRIPT_ROOT}/pkl2php.py -i ad_dbTickets -o ad_dbTickets
-#${MONITOR_SCRIPT_ROOT}/pkl2php.py -i idTickets -o idTickets
-
-echo "Archiving pkl files"
-#########################
-# Archive pkl files.
-for f in findbad act_all findbadpcus l_plcnodes site_persistflags node_persistflags pcu_persistflags ; do
- if [ -f ${MONITOR_DATA_ROOT}/production.$f.pkl ] ; then
- cp ${MONITOR_DATA_ROOT}/production.$f.pkl ${MONITOR_ARCHIVE_ROOT}/`date +%F-%H:%M`.production.$f.pkl
- else
- echo "Warning: It failed to archive ${MONITOR_DATA_ROOT}/production.$f.pkl"
- fi
-done
-
-echo "Running grouprins on all dbg nodes"
-############################
-# 5. Check if there are any nodes in dbg state. Clean up afterward.
-${MONITOR_SCRIPT_ROOT}/grouprins.py --mail=1 --reboot --nodeselect 'state=DOWN&&boot_state=(boot|rins|dbg|diag)' --stopselect "state=BOOT" || :
-${MONITOR_SCRIPT_ROOT}/grouprins.py --mail=1 --reboot --nodeselect 'state=DEBUG&&boot_state=(rins|dbg|boot)' --stopselect 'state=BOOT' || :
+#${MONITOR_SCRIPT_ROOT}/statistics/add-google-record.py --email email --password password --database MonitorStats --sheet NodeHistory `${MONITOR_SCRIPT_ROOT}/statistics/get-records.py nodes`
+#${MONITOR_SCRIPT_ROOT}/statistics/add-google-record.py --email email --password password --database MonitorStats --sheet SiteHistory `${MONITOR_SCRIPT_ROOT}/statistics/get-records.py sites`