mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
15 lines
363 B
Bash
15 lines
363 B
Bash
#!/bin/bash
|
|
|
|
APP=influxsize
|
|
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
|
|
|
|
INFLUXSIZE=$(du -s -k /host/nsm/influxdb | awk {'print $1'})
|
|
|
|
echo "influxsize kbytes=$INFLUXSIZE"
|