Closed Thread
Results 1 to 3 of 3

Thread: how to get hardware info

  1. #1
    Join Date
    Aug 2007
    Location
    Gizeh, Al Jizah, Egypt, Egypt
    Posts
    8,675
    Blog Entries
    12
    Rep Power
    81

    how to get hardware info

    hey fellow humans,
    im trying to write a small application to do the following for ubuntu or other linux dists.
    -collect hardware information like motherboard, RAM, display adapters, storage available and processor
    -send the info toa webserver

    the next step is not important now, i need to know if theres some kind of file on any distribution with the hardware information (even if theres no drivers installed for it). i tried the x-server conf file but most of the times ive tried it on other pc i get the default names like
    Code:
    	Device		"Configured Video Device"
    anyone have any ideas?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Tor
    Tor is offline Programming Expert
    Join Date
    Oct 2007
    Posts
    488
    Rep Power
    0
    That info is all in the /proc/ directory. You could examine each file/dir there. You could also use dmesg:

    Code:
    less /var/log/dmesgdmesg | grep -i cpu
    output:
    Code:
    [    0.000000] Initializing cgroup subsys cpuset
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] KERNEL supported cpus:
    [    0.000000]   Transmeta TransmetaCPU
    [    0.000000] SMP: Allowing 4 CPUs, 2 hotplug CPUs
    [    0.000000] PERCPU: Allocating 45056 bytes of per cpu data
    [    0.000000] NR_CPUS: 64, nr_cpu_ids: 4, nr_node_ids 1
    [    0.000000] Initializing CPU#0
    [    0.004000] SLUB: Genslabs=12, HWalign=128, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [    0.004000] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
    [    0.004000] Initializing cgroup subsys cpuacct
    [    0.004000] CPU: Trace cache: 12K uops, L1 D cache: 16K
    [    0.004000] CPU: L2 cache: 2048K
    [    0.004000] CPU: Physical Processor ID: 0
    [    0.004000] CPU: Processor Core ID: 0
    [    0.485029] CPU0: Intel(R) Pentium(R) 4 CPU 3.00GHz stepping 03
    [    0.004000] Initializing CPU#1
    [    0.004000] CPU: Trace cache: 12K uops, L1 D cache: 16K
    [    0.004000] CPU: L2 cache: 2048K
    [    0.004000] CPU: Physical Processor ID: 0
    [    0.004000] CPU: Processor Core ID: 0
    [    0.572571] CPU1: Intel(R) Pentium(R) 4 CPU 3.00GHz stepping 03
    [    0.572596] checking TSC synchronization [CPU#0 -> CPU#1]: passed.
    [    0.576051] Brought up 2 CPUs
    [    0.576109] CPU0 attaching sched-domain:
    [    0.576124] CPU1 attaching sched-domain:
    [    1.364016] Switched to high resolution mode on CPU 0
    [    1.364658] Switched to high resolution mode on CPU 1
    [    2.054580] cpufreq: No nForce2 chipset.
    [    2.129781] processor ACPI_CPU:00: registered as cooling_device0
    [    2.129830] processor ACPI_CPU:01: registered as cooling_device1
    [    5.068725] cpuidle: using governor ladder
    [    5.068729] cpuidle: using governor menu
    [    5.070952] processor ACPI_CPU:02: hash matches
    Outer examples:

    Code:
    dmesg | grep -i cd
    dmesg | grep -i usb
    for Video:

    Code:
    less /var/log/dmesg | grep -i Video

  4. #3
    Join Date
    Aug 2007
    Location
    Gizeh, Al Jizah, Egypt, Egypt
    Posts
    8,675
    Blog Entries
    12
    Rep Power
    81
    awesome.
    just what i needed
    thnx alooot

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Programming Hardware
    By Fullenglish in forum Visual Basic Programming
    Replies: 29
    Last Post: 03-29-2010, 03:35 PM
  2. FASM Hardware
    By Apprentice123 in forum Assembly
    Replies: 2
    Last Post: 05-12-2009, 07:55 PM
  3. getting the user hardware info
    By amrosama in forum PHP Development
    Replies: 21
    Last Post: 03-01-2009, 02:11 AM
  4. Hardware
    By kalam88 in forum Computer Hardware
    Replies: 1
    Last Post: 11-10-2008, 07:23 AM
  5. Hardware!
    By Crop in forum The Lounge
    Replies: 4
    Last Post: 05-27-2007, 07:59 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts