1. 程式人生 > 其它 >java併發資料結構之CopyOnWriteArrayList

java併發資料結構之CopyOnWriteArrayList

邏輯卷uuid查詢

[root@controller2 ~]# vgs -o name --noheadings
cl
[root@controller2 ~]# vgs -o name,uuid --noheadings
cl 0TXkYz-gw09-rgwb-Oj5Z-V4rM-zz2u-E90iMl
[root@controller2 ~]# vgs -o name,uuid
VG VG UUID
cl 0TXkYz-gw09-rgwb-Oj5Z-V4rM-zz2u-E90iMl
[root@controller2 ~]# lvs -o name,uuid
LV LV UUID
home g73qwR-6rJR-T0lA-lelz-pl2n-AR3a-xH7Prh
root 5lEabG-Yc8o-AJX8-bjix-O5cI-xEdY-pCu2H0
swap KvM6Dn-Hdf0-OUc8-5EZC-2tjH-SjGq-OHlb7P
[root@controller2 ~]# pvs -o name,uuid
PV PV UUID
/dev/sda3 jWMe7W-BnA6-Yw6O-7Pza-9hPP-v350-W4gt05
[root@controller2 ~]#

新安裝的系統初始化(清空yum檔案,清空log,清空tmp;清理root目錄;重新整理dns,重新整理網絡卡mac地址對應關係,重新整理遠端記錄)

{
find /etc/yum.repos.d /var/lib/dhclient /var/log /tmp -type f
find /root \( -name .bash_history -o -name authorized_keys -o -name anaconda-ks.cfg \)
find /etc \( -name resolv.conf -o -name 70-persistent-net.rules -o -name "ssh_host_*
" \) } | xargs rm -f touch /var/log/wtmp

redhat系列-linux改系統標識

echo 'Santia-god test_8.5 OS' > /etc/issue
ls /etc/*-release|egrep -v '/etc/system-release|/etc/os-release'|xargs rm -rf
sed -i 's/CentOS/Santia-god/g' /etc/{system,os}-release

rc.local只執行一次(刪除ks檔案,開機改ip)

### rc.local
cat <<'EOF' >> /etc/rc.d/rc.local
#START#
find /root -type f -name \*-ks.cfg -exec rm -f {} \; find /tmp -type f -name ks-\* -exec rm -f {} \; find /var/log \( -name anaconda -o -name installer.log \) -exec rm -rf {} \; ### Network nmcli -g UUID con | xargs -I{} nmcli con down {} nmcli -g UUID con | xargs -I{} nmcli con del {} IF2=$(nmcli -g DEVICE dev | grep -v lo | head -1) if [ -n "$IF2" ]; then nmcli con add type ethernet ifname $IF2 con-name $IF2 nmcli con mod $IF2 ipv4.method manual ipv4.addr 192.168.1.10/24 nmcli con mod $IF2 ipv4.gateway 192.168.1.1 autoconnect yes nmcli con reload nmcli con up $IF2 fi IF3=$(nmcli -g DEVICE dev | grep -v lo | tail -n +2 | head -1) if [ -n "$IF3" ]; then nmcli con add type ethernet ifname $IF3 con-name $IF3 nmcli con mod $IF3 ipv4.method manual ipv4.addr 10.10.1.10/24 autoconnect yes nmcli con reload nmcli con up $IF3 fi chmod -x /etc/rc.d/rc.local sed -i '/^#START#$/,/^#END#$/d' /etc/rc.d/rc.local #END# EOF
chmod +x /etc/rc.d/rc.local

系統調優

### Kernel Tuning
cat > /etc/sysctl.d/98-thesys.conf <<-\EOF_SYSCTL
kernel.sem = 4010 641600 4010 1024
fs.aio-max-nr = 1048576
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65501
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 1048576
net.core.wmem_max = 1048576
vm.swappiness = 0    #禁用swap交換空間
vm.dirty_background_bytes=102400000
vm.dirty_bytes=409600000
vm.min_free_kbytes=512000
kernel.pid_max = 4194303
EOF_SYSCTL

cat > /etc/security/limits.d/20-nofile.conf <<-\EOF_LIMITS
*       soft    nproc   131072
*       hard    nproc   131072
*       soft    nofile  131072
*       hard    nofile  131072
EOF_LIMITS

nmcli抓取網絡卡uuid

[root@controller2 ~]# nmcli c s
NAME UUID TYPE DEVICE
ens192 a5da65b0-5136-416a-9bdd-55db0ce94ef6 ethernet ens192
ens224 8e8f76cc-1f83-4071-881b-5ed665d14895 ethernet --
[root@controller2 ~]# nmcli -g UUID con
a5da65b0-5136-416a-9bdd-55db0ce94ef6
8e8f76cc-1f83-4071-881b-5ed665d14895
[root@controller2 ~]# nmcli -g NAME,UUID con
ens192:a5da65b0-5136-416a-9bdd-55db0ce94ef6
ens224:8e8f76cc-1f83-4071-881b-5ed665d14895
[root@controller2 ~]#