Solved

commands to get system information for AIX

Posted on 2006-06-28
9
40,581 Views
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.
0
Comment
Question by:wesly_chen
  • 4
  • 3
  • 2
9 Comments
 
LVL 4

Accepted Solution

by:
JulieBouillon earned 280 total points
Comment Utility
Hi,

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.
0
 
LVL 38

Author Comment

by:wesly_chen
Comment Utility
prtconf is the right command I want. However, I've AIX 4.3.3.0 which
"prtconf" doesn't show "Processor Clock Speed".
Any command can show CPU speed for AIX 4.3.x
0
 
LVL 4

Expert Comment

by:JulieBouillon
Comment Utility
Indeed AIX 4.3 is rather old... Maybe this command:
lsattr -El proc0

where 0 is the number of your processor
0
 
LVL 38

Author Comment

by:wesly_chen
Comment Utility
> oslevel
4.3.3.0
> 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
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 61

Expert Comment

by:gheist
Comment Utility
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
0
 
LVL 4

Assisted Solution

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


Explanation:
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.
0
 
LVL 61

Assisted Solution

by:gheist
gheist earned 20 total points
Comment Utility
0
 
LVL 38

Author Comment

by:wesly_chen
Comment Utility
the script works.
And
lscfg -vp
also provide some more useful information.
0
 
LVL 38

Author Comment

by:wesly_chen
Comment Utility
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 --
#!/bin/ksh
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.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
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…
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.

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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now