cat ups.sh
#!/bin/bash
#作者:李国安
#创造日期:2024年3月31日
#脚本说明:1)可断点续传,2)对于分片表是单进程并行多线程执行统计更新,对于普通表是串行执行统计更新,3)没有变化的表不做统计更新
#gbasedbt执行定时任务crontab -e写入0 3 * * * . /home/gbase/.bash_profile && sh /home/gbase/ups.sh
############################## check ##############################################
#db env check
if [ "${GBASEDBTSERVER}x" == "x" ];
then
echo "GBASEDBTSERVER Environment variable error!!!";
exit 1;
fi
#db run check
db_is_running=$(onstat -|grep "Kbytes"|wc -l)
if [ ${db_is_running} -eq 0 ];
then
echo "GBASEDBTSERVER No running!!!";
exit 1;
fi
############################## function : ups ##############################################
ups(){
> ${dbName}.ups.sql
##1.high ups
#e