++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
To watch CPU core interrupts:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/usr/bin/watch -d 'cat /proc/interrupts'
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
To increase WAN transfers, increase txqueuelen in eth interface:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
“For WAN transfers, it was discovered that a setting of 2,000 for the txqueuelen is sufficient to prevent any send stalls from occurring.”5 Default value for txqueuelen is 1000. I have successfully tested a value of 2500. Type the follow command to change it:
Example:
ifonfig eth4 txqueuelen 2500
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# To run the application or commands to a specific core "numactl"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#get the cpu physical core info from the below and use it in numactl.
less /proc/cpuinfo
numactl --physcpubind=1
Ex: numactl --physcpubind=1 top
This will run the top command using physical cpu core id "1"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#To Check the ethernet interface driver version:
ethtool -i eth0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#To get Inode number for a group a files in a folder
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
cd /test
stat * |grep -i -E 'File:'\|'Inode' | awk '{ if($3 == "Inode:") print " "$3" "$4; else print $0 }'
#Good Format:
stat * |grep -i -E 'File:'\|'Inode' | awk '{ if($3 == "Inode:") print "\t"$3" "$4; else print $1 $2 }' |awk 'NR%2{printf "%s ",$0;next;}1'
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#To process any operation line by line in do while loop:(Example)
filename=/tmp/file1.txt
while read -r line
do
name="$line"
echo "Name read from file - $name"
done < "$filename"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#To extract the logs between two timestamps
Example:
sort hiveserver2.log |sed -n '/2017-04-26 20:40:44/,/2017-04-26 20:43:44/p' >> extracted_file.log
or
sed -n '/2017-04-26 20:43:44/,/2017-04-26 20:43:44/p' hiveserver2.log >> extracted_file.log
cat hiveserver2_knox_25_april1 |grep -a '' |sort |sed -n '/2017-04-25 20:/,/2017-04-25 21:/p' > hiveserver2_8:30PM_9:30PM
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
##Monitor I/O using SAR command:
sar -d -p 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mac OS : converting delimiter $ to ','
perl -pi -w -e 's/\$/,/g;' test1.txt
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Hive Server(HS2) open files group by PID :-
grep 'open files' /proc/$(ps aux | grep -i "hiveserver2"|grep -v 'grep'| awk '{print $2}')/limits
lsof -u hive |awk '{print $2}' |uniq
lsof -u hive |awk '{print $2}' |sort |uniq -c
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
No comments:
Post a Comment