51°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • System information from linux command line

    April 30, 2006

    I was just reading this webpage about shell scripting, and discovered that you can get a lot of information about your cpu and memory from the command line.

    Return details about your processor:

    # cat /proc/cpuinfo
    processor       : 0
    vendor_id       : AuthenticAMD
    cpu family      : 6
    model           : 8
    model name      : AMD Athlon(tm) XP 2700+
    stepping        : 1
    cpu MHz         : 2164.892
    cache size      : 256 KB
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 1
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
    bogomips        : 4243.45
    

    in doing this, I discovered that my AMD 2700 Athlon processor has a 256kb cache, while my 600mhz Athlon processor has 512kb!

    Return just one line with the CPU model or clock speed:

    # cat /proc/cpuinfo | grep model\ name
    model name      : AMD Athlon(tm) XP 2700+
    # cat /proc/cpuinfo | grep MHz
    cpu MHz         : 2164.892
    

    Get details about system memory:

    # cat /proc/meminfo
    MemTotal:       483684 kB
    MemFree:          1924 kB
    Buffers:         23512 kB
    Cached:         379796 kB
    SwapCached:         12 kB
    Active:          61876 kB
    Inactive:       369916 kB
    HighTotal:           0 kB
    HighFree:            0 kB
    LowTotal:       483684 kB
    LowFree:          1924 kB
    SwapTotal:     1052248 kB
    SwapFree:      1051996 kB
    Dirty:            6108 kB
    Writeback:           0 kB
    Mapped:          40692 kB
    Slab:            39788 kB
    Committed_AS:   112332 kB
    PageTables:       1080 kB
    VmallocTotal:  3645432 kB
    VmallocUsed:      3548 kB
    VmallocChunk:  3641332 kB
    HugePages_Total:     0
    HugePages_Free:      0
    Hugepagesize:     4096 kB
    

    Similarly, you can grep for certain fields. For example:

    # cat /proc/meminfo | grep MemFree
    MemFree:          1732 kB
    # cat /proc/meminfo | grep MemTotal
    MemTotal:       483684 kB
    
    Sun, Apr 30, 2006 2:18am -07:00 #command line #Linux
Posted in /articles

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • 🎥 YouTube Tutorials and Reviews
  • 🏠 We're building a triplex!
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv