How to get sytem/hardware information?

A

Akhila

Hi All,
I wish to find hardware information like
hard disk type make size
ram size
monitor info like company
mouse type
mother board chipset type
etc etc...

also all the names of RPM's installed.

Is there any way i can do this using perl on Linux(I have fedora core 2)?
Thanking you in advance.
Bye
 
J

Josef Moellers

Akhila said:
Hi All,
I wish to find hardware information like
hard disk type make size
ram size
monitor info like company
mouse type
mother board chipset type
etc etc...

also all the names of RPM's installed.

Is there any way i can do this using perl on Linux(I have fedora core 2)?
Thanking you in advance.

There are a number of places to look for this information:
- /proc subsystem
- dmidecode program
- rpm program
 
D

D. Marxsen

Akhila said:
I wish to find hardware information like
hard disk type make size
ram size
monitor info like company
mouse type
mother board chipset type
etc etc...

also all the names of RPM's installed.

Hi,

never tried to to get sys info with Perl on my Linux system but you should
have a look at the /proc file system. Your script could scan that
information.
According the RPMs: I am pretty sure that there is an RPM command which
lists the packages (although I can't recall it). Simply call it, direct its
output into a temporary file and then read the file from your script.

Cheers,
Detlef.
 
J

Josef Moellers

D. Marxsen said:
Hi,

never tried to to get sys info with Perl on my Linux system but you should
have a look at the /proc file system. Your script could scan that
information.
According the RPMs: I am pretty sure that there is an RPM command which
lists the packages (although I can't recall it). Simply call it, directits
output into a temporary file and then read the file from your script.

simply
open(RPM, "rpm -qa |") or die "$0: cannot start rpm\n";
while (<RPM>) {
chomp;
print "Package $_ is installed\n";
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top