Change EPS for Telegraf

This commit is contained in:
Mike Reeves
2021-04-19 12:36:46 -04:00
parent af7b6af32f
commit 31f193c397
14 changed files with 255 additions and 263 deletions

View File

@@ -15,15 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
APP=checkfiles
lf=/tmp/$APP-pidLockFile
# create empty lock file if none exists
cat /dev/null >> $lf
read lastPID < $lf
# if lastPID is not null and a process with that pid exists , exit
[ ! -z "$lastPID" -a -d /proc/$lastPID ] && exit
echo $$ > $lf
THEGREP=$(ps -ef | grep $0 | grep -v grep)
FILES=$(ls -1x /host/nsm/faf/complete/ | wc -l)
if [ ! $THEGREP ]; then
echo "faffiles files=$FILES"
FILES=$(ls -1x /host/nsm/faf/complete/ | wc -l)
echo "faffiles files=$FILES"
else
exit 0
fi