Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


commands to get system information for AIX

Posted on 2006-06-28
Medium Priority
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 1120 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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 1120 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 80 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

610 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