Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Thu Mar 30, 2023 7:06 pm


FreeBSD tutorials and how-tos

Author Message
LaR3
  Post  Post subject: FreeBSD - Collecting hardware information  |  Posted: Wed Aug 05, 2009 2:40 pm

Joined: Mon Aug 03, 2009 4:55 pm
Posts: 19

Offline
 

FreeBSD - Collecting hardware information

Finding hardware information in FreeBSD can be performed using dmesg, pciconf, usbdevs, atacontrol and dmidecode utilities.

I will start with finding information CPU on FreeBSD:
Code:
# grep -i cpu /var/run/dmesg.boot
CPU: Pentium III/Pentium III Xeon/Celeron (501.14-MHz 686-class CPU)
cpu0: <ACPI CPU> on acpi0

(don't expect some mainframe :D ). Above is a 500Mhz Pentium III

Determining hardware platform and processor architecture:
Code:
# uname -mp
i386 i386

Physical and available memory
Code:
# grep -i mem /var/run/dmesg.boot
real memory  = 268369920 (255 MB)
avail memory = 248635392 (237 MB)

Information on the PCI slots using pciconf
Code:
# man pciconf
PCICONF(8)              FreeBSD System Manager's Manual             PCICONF(8)

NAME
     pciconf -- diagnostic utility for the PCI bus

SYNOPSIS
     pciconf -l [-cv]
     pciconf -a selector
     pciconf -r [-b | -h] selector addr[:addr2]
     pciconf -w [-b | -h] selector addr value

DESCRIPTION
     The pciconf utility provides a command line interface to functionality
     provided by the pci(4) ioctl(2) interface.  As such, some of the func-
     tions are only available to users with write access to /dev/pci, normally
     only the super-user.
..........................
     With the -l option, it lists all devices found by the boot probe in the
     following format:

     foo0@pci0:4:0: class=0x010000 card=0x00000000 chip=0x000f1000 rev=0x01 hdr=0x00
     bar0@pci0:5:0: class=0x000100 card=0x00000000 chip=0x88c15333 rev=0x00 hdr=0x00
     none0@pci0:6:0: class=0x020000 card=0x00000000 chip=0x802910ec rev=0x00 hdr=0x00
..........................
     If the -v option is supplied, pciconf will attempt to load the ven-
     dor/device information database, and print vendor, device, class and sub-
     class identification strings for each device.
...........................
# pciconf -lv
hostb0@pci0:0:0:   class=0x060000 card=0x00000000 chip=0x71908086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82443BX/ZX 440BX/ZX CPU to PCI Bridge (AGP Implemented)'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:1:0:   class=0x060400 card=0x00000000 chip=0x71918086 rev=0x03 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82443BX/ZX 440BX/ZX AGPset PCI-to-PCI bridge'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:4:0:   class=0x060100 card=0x00000000 chip=0x71108086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82371AB/EB/MB PIIX4/4E/4M ISA Bridge'
    class      = bridge
    subclass   = PCI-ISA
atapci0@pci0:4:1:   class=0x010180 card=0x00000000 chip=0x71118086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82371AB/EB/MB PIIX4/4E/4M IDE Controller'
    class      = mass storage
    subclass   = ATA
uhci0@pci0:4:2:   class=0x0c0300 card=0x00000000 chip=0x71128086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82371AB/EB/MB PIIX4/4E/4M USB Interface'
    class      = serial bus
    subclass   = USB
none0@pci0:4:3:   class=0x068000 card=0x00000000 chip=0x71138086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82371AB/EB/MB PIIX4/4E/4M Power Management Controller'
    class      = bridge
xl0@pci0:11:0:   class=0x020000 card=0x905510b7 chip=0x905510b7 rev=0x30 hdr=0x00
    vendor     = '3COM Corp, Networking Division'
    device     = '3C905-TX Fast Etherlink 10/100 PCI TX NIC'
    class      = network
    subclass   = ethernet
rl0@pci0:16:0:   class=0x020000 card=0x813910ec chip=0x813910ec rev=0x10 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'RT8139 (A/B/C/810x/813x/C+) Fast Ethernet Adapter'
    class      = network
    subclass   = ethernet
none1@pci1:0:0:   class=0x030000 card=0xff00102b chip=0x0521102b rev=0x03 hdr=0x00
    vendor     = 'Matrox Electronic Systems Ltd.'
    device     = 'Matrox lnc MGA-G200B Eclipse/Calao'
    class      = display
    subclass   = VGA

Viewing USB device information on FreeBSD:
Code:
# usbdevs -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00
port 1 powered
port 2 powered

Hard Disk information in FreeBSD:
Code:
# atacontrol
usage:  atacontrol <command> args:
        atacontrol list
        atacontrol info channel
        atacontrol attach channel
        atacontrol detach channel
        atacontrol reinit channel
        atacontrol create type [interleave] disk0 ... diskN
        atacontrol delete array
        atacontrol addspare array disk
        atacontrol rebuild array
        atacontrol status array
        atacontrol mode device [mode]
        atacontrol cap device

Code:
# atacontrol list
ATA channel 0:
    Master:  ad0 <ST3160215A/3.AAD> ATA/ATAPI revision 7
    Slave:       no device present
ATA channel 1:
    Master:      no device present
    Slave:       no device present

Showing detailed info about a hard disk device
Code:
# atacontrol cap ad0

Protocol              ATA/ATAPI revision 7
device model          ST3160215A
serial number         9RA8M9EK
firmware revision     3.AAD
cylinders             16383
heads                 16
sectors/track         63
lba supported         268435455 sectors
lba48 supported       312581808 sectors
dma supported
overlap not supported

Feature                      Support  Enable    Value           Vendor
write cache                    yes   yes
read ahead                     yes   yes
Tagged Command Queuing (TCQ)   no   no   0/0x00
SMART                          yes   yes
microcode download             yes   yes
security                       yes   no
power management               yes   yes
advanced power management      no   no   65278/0xFEFE
automatic acoustic management  no   no   0/0x00   208/0xD0


To view even more detailed information about installed hardware on a FreeBSD server/PC, dmidecode tool can be used. It is not come installed by default and needs to be installed separately from ports (or pkg_add) /usr/ports/sysutils/dmidecode/
Code:
# dmidecode# dmidecode 2.10
SMBIOS 2.3 present.
23 structures occupying 842 bytes.
Table at 0x000F0630.
.........
System Information
        Manufacturer: Micro-Star Inc.
        Product Name: MS-6566E
        Version: 1.0
        Serial Number: 00000000
        UUID: Not Settable
        Wake-up Type: Modem Ring

Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
        Manufacturer: Micro-Star Inc.
        Product Name: MS-6566E
        Version: 1.0
        Serial Number: 00000000
................

Code:
Processor Information
        Socket Designation: FC-478
        Type: Central Processor
        Family: Pentium 4
        Manufacturer: Intel                           
        ID: 24 0F 00 20 FF FB EB 3F
        Signature: Type 0, Family 15, Model 2, Stepping 4
        Flags:
                FPU (Floating-point unit on-chip)
                VME (Virtual mode extension)
                DE (Debugging extension)
                PSE (Page size extension)
                TSC (Time stamp counter)
                MSR (Model specific registers)
                PAE (Physical address extension)
                MCE (Machine check exception)
                CX8 (CMPXCHG8 instruction supported)
                APIC (On-chip APIC hardware supported)
                SEP (Fast system call)
                MTRR (Memory type range registers)
                PGE (Page global enable)
                MCA (Machine check architecture)
                CMOV (Conditional move instruction supported)
                PAT (Page attribute table)
                PSE-36 (36-bit page size extension)
                CLFSH (CLFLUSH instruction supported)
                DS (Debug store)
                ACPI (ACPI supported)
                MMX (MMX technology supported)
                FXSR (Fast floating-point save and restore)
                SSE (Streaming SIMD extensions)
                SSE2 (Streaming SIMD extensions 2)
                SS (Self-snoop)
                HTT (Hyper-threading technology)
                TM (Thermal monitor supported)
        Version: Intel(R) Pentium(R) 4 Processor
        Voltage: 3.3 V 2.9 V
        External Clock: 110 MHz
        Max Speed: 3000 MHz
        Current Speed: 1980 MHz
        Status: Populated, Enabled
        Upgrade: Socket 478
        L1 Cache Handle: 0x0005
        L2 Cache Handle: 0x0006
        L3 Cache Handle: Not Provided

Code:
Memory Controller Information
        Error Detecting Method: None
        Error Correcting Capabilities: None
        Supported Interleave: One-way Interleave
        Current Interleave: One-way Interleave
        Maximum Memory Module Size: 1024 MB
        Maximum Total Memory Size: 2048 MB
        Supported Speeds:
                Other
        Supported Memory Types:
                DIMM
                SDRAM
        Memory Module Voltage: 3.3 V
        Associated Memory Slots: 2
                0x0008
                0x0009
        Enabled Error Correcting Capabilities: None

Code:
Handle 0x0009, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: DIMM2
        Bank Connections: 3 2
        Current Speed: Unknown
        Type: DIMM SDRAM
        Installed Size: 512 MB (Double-bank Connection)
        Enabled Size: 512 MB (Double-bank Connection)
        Error Status: OK

Code:
Handle 0x0010, DMI type 9, 13 bytes
System Slot Information
        Designation: AGP
        Type: 32-bit PCI
        Current Usage: In Use
        Length: Long
        ID: 4
        Characteristics:
                3.3 V is provided
                Opening is shared
                PME signal is supported

_________________
Humble user
http://www.ivorde.ro





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "FreeBSD - Collecting hardware information"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. FreeBSD - Can't locate Mail/Header.pm in @INC (@INC contains:

mandrei99

0

2797

Thu Jul 29, 2010 3:00 am

mandrei99 View the latest post

There are no new unread posts for this topic. FreeBSD portupgrade packages with manual dependencies

LaR3

0

1906

Wed Aug 05, 2009 11:07 am

LaR3 View the latest post

There are no new unread posts for this topic. FreeBSD portupgrade without port vulnerability check

mandrei99

0

2372

Thu Mar 18, 2010 6:12 am

mandrei99 View the latest post

There are no new unread posts for this topic. FreeBSD: Apache 2.2.15 (custom location) + mod_fcgid

debuser

0

2011

Thu Jul 22, 2010 1:07 pm

debuser View the latest post

There are no new unread posts for this topic. FreeBSD ifconfig display capability and supported media types for an interface

debuser

0

5152

Thu Jul 08, 2010 6:26 am

debuser View the latest post

There are no new unread posts for this topic. FreeBSD: monitor network interface traffic throughput - exploring systat

admin

0

7384

Mon Feb 02, 2015 7:17 pm

admin View the latest post

There are no new unread posts for this topic. FreeBSD: php 5.3.2 configure error: xml2-config not found. Please check your libxml2 installation.

debuser

0

2432

Thu Jul 22, 2010 1:41 pm

debuser View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
cronNews News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO