How to find out CPU and Memory of Unix box?

Machine Info

HP-UX

http://craeser.wordpress.com/2009/04/23/hp-ux-how-to-get-machine-informa...

 

CPU

HP-UX CPU:

/usr/sbin/ioscan -k |grep -n processor | wc -l

SunOS CPU:

1) /usr/sbin/psrinfo -v | grep MHz | wc -l

2) top

Load averages: 0.02, 0.02, 0.02
143 processes: 121 sleeping, 21 running, 1 zombie
Cpu states:
CPU   LOAD   USER   NICE    SYS   IDLE  BLOCK  SWAIT   INTR   SSYS
 0    0.02   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
 1    0.02   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
 2    0.01   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
 3    0.02   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
---   ----  -----  -----  -----  -----  -----  -----  -----  -----
avg   0.02   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%

Memory: 282896K (177928K) real, 1108180K (267252K) virtual, 5696704K free  Page# 1/4
 

3) $ /usr/platform/`uname -m`/sbin/prtdiag
System Configuration:  Sun Microsystems  sun4us Fujitsu PRIMEPOWER450 4x SPARC64 V
System clock frequency: 220 MHz
Memory size: 24576 Megabytes

========================= CPUs =========================

                    Run   Ecache   CPU    CPU
Brd  CPU   Module   MHz     MB    Impl.   Mask
---  ---  -------  -----  ------  ------  ----
 0     0     0      1650     3.0   5        5.1
 0     1     1      1650     3.0   5        5.1
 0     2     2      1650     3.0   5        5.1
 0     3     3      1650     3.0   5        5.1

========================= IO Cards =========================

     Bus   Freq
Brd  Type  MHz   Slot        Name                          Model
---  ----  ----  ----------  ----------------------------  --------------------
 0   PCI    33            1  network-SUNW,hme
 0   PCI    66            1  FJSV,pwga-fjgi                Broadcom,BCM5703C
 0   PCI    66            1  ethernet-pci1148,9843
 0   PCI    33            2  FJSV,ulsa-fjulsa/disk (block+ FUJITSU,1030
 0   PCI    33            2  FJSV,ulsa-fjulsa/disk (block+ FUJITSU,1030
 0   PCI    33            3  fibre-channel-pci10df,f900
 0   PCI    33            3  fibre-channel-pci10df,f900
 0   PCI    33            7  isa/su (serial)
 0   PCI    33           10  usb-pci108e,1103.0
 0   PCI    33           13  ide-pci10b9,5229.c4/disk (bl+

No failures found in System
===========================
 

Linux

1) -> dmesg | grep -i "cpu"
SMP: Allowing 8 CPUs, 4 hotplug CPUs
Initializing CPU#0
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
CPU0: Thermal monitoring enabled (TM1)
Initializing CPU#1
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: Physical Processor ID: 3
CPU: Processor Core ID: 0
CPU1: Thermal monitoring enabled (TM1)
                  Intel(R) Xeon(TM) CPU 3.20GHz stepping 01
Initializing CPU#2
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
CPU2: Thermal monitoring enabled (TM1)
                  Intel(R) Xeon(TM) CPU 3.20GHz stepping 01
Initializing CPU#3
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: Physical Processor ID: 3
CPU: Processor Core ID: 0
CPU3: Thermal monitoring enabled (TM1)
                  Intel(R) Xeon(TM) CPU 3.20GHz stepping 01
Brought up 4 CPUs
mtrr: your CPUs had inconsistent fixed MTRR settings
mtrr: probably your BIOS does not setup all CPUs.
microcode: CPU2 updated from revision 0xd to 0x17, date = 04222005
microcode: CPU1 updated from revision 0xd to 0x17, date = 04222005
microcode: CPU3 updated from revision 0xd to 0x17, date = 04222005
microcode: CPU0 updated from revision 0xd to 0x17, date = 04222005
 

2)$ cat /proc/cpuinfo|more
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 26
model name      : Intel(R) Xeon(R) CPU           E5520  @ 2.27GHz
stepping        : 5
cpu MHz         : 2266.800
cache size      : 8192 KB
physical id     : 1
siblings        : 8
core id         : 0
cpu cores       : 4
apicid          : 16
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx rdtscp lm
 constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
bogomips        : 4533.60
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: [8]

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 26
model name      : Intel(R) Xeon(R) CPU           E5520  @ 2.27GHz
stepping        : 5
cpu MHz         : 2266.800
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 0
cpu cores       : 4
apicid          : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx rdtscp lm
 constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
bogomips        : 4533.68
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: [8]

 

 


mpstat -P ALL
Linux 2.6.18-238.1.1.el5 (boxname)    03/10/2011

06:01:07 AM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
06:01:07 AM  all    0.35    0.00    0.23    1.18    0.01    0.01    0.00   98.22   1226.04
06:01:07 AM    0    0.52    0.00    0.62    5.07    0.00    0.02    0.00   93.76   1048.99
06:01:07 AM    1    0.52    0.00    0.29    4.22    0.00    0.01    0.00   94.96     17.04
06:01:07 AM    2    0.93    0.03    0.21    4.55    0.00    0.03    0.00   94.25     18.63
06:01:07 AM    3    0.09    0.00    0.10    0.22    0.00    0.00    0.00   99.59      1.09
06:01:07 AM    4    0.17    0.00    0.07    0.25    0.00    0.00    0.00   99.50      9.30
06:01:07 AM    5    0.04    0.00    0.04    0.06    0.00    0.00    0.00   99.86      0.03
06:01:07 AM    6    0.25    0.00    0.26    0.27    0.01    0.06    0.00   99.15     47.96
06:01:07 AM    7    0.06    0.00    0.05    0.05    0.00    0.00    0.00   99.84      0.00
06:01:07 AM    8    0.73    0.00    0.20    0.45    0.00    0.00    0.00   98.61      0.52
06:01:07 AM    9    0.20    0.00    0.17    0.40    0.00    0.00    0.00   99.23      0.22
06:01:07 AM   10    0.76    0.00    0.43    1.05    0.00    0.01    0.00   97.73      0.98
06:01:07 AM   11    0.67    0.00    0.51    0.70    0.00    0.00    0.00   98.11      0.15
06:01:07 AM   12    0.25    0.00    0.17    0.27    0.01    0.01    0.00   99.29     68.60
06:01:07 AM   13    0.20    0.00    0.21    0.17    0.00    0.01    0.00   99.41      2.98
06:01:07 AM   14    0.15    0.00    0.17    1.00    0.00    0.00    0.00   98.68      5.27
06:01:07 AM   15    0.09    0.00    0.10    0.08    0.00    0.01    0.00   99.72      4.26

 

 

Model

HP-UX:

% model
9000/800/rp3440
 

Memory

Linux

[/proc]:
=> more meminfo
MemTotal:     24551228 kB
MemFree:       1213908 kB
Buffers:        207340 kB
Cached:       10350348 kB
SwapCached:      18864 kB
Active:       15977656 kB
Inactive:      6267152 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:     24551228 kB
LowFree:       1213908 kB
SwapTotal:    50331640 kB
SwapFree:     50228656 kB
Dirty:             680 kB
Writeback:           0 kB
AnonPages:    11684956 kB
Mapped:         376464 kB
Slab:           837384 kB
PageTables:      46352 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:  62607252 kB
Committed_AS: 15790568 kB
VmallocTotal: 34359738367 kB
VmallocUsed:    308888 kB
VmallocChunk: 34359429443 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     2048 kB
 

 

Network

HP-UX:

$ lanscan
Hardware Station        Crd  Hdw   Net-Interface    NM   MAC       HP-DLPI DLPI
Path     Address        In#  State NamePPA          ID   Type      Support Mjr#
0/1/2/0  0x001321D66050 0    UP    lan0 snap0       1    ETHER       Yes   119
0/2/1/0/6/0 0x0014C29CB774 1    UP    lan1 snap1       2    ETHER       Yes   119
0/3/1/0/6/0 0x0014C29CE7B6 2    UP    lan2 snap2       3    ETHER       Yes   119
0/4/1/0/4/0 0x001279FED270 3    UP    lan3 snap3       4    ETHER       Yes   119
0/4/1/0/5/0 0x001279FED271 4    UP    lan4 snap4       5    ETHER       Yes   119
0/4/1/0/6/0 0x001279FED272 5    UP    lan5 snap5       6    ETHER       Yes   119
0/4/1/0/7/0 0x001279FED273 6    UP    lan6 snap6       7    ETHER       Yes   119
 

Linux:

-> ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:12:79:D8:E1:CD
          inet addr:10.12.128.182  Bcast:10.12.128.255  Mask:255.255.255.0
          inet6 addr: fe80::212:79ff:fed8:e1cd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:132350633 errors:0 dropped:0 overruns:0 frame:0
          TX packets:86025231 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:93460949684 (87.0 GiB)  TX bytes:19153927998 (17.8 GiB)
          Interrupt:217 Memory:fdef0000-fdf00000

eth1      Link encap:Ethernet  HWaddr 00:12:79:D8:E1:CC
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:225 Memory:fdee0000-fdef0000

 

SunOS:

$ ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.12.128.92 netmask ffffff00 broadcast 10.12.128.255
hme0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.12.128.134 netmask ffffff00 broadcast 10.12.128.255