Thread: /proc/cpuinfo

  1. #1
    still a n00b Jaguar's Avatar
    Join Date
    Jun 2002
    Posts
    187

    /proc/cpuinfo

    Normally I get cpu information from /proc/cpuinfo.
    But I don't know gcc functions doing that.
    And I don't know how to get monitor card info with gcc.
    (like GeForce 4-64M and so on).
    Anyone know please tell me?

    Thanks,
    Last edited by Jaguar; 03-07-2003 at 12:48 PM.
    slackware 10.0; kernel 2.6.7
    gcc 3.4.0; glibc 2.3.2; vim editor
    migrating to freebsd 5.4

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    The other awnser you may of been looking for is you read /proc/cpuinfo using standard c/c++ file I/O (and parse it). I couldn't tell if you knew that already or not from your question
    But as Salem suggested, you can always parse the output of a program that already knows how to do such things.

    gg

  3. #3
    still a n00b Jaguar's Avatar
    Join Date
    Jun 2002
    Posts
    187
    # xdpyinfo
    xdpyinfo: unable to open display"".
    #
    # xdpyinfo -ext all
    xdpyinfo: unable to open display"".

    man or info couldn't help me, it stated xdpyinfo no need arguments.
    # scanpci -v and XF86Config both are exact what I want, thanks Salem.

    But I still guess there are real C functions() doing so without using <stdlib.h> system() or <stdio.h> popen(). I'm avoiding direct access to system commands.
    slackware 10.0; kernel 2.6.7
    gcc 3.4.0; glibc 2.3.2; vim editor
    migrating to freebsd 5.4

  4. #4
    Registered User
    Join Date
    Apr 2003
    Posts
    1
    You could also use lspci

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 06-11-2005, 04:10 AM