How to get sytem/hardware information?

Discussion in 'Perl Misc' started by Akhila, Nov 17, 2004.

  1. Akhila

    Akhila Guest

    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
     
    Akhila, Nov 17, 2004
    #1
    1. Advertising

  2. Akhila wrote:
    > 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

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett
     
    Josef Moellers, Nov 17, 2004
    #2
    1. Advertising

  3. Akhila

    D. Marxsen Guest

    "Akhila" <> schrieb im Newsbeitrag
    news:...
    > 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.

    --
    D. Marxsen, TD&DS GmbH
    (replace z with h, spam protection)
     
    D. Marxsen, Nov 17, 2004
    #3
  4. D. Marxsen wrote:
    > "Akhila" <> schrieb im Newsbeitrag
    > news:...
    >
    >> 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, 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";
    }

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett
     
    Josef Moellers, Nov 17, 2004
    #4
  5. Akhila

    Akhila Guest

    Thanks for the info given. it helped me to go in right direction.
     
    Akhila, Nov 18, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Monika Talwar

    Sytem date

    Monika Talwar, Feb 11, 2004, in forum: VHDL
    Replies:
    2
    Views:
    690
    Srinivasan Venkataramanan
    Feb 11, 2004
  2. Alvaro Puente

    How to Empty Sytem.in

    Alvaro Puente, Dec 15, 2003, in forum: Java
    Replies:
    1
    Views:
    404
    fabio
    Dec 15, 2003
  3. Philipp Ringel
    Replies:
    4
    Views:
    3,183
    virtuosity250
    May 21, 2009
  4. Mitschu

    sytem notification balloon

    Mitschu, Aug 7, 2007, in forum: Java
    Replies:
    2
    Views:
    385
    Mitschu
    Aug 8, 2007
  5. Edward

    File Sytem Object versus MSXML

    Edward, Jan 16, 2007, in forum: ASP General
    Replies:
    6
    Views:
    150
    Mike Brind
    Jan 17, 2007
Loading...

Share This Page