Pular para o conteúdo principal

Get Linux and FreeBSD hardware info with guide to commands

Get Linux and FreeBSD hardware info with guide to commands: "
Switching between open source OSs can sometimes be confusing, since they may have different ways of doing things. A common task that may confuse some users when switching systems is getting hardware information. In the case of Linux-based OSs and FreeBSD, the following cheat sheet for figuring out how to do the same things on two different systems can ease some of the pain.

CPU and memory information


Because Linux-based systems use the proc device filesystem to provide access to information about hardware devices in the system, getting specific information about the hardware sometimes involves finding it in files using the grep command. The same information is normally accessed on FreeBSD via the sysctl command.

To get information about your CPU model . . .

  • Linux:
    grep model /proc/cpuinfo
    

  • FreeBSD:
    sysctl hw.model
    


To get information about total system memory . . .

  • Linux:
    grep MemTotal /proc/meminfo
    

  • FreeBSD:
    sysctl hw.realmem
    


Device listings


Information about many other devices might be needed as well. For these, each system has tools designed to provide listings of devices connected to various system buses.

To get information about PCI devices . . .

  • Linux:
    lspci -v
    

  • FreeBSD:
    pciconf -lv
    


To get information about USB devices . . .

  • Linux:
    lsusb -v
    

  • FreeBSD:
    usbconfig
    


To get other connected device information . . .

  • Linux:
    dmidecode
    

    This command shows DMI/SMBIOS hardware information.

    lshal
    

    This command shows all devices managed by the HAL subsystem.
  • FreeBSD:
    atacontrol list
    

    This command shows all ATA devices.

    camcontrol devlist -v
    


Notes


Some of the above commands may work from a normal, unprivileged user account. Others may be restricted to root access.

Obviously, on both these OS types, a lot more information can be had by the same means. Check out the rest of the contents of the /proc/cpuinfo and /proc/meminfo files, and poke around amongst the various resources offered by sysctl on FreeBSD. While Linux-based systems offer a sysctl utility as well, it is not as extensively useful a tool as it is on FreeBSD.

On both of these OS types, a lot more information can be had by means similar to those described above. For instance, the /proc/cpuinfo and /proc/meminfo files contain a lot more information than just the CPU model and total memory. There is a sysctl command on Linux-based systems as well as on FreeBSD and other BSD Unix systems, but it is not as broadly useful as on FreeBSD, nor does it offer as comprehensive coverage of the system, because Linux-based systems default to other means of accessing and configuring system configuration values (such as the proc filesystem). On either system type, a picture of sysctl capabilities can be seen by viewing the utility’s manpage.

If you are feeling curious and have some time to spend exploring, sysctl -a outputs all information sysctl has to provide.




"

Comentários

Postagens mais visitadas deste blog

Improve Windows Security By Closing Open Ports

Improve Windows Security By Closing Open Ports : " A standard Windows operating system has a number of ports open after installation. Some of these ports are needed for the system to function properly while others might not. These ports can pose a security risk as every open port on a system might be an entry point for a malicious user. A port basically allows communication to or from the device. Characteristics are a port number, an IP address and a protocol type. This article will give you the tools at hand to identify and evaluate the open ports on your Windows system to make a decision in the end whether they can or should be closed or left open. Software programs and tools that we will use: CurrPorts : Available for 32-bit and 64-bit editions of Windows. It is a port monitor that displays all open ports on a computer system. We will use it to identify the ports and the programs that are using them. Windows Task Manager: Also used to identify the programs and link some p

Diagnosing a Blue Screen of Death Error in Windows

Diagnosing a Blue Screen of Death Error in Windows : For many years now the famous Blue Screen of Death (BSoD) has been the ultimate indication that something disastrous has happened to make your computer die, but how useful is the information in the BSoD and the respective crash dump file that Windows produces? The best article I ever found explaining the BSoD in depth is here on the Microsoft website, however it’s quite technical and doesn’t discuss how to actually troubleshoot a problem. The crash dump file is just technical details of what was being held in the computer’s memory at the time of the crash, and this will include details on every driver and service that was loaded, and every piece of software that was running. The most useful pieces of information are to be found on the BSoD itself and are highlighted on the screenshot below. These are the BSoD error name, the stop error code and the name of the driver or service that has failed (this last one might not always appea

Use BGInfo to Build a Database of System Information of Your Network Computers

Use BGInfo to Build a Database of System Information of Your Network Computers : " One of the more popular tools of the Sysinternals suite among system administrators is BGInfo which tacks real-time system information to your desktop wallpaper when you first login. For obvious reasons, having information such as system memory, available hard drive space and system up time (among others) right in front of you is very convenient when you are managing several systems. A little known feature about this handy utility is the ability to have system information automatically saved to a SQL database or some other data file. With a few minutes of setup work you can easily configure BGInfo to record system information of all your network computers in a centralized storage location. You can then use this data to monitor or report on these systems however you see fit. BGInfo Setup If you are familiar with BGInfo, you can skip this section. However, if you have never used this tool, it takes ju