Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- eparator="---------------------------------------------------------------------------------"
- top -b -n2 -d 0.90 | awk ' /^top/ { i++ } i == 2 {print }'|head -n 13|tail -n +3 >/dev/shm/tmpA.stdin &
- pid1=$!
- #IOTOP=$(iotop -d 0.5 --batch -n 2 -P 2>/dev/null) ; echo "$IOTOP"|grep "Total DISK READ" -A5|tail -n 6 >/tmp/B.stdin &
- iotop -d 1.3 --batch -n 2 -P 2>/dev/null |grep "Total DISK READ\:" -A5|tail -n 10|grep -vi 'grep\|sadc\|less\|cut\|bwm' |grep "Total DISK READ\:" -A5 >/dev/shm/tmpB.stdin &
- pid2=$!
- echo "iface Rx Tx Total" >/dev/shm/tmpC.stdin
- bwm-ng -I eth0,eth1 -o plain -c 1 -N -t 1500|grep -i eth|cut -b 12- >>/dev/shm/tmpC.stdin &
- pid3=$!
- grep -v "MARK\|Disabled Privacy Extensions" /var/log/messages.log|tail -n 8 >/dev/shm/tmpD.stdin &
- pid4=$!
- nbtscan 192.168.117.1-254 -t 1 -r|grep -vi "ILC" |tail -n +5 >/dev/shm/tmpE.stdin &
- pid5=$!
- df -h|grep ' /\|File'|grep -vi 'udev\|infserv\|/dev/shm\|/mnt/nas' >/dev/shm/tmpF.stdin &
- pid6=$!
- wait $pid1
- wait $pid2
- wait $pid3
- wait $pid4
- wait $pid5
- wait $pid6
- A=$(cat /dev/shm/tmpA.stdin)
- B=$(cat /dev/shm/tmpB.stdin)
- C=$(cat /dev/shm/tmpC.stdin)
- D=$(cat /dev/shm/tmpD.stdin)
- E=$(cat /dev/shm/tmpE.stdin)
- F=$(cat /dev/shm/tmpF.stdin)
- echo -e "\
- [TOP] \n$eparator\n$A\n\n\
- [IOTOP] \n$eparator\n$B\n\n\
- [BWM-NG] \n$eparator\n$C\n\n\
- [DMESG] \n$eparator\n$D\n\n\
- [NBTSCAN] \n$eparator\n$E\n\n\
- [DISK FREE]\n$eparator\n$F\n\n\
- "\
- |cut -b 1-80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement