-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCyclicLogs.sh
More file actions
39 lines (30 loc) · 864 Bytes
/
CyclicLogs.sh
File metadata and controls
39 lines (30 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# ******************************************************************************
# *
# * Copyright (c) 2021 Phoenix Contact GmbH & Co. KG. All rights reserved.
# * Licensed under the MIT. See LICENSE file in the project root for full license information.
# *
# ******************************************************************************
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
#s
SLEEP=100
##Enable MemoryLogging
MEMORYLOGGING=true
OPENSOCKETS=true
NETWORKSETTINGS=true
LARGEFILELOG=true
while true; do
if $MEMORYLOGGING; then
${SCRIPT_DIR}/MemoryLog.sh
fi
if $OPENSOCKETS; then
${SCRIPT_DIR}/CheckOpenSockets.sh
fi
if $NETWORKSETTINGS; then
${SCRIPT_DIR}/CheckNetworkSettings.sh
fi
if $LARGEFILELOG; then
${SCRIPT_DIR}/SearchLargeFiles.sh "/var/volatile/" "20"
fi
sleep $SLEEP
done