AIX Commands

I’m starting a thread for me to keep up with some AIX commands and syntax since I have taken over some environments that sit on IBM AIX servers.

$mailx -s “TEST” me@home.com < /some/file

find /logs/SE -name *20100119* -print | xargs ls -ltdr {}

errpt -a | more

diag

echo "runcpu ppda" |/usr/sbin/kdb|grep ref_time

prtconf | more | grep -i "whatever"

Created a tar file vpw_log.tar file
tar –cvf vpw_log.tar FirstLogFile.log

Then
find . -name '*.gz' | xargs tar -rvf vpw_log.tar

After that deleted all .gz files
find . -name '*.gz' | xargs rm

To run the adapter ELA directly from the command line, issue this command:
diag -d [css0 | css1] -e

CPU INFO:
tprof
ps avg
topas
Displaying top CPU_consuming processes:
#ps aux | head -1; ps aux | sort -rn +2 | head -10

Displaying top 10 memory-consuming processes:
#ps aux | head -1; ps aux | sort -rn +3 | head

Displaying process in order of being penalized:
#ps -eakl | head -1; ps -eakl | sort -rn +5

Displaying process in order of priority:
#ps -eakl | sort -n +6 | head

Displaying process in order of nice value
#ps -eakl | sort -n +7

Displaying the process in order of time
#ps vx | head -1;ps vx | grep -v PID | sort -rn +3 | head -10

Displaying the process in order of real memory use
#ps vx | head -1; ps vx | grep -v PID | sort -rn +6 | head -10

Displaying the process in order of I/O
#ps vx | head -1; ps vx | grep -v PID | sort -rn +4 | head -10

Displaying WLM classes
#ps -a -o pid, user, class, pcpu, pmem, args

Determinimg process ID of wait processes:
#ps vg | head -1; ps vg | grep -w wait

Wait process bound to CPU
#ps -mo THREAD -p

Cpu usage with priority levels
#topas -P

you can check CPU in any UNIX flavor using:

sar 1 100
sar -P ALL 1 100

this will output the statistics of CPU usage in terms of %user, %sys and %idle percents.

You can check for memory usage by using:

#vmstat 1 100
In this command, if we see more number on pi po then its memory issue
# vmstat -w 2 5

this will check your memory (real and virtual).

Linux, Tutorials/Whitepapers
Tags: , , , , , ,

3 comments to AIX Commands

  • […] AIX Commands […]

    Reply
    • Kammo

      Check out nmon. An IBM’er wrote it, also available on various Linux platforms, a utility I add to every server. I build

      Reply
  • thepuregeek

    After joining a VG use lspv command:
    # lspv hdisk7 | awk ‘/FREE PPs/ {print “The disk size is ” $4″ “$5}’

    Reply

Leave a Reply

Comment
Name*
Mail*
Website*