AIX command CheatSheet

★AIX compression with TAR, COMPRESS, GZIP, ZCAT
tar
tar in AIX by default does not support compression. You will need to incorporate with gzip command to have it

tar and compress at the same time.

$ tar cvf test.tar test                             # pure tar only
$ tar cvf - test | gzip > test.tar.gz        # tar and compress together

gzip / gunzip

$ gunzip -c test.tar.gz | tar tvf -           # list compress files
$ gunzip -c test.tar.gz | tar xvf -           # decompress files

★nmon command

nmon -fT -s DATAinterval(unit in seconds) -c NUMBERofExecutions

nmon -fT -s 1 -c 10800

→ Data will be recorded every 1 seconds
→ nmon data will be recorded : 1sec x 10800times = 3hours

★tcpdump

#Write an output file of tcpdump result

tcpdump -i en20 -w dumpfilename.out
tcpdump -w dumpfile

#Read the result of tcpdump

tcpdump -r dumpfilename.out
or
tcpdump -r dumpfilename.out > dumpfilename.out.result
more dumpfilename.out.result

★Check AIX Network Status
Network Interface

OVERVIEW and PROCEDURE

The task that is described in this procedure is performed in the AIX terminal window. If the terminal window

is not open at this time, you may do so by using the instructions in Hardware Management Console Overview.

After the terminal window is open, simply type

netstat -r

Where netstat = network status

-r = route

The primary information to check is located in the first entry in the top-left, “default”, and then the column

to the far right titled “If”. This column tells you what interface is being used.  For instance, “en0”.

Secondarily, you may run an additional command to

entstat -dt en0

Where entstat = network settings

-dt = display all statistics

en0 = The interface from the If column

As a result of this command, the  information that you should check is as follows:

Link Status : up  Tells you that the cable is attached and is connected to a switch. In other words, the cable

from the system to the network is functional. This is a good thing!

NOTE: If the status is down (Link Status : down), there is a problem with the cable, or the switch, or the

port.

Media Speed Selected  Should read “100 Mbps Full duplex”

Exception: If the machine has a gigabit card, it will read “Autonegotiate”

Media Speed Running   Should read “100 Mbps Full duplex”

IF your system has a NIC / NIB (network interface backup) as en20, you may try the below command to check the

status of each primary and secondary network condition.

entstat -dt en20 | egrep “(Link Status|Media Speed)”

command result (sample):
Link Status: Up
Media Speed Selected : Autonegotiation
Media Speed Running : 1000 Mbps Full Duplex
Link Status: Up
Media Speed Selected : Autonegotiation
Media Speed Running : 1000 Mbps Full Duplex

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: