2012年4月11日星期三

Some Command I always used in AIX

Common Commands in AIX Common Commands in AIX

1. Check Top Process
    topas -P

2. Check Disk I/O
    topas -D

3. Check error report within a range
    errpt -a -s 1101000008 -e 1118235908 | more
                     MMDDHHMMYY    MMDDHHMMYY

4. Display the PGIN, SIZE, RSS, LIM, TSIZ, TRS, %CPU, %MEM fields of all processes
    ps gv

5.  Get the status of all subsystem or subserver.
    lssrc -a

6. Display all user account attributes : user id and home directory.
    lsuser -c -a id home ALL | sed '/^#.*/d' | tr ':' '\011'  

    Remarks :
    sed '/^#.*/d' : remove the line "#name:id:home"
    tr : Translate character ":" to "tab(\011)"

7. Display devices "disk" in the system and their characteristics.
    lsdev -H -C -c disk

    Remarks :
    -H : Display the Header Information
           name   status    location description

8. Display devices "processor" in the system and their characteristics.
    lsdev -Cc processor

9. Display attribute characteristics and possible values of attributes for device "proc0" in the system.
    lsattr -El proc0

10. Display devices "memory" in the system and their characteristics.
      lsdev -Cc memory

11. Display attribute characteristics and possible values of attributes for device "mem0" in the system.
      lsattr -El mem0

14. Display attribute characteristics and possible values of attributes for device "hdisk0" in the system.
      lsattr -El hdisk0

15. Restart a subsystem
      refresh -s syslogd

16. Monitors activity and reports statistics on network I/O and network-related CPU usage.
      netpmon

      Remarks :
      Run trcstop command to signal end of trace.

17. Display System Configuration
      lscfg
      prtconf

      Remarks :
      lscfg -v : Display vital product data (VPD) such as part numbers, serial numbers
      lscfg -p : Display the platform-specific device information.

18. Check AIX Maintenance Level
      instfix -i|grep ML
      or
      instfix -ik 4330-04_AIX_ML

19. Check Installed Package
      lslpp -l

20. Check File over 1M
      find / -xdev -size +1048576c -ls
      find /usr -xdev -size +1048576c -ls

21. Run command together with command "find"
      find . | xargs grep bc
      or
      find /root/scripts | xargs grep bc

22. Monitor the CPU usage per process with command "ps"
      ps auwx

23. General Command for device management
      cfgmgr : refresh and update device database
      lsdev : list  device
      mkdev -l :  change specific device status to "Available"
      rmdev -l  : change specific device to "Defined"
      rmdev -d  : remove specific device

沒有留言: