Knowledge about common AIX commands

Source: Internet
Author: User
Tags tmp file


Knowledge about common AIX commands lsvg-o rootvg # lspv hdisk0 # oslevel-rssaxlate-l hdisk3lsattr-El kernel-El proc0lscfg-vl kernel-vl pdisk * errpt-aj paste error code errclear 0 (Remember to back up) cp/var/adm/errlog/home/ww/err/errlog errclear 0 lsdev-Cc restart-ad/dev/hdisk0bootlist-m normal-o bootlist-m normal hdisk0 hdisk1 rmt0 fd
View the installation media content: installp-q-d/dev/cdrom-ldu www.2cto.com errpt | morefind/-name core-printcp file1 file1.030807ps aux | headpmcycles-msync CommandUpdates the I-node table and wrbuffites ered files hard disk # sync; sync; synccrontab-l view crontab-e modify (vi) crontab-r Delete
If you have a system, you can also edit what you need and sometimes the system automatically generates the system. For example, if the system generates a power fault alarm, you should delete the system after correcting the error. Minute hour day_of_month month weekday commandThese fields accept the following values: minute 0 through 59 hour 0 through 23day_of_month 1 through 31 month 1 through 12 weekday 0 through 6 for Sunday through Saturdaycommand a shell command mount-rv cdrfs/dev/cd0/mntlslpp-l/unix www.2cto.com ifconfig-anetstat-infget_config-l dar0chmod 755 lee # ls-lu: view the last time a file was accessed # bootinfo-B view vmstat svmon ps tprof iostat netpmon filemon check physical memory: (RAM> = 512 MB) # lsattr-El sys0-a realmem use the instfix command to view the current ML: $ instfix-I | grep ML # svmon-Pau 10 | more
Check whether a patch is installed: # instfix-I | grep IY24568 All filesets for IY25282 were found indicates that the patch already exists. You can use the following command to automatically assign PVID to the system: # chdev-l hdisk #-a pv = yes use # lsfs-q FSNAME to check if bf is true, then the FS is large. Syncvg-v rootvgps aux | head-10 instfix-ciqk 5100-04_AIX_ML | grep ":-: "Use the ls-altr column at the end of the file is the latest touch file. If you want to find out who occupies the largest space in a fs with many directory structures, use du-k. | sort-rn kills many processes at a time. ps-ef | grep XXXX | awk '{print $2}' | xargs kill-9 is used to kill the shell of the process generated by the user "user1 ". command. # Kill-9 'ps-ef | grep user1 | grep-v grep | awk' {print $2} ''bootinfo-y processor bits bootinfo-K kernel bits 1, how to Switch AIX5.1 from 32-bit to 64-bit: ln-sf/usr/lib/boot/unix_64/unix ln-sf/usr/lib/boot/unix_64/usr/lib/boot/unix lslv-m hd5 bosboot-ad/ dev/ipldevice shutdown-Fr www.2cto.com 2, 2, How to Switch AIX5.1 from 64-bit to 32-bit: ln-sf/usr/lib/boot/unix_mp/unix ln-sf/usr/lib/boot/unix_mp/usr/lib/boot/unix lslv-m hd5 bosboot-ad/ dev/ipldevice shutdown-Fr
Determine whether the system has loaded the 64-bit kernel extension. Run the command: # genkex | grep 64. If the system has loaded the 64-bit kernel extension, the system will return information similar to the next line: 149bf58 a3ec/usr/lib/drivers/syscalls64.ext edit/etc/environment PS = "$ LOGNAME: PWD>" Error TYPE (TYPE): PEND: the device will soon be unable to use PERF: the performance of the device is reduced to an unacceptable level. PERM: the error of the device cannot be recovered. This type of error indicates that the device or driver is completely damaged. TEMP: the device has recovered UNKN after several attempts: the error type cannot be determined. INFO: only one message, TIMESTAMP: MMDDHHMMYY (month, day, and year) T (type): P permanent; T temporary; U unknown (permanent errors should be paid attention to) C (Classification): H hardware; S software; O users; U unknown # errpt-d H listing all hardware error messages # errpt-d S listing all software error messages # errpt-aj ERROR_ID listing detailed error information # errpt-aj 0502f666
Solution: use the system disk or System Backup Tape to start the disk (must be consistent with the operating system version in the hard disk) after startup, select option 3 "Start Maintenance Mode for System Recovery"> "Access a Root Volume Group"> "Access this volume group and start a shell before mounting the file systems" to format the file System log (jfslog) #/usr/sbin/logform/dev/hd8 check and repair the file system # fsck-y/dev/hd1 (/home File System) # fsck-y/dev/hd2 (/usr File System) # fsck-y/dev/hd3 (/tmp File System) # fsck-y/dev/hd4 (/File System) # fsck-y/dev/hd9var (/Var file system)... exit with the exit command. The file system will automatically mount it. Rebuild bootimage # lslv-m hd5 to find the hard disk where bootimage is located, for example, hdisk0 # bosboot-ad/dev/hdisk0 # bootlist-m normal/dev/hdisk0. Restart the system # shutdown-Fr www.2cto.com
On AIX, how does one automatically log on to a logout user? Some users are idle for a long time, which may cause security problems. By opening the TMOUT comment in/etc/profile, the logout user will automatically arrive at the set time. For example, if export TMOUT = 120, the user does not press the key in two minutes and logout is automatically triggered. To convert a man file to a common text file, the correct method to convert the man file output to a text file is: $ man ls | col-B> man.txt 1. Stand-alone environment 1. Maximum number of system users the specific size of maxlogin can be set based on the number of users and can be modified using the smitty chlicense command, this parameter is recorded in/etc/security/login. cfg file. The modification takes effect after the system restarts. 2. The limits parameters of the System user are located in the/etc/security/limits file. You can set these parameters to-1, which is unlimited, you can use vi to modify the/etc/security/limits file. All modifications take effect after the user logs on again. Default: fsize = 2097151 ---- "-1 core = 2097151 cpu =-1 data = 262144 ----"-1 rss = 65536 www.2cto.com stack = 65536 nofiles = 2000
3. Check the size of Paging Space in paging space. Adjust the size of Paging Space to 2 GB in physical memory. At the same time, when creating paging space, try to allocate it to different hard disks to improve its performance. Use smitty chps to modify the size of the original paging space or smitty mkps to add a paging space. 4. Use lsattr-Elsys0 to check the size of parameters such as maxuproc, minpout, and maxpout. Maxuproc is the maximum number of processes for each user. Generally, if the system runs DB2 or ORACLE, you should adjust maxuproc, Default: 128, and to 500. The increase in maxuproc will immediately take effect, reduce and restart AIX. When an application involves a large number of sequential reads and writes and affects the response time of the foreground program, you can set maxpout to 33, minpout to 16, and smitty chgsys to set it. 5. Set the file system space. Generally, the usage of the system's file system/,/usr,/var, And/tmp should not exceed 80%. The recommended/tmp space should be at least 300 MB, if the file system is full, the system cannot work normally, especially for the basic file system of AIX. If the/(root file system) is full, the user cannot log on. Use df to view data. 6. Activate SSA Fast-Write Cache and use smitty ssafastw to activate tuxedo of hdiskn for each Logical Disk

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.