5 Replies Latest reply: Apr 18, 2006 2:33 PM by ScottZheng RSS

    How to get Physical Memory and CPU speed using unix commands?

    ScottZheng
      hi all,
      I need to know the server hardware setting, such as total memory, number of CPU and speed in Solaris, HP, AIX,Linux.

      Who can list the commands for these different Unix OS?

      Notes: some OS does not support TOP command.

      Your help is greatly appreicated.
        • 1. Re: How to get Physical Memory and CPU speed using unix commands?
          451902
          Linux and AIX supports top command. I dont know about others

          you can also use iostat for I/O related info

          Thanks

          Raman
          • 2. Re: How to get Physical Memory and CPU speed using unix commands?
            397015
            read the 10g installation guide for each platform which includes the commands to check pre-req such as cpu, memory.....
            • 3. Re: How to get Physical Memory and CPU speed using unix commands?
              93654
              Hello,

              Try prtdiag command on solaris. That will show complete hardware info about CPU's and their speed, Memory etc.,

              Solaris Platform:
              /usr/platform/sun4u/sbin/prtdiag
              (or)
              /usr/platform/`uname -i`/sbin/prtdiag

              Linux:
              On linux you dont have prtdiag but you can download a bunzip prtdiag file just google up you will find the download url.

              file: prtdiag-1.2.tar.bz2
              bunzip2 prtdiag-1.2.tar.bz2
              tar xvf prtdiag-1.2.tar

              you will find prtdiag program you can run and get the system info on linux.


              Hope this info helps

              -Sri
              • 4. Re: How to get Physical Memory and CPU speed using unix commands?
                480567
                This note with id 69200.1 should give most of the commands you need but seems like the note is disabled in Metalink. Below are few of the commands. Hope this help!!

                ~Ash

                a.Solaris:
                $ /usr/sbin/prtconf |grep -i "Memory size"
                $ swap -s
                $ df -k
                $ /usr/local/bin/top
                $ vmstat 5 100
                $ sar -u 2 100
                $ iostat -D 2 100
                $ mpstat 5 100
                a.     HP-UX 11.0:
                $ grep Physical /var/adm/syslog/syslog.log
                $ df -k
                $ sar -w 2 100
                $ sar -u 2 100
                $ /bin/top
                $ vmstat -n 5 100
                $ iostat 2 100
                $ top
                b.     AIX:

                $ /usr/sbin/lsattr -E -l sys0 -a realmem
                $ /usr/sbin/lsps -s
                $ vmstat 5 100
                $ iostat 2 100
                $ /usr/local/bin/top # May not be installed by default in the server

                c.     Linux [RedHat 7.1 and RedHat AS 2.1]:
                $ dmesg | grep Memory
                $ vmstat 5 100
                $ /usr/bin/top

                2.     PHYSICAL MEMORY AND SWAP SPACE

                OS Specific Commands:
                AIX:
                /usr/sbin/lsattr -E -l sys0 -a realmem
                /usr/sbin/lsps -s

                HP-UX:
                grep Physical /var/adm/syslog/syslog.log
                /usr/sbin/swapinfo -t

                Linux:
                cat /proc/meminfo | grep MemTotal
                /sbin/swapon -s

                Solaris:
                /usr/sbin/prtconf | grep "Memory size"
                /usr/sbin/swap -s

                Tru64:
                vmstat -P| grep -i "Total Physical Memory ="
                /sbin/swapon -s