How to reset BMC to factory default by command(AMI code)
#ipmitool raw 0x32 0x66
2020年6月7日 星期日
2020年6月3日 星期三
How to change Centos 7 run level graphic<=>text
How to change Centos 7 run level graphic<=>text
1. Check current run level
#systemctl get-default
2. Change run level from graphic to text
#systemctl set-default multi-user.target
#init 6
3. Change run level from text to graphic
#systemctl set-default graphical.target
#init 6
---------------------------------------
[Centos 6]
1.Change run level from graphic to text
#vim /etc/inittab
id:3:initdefault:
2. Change run level from text to graphic
#vim /etc/inittab
id:5:initdefault:
1. Check current run level
#systemctl get-default
2. Change run level from graphic to text
#systemctl set-default multi-user.target
#init 6
3. Change run level from text to graphic
#systemctl set-default graphical.target
#init 6
---------------------------------------
[Centos 6]
1.Change run level from graphic to text
#vim /etc/inittab
id:3:initdefault:
2. Change run level from text to graphic
#vim /etc/inittab
id:5:initdefault:
2020年5月14日 星期四
How to check hardware information (CPU/MEM/Disk/PCIE card) by command under linux
How to check hardware information (CPU/MEM/Disk/PCIE card) by command under linux
How many physical cpu install
# cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
2
Cpu core number
# cat /proc/cpuinfo| grep "cpu cores"| uniq
cpu cores : 2
#cat /sys/devices/cpu/caps/pmu_name
How many physical cpu install
# cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
2
# cat /proc/cpuinfo| grep "cpu cores"| uniq
cpu cores : 2
# cat /proc/cpuinfo| grep "cpu cores"| uniq | awk {'print $4'}
2
Total CPU logical core
# cat /proc/cpuinfo| grep "processor"| wc -l
4
CPU model
#cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
4 Intel(R) Xeon(R) Platinum 8170 CPU @ 2.10GHz
# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c | awk {'print $5'}
8170
CPU code name
#cat /sys/devices/cpu/caps/pmu_name
Skylake , Haswell
CPU TDP (Need PTU linux tool)
./ptumon -s | grep -i "package tdp" | awk {'print$4'}
CPU turbo frequency
#dmidecode | grep -I "max speed" | tr -d "\n" | awk {'print$3'}
#dmidecode | grep -I "max speed" | tr -d "\n" | awk {'print$3'}
memory brand:
#dmidecode -t memory | grep -i manufacturer | tr -d "\n" | awk {'print$2'}
memory model
#dmidecode -t memory | grep -i part | tr -d "\n" | awk {'print$3'}
memory single size
#dmidecode -t memory | grep -i size | tr -d "\n" | awk {'print$2'}
memory speed
#dmidecode -t memory | grep -i speed | tr -d "\n" | awk {'print$2'}
memory type & speed
# lshw | grep -i *-bank:0 -A 2 | sed '2!d' | awk {'print$3"-"$5'}
DDR4-2666
memory total size
#lshw -class memory | grep -i "system memory" -A 5 | sed '4!d' | awk {'print$2'}
memory slots
#midecode -t memory | grep -i part | wc -l
Disk model
#lsblk --nodeps -o model | sed '2!d'
Detail disk information
#smart -a /dev/yourdrive
Disk IO performance
#iostat -m
PCIE card
# lspci | grep -i ethernet ; lspci | grep -i raid ; lspci | grep -i vga
Disk model
#lsblk --nodeps -o model | sed '2!d'
Detail disk information
#smart -a /dev/yourdrive
Disk IO performance
#iostat -m
PCIE card
# lspci | grep -i ethernet ; lspci | grep -i raid ; lspci | grep -i vga
2020年5月12日 星期二
Sysbench
Sysbench
Setup :
Setup :
#yum -y remove mariadb-libs
#yum install mysql-community-server -y
#yum install mysql-community-devel.x86_64
#service mysqld restart
#tar zxvf sysbench-0.4.12.14.tar.gz
#cd sysbench-0.4.12.14
#./autogen.sh
#./autogen.sh
#./configure --with-mysql
#make
#make install
-------------------------------------------------------------------------------
Running:
CPU benchmark
#sysbench --test=cpu --cpu-max-prime=20000 --max-time=120 run
Memory benchmark
#sysbench --test=memory --max-time=120 run
IO benchmark
#sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw prepare
#sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw run
Clean the test file
#sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw cleanup
MySQL benchmark
#vim /etc/my.cnf
add new line under [mysqld]
skip-grant-tables
# service mysqld restart
#mysql -u root -p
Input Aa123456
mysql>create database sbtest;
Execute in another terminal
#sysbench --test=oltp --db-driver=mysql --oltp-table-size=10000 --mysql-db=sbtest --mysql-user=root --mysql-password=Aa123456 prepare
#sysbench --test=oltp --db-driver=mysql --oltp-table-size=10000 --mysql-db=sbtest --mysql-user=root --mysql-password=Aa123456 run
Clean the test file
#sysbench --test=oltp --db-driver=mysql --oltp-table-size=10000 --mysql-db=sbtest --mysql-user=root --mysql-password=Aa123456 cleanup
Unixbench
Unixbench
https://code.google.com/archive/p/byte-unixbench/downloads
(download 5.1.3 version)
#./Run
It will run about 1 hour.
https://code.google.com/archive/p/byte-unixbench/downloads
(download 5.1.3 version)
#tar zxvf unixbench-5.1.3.tar.gz
#cd unixbench-5.1.3
#make#./Run
It will run about 1 hour.
GPU burn
GPU burn
Install driver
Install cuda
Check all well by listing your GPUs (Command 1 below) and checking the properties of GPUs ( Command 2 below) , and checking nvcc is setup (Command 3 below). If you don’t get a meaningful response, most likely something is off with your environment variables or worst case your driver / CUDA version
- nvidia-smi
- nvidia-smi -q
- nvcc -V
Download gpu burn from
#unzip gpu-burn-master.zip
#cd gpu-burn-master
#make
Running GPU Burn (Few example commands below)
- ./gpu_burn (Single precision GPU burn for 10 seconds)
- ./gpu_burn -d ( Double precision GPU burn for 10 seconds)
- ./gpu_burn 120 (Single precision GPU burn for 120 seconds)
2020年3月16日 星期一
Intel X710 OCP has confusing name device manager
Intel X710 OCP has confusing name device manager
The OCP have two ports , and it show different name under BIOS.
The windows os device manager also follow the different name.
1st Port: Intel(R) Ethernet Controller X710 for 10GbE SFP+ Other Ports: Intel(R) Ethernet Converged Network Adapter X710
This is known issue.
From Intel document, https://downloadcenter.intel.com/download/22283/Intel-Ethernet-Adapter-Complete-Driver-Pack => Please refer to the "Adapter User Guide.pdf" from the driver package
search "correct branding". in this pdf.
Compatibility Notes
Devices based on the Intel Ethernet Controller XL710 (4x10 GbE, 1x40 GbE, 2x40 GbE) have an expected
total throughput for the entire device of 40 Gb/s in each direction.
The first port of Intel® Ethernet Controller 700 Series based adapters will display the correct branding string.
All other ports on the same device will display a generic branding string.
2020年3月5日 星期四
How to Check CPU L2, L3 Cache Size on Windows
How to Check CPU L2, L3 Cache Size on Windows
#wmic cpu get L2CacheSize, L3CacheSize
2020年1月30日 星期四
How to check CPU&memory loading under ubuntu
How to check CPU&memory loading under ubuntu
Memory
#free -m
CPU
#top
Or install sw
#sudo apt-get install htop
#htop
Memory
#free -m
CPU
#top
Or install sw
#sudo apt-get install htop
#htop
2020年1月29日 星期三
Missing libraries in Ubuntu when running burnin test
Missing libraries in Ubuntu when running burnin test
System have to connect to Internet
#sudo apt-get install libqt5opengl5 libqt5printsupport5 libcurl4
System have to connect to Internet
#sudo apt-get install libqt5opengl5 libqt5printsupport5 libcurl4
2020年1月14日 星期二
Simple dd command to test HDD read/write performance under linux
Simple dd command to test HDD read/write performance under linux 2021/02/22 update
Read
#dd oflag=direct if=/dev/zero of=/mnt/test bs=512k count=20000
Write
#dd iflag=direct if=/mnt/test of=/dev/null bs=512k count=20000
If you want to test different disk, you can mount /mnt to diffect /dev/sdx
#mkfs -t ext4 /dev/sdb1
#mount /dev/sdb1 /mnt
How to fix /lib64/libc.so.6: version `GLIBC_2.15' not found
How to fix /lib64/libc.so.6: version `GLIBC_2.15' not found
1.
wget https://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz
1.
wget https://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz
2.
# tar -zxvf glibc-2.15.tar.gz
# cd glibc-2.15
# mkdir build;
# cd build
# ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
# make -j 8
# make install
2020年1月13日 星期一
How to install/uninstall/launch LSI/Avago MSM utility under Linux
How to install/uninstall/launch LSI/Avago MSM utility under Linux
install
#./install.csh -a
launch
# cd /user/local/MegaRAID Storage Manager
#./startupui.sh
Uninstall
# cd /user/local/MegaRAID Storage Manager
#./uninstaller.sh
install
#./install.csh -a
launch
# cd /user/local/MegaRAID Storage Manager
#./startupui.sh
Uninstall
# cd /user/local/MegaRAID Storage Manager
#./uninstaller.sh
2019年11月20日 星期三
When execute sh script under linux, /bin/sh^M:bad interpreter:No such file or directory
When execute sh script under linux, /bin/sh^M:bad interpreter:No such file or directory
Root Cause:
The file has been modify under windows.
#vim file name
:set ff
Check if fileformat=dos
Fixed:
:set ff=unix
:wq
Run script again.
Root Cause:
The file has been modify under windows.
#vim file name
:set ff
Check if fileformat=dos
Fixed:
:set ff=unix
:wq
Run script again.
2019年11月17日 星期日
Commad line flash BIOS/BMC fw(AMI code base)
Commad line flash BIOS/BMC fw
/Flash
Method
|
Command line (Local)
| |
EFI Shell
|
Windows
| |
BIOS
|
AfuEfix64.efi BIOS.bin /b /p /n /x
|
afuwinx64.exe BIOS.bin /b /p /n /x
|
BMC
|
socflash -s BMC.bin
|
yafuflash.exe -cd BMC.ima
|
FW /Flash
Method
| Command line (Local) |
| Linux | |
| BIOS | ./afulnx_64 BIOS.bin /b /p /n /x |
| BMC | ./yafuflash -cd BMC.ima -vyes |
FW /Flash
Method
| Command line (Remote) |
| Windows Client | |
| BIOS |
Grantley:
yafuflash.exe -nw -ip [BMC_IP] -u username -p password -bios BIOS.bin
Purley:
yafuflash.exe -d 2-nw -ip [BMC_IP] -u username -p password BIOS.bin
|
| BMC | yafuflash.exe -nw -ip [BMC_IP] -u username -p password -full BMC.ima |
2019年11月13日 星期三
Windows remote shutdown/reboot
Windows remote shutdown/reboot
Reboot:
net use \\Remote IP /user:administrator password
shutdown -m \\\\Remote IP -r -f -t 3
Shutdown
net use \\Remote IP /user:administrator password
shutdown -m \\\\Remote IP -s -f -t 3
2019年11月12日 星期二
How to enable/disable ethernet by command under windows
How to enable/disable ethernet by command under windows
disable
netsh interface set interface "Ehternet" disabled
enable
netsh interface set interface "Ethernet" enabled
2019年11月11日 星期一
Reset BMC username/password by ipmitool locally
Reset BMC username/password by ipmitool locally
ipmitool raw 0x6 0x45 0x02 0x72 0x6F 0x6F 0x74 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
ipmitool raw 0x6 0x47 0x02 0x02 0x70 0x77 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
ipmitool raw 0x6 0x47 0x02 0x01
ipmitool raw 0x6 0x43 0x93 0x02 0x04 0x00
ipmitool raw 0x6 0x40 0x03 0x82 0x84
ipmitool raw 0x6 0x40 0x03 0x42 0x44
User will set to "root"
Password is "pw"
2019年11月6日 星期三
How to write a linux script with loop
How to write a linux script with loop
While true
do
XXXX (Command1)
sleep 2
XXXX (Command2)
done
------------------------------------------
Add count with color
------------------------------------------
Add count with color
While true
do
XXXX (Command1)
sleep 2
XXXX (Command2)
echo -e "\033[40;32m "This is $count times." \033[0m"
count =$(($count+1))
done
2019年10月30日 星期三
Hwo to make HDD IO on linux system
Hwo to make HDD IO on linux system
dd if=/dev/sdb of=/dev/null
This is to read disk, and you can check HDD LED behavior.
訂閱:
文章 (Atom)
TEMP-2026
123
-
Use AMISCE tool to update BIOS configuration under linux Test fucntion without change dump file 1.Copy SCELNX_64 to Linux_Flash folder 2...
-
123