commands to get system information for AIX

Posted on 2006-06-28
Last Modified: 2013-11-17
Dear experts,

   I would like to know as a regular unix user, how what commands can get the information of AIX 4.x and 5.x system
CPU clock speed (in MHz or GHz),
memory size (in MB or GB),
swap size (in MB or GB),
hard disk volume (in GB, not filesystem size)
System model (Such as J6700)
System Serial number (if possible)

   I want to put those commands into a script so end users can run it to get the information for the AIX they are login.
As root, I can get those information and I would like to know the commands for regular user.
Most important information is the CPU speed, physical memory size, swap size, and disk volume.

Thanks in advance.
Question by:wesly_chen
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2

Accepted Solution

JulieBouillon earned 280 total points
ID: 17003494

You can use the prtconf command to list your AIX hardware configuration, including CPU's, memory, adapters, disks and network. The prtconf command is available since AIX 4.3.3 (IIRC), and of course for AIX 5. If you are running older versions of AIX, here's a list of commands that can/could provide the same information:
 - lscfg [-v] -> devices (-v = verbose for microcode levels, etc)
 - lsdev -Cc adapter -> adapter cards
 - lsdev -Cc disk -> disks
 - lsdev -Cc processor -> CPU's
 - lsattr -El sys0 -> serial number, model number, memory
 - lsvg -o -> active volume groups
 - lsvg -p vgname -> disk drives in VG
 - lsvg -l  vgname -> LV's in VG
 - lslv  lvname -> LV detail
 - lslv -l lvname -> LV disk location
 - lspv -> disks
 - lspv -l hdisk# -> LV's residing on a disk
 - lsdev -Cc if -> List network interfaces

See the man pages for those commands. If you have prtconf on one of your server, you can have a look at it since it is only a shell script. You will then see example of how to use the previous commands.
LVL 38

Author Comment

ID: 17005327
prtconf is the right command I want. However, I've AIX which
"prtconf" doesn't show "Processor Clock Speed".
Any command can show CPU speed for AIX 4.3.x

Expert Comment

ID: 17005521
Indeed AIX 4.3 is rather old... Maybe this command:
lsattr -El proc0

where 0 is the number of your processor
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 38

Author Comment

ID: 17005690
> oslevel
> lsattr -El proc0
state enable         Processor state False
type  PowerPC_POWER3 Processor type  False

It shoe the CPU type, not the CPU clock speed.
> prtconf | grep "Processor Type"
Processor Type:  PowerPC_POWER3
LVL 62

Expert Comment

ID: 17006881
1) POSIX standard OS Version
 uname -a
2) AIX version and patchlevel
 oslevel -r
3) All devices
 lscfg -vp

> Any command can show CPU speed for AIX 4.3.x
For 604e-s found from feature codes, printed on CPU board

Assisted Solution

JulieBouillon earned 280 total points
ID: 17007746
Let's try this one:
typeset -i16 CPUSPEED=16#`lscfg -vp | grep "PS=" | tail -1 | cut -f2 -d'=' | cut -f1 -d','`
typeset -i MHZ=$CPUSPEED/1000000
echo $MHZ

lscfg -vp returns VPD data with device information
the grep get rid of unwanted lines, the tail keep the last line (you may have several lines), then we extract the CPU speed
The CPU speed is expressed in hexadecimal hence the typeset -i16=16#<hex value>
We convert the value to something more human readable
And finally display the value

Not tested under AIX 4.3 since I don't have such old config anymore. I hope it works.
If it's not working, I'm afraid we will need to use some kind of table to extrapolate the CPU speed.
LVL 62

Assisted Solution

gheist earned 20 total points
ID: 17010821
LVL 38

Author Comment

ID: 17012407
the script works.
lscfg -vp
also provide some more useful information.
LVL 38

Author Comment

ID: 17012510
Thanks very much.

The summary for my question:
prtconf : memory size, swap size, model, number of CPU, CPU clock (AIX 5.x above)
model : Model number
--For CPU clock spped --
typeset -i16 CPUSPEED=16#`lscfg -vp | grep "PS=" | tail -1 | cut -f2 -d'=' | cut -f1 -d','`
typeset -i MHZ=$CPUSPEED/1000000
echo $MHZ
lscfg -vp : for serial number and hardware configuration

Those IBM RS6000 machines we have are loaned from IBM as partnership.
They will upgrade them to AIX 5.3.x soon.

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question