Hardware

Collect network system information with Belarc Advisor and PhpSysInfo

The free applications Belarc Advisor and PhpSysInfo can get as much information about as many of your machines as you need.

An IT administration task we must do is keep track of our systems. We need to know who uses a system, as well as what makes up each system, including hardware, usage, software, etc. in order to maintain a healthy and easily managed environment. There are many tools that can help you collect this information, but I'm going to focus on two free applications that I like: Belarc Advisor and PhpSysInfo. Here's what each application will report back.

Belarc Advisor
  • Installed software
  • Hardware information
  • Network inventory
  • Missing Microsoft hotfixes
  • Antivirus status
  • Security benchmarks
PhpSysInfo
  • Operating system information
  • CPU, memory, and disk usage
  • Network information
  • SMART information
  • Fans/temperatures

PhpSysInfo will work on the following platforms:

  • Linux 2.6.x
  • FreeBSD 7.x
  • OpenBSD 2.8+
  • NetBSD
  • DragonFly
  • IBM AIX
  • HP-UX
  • Darwin/OSX
  • Windows (2000, 2003, XP, Vista, 7)

Belarc Advisor has no other requirements outside of what is on the standard Windows machine. For PhpSysInfo, you will need to meet the following requirements:

  • PHP 5.2 or later
  • PHP extensions: PCRE, XML, XSL, MBString and SimpleXML
  • Web server

With PhpSysInfo, you most likely will be running it on servers or desktops that also happen to run LAMP servers.

I'll first walk through the process of running Belarc Advisor on a Windows 7 system, and then I'll use PhpSysInfo on a Ubuntu 12.04 system.

Belarc Advisor

  1. Download the free Belarc Advisor.
  2. Double-click the executable file.
  3. Accept the EULA.
  4. Click Install.
  5. Click Yes when prompted (to download newest definitions).
  6. Allow the analysis to complete (this can take a while).
  7. Once the analysis completes, your default web browser will open with the results of the scan (Figure A). Click the links in the left navigation to get a view on: USB Storage, Hosted Virtual Machines, Network Map, Software Licenses, Software Versions & Usage, Missing Hotfixes, Installed Hotfixes.

Figure A

You can get plenty of information here. (Click the image to enlarge.)

I recommend you save that .html file for later comparison. You should also copy that .exe file onto a flash drive so you can take it around with you.

PhpSysInfo

Although this solution won't give you the hotfix, license key, and installed software (we'll get to the software portion in a bit), it will give you plenty of information, and it's much more flexible. Here's how you use it:

  1. Once you have your LAMP server installed, download the PhpSysInfo source.
  2. Unpack the downloaded file and move it to the document root.
  3. Rename the file /var/www/phpsysinfo/config.php.new to /var/www/phpsysinfo/config.php.
  4. Point your browser to http://ADDRESS_OF_MACHINE/phpsysinfo/index.php.

You should now see plenty of information about your machine's hardware (Figure B). Figure B

Expand the various entries to get more detail. (Click the image to enlarge.)

If you want to use PhpSysInfo as a portable tool, it is possible. Here's what you'd have to do:

  1. Install XAMPP Lite onto a flash drive.
  2. Unpack the PhpSysInfo file into the document root of the XAMP Lite server on the flash drive.
  3. Rename the config.php.new file to config.php.
  4. Point your browser to http://LOCATION_OF_XAMPP_SERVER/phpsysinfo/index.php (LOCATION_OF_XAMPP_SERVER is the actual location to the document root on the flash drive running the XAMPP server). You should now have a portable version of PhpSysInfo.

Now let's say you want to know what applications are installed on that Linux machine. If it's a debian-based machine, you can issue the command dpkg --get-selections > installed-software to create a text file that will list all installed applications. This file will be fairly large (on my Ubuntu 12.04 machine, the file is 1247 lines long -- that's 1,247 installed applications on a machine that is fairly fresh). To get even more information about a specific package, you could use the command apt-cache show PACKAGE_NAME (PACKAGE_NAME is the package's name). On an rpm-based system, you can run the command rpm -qa > installed-software to get a similar list. If you want specific information on a package for this system, you could issue a command like rpm -qi PACKAGE_NAME (PACKAGE_NAME is the actual name of the package you want information about).

Summary

Between these two tools, you should be able to get as much information about as many machines as you need. It's not the perfect solution, but it's easy and cost effective. If you need to do this on a much larger scale, you should look at Spiceworks.

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

3 comments
microbins
microbins

We looked at a variety of auditing utils and settled on WinAudit, which is free for commercial use as well as home use: It does the job and allows saving results to a wide variety of formats. http://www.pxserver.com/WinAudit/hlp_license.html It is not as full featured as other programs, and is Windows only, but is keeps us lawful :-) (I am just a satisfied user and have no affiliation with pxserver)

smithadmin
smithadmin

It is my understanding that the free version of Belarc is for personal use only and is NOT for commercial use as stated in the EULA. Would using this on your business network not violate that agreement? It might be something you want to check on before loading it especially with the current wave of companies cracking down on piracy and misuse of programs.