AIX operating system and common command

xiaoxiao2021-03-04  46

First, AIX performance and characteristics:

1. Short heavy dry kernel and rich enterprise procedures

AIX designers have carefully designed the system's kernel, making it brief and strong and can be resident in memory. Separate from the part from the core from the core, the separated portion is treated in the nuclear external system.

2, good user interface

AIX is fully functional to the user's interface features and easy to use. These include: Command is an interface that the user interacts the session with the system via the keyboard and the display terminal. The system call command is an interface for users to use when writing applications. X-windows is a graphical interface environment between the system and the user.

3, file system for loading and unloading file volume

The entire file system of AIX consists of a basic file system and several detachable subfiles systems that allow users to put their file volumes into and connect to the basic file system, and can be disassembled. This feature of AIX is easy to expand file storage space and is safe and confidential.

4, files, catalogs and various I / O equipment are all processed as files

In order to facilitate users, AIX uses ordinary data files, directory files, and I / O devices, and the three use the same protection mechanism, which they have the same syntax and semantics in front of the user.

5, good performance network environment

AIX provides users with a good network environment, including: a set of network communication protocols, such as TCP / IP. A set of network communication tools, such as Mail, Write, Wall, Talk, etc. A set of network programming interfaces, such as TLI (Transport Layer Interface) and Socket, etc.

6, perfect security mechanism

AIX has a perfect multi-level security / confidential mechanism, with some basic contents of the user-level mechanism include: AIX divides other users into ordinary users and privileges (super) users, each of which enjoy different permissions. AIX creates a householder for each user, called a user account. The system organizes and records activities in the system through user accounts and limits them within a certain activity range. AIX requires that each user must register with a legal username, the correct password, and each user is marked into a particular user group. AIX requires that each user must access the file / directory in accordance with the permissions you have, and access to the permission is not accepted by the system.

7, AIX is written in C language, very convenient to transplant

Second, the basic structure of AIX

AIX uses the overall framework of organic combination of kernels and nuclear procedures. From logically, the entire system can be divided into five layers: hardware layer, core layer, system call layer, an intra-external procedure layer, and a housing layer.

The hardware layer is the foundation of the AIX system. On the one hand it has to provide the necessary hardware support for AIX, and on the other hand, it works in an orderly manner in the unified management of the system. The hardware layer includes CPU, memory, I / O device, and network control components.

The kernel layer is an important part of the AIX system. It is responsible for managing, all resources in the system, including hardware resources, software resources, and information resources. The AIX core includes part of interrupt / falling processing, storage management, process management, I / O device management, and file management.

The system call layer is the interface of the kernel and the procedure program. The procedures are serviced by the subsidiary of the kernel to call the kernel.

The nuclear program layer works under kernel support. The user can perform control through the outer casing layer. It mainly includes a verbal conventional system program, various utility software and user applications.

The outer casing is an AIX system directly facing the user's outer interface, which consists of shell and x-window. Shell is a command language / command programming language environment of the AIX operating system. In this environment, users can use a single shell command or write shell command programs. X-Window is a graphical user interface of the AIX system.

Some basic concepts of UNIX

First, account

1, ordinary user account

Ordinary user account is the most commonly used user account. It mainly involves this content: User Login Name User Password Identifier (GID) User Login Directory (Home Directory) User Login Shell

2, super user account

Super User Account has its fixed login name root. Super users have the highest power in the system, any files in the system can read or edit the system, can perform any of the system, so you must be cautious when using a super user account, you cannot freely delete or modify important files or other content in the system. In order to ensure safety, the password of the Super User Account should be kept confidential by the person and change every other time. Second, files and directories

The file is the basic unit of the UNIX system, a total of three different types of files: Normal file normal files are usually referred to as program files and text files to store data. They are both text, but also binary, some can also be implemented. The directory file directory file includes information for accessing other files, referred to as a directory. Special files define a piping of advanced first out (FIFO) or a physical device, usually referring to external devices such as tape, disk.

1, ordinary document

Ordinary files are the most common file, which is a collection of data information in bytes, including text, program code, program data, and executable binary code files. Each normal file has the following basic attributes: a file name. A unique file index number, i.e., i node. Size in bytes. Recent access time and modification time. A set of access rights. The primary name. A group name.

Use the command ls -li to see the properties of a normal file:

1234 -RWXR-XR-X 2 User Group 688 NOV 27 1999 / USR / Calender index number file flag and access rights link number The primary name group name byte last modified time file name

Ordinary files can also be divided into two categories: text files and binary files.

(1), text file

Text files are files that contain user readable information. These files are stored in ASCII codes, displayed and printed. The row of text files cannot include empty characters (ie NULL in the code), and the maximum length of the row (including the wrap) cannot exceed the number of bytes defined by (line_max). However, the text file does not limit the use of control characters other than empty characters or other non-print characters.

(2), binary file

The binary is a file containing computer readable information. The binary file can be an executable file that completes an item based on the instructions there. Commands and programs are stored in executable and enforced files. The binary file has no long limit, or the empty character can also be included.

2, catalog file

A directory file is a unique file type, which only contains information required to access files or other directories, usually referred to as a directory. The directory contains a directory entry, and each directory item contains a file name / directory name and a node number. In order to improve access speed, take advantage of disk space, the data in the file is stored in different locations. So the address of the hash data block associated with a file is included in one I node. i nodes also contain information about the recent access and modification time, access rights, links, file owners and file types, etc. You can create multiple directory items by using the ln command, link different files to the same I node. The directory can be defined by the operating system, system administrator, and users. E.g:

/ Root Catalog / DEV includes special files for input and output devices / ETCs include files / HOME, including system initialization and system management, including system users, include some temporary files / usr including LPP, include, and other system directories / USR / bin includes a user executable program.

The catalog structure is often compared to an inverted tree, called the number of directory. The parent directory is the subdirectory.

3, special file

Special documents are in fact refer to pipes and some physical devices connected to the system, such as hard disk, terminal, tape drive, etc. These special files are typically stored in the / dev directory in UNIX systems. Special documents are divided into three types: FIFO (advanced first out) pipeline file, block device special file and character device special file.

The FIFO pipe file is created by the process and is temporarily communicated with the process with another process. These files no longer exist when the process is created. The special file of the block device refers to a device such as a hard disk, a floppy disk, and a tape, and their recording data is in units of 512 bytes (512byts = 1block), and therefore referred to as block devices. (The first letter is b) Character equipment special file refers to the device of the printer, terminal, and displays. These devices are typically in units of data when data transmission is transmitted, and thus is called a character device. (The first letter is c), for example: BRW-RW-RW 3 bin bin 2 7 NOV 19 14:00 / dev / fd0 CW - W - W 2 bin bin 6 0 NOV 30 10:02 / dev / lp equipment Special file link Number The primary name of the primary device number final modification time special file name

Its main device number represents the type of device, and the secondary device number indicates that the device is the first few such devices in the system. Almost every block device has a character interface, and there is a special file for the character interface of this block device. Usually, a letter R is added in front of the file name of the block device special file. FD --- RFD.

4, files and directories named

(1) The length of the file name is up to 256 characters.

(2) The file name is subject to case.

(3), indicate the current working directory; indicates the previous directory of the current working directory; ~ and home represent the user's login directory.

(4), * Wild a number of characters;? Wild a single character; [] Waplely match any character in parentheses;! Widely displays any characters outside of the characters.

5. Access to files and catalogs

The read rights R digital representation 4. Write rights W digital representation is 2. Execution X digital representation is 1.

Third, orders

1. There must be space between commands, logos, and parameters.

2, two or more commands can be input in the same line, in the middle of the semicolon; separated.

3, the command job is put in the background, and the command is finally added to the symbols.

4. Use history when listing the previously entered command list.

5. Run the command history in the history history.

6. Replace the command string in the command history to use R old string = new strings.

7. Use alias name = string when creating a command alias, such as $ alias dir = "/ usr / bin / ls -alf".

Installation of AIX

Before installation, you must meet the IBM installed conditions and all hardware devices have been connected. Open the power of the external device and system, assume that the system will start from the disc after the power is turned on. After selecting the language environment used to select the console and installation, the system will appear to be prompted for users to choose the function.

Welcome to base operationing system installation and maintenance

Type the numbers of your choise and press enter. Choice indeicate by >>>

1. Start Install now with default settings 2. Change / show installation settings and install 3. Start Maintenance Mode for System Recovery

88. Help? >>> Choice [1]:

The third item is a single user environment set to fix some errors in the system. The first item is if you do not want to change any default settings, choose 1 to start installing. The second item is to change or view the settings of the system installation. In the submenu of the second item, there are three options that can be changed:

Installation settings

ENTER TYPE 0 or Press Enter to install with current settings, or try to change and press enter.1. System settings method of installation ---------------- --------------------- New and Complet Overwrite Disk Where You Want to Install ------------------- --------- hdisk0

2. PRIMARY LANGUAGE ENVIRONMENT SETTINGS (After Install) Cultural Convention -------------------------------- C (POSIX ) ,---------------------------------------------------------------------------------------------------------- C (POSIX) Keyboard --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --- C (POSIX)

3. Install Trusted Computing Base --------------------------- NO

0. Install with the settings listed above

88. Help? 99. Previous menu

>>> CHOICE [1]:

The option 1 is a new installation. Installing the system using this method will overwrite all the data on the target disc of the user. Option 2 is a migration installation. This method is often used to do system upgrades (such as upgraded from AIX 3.2 to AIX4.1), when using this method, except that all file systems other than TMP will be retained. But some AIX devices driven software must be reinstalled. Option 3 is to keep the installation. This installation method can be selected if the user wants to retain user data in the rootvg volume group. All data in / usr, / tmp, / var, and / file systems will be overwritten, and the system must be reconfigured after the system is installed.

When the above parameters are selected, you can start the installation system.

After the system is installed, it will be automatically restarted, and the screen of install_assist is available for the user for basic configuration.

Other practical skills

1, check the software version command

# oslevel # lslpp -l

Oslevel is used to see the version of the AIX operating system.

LSLPP -L is used to view the version of each file package for the system.

example:

# lslpp -l> lpp.txt

The following information is included in lpp.txt:

FileSet Level State Description -------------------------------------------------------------------------------------------------------------------------- ------------------------------ path: / usr / lib / Objrepos IMNSEARCH.BLD.DBCS 1.2.0.4 Committed Netquestion DBCS Buildtime Modules IMNSearch.bld.SBCS 1.2.1.3 COMMITTED NetQuestion SBCS Buildtime Modules IMNSearch.rte.DBCS 1.2.0.4 COMMITTED NetQuestion DBCS Search Engine IMNSearch.rte.SBCS 1.2.1.3 COMMITTED NetQuestion SBCS Search Engine IMNSearch.rte.httpdlite 1.1.1.1 COMMITTED NetQuestion Local http daemon java.adt.docs 1.1.6.0 committed java documentation java.adt.includes 1.1.6.4 Committed Java Application Development Toolkit Includes2, view all error messages

At the system run, some system error records are recorded in Errlog, where some errors are displayed on the terminal, check the error logs available:

# Errpt | More View System All Records

IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION E85C5C4C 0426104399 P S CFGLFT SOFTWARE PROGRAM ERROR 2BFA76F6 0426104099 T S SYSPROC SYSTEM SHUTDOWN BY USER 9DBCFDEE 0426104399 T O errdemon ERROR LOGGING TURNED ON 192AC071 0426103999 T O errdemon ERROR LOGGING TURNED OFF AA8AB241 0423132999 T O clstrmgr OPERATOR NOTIFICATION

among them

Identifier is an error number that is often used when you need to check the details.

Time stamp is a time label, which records the error time, its format: monthly day, day, year

T is Type, which records the error type P: for a permanent error, you need to pay attention to T: Temporary error.

C is Class, which records the error type H: Hardware S: Software o: Erloger Command Messages u: UndeteMined

Resource_name is an incorrect source

Description is an error description

View system detailed record content

# Errpt -aj | PG

Where Identifier is the wrong number, such as # errpt -aj 0426104399 | PG

View system all hardware error records

# Errpt -DH

3, the operation of the file system

(1) list all file systems

# lsfs

Its role is to list all file systems, and its output is as follows:

Name Nodename Mount Pt Vfs Size Options Auto Accounting / DEV / HD4 - / JFS 16384 - YES NO / DEV / HD1 - YES NO / DEV / HD2 - YES NO / DEV / HD2 - / USR JFS 2818048 - YES NO / dev / hd9var - / var jfs 16384 - Yes NO / DEV / HD3 - / TMP JFS 32768 - YES NO / DEV / LV00 - / IBMCXX JFS 835584 RW NO (2) lists all MOUNT File system

# mount

Its output is as follows:

Node Mounted Mounted over VFS Date Options -------- --------------------------------------------------- - - ------------ --------------- / DEV / HD4 / JFS NOV 16 12:47 rw, log = / dev / hd8 / dev / HD2 / usr JFS NOV 16 12:47 rw, log = / dev / hd8 / dev / hd9var / var jfs NOV 16 12:47 rw, log = / dev / hd8 / dev / hd3 / tmp JFS NOV 16 12:47 rw LOG = / dev / hd8

/ DEV / HD1 / HOME JFS NOV 16 12:49 rw, log = / dev / hd8

(3) View the use of each file system

# df -k

Its output is as follows:

Filesystem 1024-block Free% Used iUsed% iused mounted on / dev / hd4 81920 68568 17% 1724 5% / / / DEV / HD2 1409024 430896 70% 28467 9% / USR / DEV / HD9VAR 8192 6540 21% 293 15% / var / DEV / HD3 16384 15352 7% 51 2% / TMP / DEV / HD1 8192 3820 54% 54 3% / Home

(4), start, stop and detect HACMP

A Start HACMP B with (#TAIL -F /TMP/Hacmp.out) Tracking Output C View EN0, EN1 status, see if it has been switched from the boot address to the service address D (#lsvg -o) to see if DataVG has activated E Normal startup, use (#smit clstop) with (#Smit Clstop) to drop a Node through the Takeover mode DOWN, check if IP stops HACMP by another Node tube f, with (#smit clstop) The HACMP -GRACEFUL mode is deactivated by the GRACEful mode or the Force method is Node deactivated HACMP and releases the resource.

Use AIX system

First, the system starts

1, internal self-test

2, power self-test

3, load the kernel program

4, software configuration and initialization

Second, registration

Some options and settings are registered on the console:

1. Start over press this button to delete the original input, so you can re-enter the username and log in again.

2, Options (OPTIONS) Press this button to select the following: Language Session Command Line Registration Switch to the Command Line Environment Reset Registration screen Restart the X-Server username and passwords After entering the correct, you will enter the system.

Third, change the password

You can modify the password by using the passwd command. For example: $ passwd Changing password for "user" user's old password: user's new password: re-enter user's new password: After the input is correct, change the password success. When you register next time, you must use a new password to register success. Fourth, directory management

1. Display the current work directory PWD

2, display directory content ls [-option] [name]

The meaning of its parameters is: -a: Lists all file names included in the included. Started hidden files - T: List the file name -f: listing the current directory in accordance with the order of the final modification of the file The file name and its type. / End is expressed as a directory name, * End is indicated as an execution file, @ end is indicated as symblic link -l: list all the licenses, owners, file size, modification time and name -lg: the same, and display The owner of the file is the name -R: display the directory, and the file names of all the subdirectory

3. Change the current directory CD to the job directory to the login to the specified directory to go to the previous layer of the current directory

4, create a directory MKDir Directory

5, delete directory RMDir Directory

6, directory mission MV SOURCEDIRECTORY TARGETDIRECTORY

7. Contents Copy CP SourceDirectory Targetdirectory

V. File management

1, file copy CP Sourcefile Targetfile CP Sourcefile Targetdirectory

2, file delete RM file

3, file link LN Sourcefile TargetFile

4, file mobile / change MV Sourcefile Targetfile or targetdirectory

5, display file content more pg cat head tail

6, file lookup Find / -Name .profile -print Find. -Perm 0600 -Print Find. -Ctime 1 -Print Find. -INum 2145 -Print Find. -User abc -print

6. Change file / directory properties

Every file or directory has a home, a group name, and a set of access rights, access time, and more.

1. Change the recent visual time of the file or directory Touch

2, change the owner of the file or directory Chown

3, change the group of documents or directory ChGRP

4, change the access to the file or directory CHMOD CHMOD G W File CHMOD U R File Chmod U = RWX File Chmod 755 File

Seven, DOS format files

1. DOS format DOSFORMAT / DEV / FD0 for disk

2, display DOS file directory DOSDIR

3, read DOS format file dosread file1 file2

4, write DOS format file doswrite file1 file2

5, delete DOS format file dosdel file

Eight, process control

1, query process status PS PS -A PS-EF PS -L PS -U UID

2. Terminate the process of the process Kill 19160 Kill -9 19160

3. Control of the process Nohup Nice Sleep Wait

4. Run the program at the specified time AT Batch cron / usr / bin / crontab crontab and / var / spool / cron / crontabs /

Nine, exit system and shutdown Exit Ctr D logout shutdown [-option] [ Time Message]

When ShutDown does not bring any parameters, the machine will send a shutdown information to all terminals on it, then close all terminals after one minute, kill all the processes running on the system, remove all file systems, and finally closed system. You can also add some parameters after Shutdown, which are: -f: Quick shutdown, no warning information (Warning) -r: Start after turning off

The document editing command is in AIX, the commonly used document editing command is VI. Below, let's learn about the use of VI.

In VI, you must keep in mind that it has two states --- input status and command status. Switch by the input status to the command state, must be the ESC key; there is more commands that are converted from the command state to the input state, there are A, A, I, I, S, S, C, C, O, and O, etc.

Second, you must master the basic movement of the cursor. Because many of AIX commands are related to the location of the cursor. Keep in mind that only the cursor can be moved in the command state. You can move with the arrow keys or to move with H, J, K, and L. Where h is left, j is down, k up, and L is left right.

Third, remember the basic insertion, delete commands.

1, insert or attach the body

Insert or additional text is to join the new content to the file. Insert the character in front of the cursor, the command of the current line is inserted into the character's command for the command of the character, and the command of the attached character after the cursor is A, in the current row The command of the tail attached character is A. When the command is added to the current line, the command to add a number of lines of new content is O, and the command to add a number of new contents of the new content is O, which will make the VI convert to the insertion of the command state. State, when new content is added, you must press the ESC key to switch the VI by the insert state to the command state.

2, delete the body

The command to remove the body in VI is more, you can delete different units such as characters, words and rows. The command to delete the character will make the VI continue in the command state. Below is the meaning of each delete key and the position of the cursor after the end of the end.

Deleting key meaning Delete After the cursor location X button Delete the character where the cursor is located Move the next character X button Delete the cursor before the original character D button Delete the cursor to the line of the line. The tail DD button deletes the cursor where the cursor is located to the next line.

3, find or modify the body

/ Expression? expression

The former is to find backwards from the current cursor position, and the question mark represents the forward look forward from the current cursor position.

4, save text and exit VI

: w Save File Content

: w! Forcibly save the file content

: q Exits VI status

: q! Forced exit VI status

: WQ storage and exit

Shell

Shell is a command interpreter and a programming language. It has Korn Shell, Bourne Shell, and C shell, AIX uses K shell.

1, initialization file. Profile (.dtprofile) and user environment

In summary, .profile should complete confirmation to set the user terminal type, define a variety of necessary shell variables, and so on. Here is an example of .Profile: path = / usr / bin /: / etc: / usr / sbin: / usr / lib: $ home / bin: / usr / bin / x11: / sbin: / bin export path export ps1 = '$ PWD>' Export Editor = / usr / bin / vi set -o vi alias dir = "ls -l" Frequent environment variables in K Shell are: path variables for Path Query (to be out of the order) PATH = / usr / bin: / etc PS1 Shell Main Probe PS1 = '$ PWD>' PS2 Shell Secret Prompt PS2 = '>' PWD Current Work Directory TMOUT No Command Enter The waiting time (second) TMOUT = 200 Term Terminal Type Term = IBM3151 Home User's Home Directory Home = / Home / User / Editor Default Editor Editor = / USR / BIN / VI Use command SET to list current variables. File system and logical volume

First, the AIX system data storage method

In AIX, it is to organize data on multiple hard drives:

Physical volume PV separate hard disk / dev / hdisk0, / dev / hdisk1 ... can be subproved as a physical partition PP volume group VG one or more hard drives.

Logically, in a volume group VG, several logical volume LV can be defined. It can also be subdivided into logical partition LP. These logical volumes LV can be used as panging space, system logs, up to the vectors used as file system FileSystem, called a Log File System (JournaldFileSystem).

When the system is initially installed, a volume group called rootvg is used to load BOS. In the rootvg volume group, some logical partitions are used to load some specific system data, such as starting data HD5, logging (JL) HD8, Paging Space (PagingSpace) HD6, etc. This rootvg is always activated.

At least one or more important data zones (VGDA) in each volume group VG, at least one or more important data zones (VGDA). The VGDA content on each physical volume PV of the same volume group VG should be consistent.

In a volume group VG, the user can define several logical volume LVs, and a logical volume may be physically discontinuous, and it is possible to span multiple physical volumes in a volume group. Can be created with MKLV. The size of a logical volume can be determined using the number of logical partitions. Each logical partition can have three physical partitions, and a plurality of physical partitions correspond to a logical partition, typically used to generate mirrors on logical volumes.

This has this concept:

Volume Group VG Physical Volume PV Physical Partition PP Logic Volume LV Logical Partition LP

Commonly used commands:

# rsvg Displays information about the volume group VG, for example:

(1) LSVG -O

(2) LSVG

(3) LSVG VG02

(4) LSVG -L VG02

#varyoffvg makes the volume group VG are not activated, for example:

(1) Varyoffvg CX_VG

#varyonvg causes the volume group VG to be activated, for example:

(1) Varyonvg CX_VG

# lPV Displays information about the physical volume PV, for example:

(1) LSPV HDISK0

(2) LSPV -P HDisk2

(3) LSPV

HDisk0 0000000012345678 Rootvg HDisk1 10000bc876543258 rootvg HDisk2 ABCD000054C23486 CX_VG # LSLV Displays information about logical volume LV, for example:

(1) LSLV LV03

(2) LSLV -P HDisk2

(3) LSLV -L LV03

# lPS Displays information from Paging Space, for example:

(1) LSPS -A

Page Space PHY VOL VOL GRP Size% Used Active Auto HD6 HDisk0 Rootvg 1024MB 30 YES YES (2) LSPS -S

# ilSfs Displays information about the file system, for example:

(1) LSFS

(2) LSFS -V JFS

Second, the management of file systems

1, file system overview

In AIX, the file system is a hierarchical tree structure consisting of a file and directory. The file system connects yourself to a node that you connect to the system via a hanging point Mount Point so that the file system can easily install, disassemble, and back up, restore. In AIX, a file system always monitors a logical volume, so the system logical volume has a certain limit on the file system. Of course, the logical volume can be used as a carrier of a file system, or it can be used as it. AIX supported file system type has log file system JFS, network file system NFS, CD file system CDRFS, etc. For a general log file system, the system has a specific definition in the / etc / filesystems file. E.g:

/: dev = / dev / hd4 vol = "root" mount = automatic check = false vfs = jfs log = / dev / hd8 type = bootfs / home: dev = / dev / hd1 Vol = "/ home" mount = true check = true vfs = jfs log = / dev / hd8 / home / user: dev = / dev / lv00 vfs = jfs log = / dev / hd8 mount = false check = true options = rw

Where the check attribute indicates whether the file system is detected if the FSCK command is used. AIX wants to call FSCK when the system starts to detect the complete shape of the specified file system. The mount property has three options: Automatic means that this file system will be automatically loaded when the system is started, and the opposite is represented by false; true means using the mount all command to load. VFS represents the type of file system, such as JFS, NFS. Log indicates that the logical volume written by the logging data of this file system will be written. Options represents the operational properties of this file system, such as RW is expressed as readable and written.

2, the structure of the file system

In AIX, there are five specific file systems that are automatically generated when the system is installed.

(1), / root file system includes some key files and directories running in AIX systems, with more important directory / etc, / dev, / usr, / var, / home, file / UNIX, etc. In / etc directory, including some configuration files and command files for the system. In / dev directory, all of the logical files of all hardware devices are included. / UNIX file contains the core program of UNIX operating system

(2), / usr file system is the largest file system in AIX, which is hung in the / usr directory of the root file system. It includes the most common content: / usr / bin directory includes a variety of binary command files and shell scripts. The / usr / lib directory is mainly mainly a variety of library files that are unrelated to the platform. / USR / LPP directory contains a variety of application software products installed into AIX. The / usr / sbin directory is provided to the administrator's various tools for system management. (3) The / VAR file system includes text records for some applications from email, logging, event tracking, etc. For example: / VAR / ADM / WTMP user login record / VAR / NEWS system message record / var / tmp / * related temporary file / var / adm / sulog users use su command records

(4) In order to save some temporary files, AIX has a special file system / TMP.

(5) The / home file system is specifically used to place user data. In addition to these file systems established by the system, users can use SMIT MKFS to build their own file systems.

3, manage file system

#smit fs File Systems List All File Systems List All Mounted File Systems Add / Change / Show / Delete File Systems Mount a File Systems Mount a Group of File Systems Unmount a File Systems Unmount a Group of File Systems Verify a File Systems Backup a File Systems Restore A File Systems List Contents of A Backup

Third, the management of logical volumes

For logical volumes, a logical file description corresponding to a stream format and a block format in / dev:

BRW-RW ---- 1 Root System 19, 0 Apr 01 12: 30 / DEV / HDISK0 CRW-RW ---- 1 Root System 19,0 APR 01 12: 30 / dev / rhdisk0 BRW-RW --- - 1 Root System 10,6 Apr 01 12: 30 / DEV / HD2 CRW-RW ---- 1 Root System 10,6 Apr 01 12: 30 / DEV / RHD2

It mainly includes:

Journaled File System Log File System Paging Space Paging Space Journal Log Log Logging Boot Logical Volume Boot Logic Volume Raw Device Naked Device Dump Space

We can manage and configure SMIT LVM

Fourth, page space

Page space is a fixed space located on the hard disk, which holds some data in virtual memory and currently not accessible. Page space can also be called swap space, actually a logical volume. In the actual system run, if the system is too small, the data that is not accessed recently not accessed in the real memory will be sent to the paging space from real-in to the homework, and the job is released in the job. In AIX, the default paging space is / DEV / HD6 logical volume. For a system, the management of the paging space is usually performed on the following two aspects:

(1) The number of patch spaces is a unnecessary waste, but too little will affect the operational efficiency of the system, and more people may cause the system to terminate. It is recommended to be between 30% to 70%.

(2) The distribution of page spaces is the area where frequently accessed, so it should be as far as possible to place the hard disk.

V. Systematic backup and recovery

The backup and recovery of data is an important job in the UNIX system. During the backup process, the data is often used to compress the data using the Compress and Pack commands. Use uncompress, unpack, and unpack. Data backups are as follows from the way:

The system backup retains a backup image of the entire operating system, which can be used to resume the operating system. All data files and configuration information for all users are retained. Enhanced backups only make backups for the modified part after the last backup, the backup speed is fast. After the system is installed, if there is any modification, there is any modification of the system, the method should be backed up for the Rootvg system, the method is: # sit] [[]]: Execution of the mksb Command Will Result In The Loss Of All Material Previously Stored ON The SELECTED OUTPUT Medium. This Command Backs Up Only Rootvg Volume Group.

* Backup Device or File? NO EXCLUDE FILES? NO LIST FILES AS THEY ARE BACKED UP? NO GENERATE NEW /IMAGE.DATA FILE? YES Expand / TMP if NEEDED? NO DISABLE SOFTWARE PACKING OF BACKUP? NO [More ... 2]

ESC 1 = HELP ESC 2 = Refresh ESC 3 = Cancel Esc 4 = List ESC 5 = Reset Esc 6 = Command ESC 7 = Edit Esc 8 = Image Esc 9 = shell ESC 0 = EXIT ENTER = DO

After entering the SMIT interface, set the Device column into a tape drive, then press Enter. For non-rootvg volume groups, you can use SaveVG commands or Smit Savevg to make backups. For the general user, you can use the backup command. For example: backup [-u] [-LEVEL] [-f device] [file system] is allowed to use parameters to implement enhanced backup, such as -0, -1, -2, ..., etc., where zero-level backup That is, it means full backup. In addition, AIX also provides TAR, CPIO, DD, COPY, FLCOPY, TCTL, etc., please see a random CD-ROM file.

Note: The database's backup should be used to ensure the integrity of the database.

Device management and use

First, physical equipment and logic equipment

1. Physical equipment refers to the actual hardware connected to the computer system in some way. Such as displays, terminals, tape drives, etc.

2. Logic devices are interfaces that users or applications access physical devices, users or applications access physical devices through logic devices.

3, in many cases, a physical device corresponds to multiple logical devices, for example:

/ dev / fd0 /dev/fd0.18 / dev / fd0h / dev / fd0l / dev / rfd0 /dev/rfd0.18 / dev / rfd0h / dev / rfd0L

All of the above logic devices are all corresponding to the same physical device (floppy drive). In addition, some logic devices in the system are just some virtual devices, which are not for any actual physical devices, such as / dev / error and / dev / null.

4. Block equipment is a device that stores information in a fixed length block. The block device is a random access device that allows users to access any of the devices. Common block devices are:

CD0 read-only optical drive FD0 floppy drive HD1 LV00 logic volume HDISK0 hard disk

5, the character device is an original, sequential access device for a character stream, and reads and writes a character each time. Common character devices include: console, LFT0, TTY terminal RMT0 tape drive tok0, ENT0 network card MEM memory RHD1, RLV00 logic volume rhdisk0 physical volume 2 classification level

1. In the AIX system, the devices are classified by class, subclasses, and models.

Class (CLASS) is divided according to the functionality of the device, such as printer, hard drive, adaptation card, etc. Subclass is divided by a similarity of the device, such as an adaptive card class, can be divided into PCI subclass and MCA subclasses. Model (TYPE) is divided by device or manufacturer, for example, a tape drive can be divided into 4mm12GB, 8mm20GB and other models.

2, get equipment information

# lsdev [-option]

In the AIX system, there are two databases about the device ---- Predefined with Customized. The predefined database records all device types that the AIX system itself can support; the Customized database records the type of device that is currently configured / installed in your system.

There are two types of devices in the Customized database. A refined device; another is called available device. Defined devices refer to its driver installed, but the system has not found the device. Available device refers to the system and its driver, so you can use this device directly.

The parameters of this command are as follows:

-P: View the device in the system PREDEfined database - h: When output, add the tits -c: Title -c: Type-C to query the device type -c: View the device in the system CUSTOMized database

example:

# lsdev -ph

View all devices that the system can support, the output is as follows:

ClasStype Subclass Description

adapterethernet isa IBM ISA Ethernet Adapter adapterppa sio Standard I / O Parallel Port Adapter adaptertokenring mca Token-Ring High-Performance Adapter disk 400mb scsi 400MB SCSI Disk Drive disk osdisk scsi Other SCSI disk memory memory sys Memory Card printerosp rs232 Other serial printer tape 150mb scsi 150MB? -Inch Tape Drive Tty Tty RS232 Asynchronous Terminal Adapterner810 PCI Standard SCSI I / O Controller.......

# lsdev -pc tape

View all tape drive types that the system can support, the output is as follows:

TAPE1200MB SCSI1.2GB? -Inch Tape Drive Tape150MBSCSI150MB? -Inch Tape Drive......

# lsdev -ch

View the information of each device in the system, we can see the following information:

NamestatusLocationDescriptionDESCRIption

sys0Available00-00System Object bus0Available00-00PCI Bus bus1Available00-10ISA Bus ppa0Available00-00-0PStandard I / O Parallel Port Adapter lp0Available00-00-0P-00IBM 4201 Model Proprinter II sa0Available00-00-S1Standard I / O Serial Port 1 tty0Available00-00-S1 -00Asynchronous Terminal mem0Available00-0D16MB Memory Card scsi0Available00-01SCSI I / O Controller hdisk0Available00-01-00-0,0400MB SCSI Disk Drive rmt0Defined 00-01-00-5, C150MB? -Inch Tape Drive ent0Available00-02Ethernet Adapter # lsdev -Cc Memory

See all information belonging to the Memory device, which is as follows:

MEM0AVAILABLE00-0D16MB Memory Card Mem1available00-0432MB Memory Card

3, get the specific information of the device

# lsattr [-option] [Resource Name]

This command is used to obtain specific information for a certain device.

Each logical device has a Location code in the system, which is determined by the type of device and the adapter card connected.

The parameters of this command are as follows:

-C: Information from the Customized device from the ODM library. -E: See the specific properties of the device. -L: List the logical device name. -c: The device is listed by class.

example:

# lsattr --el sys0

View the configuration information of the system itself. Its output is as follows:

KeylockNormalState of System Keylock At Boot Timefalse Maxbuf20maximum Number of Pages In Block I / O Buffer Cachetrue

4, display system configuration, diagnostics, VPD (Vital Product Data)

# LSCFG, for example:

(1) LSCFG

Installed Resource List

The Following Resources Are Installed On Your Machine.

/- = added / deleted from diagnostic test. * = Not supported by Diagnostics.

Sysplanar0 00-00 System Planar FPA0 00-00 FLOATING POINT Processor MEM0 00-0A Memory Card MEM1 00-0B Memory Card

IOPLANAR0 00-00 I / O Planar * f2bus0 00-00 Micro Channel Bus RS2320 00-01 RS232 Card TTY0 00-01-01 RS232 Card Port - TTY1 00-01-02 RS232 Card Port

(2) LSCFG -V

Installed Resource List with VPD

The Following Devices Are Installed in Your System.

Sysplanar0 00-00 System Planar

Part Number ......... 342522 EC level ............ 254921 Serial Number ....... 353535fpa0 00-00 floating point processor MEM0 00-0A Memory Card

EC Level ............ 990221

Third, the status of the equipment

In AIX, the device can be one of the three states:

1, undefined undefined state

If the device is in this state, the system does not have any information for the device.

2, defined has been defined

In this state, the system has all the information of the device already exists and has been assigned a logical device name and port to the device, but the current device cannot be used.

3, Available available status

The equipment in this state can be used normally.

The device can be converted between these three states, which can be performed by command MKDEV-DL and RMDEV-DL or via Smit DEV. For example: (1) MKDEV -L RMT0 RMT0 AVAILABLE

(2) RMDEV -L RMT0 RMT0 Defined

(3) RMDEV -DL RMT0 RMT0 deleted

Fourth, serial equipment

Serial devices are devices connected to the system serial port, which generally requires manual configuration.

1. Show all defined TTY devices

LSDEV -CCTTY SMIT TTY

2, add a TTY device

SMIT TTY -ADD A TTY-TTY (RS232 RS422) -Parent Adapter (SA0 Available 00-00-S1 Standard I / O Serial Port1) (sa1available 00-00-S2 Standard I / O Serial Port2) (sa2 available 00-03 -11 8 Port asynchronous adapter

Add A TTY

Type or select values ​​in entry fields. Press Enter AFTER making all desired changes. [TOP] [Entry Fields] TTY type tty TTY interface rs232 Description Asynchronous Terminal Parent adapter sa0 * PORT number [] Enable LOGIN disable BAUD rate [9600] PARITY [NONE] BITS Per Character [8] Number of Stop Bits [1] Time Before Advancing To Next Port Setting [0] # Terminal Type [Dumb] Flow Control to Be Used [XON] [More. ..31]

F1 = help f2 = refresh f3 = cancel f4 = list esc 5 = reset ESC 6 = Command ESC 7 = Edit Esc 8 = Image Esc 9 = shell ESC 0 = EXIT ENTER = DO

In this dialog, you must fill in the port number, use the F4 key to get the list of options, and select the appropriate port number.

3, command related to TTY

The PDISABLE [-A] [Device] command temporarily disables a TTY device PENABLE command to unless the TTY device's disable stty [-g] [options] command settings or displays properties of the TTY device

V. Use of tape drive and floppy disk 1, format floppy disk

Format -D / dev / rfd0 Note: Formatted floppy in the UNIX system cannot be used in DOS.

2, floppy copy

The FLCOPY command is used to copy the contents of a floppy disk to another floppy disk.

3, use floppy disks or tape

Use the CPIO command to copy the hard disk file to the tape or floppy disk. For example, copy all files under the current directory to a file to the floppy disk: ls * .c | cpio -ov> / dev / rfd0 For example, copy all files and subdirectories of the current directory to the floppy disk: find. -Print | CPIO -OV> / dev / rfd0

Use the CPIO command to restore the file from the floppy disk or tape copy to the hard disk. For example, copy the file of the floppy disk to the hard disk: CPIO -IV

Tar command TAR CVF TAR XVF TAR TVF

4, the properties of the tape drive

(1), block size Block-size

Data is stored on a tape, and there is a certain interval sign between blocks and blocks. When reading and writing a tape, you need to know the size of the block. When setting the block size to a larger value, you can write more information to the tape because this will reduce the number of intervals between blocks and blocks. When the block size is set to zero, a block indicating a variable length using a tape drive. You can set or view the block size via the Smit Tape - Change / Show Characteristics of a Tape Drive.

(2), buffer USE Device Buffers During Writes

When the buffer property is set to YES, the application writes the data into the device buffer to complete the write operation. When the buffer attribute is set to NO, the application is only inform to complete the write operation only when the data is truly written in the tape. This value defaults to YES.

AIX network communication

First, configure and run TCP / IP

1. Before configuring TCP / IP, you need to know:

Host name and domain name IP address and subnet mask router IP address domain name server IP address

Smit Tcpip -minimum Configuration & Startup Minimum Configuration & Startup

To Delete EXISTING CONFIGURATION DATA, PLEASE USE FURTHER Configuration Menus

Type or select values ​​in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] * HOSTNAME [] * Internet ADDRESS (dotted decimal) [] Network MASK (dotted decimal) [] * Network INTERFACE en0 NAMESERVER Internet ADDRESS (dotted Domain Name [] DEFAULT GATEWAY Address [] (Dotted Decimal or Symbolic Name) Your Cable Type N / A Start Now NOW

F1 = help f2 = refresh f3 = cancel f4 = list esc 5 = reset ESC 6 = Command ESC 7 = Edit Esc 8 = Image Esc 9 = shell ESC 0 = EXIT Enter = Do I entered in the domain Value, press ENTER to complete the configuration of TCP / IP. If the value changes, the second time can be set with SMIT chinet. E.g:

Smit chinet

[Entry Fields] Network Interface Name EN0 Internet Address (Dotted Decimal) [] Network Mask (Dotted Decimal) [] CURRENT Stat Up

F1 = help f2 = refresh f3 = cancel f4 = list esc 5 = reset ESC 6 = Command ESC 7 = Edit Esc 8 = Image Esc 9 = shell ESC 0 = EXIT ENTER = DO

2, TCP / IP startup

Two boot files are required when TCP / IP starts: /etc/rc.net and /etc/rc.tcpip. File /etc/rc.net is used to configure the network interface, set the route; /etc/rc.tcpip is used to launch the TCPIP background service process.

Second, TCP / IP common command

1, ping

2, Telnet

3, FTP / ETC / FTPUSERS

4, NetStat Displays the network status, for example:

(1) Netstat -in

(2) Netstat -Rn

Third, network file system NFS

NFS is a solution that can better share remote files. It uses a client / server structure, and the NFS server provides shared files for customers to access, and NFS customers request the resources of the server via the network. A host can act as an NFS server and an NFS client.

1, NFS service process

NFS client processes: BIOD, RPC.Statd, RPC.Locked NFS server process: rpc.mountd, nfsd, rpc.statd, rpc.lockd

2, configure NFS server

Before configuring NFS, you need to confirm that the installation and configured TCP / IP installed NFS software (BOS.NET.NFS) clarifies those that are NFS servers and clients in the network to determine the directory that needs to be shared on the NFS server.

Smit NFS -Network File System (NFS) -Add A Directory to Exports List Add A Directory To Exports List

.. Type or select values ​​in entry fields Press Enter AFTER making all desired changes [Entry Fields] * PATHNAME of directory to export [] / * MODE to export directory read-write HOSTS & NETGROUPS allowed client access [] Anonymous UID [- 2] HOSTS allowed root access [] HOSTNAME list. If exported read-mostly [] Use SECURE option? no Public filesystem? no * EXPORT directory now, system restart or both both PATHNAME of alternate Exports file [] F1 = Help F2 = refresh f3 = cancel f4 = list esc 5 = reset ESC 6 = Command ESC 7 = Edit Esc 8 = Image Esc 9 = shell ESC 0 = ENTER = DO

These pathname of directory to export represents the path of the shared directory. Mode to Export Directory indicates that the mode Hosts & NetGroups allowed client access represents the client name that allows access to the shared directory. If blank, all client access is allowed

3, configure NFS client

(1), create a local installation point with the nkdir command

MKDIR / HOME / MNTPT

(2) Start the NFS customer process

Smit MKNFS Start NFS

TYPE or SELECT VALUES IN ENTRY FIELDS. Press Enter ALLD CHANGES. [Entry Fields] * Start NFS Now, ON System Restart or Both Both

F1 = help f2 = refresh f3 = cancel f4 = list esc 5 = reset ESC 6 = Command ESC 7 = Edit Esc 8 = Image Esc 9 = shell ESC 0 = EXIT ENTER = DO

(3) Install network file system

Mount Server1: / Export_File / Home / MNTPT

SMIT tool

Smit (SmitTy) provides users with a flexible tool to manage the system. Here is the meaning of some SMIT symbols and function keys * The value you need, this domain must fill in the value # This domain needs to fill in the digital / this domain Need to fill the path X This value needs to be filled in a 16-based number? This value does not display a drop-down list, press F4 key display list F1 (ESC-1) display context help F2 (ESC-2) refresh F3 (ESC-3) logout, return to the previous menu F4 (ESC-4 ) List, give an optional list value F5 (ECS-5) initialization, restore the original data F6 (ESC-6) command of an input domain, display the AIX command F7 (ESC-7) editing to execute, edit a drop down A F8 (ESC-8) mirror in the drop-down table, save the current screen to a file and display the current fast path to F9 (ESC-9) housing, start a sub-housing F10 (ESC- 10) Exit, immediately exit the SMIT menu Enter to start executing the current row / text In the output Find text n Find the next place where the text you want to find, in the $ home directory, named smit.log, it saved All accessed menus and dialogs, as well as all executed commands and output, and errors generated during the running process. The smit.script file saves all the AIX commands executed by the SMIT.

转载请注明原文地址:https://www.9cbs.com/read-31668.html

New Post(0)