This section mainly collates some of the Linux and AIX commands that are often used during performance testing.
1 Basic Commands
PWD View current directory
Ls-a View hidden Information-L View details
CD go to specified directory
mkdir Create a directory
MKDIR–P Create multilevel Catalogs
RmDir Delete directory (cannot delete current directory or parent directory and must be empty)
RM-RF File Delete Files
Clear Screen
Istat View information about the file I_node table
Touch update file access and modification time
Date lists the current date time
Who view logged in users
Who am I to view the current user
SU Switch User
Man Help
VI file Create/Edit file
Exit exits
CP Source Target Copy files
MV source target moves or renames a file
Cat View File Contents
COMPRESS-V File Compressed Files
Uncompress file.z Extract Files
passwd Modify Password
Shutdown-h now turn off the machine.
Shutdown-r now shut down and reboot immediately.
Reboot reboot
2 View Port connection number command
Netstat-an | find/i "8000"/C Windows view 8000 port connections
Netstat-an | grep 8000 Linux and Aix to view Port 8000 connections
Netstat-an | grep 8000 |wc-l automatic statistics Linux and AIX port number 8000 connections
3 Change Permission command
chmod a-x myfile rw-rw-rw-Reclaim all user's Execute permissions
chmod og-w myfile rw-r--R-Reclaim write permissions for same group of users and other users
chmod g+w myfile rw-rw-r--Give the same group of users write permissions
chmod u+x myfile rwx rw-r--Give file owner executive permission (common)
chmod go+x myfile rwx rwx r-x give the same group of users and other users permission to execute
4 Copy File command
Remote directory Copy to Local
SCP Cata@108.199.2.201:/home/cata/nmon/nmon/home/oracle/nmon
Local Copy to remote directory
SCP awr* Cata@108.199.2.201:/home/cata/nmon
Access to FTP mode copy under Windows
SFTP cata@108.199.2.201
SCP db205_20150928* Cata@108.199.2.201:/home/cata/nmon
SCP db206_20150928* Cata@108.199.2.201:/home/cata/nmon
5 Viewing performance commands
Top is a commonly used performance analysis tool under Linux to display the resource occupancy status of each process in the system in real time
Topas is a statistic that reports the activity of the selected local AIX system
Nmon perform Nmon real-time view of resource usage (installation required)
CTRL + C interrupt execution of program
6 View Process commands
PS-EF View All Processes
Ps-ef| grep Nmon View processes that contain Nmon keywords
ps-a | grep nmon get Process pid
Kill-9 PID End Process