From announce at ntlug.org Fri Jun 19 00:26:12 2009 From: announce at ntlug.org (Low-traffic NTLUG announcement list) Date: Fri, 19 Jun 2009 00:26:12 -0500 Subject: [NTLUG:Announce] NTLUG Meeting, Saturday 6/20, Exploring your hardware Message-ID: <4A3B2174.8050209@acm.org> One thing Linux does really well is figuring out the hardware you have and loading the right drivers. However, Linux doesn't really tell you what hardware you have.... I know that seems weird. There are some ways of getting to the information, some are great, some are not so great.... lots of variety out there. Can make for an interesting puzzle when trying to query all hardware. Especially if you're querying hardware running Linux distributions that are more than 7 years old. Come to the meeting this Saturday and we'll look at the various ways (from least effective to most effective): /proc procfs sysfs scsi_info, scsiinfo sginfo lsscsi dmidecode hal (lshal and friends) kudzu (/etc/sysconfig/hwconf) hwinfo It's not as easy as you might think. There's a mixture of FOSS and proprietary drivers, x86 to mainframes.... hwinfo is the best and we can look at why. If we just consider: 1. Hardware platform (make/model of machine) 2. CPU 3. Memory 4. Network Interfaces 5. Disk/Storage #5 is by far the hardest (believe it or not). SUSE's see hardware the best (because of hwinfo). Newer Ubuntu's might be ok (need to investigate some more). Kudzu based things are downright arcane (time to ditch it). Hal and sysfs are forever changing moving one step forward, two steps back, one step forward, etc... Intel's hyperthreading is an experiment in obscurity... AND nobody rights tools with easily parseable output (sigh... why?). Anyway, hope you can make it. Sample output (mixed sections across several different hosts for variety): Host information for a really (really) old zLinux Red Hat. >>class='hw_hostname hw_linux_hostname'<< ![[#Hostname]] [[{*$FullName}#Hostname|Host Information]] (:Host_Hostname:rh7231b :) (:Host_Class:System-z9 :) (:Host_Type:Linux-zLinux :) (:Host_Uptime:11:47pm up 127 days, 7:48, 0 users, load average: 0.00, 0.00, 0.00 :) rh7231b Uptime: 11:47pm up 127 days, 7:48, 0 users, load average: 0.00, 0.00, 0.00 (:include Hardware/System-z9:) [[!System-z9]] >><< OS information for a VMware ESX Server. Shows the guests defined. >>class='hw_os hw_linux_os'<< ![[#Os]] [[{*$FullName}#Os|OS Version]] (:OS_Class:Linux :) (:OS_SubClass:VMware-ESX-Server :) (:OS_Uname:VMware ESX Server 3.5.0 [Releasebuild-110268], built on Aug 12 2008 :) (:OS_Update:VMware-ESX-Server-3-5-0-Build-110268 :) (:OS_Version:VMware-ESX-Server-3-5-0 :) VMware ESX Server 3.5.0 [Releasebuild-110268], built on Aug 12 2008 VMware ESX Server 3.5.0 [Releasebuild-110268], built on Aug 12 2008 vmkernel build: 110268, vmkcall: 45.0 driver interface: 8.0 kernel: 61.0 vmnixmod build: 110268, interface: 2850028248 vmksysinfo version: 83521b8d3a8bccfb7444d2be30127713 Loadable module version info: vmkernelID: 0x11ef140a vmklinux build 110268: Built on: Aug 12 2008 bnx2 build 82663: 1.5.10b tg3 build 110268: tg3.c:v3.81c (September 18, 2007) ... more not shown .... !!! VMware Guests ||[[Hosts/pgounder-l]] ||/vmfs/volumes/49468...022640ed630/Pgounder-l/Pgounder-l.vmx || ||UNKNOWN ||/vmfs/volumes/49468...022640ed630/Darbng/Darbng.vmx || ||[[Hosts/wisdom]] ||/vmfs/volumes/49468...022640ed630/Wisdom/Wisdom.vmx || ||[[Hosts/schwartz]] ||/vmfs/volumes/49468...022640ed630/Schwartz/Schwartz.vmx || ||[[Hosts/sles10-64-db]] ||/vmfs/volumes/490f5...022640ed630/Sles10-64-db/Sles10-64-db.vmx || ||[[Hosts/ccsles10-64]] ||/vmfs/volumes/490f5...022640ed630/Ccsles10-64/Ccsles10-64.vmx || ||UNKNOWN ||/vmfs/volumes/490f5...022640ed630/Ubuntu810/Ubuntu810.vmx || ||[[Hosts/jmercier-vmxp]] ||/vmfs/volumes/490f5...022640ed630/XP32bit-VM/XP32bit-VM.vmx || ||[[Hosts/prestwick]] ||/vmfs/volumes/490f5...022640ed630/Prestwick/Prestwick.vmx || ||[[Hosts/geeko]] ||/vmfs/volumes/490f5...022640ed630/Geeko/Geeko.vmx || ||[[Hosts/johan]] ||/vmfs/volumes/490f5...022640ed630/johan/johan.vmx || ||[[Hosts/serg]] ||/vmfs/volumes/490f5...022640ed630/Serg/Serg.vmx || ||[[Hosts/sthompson-sled10]]||/vmfs/volumes/490f5...022640ed630/sthompsn-sled10/sthompsn-sled10.vmx || [[!Linux]] [[!VMware-ESX-Server]] [[!VMware-ESX-Server-3-5-0]] [[!VMware-ESX-Server-3-5-0-Build-110268]] >><< Memory output from an HP xw6600 workstation. Notice the empty ram slots. >>class='hw_memory hw_linux_memory'<< ![[#Mem]] [[{*$FullName}#Mem|Memory]] (:Mem_Class:Memory-3G-4G :) (:Mem_Size:3.86G :) ||! Size ||! Location ||! Speed ||! Type || || 1024 MB || DIMM01 || 667 MHz (1.5 ns) || DDR2 FB-DIMM || || No Module Installed || DIMM02 || Unknown || DDR2 FB-DIMM || || 1024 MB || DIMM03 || 667 MHz (1.5 ns) || DDR2 FB-DIMM || || No Module Installed || DIMM04 || Unknown || DDR2 FB-DIMM || || 1024 MB || DIMM05 || 667 MHz (1.5 ns) || DDR2 FB-DIMM || || No Module Installed || DIMM06 || Unknown || DDR2 FB-DIMM || || 1024 MB || DIMM07 || 667 MHz (1.5 ns) || DDR2 FB-DIMM || || No Module Installed || DIMM08 || Unknown || DDR2 FB-DIMM || || 1024 kB || SYSTEM ROM || Unknown || Flash || Total: 3.86G [[!Memory-3G-4G]] >><< Machine that as dual dualcore processors with hyperthreading enabled (e.g. Xeon 7xxx series). >>class='hw_cpuinfo hw_linux_cpuinfo'<< ![[#Cpu]] [[{*$FullName}#Cpu|CPU Information]] (:CPU_Cache:2048 KB :) (:CPU_Capable64:Yes :) (:CPU_CPUID:0f48h :) (:CPU_SubClass:Xeon :) (:CPU_Class:Intel :) (:CPU_CapableVirt:No/Unknown :) (:CPU_Freq:2800 :) (:CPU_Hyperthreading:On :) (:CPU_LNumber:8 :) (:CPU_Name:Intel(R) Xeon(TM) CPU 2.80GHz :) (:CPU_Vendor:GenuineIntel :) (:CPU_PNumber:2 :) (:CPU_Siblings:4 :) (:CPU_Sockets:2 :) ||! # ||! Vendor ||! Type ||! Speed ||! Cache ||! Id ||! Cores|| || 0 || GenuineIntel || Intel(R) Xeon(TM) CPU 2.80GHz || 2800 || 2048 KB || 15 || P 0* || || 1 || GenuineIntel || Intel(R) Xeon(TM) CPU 2.80GHz || 2800 || 2048 KB || 15 || P 0* || || 2 || GenuineIntel || Intel(R) Xeon(TM) CPU 2.80GHz || 2800 || 2048 KB || 15 || P 0* || || 3 || GenuineIntel || Intel(R) Xeon(TM) CPU 2.80GHz || 2800 || 2048 KB || 15 || P 0* || || 4 || GenuineIntel || Intel(R) Xeon(TM) CPU 2.80GHz || 2800 || 2048 KB || 15 || P 1* || || 5 || GenuineIntel || Intel(R) Xeon(TM) CPU 2.80GHz || 2800 || 2048 KB || 15 || P 1* || || 6 || GenuineIntel || Intel(R) Xeon(TM) CPU 2.80GHz || 2800 || 2048 KB || 15 || P 1* || || 7 || GenuineIntel || Intel(R) Xeon(TM) CPU 2.80GHz || 2800 || 2048 KB || 15 || P 1* || ''* - processor uses Intel hyperthreading (sorry)'' [[!Intel]] [[!Xeon]] [[!X64-Capable]] >><< Network info for my laptop while connected to the VPN. >>class='hw_interfaces hw_linux_interfaces'<< ![[#Net]] [[{*$FullName}#Net|Network Interfaces]] (:Net_MAC:00:0E:35:FC:76:CE :) (:Net_UpDevices:eth1 lo tun0 :) (:Net_AutoNeg:off :) (:Net_PrimDev:tun0 :) (:Net_DHCP:yes :) (:Net_Gatewayv4:199.3.17.18 :) (:Net_Hardware:PRO/Wireless 2200BG [Calexico2] Network Connection :) (:Net_IPv4:10.20.20.63 :) (:Net_IPv4DNSName:m70.csg.stercomm.com :) (:Net_MTU:1412 :) (:Net_DNS:204.96.213.10 199.1.6.7 :) (:Net_Duplex:Full :) (:Net_NetMaskv4:255.255.255.255 :) (:Net_Devices:lo eth0 eth1 tun0 :) (:Net_Speed:10Mb/s :) (:Net_Port:Twisted Pair :) (:Net_DNSSearch:tx.rr.com csg.stercomm.com :) (:Net_Status:UP :) (:Net_Vendor:Intel Corporation :) (:Net_VPN:Enabled :) (:Net_VPNMAC:00:0E:35:FC:76:CE :) (:Net_VPNDev:eth1 :) (:Net_VPNGateway:199.3.17.18 :) ... rest not shown ... Disks used by a machine where some of the disks are from a SAN device, some from a internal RAID. >>class='hw_disks hw_linux_disks'<< ![[#Disks]] [[{*$FullName}#Disks|Disks]] (:Disk_Type:disk disk disk disk :) (:Disk_Devices:cciss/c0d0 cciss/c0d0 sda sdb :) (:Disk_Models:HP-Smart-Array-E200i-Controller HP-Smart-Array-E200i-Controller SATABeast SATABeast :) (:Disk_RAID:RAID-1(1+0) RAID-1(1+0) - - :) (:Disk_Revs:1.80 1.80 Gd66 Gd66 :) (:Disk_Serial:- - 639E7F4742C60000000402FC000242C6 639E64D742C60000000402FC000242C6 :) (:Disk_Sizes:286677120 286677120 488282112 488282112 :) (:Disk_Vendors:HP HP NEXSAN NEXSAN :) ||!Model ||!Device ||!Driver ||!Size ||!Status || ||CCISS disk 0/0 ||/dev/cciss/c0d0 ||cciss ||286677120 sectors a 512 bytes ||cfg=yes...|| ||NEXSAN SATABeast ||/dev/sda (/dev/sg1) ||qla2400, sd ||488282112 sectors a 512 bytes ||cfg=new...|| ||NEXSAN SATABeast ||/dev/sdb (/dev/sg2) ||qla2400, sd ||488282112 sectors a 512 bytes ||cfg=new...|| !!! Fibre Targets /sys/class/fc_transport/0:0:0:17/node_name:0x2002000402fc42c6 /sys/class/fc_transport/0:0:0:17/device/model:SATABeast /sys/class/fc_transport/0:0:0:17/device/vendor:NEXSAN /sys/class/fc_transport/0:0:0:17/device/block/size:488282112 /sys/class/fc_transport/0:0:0:16/node_name:0x2002000402fc42c6 /sys/class/fc_transport/0:0:0:16/device/model:SATABeast /sys/class/fc_transport/0:0:0:16/device/vendor:NEXSAN /sys/class/fc_transport/0:0:0:16/device/block/size:488282112 /sys/class/fc_transport/0:0:0:0/node_name:0x2002000402fc42c6 /sys/class/fc_transport/0:0:0:0/device/model:SATABeast /sys/class/fc_transport/0:0:0:0/device/vendor:NEXSAN >><<