• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 42079
  • Last Modified:

commands to get system information for AIX

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.
  • 4
  • 3
  • 2
3 Solutions

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.
wesly_chenAuthor Commented:
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
Indeed AIX 4.3 is rather old... Maybe this command:
lsattr -El proc0

where 0 is the number of your processor
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

wesly_chenAuthor Commented:
> 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
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
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.
wesly_chenAuthor Commented:
the script works.
lscfg -vp
also provide some more useful information.
wesly_chenAuthor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now