man 8 hwinfo
arch, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard, cpu, disk, dsl, dvb, fingerprint, floppy, framebuffer, gfxcard, hub, ide, isapnp, isdn, joystick, keyboard, memory, modem, monitor, mouse, netcard, network, partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer, redasd, reallyall, scanner, scsi, smp, sound, storage-ctrl, sys, tape, tv, uml, usb, usb-ctrl, vbe, wlan, xen, zip
man 1 dstat
cpu24, load, mem, swap, vm, disk, net, cpufreq, net_packets, thermal, topbio, topio, topoom … and many more | [reply] |
The parameters you need to consider depend on your application. What do you collect the data for? If the application is related to pure perl scripts or modules, most of these data points are not very important (but endianess might matter for pack/unpack)
For other applications you surely want to know the architecture (i386/ARM/PowerPC/SPARC/ ...), the endianess, maybe libc vendor and version, $PATH and other env variables
| [reply] |
This really depends more on your purpose for the script! It would probably more useful to let your needs dictate what to include than a bunch of us on the 'net who don't know your requirements. :)
| [reply] |
there exists many CPAN modules to access this type of information. | [reply] |
use Sys::Info;
use Sys::Info::Constants qw( :device_cpu );
my $info = Sys::Info->new;
my $cpu = $info->device('CPU');
printf "\nWe have %s ", scalar $cpu->count;
printf "%s-bit CPU", scalar $cpu->bitness;
printf " %s\n", scalar $cpu->identify;
printf "The CPU speed is: %s\n", scalar $cpu->speed;
print "We are running a ",$^O", system\n";
if you are in win you can also Use Win32::GetOSName(); Use Win32::GetOSVersion();
| [reply] [d/l] |