@@ Syntax: 1.5 @@ Message: Other users will be warned until 2017-01-11 17:22:42 that @ you are editing this page. @@ Comment: None @@ Trivial: (x) Yes ( ) No Describe 首頁/2017-01-10 here.
大地影院硬件信息收集
root 123456 root ROOT@DADIMEDIA@!))))$ root ^2Front9011) root ^10Server9011)
Linux
ipmitool fru print
# rhel6 x64 ansible 172.30.62.2 -m copy -a 'src=/mnt/play/systec/Projects/Dadi_Media大地影院/rhel6/ipmitool-1.8.12-17.1.x86_64.rpm dest=/tmp' ansible 172.30.62.2 -m copy -a 'src=/mnt/play/systec/Projects/Dadi_Media大地影院/rhel6/megacli-8.07.14-1.x86_64.rpm dest=/tmp' ansible 172.30.62.2 -m raw -a 'rpm -Uvh /tmp/ipmitool*.rpm' ansible 172.30.62.2 -m raw -a 'rpm -Uvh /tmp/megacli*.rpm' # rhel5 i386 ansible 172.30.62.2 -m copy -a 'src=/mnt/play/systec/Projects/Dadi_Media大地影院/rhel5/ipmitool-1.8.11-99.dell.21.3.el5.i386.rpm dest=/tmp' ansible 172.30.62.2 -m copy -a 'src=/mnt/play/systec/Projects/Dadi_Media大地影院/rhel5/ipmitool-1.8.12-17.1.i386.rpm dest=/tmp' ansible 172.30.62.2 -m raw -a 'rpm -Uvh /tmp/ipmitool*.rpm'
ansible IPMI_x64 -m copy -a 'src=/mnt/play/Downloads/ipmitool-1.8.12-17.1.x86_64.rpm dest=/tmp' | tee /tmp/ipmi_copy ansible IPMI_x64 -m raw -a 'rpm -Uvh /tmp/ipmitool*.rpm' | tee /tmp/ipmi.8.install if [ ! -f /etc/init.d/ipmi ]; then ansible X.X.X.2,X.X.X.7,X.X.X.8 -m raw -a '/etc/init.d/ipmi start' | tee ipmi_start.log # ansible X.X.X.2,X.X.X.7,X.X.X.8 -m raw -a 'modprobe ipmi_devintf; ipmitool lan print | grep "IP Address ";ipmitool fru print ' | tee all_fru.log else ansible X.X.X.2,X.X.X.7,X.X.X.8 -m raw -a 'modprobe ipmi_devintf; ipmitool fru print ' | tee all_fru.log fi
Show Server Vendor&type
grep --after-context=3 'Builtin FRU Device' 8.all_linux_fru.log | grep "Board Product"
show all info
ansible 2x,7x,7x -m raw -a 'modprobe ipmi_devintf; ipmitool fru print 2>/dev/null | egrep --after-context=6 'Builtin FRU Device|PS1|BP1|PERC' | megacli -PDList -a0 | egrep "Inquiry Data:|Raw Size:|PD Type:|Link Speed:"; smartctl -i -d megaraid,0 /dev/sda; dmidecode --type memory | head -38 | egrep "System Mem|Size:|Type:|Speed:|Part Number:";' | tee all_fru.log
dmidecode
memory info
dmidecode --type memory | head -30 | egrep 'Size:|Type:|Speed:|Part Number:' dmidecode --type memory | head -38 | egrep "System Mem|Size:|Type:|Speed:|Part Number:" ansible 172.31.221.7 -m raw -a "dmidecode --type memory | head -30 | egrep 'Size:|Type:|Speed:|Part Number:'"
disk info
lspci -knn | grep 'RAID bus controller'
smartctl -i -d megaraid,0 /dev/sda
password not correct
172.31.240.8 192.168.69.7 172.30.16.7 172.30.46.7 172.30.47.7 172.30.55.7 172.30.57.7
brightmoon ~ # grep --before-context=2 Au X.X.X.8
172.31.240.8 | UNREACHABLE! => {
"changed": false,
"msg": "Authentication failure.",
brightmoon ~ # grep --before-context=2 "Authentication failure" X.X.X.8 | grep UNRE | awk '{ print $1,"ansible_ssh_pass=ROOT@DADIMEDIA@!))))$ ansible_ssh_user=root" }' >> /etc/ansible/hosts
"module_stderr": "Shared connection to 172.31.29.2 closed.\r\n"
--> missing python-simplejson module
--> 32bit Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Linux AHliuanServer-3 2.6.18-194.el5PAE #1 SMP Tue Mar 16 22:00:21 EDT 2010 i686 i686 i386 GNU/Linux 32bit Not supported
Windows
Physical disk info
wmic diskdrive list brief
Or with PowerShell:
PS C:\Users\Administrator> Invoke-Command -ComputerName 172.30.55.190 -ScriptBlock { wmic diskdrive list brief} -credential administrator Caption DeviceID Model Partitions Size
DELL PERC H730 Mini SCSI Disk Device \\.\PHYSICALDRIVE0 DELL PERC H730 Mini SCSI Disk Device 3 898315729920
wmic memorychip get
