The output of du contains two items: the size of the directory and the directory name. Hence you have to parse the output stripping out the directory name, otherwise the expression -gt (integer comparison) fails. For example:
Code:
CHECK=$(du -bs /data/sflow_log | awk '{print $1}')
the -b option gives the size in bytes (otherwise default is kbytes) and the -s option prevents du to give the size of each subdirectory inside /data/sflow_log, resulting in a multi-line output. Finally the awk command extract the first field of the output line, that is the size only. Hope this helps.