queryHistData.sh 661 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. ROOT=$(cd `dirname $0`/../../../; pwd)
  3. cd $ROOT
  4. source $ROOT/shell/influxdb/common.sh
  5. pointCount=1
  6. pointIndex=1
  7. for days in 1 2 3 4 7 15 30 60 90 180
  8. do
  9. echo "----test query range days:$days"
  10. beginDate="2018-01-01 00:00:00"
  11. echo beginDate:beginDate
  12. endDate=$(date -d "${beginDate} ${days} days" +"%Y-%m-%d %H:%M:%S")
  13. echo endDate:$endDate
  14. java -cp ./lib/influxdb.jar demo.query.histQuery.QueryMultiPointHistData \
  15. --host $host --pointNamePrefix pointName1_ --pointCount $pointCount --pointIndex $pointIndex \
  16. --beginDate "$beginDate" --endDate "$endDate" \
  17. --showQueryResult 10 2>&1 | tee -a ./log/influxdb/out.log
  18. done