Use ip command to determine IP address ('hostname -I' does not work on all Linux systems)
Filter out multiple listing of the same btrfs volume Use mktemp for temp files (for times when the TA may be run outside of Splunk) If running rlog.sh outside of Splunk, use $HOME to store seek file Debian also uses apt Arch Linux uses pacman Add use of sudo -n for 'apt update' and 'pacman -Syy' vmstat uses "K paged out" Replace the use of 'sar' with netstat and vm_stat for MacOS
This commit is contained in:
parent
92ac2630a1
commit
07122cafad
18 changed files with 122 additions and 87 deletions
|
@ -66,11 +66,11 @@ elif [ "$KERNEL" = "AIX" ] ; then
|
|||
# shellcheck disable=SC2016
|
||||
FORMAT='{Name=$1; rxPackets_PS=$5; txPackets_PS=$7; rxKB_PS="?"; txKB_PS="?"}'
|
||||
elif [ "$KERNEL" = "Darwin" ] ; then
|
||||
CMD='sar -n DEV 1 2'
|
||||
CMD='eval ifconfig -a -u | awk "/^[^ \t]/{i=substr(\$1,1,length(\$1)-1)}/status: active/{print i}" | while read -r int; do netstat -bnI $int -w 1 | head -n3 | sed "s/^/$int/"; done'
|
||||
# shellcheck disable=SC2016
|
||||
FILTER='($0 !~ "Average" || $0 ~ "sar" || $2~/lo[0-9]|IFACE/) {next}'
|
||||
FILTER='$2~/^(input|packets)$/{next}'
|
||||
# shellcheck disable=SC2016
|
||||
FORMAT='{Name=$2; rxPackets_PS=$3; txPackets_PS=$5; rxKB_PS=$4/1024; txKB_PS=$6/1024}'
|
||||
FORMAT='{Name=$1; rxPackets_PS=$2; txPackets_PS=$5; rxKB_PS=$4/1024; txKB_PS=$7/1024}'
|
||||
elif [ "$KERNEL" = "HP-UX" ] ; then
|
||||
# Sample output: http://h20565.www2.hp.com/hpsc/doc/public/display?docId=emr_na-c02263324
|
||||
CMD='netstat -i 1 2'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue