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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

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

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

Question has a verified solution.

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

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
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.
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

743 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