2016年4月21日 星期四

How to create bmc flash cycle under dos

How to create bmc flash cycle under dos

[autoexec.bat]
Yafu.exe -kcs xxxx.bin -vyes
count
:bmc
ipmitool 20 00 02 02
goto bmc


You need put "Yafu.exe"  "count.exe" "ipmitool.exe" to your dos key
----------------------------------------------------------------------------
Or
[autoexec.bat]
Yafu.exe -kcs xxxx.bin -vyes
delay -s 120
count

ipmitool 20 00 02 02

You need put "Yafu.exe" "delay.exe"  "count.exe" "ipmitool.exe" to your dos key

2016年4月13日 星期三

How to create samba share folder under RHEL linux for stress

How to create samba share folder under RHEL linux for stress


1.Disabling SELinux
#vim /etc/selinux/config
SELINUX=disabled
save then reboot
#init 6

2.#mkdir /mnt/stress

#chmod 777 stress
#vim /etc/samba/samba.conf

security = share

[stress]
path = /mnt/stress
browseable = yes 
read only = no
writable = yes 
create mode = 0777 
directory mode = 0777
guest ok = yes
guest only = yes


#service smb restart
3.#service iptables stop


2016年2月3日 星期三

Could Not Find Trusted Signer Error While Installing VIBs in VMware vSphere ESXi 5.x

Could Not Find Trusted Signer Error While Installing VIBs in VMware vSphere ESXi 5.x


ould not find a trusted signer
Add the --no-sig-check switch to your command when installing the VIB.

Example : # esxcli software vib install -d /vmfs/volumes/datastore1/offline-bundle.zip --no-sig-check


2016年1月13日 星期三

How to mount usb device to ESXi

How to mount usb device to ESXi

1.) Stop the usbarbitrator service by running this command
/etc/init.d/usbarbitrator stop
2.) Disconnect and reconnect the usb device. The device might be automatically mounted under
/vmfs/volumes/NO NAME/ (just navigate here to export or import your files)
**) If not automatically mounted, use the following commands to find out where the device is connected to (e.g. /dev/sda1)
fdisk -l
tail /var/log/messages
To mount the device, first create a folder
mkdir /ExtUSB
mount the device with
mount -t ext3 /dev/sda1 /ExtUSB/
3.) After using the device, run the following command to start the usbarbitrator service
/etc/init.d/usbarbitrator start

2016年1月11日 星期一

How to list BMC sensor

How to list BMC sensor
#ipmitool.exe -I lanplus -H 192.168.1.227 -U admin -P admin -v sdr
#ipmitool.exe -I lanplus -H 192.168.1.227 -U admin -P admin sdr
#ipmitool.exe -I lanplus -H 192.168.1.227 -U admin -P admin sensor
#ipmitool.exe -I lanplus -H 192.168.1.227 -U admin -P admin sensor get "XXXX"

2015年11月17日 星期二

2015年10月20日 星期二

How to check BMC ip by windows local ipmi command

How to check BMC ip by windows local ipmi command

#ipmitool -I ms lan print 1
               (-Interface)

How to check fru data by windows local ipmi command

How to check fru data by windows local ipmi command

Under windows to check fru by ipmi command
#ipmitool -I ms fru print 0






Dump current system fru data

#ipmitool   -I ms  fru read 0 fru.bin
#ipmitool   -I ms  fru print

All fru data will be saved in "fru.bin".

2015年10月19日 星期一

How to update Intel i350 fw & MAC address

How to update Intel i350 fw


Boot to UEFI shell
#eeupdate64e.efi /D I350BT2_0324.hex /NIC=1

 MAC address
#eeupdate64e.efi  /NIC=1 /MAC=665544332211
#eeupdate64e.efi  /NIC=2 /MAC=665544332212

After flash completely, AC system

2015年9月10日 星期四

How to flash LSI 2308 fw

How to flash LSI 2308 fw


Boot to UEFI shell, enter to sas2flash tool folder
sas2flash -o -e 7                                                         # Clear all image in flash.#
sas2flash -o -f xxxx.fw                                        # Flash FW.  #
sas2flash -b mptsas2.rom                                           #Flash BIOS.

sas2flash -o -sasadd 0000111122225678                #Flash SAS address.#

2015年8月16日 星期日

linux Console_Redirection -RHEL 7.x

linux Console_Redirection -RHEL 7.0





7.5 above

1.Configuring GRUB 2
#vim /etc/default/grub
GRUB_TERMINAL="serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"

2.Add console=ttyS0,115200n8 to kermel
legacy mode
#vim /etc/grub2.cfg
linux16      /vmlinuz-3.10.0-0.rc4.59.el7.x86_64 root=/dev/mapper/rhel-root ro rd.md=0 rd.dm=0 rd.lvm.lv=rhel/swap crashkernel=auto rd.luks=0 vconsole.keymap=us rd.lvm.lv=rhel/root rhgb quiet
console=tty0 console=ttyS0,115200n8

UEFI mode
#vim /etc/grub2-efi.cfg
linux16      /vmlinuz-3.10.0-0.rc4.59.el7.x86_64 root=/dev/mapper/rhel-root ro rd.md=0 rd.dm=0 rd.lvm.lv=rhel/swap crashkernel=auto rd.luks=0 vconsole.keymap=us rd.lvm.lv=rhel/root rhgb quiet
console=tty0 console=ttyS0,115200n8

3.If BIOS is legacy mode
#grub2-mkconfig -o /boot/grub2/grub.cfg
If BIOS is UEFI mode
#grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
4.Reboot



-------------------------------------------------------------------
7.0
1.Configuring GRUB 2
#vim /etc/default/grub
GRUB_TERMINAL="serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"

2.Add console=ttyS0,115200n8 to kermel
#vim /etc/grub2.cfg
linux16      /vmlinuz-3.10.0-0.rc4.59.el7.x86_64 root=/dev/mapper/rhel-root ro rd.md=0 rd.dm=0 rd.lvm.lv=rhel/swap crashkernel=auto rd.luks=0 vconsole.keymap=us rd.lvm.lv=rhel/root rhgb quiet
console=tty0 console=ttyS0,115200n8

3.If BIOS is legacy mode
#grub2-mkconfig -o /boot/grub2/grub.cfg
If BIOS is UEFI mode
#grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
4.Reboot




2015年8月6日 星期四

How to check/install RAID(LSI 2308) driver under ESXi

How to check RAID(LSI 2308) driver version under ESXi

Check driver version
#esxcli storage core adapter list
#esxcli software vib list | grep mpt2sas


Upload driver package to ESXi (By vsphere or USB key)
#esxcli software vib install –viburl file:/tmp/DRIVERVERSION.vib

2015年5月31日 星期日

How to install RHEL 7/ SLES 11 12 UEFI mode with ESRT2 raid

How to install RHEL 7/ SLES 11 12 UEFI mode with ESRT2 raid

RHEL 7.x UEFI
linuxefi /images/pxeboot/vmlinuz XXXXXXXXXXXXXXXXXXXXX quiet dd modprobe.blacklist=achi,isci nodmraid

SLES 12 UEFI
1.press "e" to edit command
2. linuxefi /boot/x86_64/loader/linux splash=silent driverupdate=1 brokenmodules=achi



SLES 11 UEFI
1. press "e" to edit command
2. linuxefi /boot/x86_64/loader/linux driverupdate=1 brokenmodules=ahci

2015年4月22日 星期三

效率達人用的Excel

C01
Tip02:快速複製上方及左方的資料
 [Ctrl + D] 鍵可快速複製上方儲存格,而[Ctrl+R]鍵則可快速複製左方儲存格的資料
Tip03:快速輸入日期與時間
 [Ctrl +;] 鍵即可快速插入今天的日期,而按下[Ctrl+Shift+;] 鍵則可以快速輸入現在的時間
Tip05:快速選取表格中的欄/列
 [Ctrl+Shift+方向]鍵,如此該儲存格之後到資料結束的欄或列,就會呈現被選取起來的狀態
Tip06:快速移到目前資料區域的邊緣
[Ctrl+方向] 鍵,就能快速進行移動到表格的上下左右的位置
Tip07:快速移到工作表開始處與最右下角輸入有資料的儲存格
若想要快速移動至右下角輸入有資料的儲存格時,按[Ctrl+End]鍵
[Ctrl+Home]鍵則可以將目前選取中的儲存格位置立刻改為工作表開始處
Tip09:快速移到上一個或下一個工作表
首先選取活頁簿中的任一工作表,利用[Ctrl+PgDn]鍵跳至下一個工作表,若是要跳至上一個緊鄰的工作表可以利用[Ctrl+PgUp]
Tip10:快速插入新的工作表
直接在鍵盤上按下[Shift+F11]鍵,Excel馬上就幫你新增一個工作表
Tip13:快速插入SUM函數
[Alt+ =]鍵
Tip15:快速顯示[插入函數]對話方塊
[Shift+F3]
Tip16:快速顯示開啟[儲存格格式]對話方塊
[Ctrl+1]  1=>數字
Tip17:快速變更成百分比格式
[常用]索引標籤內的%,或是[Ctrl+Shift+%]
Tip18:快速去除儲存格的框線
[Ctrl+Shift+_ ]
Tip23:快速繪製出直條圖
選取圖表的資料來源後,按下F11
Tip24:快速執行重複動作
F4
------------------------------------------------------------------------------------
C03
Tip01:利用浮動工具列設定格式
對儲存格點選右鍵,在畫面上就會顯示出浮動工具列
Tip07:對儲存格設定漸層顏色
選取儲存格的狀態下按下[常用]索引標籤=>字型群組內右下角的"".此時,當跳出[儲存格格式]對話方塊後切換到[填滿]索引標籤中.當再按下[填滿效果]按鈕時,則就會出現[填滿效果]對話方塊.在[色彩1]與[色彩2]中分別指定想要呈現出的2個顏色,並指定下方的[網底樣式]與[變化],確定好範例中呈現的效果後按下[確定]按鈕
Tip08:輸入不影響儲存格的長篇文章
按下[插入]索引標籤=>[文字]群組=>[文字方塊]按鈕"",利用滑鼠拖曳出文字方塊的大小
為了不讓文字方塊的外框顯示出來,要在選取文字方塊的狀態下,在[繪圖工具-格式]索引標籤=>[圖案樣式]群組中,將[圖案外框]設定成[白色,背景1]
Tip09:Excel直接幫你做心算
直接選取你想進行計算的儲存格,看看右下角的地方,是不是有看到Excel已經幫你把平均值.個數.加總等都顯示出來了
--------------------------------------------------------------------------------------
C04
Tip04:套用預設的格式化為表格
[Ctrl+L] 或 [Ctrl+T]
Tip05:將表格轉換為一般的範圍
按下[資料表工具-設計]索引標籤=>[工具]群組=>[轉換為範圍]按鈕,在跳出的確認方塊點選[是]按鈕,即可將表格轉換為一般範圍
Tip06:以橫條來顯示數值大小
利用滑鼠選取想要顯示出資料橫條的儲存格範圍, 按下[常用]=>[樣式]群組=>[設定格式化的條件]按鈕,然後在[資料橫條]選向下選擇想要的橫條色彩
Tip07:強調其數值大於特定值的儲存格
選取儲存格範圍後,按下[常用]索引標籤=>樣式群組=>[設定格式化的條件]按鈕=>[醒目顯示儲存格規則]選項=>[大於]選項
Tip08:強調前幾名或後幾名的資料
選擇[常用]=>[樣式]群組=>設定格式化的條件按鈕=>[頂端/底端項目規則]=>[前10個項目]選項
Tip13:預防錯誤的資料驗證功能
按下[資料]索引標籤=>[資料工具]群組=>[資料驗證]按鈕"",顯示[資料驗證]對話方塊
Tip14:製作下拉式選單
按下[資料]索引標籤=>[資料工具]群組=>[資料驗證]按鈕"",將[儲存格內允許]設定為[清單],在將[來源]輸入上清單上想顯示的資料,個項目以[,](半形逗號)區分,最後按下[確定]按鈕
Tip15:將欄與列的資料替換
利用滑鼠拖曳選取要將欄與列替換的表格,進行複製.貼上表格的第一個儲存格上點選右鍵,選擇[選擇性貼上]=>[轉置]選項
----------------------------------------------------------------------------------
C07
Tip05:輸入日期-TODAY
儲存格內輸入[=TODAY()]
Tip07:加總符合條件的資料-SUMIF
如果符合XXX,就進行加總 (B4:B17,B19,E12:E17)
                                                 (Range,Criteria,Sum_range)
Tip08:計數符合條件的資料個數-COUNTIF
按下公式索引標籤=>函數程式庫群組=>其他函數-統計按鈕""內的COUNTIF函數
(B4:B17,B19)
(Range,Criteria)
Tip09:滿足條件的切換處理-IF
按下[公式]索引標籤=>[函數程式庫]群組=>[邏輯]按鈕""內的[IF函數].在跳出[函數引數]對話方塊後,在[Logical_test]指定判斷的比較運算式;在[Value_if_true]指定條件成立的顯示;在[Value_if_false]指定條件未成立的顯示,最後在按下[確定]按鈕就完成設定了
IF(B4>=100,"達成","沒有達成")
Tip13 :計算星期數-WEEKDAY
WEEKDAY(A3)  A3必須有輸入日期
----------------------------------------------------------------------------------
C09
Tip02:設定檔案或網頁的超連結
Ctrl+K
Tip04:利用多重視窗複製資料
[檢視]索引標籤=>[視窗]群組=>[並排顯示]按鈕









2015年4月2日 星期四

How to check cpu frequency & memory usage under linux

How to check cpu frequency & memory usage under linux

CPU
#watch -n 1 "cat /proc/cpuinfo | grep -i mhz"

Memory
#watch -n 1 free


2015年3月29日 星期日

How to login ubuntu with "root" account

How to login ubuntu with "root" account

1.Login with "user" account
2.# sudo passwd root
3. enter password
4. repeat password
5. Ctrl+Alt+F3
6. Login with "root"

2015年3月18日 星期三

The iSCSI boot does not work on RHEL7 with a static IP configured.

The iSCSI boot does not work on RHEL7 with a static IP configured.
from http://support.lenovo.com/gb/en/documents/ht100887


  1. Configure the iSCSI adapter and enable the boot from SAN feature.
  2. Enter the BIOS and change the boot mode to Legacy.
  3. Boot into the RHEL7.0 installation DVD and configure the NIC with a static IP address.
  4. Add a remote iSCSI target as a disk.
  5. Reboot after the installation completes and boot up will fail with the following error message:
[   2.375332] i8042: No controller found
[   2.592960] dracut: FATAL: For argument 'ip=::::localhost.localdomain:ens7:none'\nValue 'none' without static configuration does not make sense
[   2.593074] dracut: Refusing to continue
[   3.197719] System halted.

Workaround
iSCSI boot will succeed when adding the client IP address to the /boot/grub2/grub.cfg file.
Grub configuration files can be modified at the end of installation before rebooting.
To go to the shell and switch to the tty2 terminal (Ctrl-Alt-F2) or from the tmux screen on tty1, press Ctrl-B.  Then, change the configuration files of the installed system root mounted to /mnt/sysimage (eg /mnt/sysimage/boot/grub2/grub.cfg).
Example:
Before:
linux16 /vmlinuz-3.10.0-123.el7.x86_64 root=UUID=956c4dbb1-b287-42ba-94ec-f3c6b60c3361 ro vconsole.keymap=jp106 ip=::::localhost.localdomain:ens7:none... initrd16 /initramfs-3.10.0-123.el7.x86_64.img
After:
linux16 /vmlinuz-3.10.0-123.el7.x86_64 root=UUID=956c4dbb1-b287-42ba-94ec-f3c6b60c3361 ro vconsole.keymap=jp106 ip=192.168.122.10:::255.255.255.0:localhos... initrd16 /initramfs-3.10.0-123.el7.x86_64.img
Additional Information
This is a known issue of RHEL7.0.  This issue will be resolved in RHEL 7.1.

iSCSI CHAP

http://blog.csdn.net/sinchb/article/details/8433994#t10

1.What is CHAP?

Challenge-Handshake Authentication Protocol
iSCSI initiators and targets prove their identity to each other using the CHAP protocol, which includes a mechanism to prevent cleartext passwords from appearing on the wire.

2. iSCSI support two tpye chap authentication:

Initiator authentication和Target authentication

2.1 Initiator authentication

    When initiator(SUT) connect to target, initator should provide user name and password to target. The user name which initiator provdie is "incoming" account.
 Initiator authentication can  authentication independently, it call " Uni-directional Authentication",One way authentication

2.2 target authentication

    When initiator connect to target, target should provide user name and password to initiator. Tis is "outcoming" account

    target authentication have to authentication on both  initiator and target , it call " Bi-directional Authentication",Mutual  authentication
    iSCSI CHAP password length requirement must have 12~16 words

2015年3月13日 星期五

error 'Call "HostStorageSystem.ComputeDiskPartitionInfo" for object "storageSystem" on ESXi

 error 'Call "HostStorageSystem.ComputeDiskPartitionInfo" for object "storageSystem" on ESXi

The disk I was using had existing partitions (a Linux swap partition and a Linux MD5 RAID partition). 
Please manually delete the partitions logged in as root to ESXi shell.

Useful commands:
# esxcfg-scsidevs -l
this lists the disk devices, the device file will be /dev/disks/<NAME>
output looks like:
t10.ATA_____ST3320620AS_________________________________________6QF1PZXB
   Device Type: Direct-Access
   Size: 305245 MB
   Display Name: Local ATA Disk (t10.ATA_ST3320620AS_6QF1PZXB)
   Multipath Plugin: NMP
   Console Device: /vmfs/devices/disks/t10.ATA_____ST3320620AS_________________________________________6QF1PZXB
   Devfs Path: /vmfs/devices/disks/t10.ATA_____ST3320620AS_________________________________________6QF1PZXB
   Vendor: ATA       Model: ST3320620AS       Revis: 3.AA
   SCSI Level: 5  Is Pseudo: false Status: on
   Is RDM Capable: false Is Removable: false
   Is Local: true  Is SSD: false
   Other Names:
      vml.010000000020202020202020202020202036514631505a5842535433333230
   VAAI Status: unknown


# partedUtil get /dev/disks/t10.ATA_...
this shows the partitions on the device
output looks like:
38913 255 63 625142448
1 63 514079 130 128
2 514080 625137344 253 0

this disk has 2 partitions, numbers 1 and 2

# partedUtil delete /dev/disks/t10.ATA_... 2
deletes partition 2

# partedUtil delete /dev/disks/t10.ATA_... 1
deletes partition 1

If partedUtil doesn't work , pleate try "fdisk /dev/disks/t10.ATA......."  to delete partition.

2015年3月12日 星期四

How to execute Intel DCM (DataCenterManager)

How to execute Intel DCM (DataCenterManager)
Install this package on client with windows OS

1.Install Intel DCM
2.Install adobe flash
3.Open web browser
put in http://"computer-name":8688/DataCenterManager
4.Configuration=>Add group
5.Group=>Network discovery
Put in search ip address, BMC user name and password
6.Waiting for a few minutes, you can see the data change.

TEMP-2026

 123