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

Favigen, Favicon Generator

Favigen, Favicon Generator : " Favicons are small icons that help identify websites. They are used as a visual representation of a website both in the web browser and at many online services. The three most prominent locations of favicons are the browser’s address bar, the tabbar and the bookmarks folder. Many webmasters like to create custom favicons to add that custom identifier to their website. Favicons can be created in many image and icon editors, but also online. Favigen is a straightforward favicon generator that can turn an image into a favicon. All that it takes is to pick an image from the local hard drive first, select the dimensions of the favicon and click the submit button to make the service generate the favicon. Favigen supports several image formats, including jpg and png, and it does not seem to have size restrictions either. Available image dimensions range are 16×16, 32×32 and 64×64. The generated favicon is displayed directly on the page. A click on do...

A simple rsync script to back up your home directory

A simple rsync script to back up your home directory : " Backing up important data is obviously something we should all do. Unfortunately, it is not always easy to make it happen. We get lazy; we do not have the additional hardware for a backup server; it takes a long time and a lot of CDs to back up to optical media; we do not trust online backup services; backup schemes are difficult to set up and use — any of dozens of reasons can stand in our way. Still, we know we should be backing up our important data. Modern open source Unix-like operating systems offer a plethora of options for incredibly simple, effective backup schemes, however. If the problem is figuring out how to set one up, a simple rsync solution may be exactly what you need. The rsync utility is used to synchronize files between two systems. It does so by way of incremental copies, only copying from the source to the destination what has not already been copied there, saving time, network bandwidth, and syst...

Google Wave now open to the public: faster, Robots and Gadgets aplenty!

Google Wave now open to the public: faster, Robots and Gadgets aplenty! : " Filed under: Internet , Google If you somehow missed it, Google Wave is now a bonafide Labs project: rather than being an invite-only alpha, it's now a public beta test! If you don't already have an account, just head on over to Wave and use your regular Google login details. If you've not seen any of the Google Wave introductory videos , you should check them out -- they explain the whole thing a lot more succinctly than I ever could. Wave has also been enabled for Google Apps domains -- businesses could convert their internal communication to Waves today! Leading up to this public release there have a lot of changes. It's by no means finished, but Google Wave is now a lot faster . It's also more intuitive -- more useful -- and given the large number of Robots and Gadgets now reaching prime-time readiness, it feels like the mass adoption of Wave is imminent. Also, if you're an ol...