AIX-223习题练习心得

更新时间:2023-10-30 11:40:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

1、a user wants to permanently added to the dba group. which of the following commands or processes can be used to accomplish this? A、chgrp 更改文件或目录的组所有权 B、chuser 更改用户属性 C、edit/etc/user

D、edit/etc/security/group

Answer: B

2、During reboot, the system hangs with an LED 0554 message that means,“The boot device could not be opened or a read failed.‖ Which of the following recovery procedures should be taken?

A Boot in maintenance mode and use fsck to check hd5

B Boot in maintenance mode, access the rootvg and check the /etc/inittab for corruption.

C Boot in maintenance mode, access the rootvg and rebuild the boot

image using the bosboot command.

D . Boot in maintenance mode, and reset the root password.

Answer:C

Bosboot : 创建引导映像

3. A production system needs to be upgraded from AIX V5.2 to AIX V5.3 . All system logs and users need to be saved. Which installation method will accomplish the upgrade? A. Update installation B. Migration installation C. Preservation installation

D. Mirror rootvg prior to a Preservation Installation Answer :B

4. An administrator is attempting to update a software product. The install is interrupted by a system failure. Which of the following commands would be used to clean up the improperly applied filesets? A. lppchk –C B. instfix –S C. installp –c D. installp –C Answer: D

installp 命令

用途:在一个兼容的安装软件包里安装可用的软件产品。 清除失败的安装:

installp -C [ -b ] [ -eLogFile ]

5. An administrator is ordering a new Power 550. They will mirror rootvg and are concerned about single point of failure. Which of the following features should be ordered?

A. Dual I/O planar, dual disk drives, dual SCSI adapters B. Dual disk drive enclosures, dual disk drives, extra media bay C. Dual disk drive enclosures, dual disk drives and dual SCSI adapters D. Dual I/O planar, extra media bay, dual disk drives Answer:C enclosures:机箱

6. During which boot phase is the rootvg first activated? A. Phase 1 B. Phase 2 C. Phase 3 D. POST Phase Answer: B

在第二阶段,可以使用 varyonvg 命令(名为 ipl_varyon 命令)的特殊版本来激活 rootvg 卷组

7. An administrator has just finished upgrading a system to AIX 5.3. If there are future problems, the system administrator would like to add an entry to the AIX errorlog to record each event. Which of the following commands can be issued for this purpose? A. /usr/bin/errmsg ―System upgraded to AIX 5.3‖

B. /usr/bin/errlog ―System upgraded to AIX 5.3‖ C. cat ―System upgraded to AIX 5.3‖ > /dev /err D. /usr/bin/errlogger ―System upgraded to AIX 5.3‖ Answer: D

errlogger 命令创建一个操作程序错误日志条目

8. A system was running properly until a reboot. Following the reboot, the system LED displayed cycles between 0223 and 0229. Which of the following procedures should be performed next? A. Boot into maintenance mode and repair the superblock B. Boot into maintenance mode and run fsck C. Boot into maintenance mode and run bosboot D. Boot into maintenance mode and check the bootlist Answer: D LED 223-229 - 无效的启动列表

1. 将钥匙模式切换到“服务”(或者 F5,对于那些没有钥匙锁的系统),并打开计算机的电源。

2. 如果显示正常继续,则将钥匙模式切换到“常规”并继续第3步。如果没有得到提示,则进入第 4 步。 3. 当您获得登录提示时,进行登录,并按照“使用 bootlist 命令”中所描述的过程来更改您的启动列表。然后继续执行第 7 步。

4. 按照“访问无法启动的系统”中所描述的过程来访问您的 rootvg,并继续执行第 5 步。 5. 使用下面的命令,确定启动磁盘:lslv -m hd5

6. 按照“使用 bootlist 命令”中所描述的过程来更改您的启动列表。 7. 关闭并重新启动您的系统。

9. How can an administrator determine how many physical partitions the

/dev/hd2 logical volume is using on each disk in rootvg? A. lslv hd2

B. lsvg rootvg, then lspv for each disk listed C. lsvg rootvg, then lslv for each disk listed D.lsvg rootvg Answer : B

10. An administrator needs to be able to list the number and size of backup sets on a tape. Which of the following procedures accomplish this?

A . Use the tcopy /dev/rmt0.1 until an end-of-tape error notification is

received.

B . Use the cpio –idmv < /dev/rmt0.1 until an end-of-tape error

notification is received.

C. Use the tar –tvf /dev/rmt0.1 repeatedly until an end-of-tape error

notification is received.

D. Use the dd if=/dev/rmt0.1 bs=128k count=EOT until an end-of-tape

error notification is received. Answer: A tcopy :复制磁带

cpio 命令:把文件拷贝进出归档存储器及目录 tar :处理归档

11. An administrator needs to change a system‘s run level from level 2 to

level 3. what is the appropriate method to accomplish this? A. Use the reboot command

B. Edit the /etc/rc.boot file and reboot the system C. Edit /etc/.init.state file and reboot the system D. Use the telinit command Answer: D 确定当前运行级别

在命令行中,输入下面的命令: # cat /etc/.init.state 2 #

系统将显示一个数字,即当前运行级别。 显示以前的运行级别的历史

使用 fwtmp 命令,您可以显示以前的运行级别的历史,如下所示:

1. 以 root 用户的身份登录。 2. 输入下面的命令,系统将显示与下面所示类似的信息: # /usr/lib/acct/fwtmp 更改系统运行级别

系当系统第一次启动时,它会进入 /etc/inittab 文件中的 initdefault 项所定义的缺省运行级别。系统会一直在该运行级别中运行,直到它收到一个更改运行级别的信号。您可以执行 lsitab 命令,以查看您的系统的缺省运行级别: # lsitab init init:2:initdefault: #

要更改运行级别,请执行下面的过程:

1. 检查 /etc/inittab 文件,以确认您将要改变到的运行级别是否支持您正在运行的进程。进程 getty 是很重要的,因为它可以控制系统控制台和其他登录的终端线路访问。确保 getty 进程在所有的运行级别中都可以运行。

2. 使用 wall 命令通知所有的用户,您将要改变系统运行级别,并要求这些用户退出系统。

3. 使用 telinit 命令(以您将要切换到的运行级别作为该命令的参数),例如:

# telinit M

12 . Under which of the following circumstances must a JFS filesystem

be used instead of a JFS2 filesystem? A. filesystem will contain 100GB files B.filesystem resides on a 32-bit system

C.filesystem contains a large number of small files D. filesystem compression is required Answer: D

13. An administrator received a call from a user whose PC crashed while

using vi to edit a file. The user wants the edited file back. Where should the administrator look for the file? A. /tmp

B. /var/preserve 存放已终止的 vi 会话 C. /var/tmp/$USER D. #HOME/.vi Answer: B

14. An administrator runs mktcpip aixhost 172.168.0.50 en0 to change the

network address, but the command hangs for an extended period of time. Which of the following is the most likely cause of the program?

A. ent0 is in a defined state B. en0 is currently active

C. There is no physical network adapter on the system D. The address 172.168.0.50 is in use by another system Answer: B

15. Which of the following commands restarts a TCP/IP subsystem that provides network services? A. refresh –s inetd B. refresh –s tcpip C. /etc/rc.tcpip efresh D. refresh –g inetd Answer: A

refresh:请求子系统或子系统组的刷新

inetd是监视一些网络请求的守护进程,其根据网络请求来调用相应的服务进程来处理连接请求

-s 指定要刷新的子系统。Subsystem 名称可以是实际的子系统名称或

Subsystem 者子系统的同义名称。如果 Subsystem 名称不包含在子系统对象类

中,refresh 命令失败。

1. 要刷新组,比如 tcpip,请输入:

refresh -g tcpip

2. 要刷新子系统,比如 inetd,请输入: refresh -s inetd

用refresh -s inetd或refresh -g tcpip

可以实现重启网络的目的

16. How can directory be excluded from a mksysb backup? A. Put an entry in the /etc/excluded.rootvg file B. Put an entry in the /etc/mksysb.exclude file

C. Remove the directory‘s entry from the mksysb /image.data file D. remove the directory‘s entry from the /var/adm/ras/bosinst.data file Answer: A

mksysb:在文件或可引导磁带上创建 root 卷组的可安装映像。

Note: If you want to exclude certain files from the backup, create the /etc/exclude.rootvg file, with an ASCII editor, and enter the patterns of file names that you do not want included in your system backup image. The patterns in this file are input to the pattern matching conventions of the grep command to determine which files will be excluded from the backup. If you want to exclude files listed in the /etc/exclude.rootvg file, select the Exclude Files field and press the Tab key once to change the default value to yes.

For example, to exclude all the contents of the directory called scratch, edit the exclude file to read as follows: /scratch/

For example, to exclude the contents of the directory called /tmp, and avoid excluding any other directories that have /tmp in the pathname, edit the exclude file to read as follows:

^./tmp/

Refer to the Installation Guide, \information.

17. How would an AIX administrator find information regarding smit menu definitions? A. Use ODM commands B. In the /smit.log file C. In the /etc/environment file D. In the /usr/lib/smit/menu.cfg file Answer: A

18. An administrator identified a problem with an AIX command and implemented a word-around. A call was made to IBM Support to report the problem. What severity level should the administrator choose? A. Crit-Sit B. Severity 1 C. Severity 2 D. Severity 3 Answer: D

19. An administrator needs to replace a failed internal disk in a mirrored rootvg. Which of the following is on of the steps that must be followed?

A. Deallocate rootvg mirror B. Use ho replace manager C. Break rootvg mirror

D. Deallocate LPs from failed disk Answer: C

20 . An administrator plans to attach an IBM DS6000 and needs to know if the fibre channel adapter is at the latest firmware level. Which of the following is the fastest way for the administrator to determine the latest supported microcode level? A. Call Techline

B. Validate via DS6000 menu C. Access IBM Storage Website D. Contact the IBM Business Partner Answer: C

21. Which disk configuration provides the fastest write performance with fault tolerance? A. RAID 0 B. RAID 6 C. RAID 5 D. RAID 1+ 0 Answer: D

22. Following a system boot, the display indicates that previously detected hardware is missing. Which of the following commands would identify the missing hardware? A. diag 执行硬件问题确定 B. lscfg 显示系统的配置信息、诊断信息和重要产品数据(VPD)信息 C. cfgmgr通过运行“配置规则”对象类中指定的程序来配置设备并可选择安装设备软件 D. lsslot 显示动态可重新配置的插槽(比如热插拔)及其特性 Ansewer: A

23. How can a system administrator determine if a system is running in 32-bit or 64-bit mode?

A. Use the ls –al to see if /unix is linked to /usr/lib/boot/unix_64 B. Check the /etc/inittab to see if there is a load64bit entry C. Use ?prtconf -c‘ to see if the system is 64-bit enabled

D. Use the lslpp command to see if the bos.mp64 fileset is installed Answer: A

# ls -al total 5528

drwxr-xr-x 5 bin bin 512 Jan 09 2003 . dr-xr-xr-x 31 bin bin 4608 Jul 26 2003 .. drwxr-xr-x 2 bin bin 512 Feb 21 1999 bin -r-x------ 1 root system 3894 Mar 27 1997 bootutil -r--r----- 1 root system 7440 Feb 19 1997 chramfs

-r-x------ 2 root system 1496 Apr 12 1996 disable_hibernation -r-x------ 2 root system 1496 Apr 12 1996 enable_hibernation -rw-r----- 1 root system 14761 Jul 23 1997 getrootfs -r-xr-x--- 1 root system 3890 Mar 27 1997 mergedev drw-rw-r-- 2 root system 512 Jan 09 2003 network

drwxr-xr-x 2 bin bin 2048 Jul 26 2003 protoext -r-xr-xr-x 1 root system 13100 Mar 27 1997 restbase -r-------- 1 root system 2594 Apr 12 1996 rs6k.cd.proto -r-------- 1 root system 3426 Apr 12 1996 rs6k.disk.proto -r-------- 1 root system 3409 Apr 12 1996 rs6k.tape.proto -r-x------ 1 root system 9877 Feb 01 1997 srvboot -r-xr-xr-x 1 bin bin 11964 Feb 19 1997 ssh -r-sr-xr-x 3 root system 29388 Jan 30 1999 tftp

lrwxrwxrwx 1 root system 21 Feb 21 1999 unix -> /usr/lib/boot/unix_mp -r-xr-xr-x 1 root system 2720118 Dec 22 1999 unix_mp -r-xr-x--- 1 root system 5921 Apr 12 1996 update_proto #

24. Which of the following commands would a system administrator run to validate /etc/tunables/nextboot after manually editing? A. ksh –n nextboot B. tunsave –a –f nextboot C. tuncheck –r –f nextboot D. tunsave nextboot Answer: C

tuncheck 命令验证可调文件。检查指定文件中列出的所有可调参数的范围和相关性。如果检测到问题,则发出警告

1. 要检查在重新引导过程中是否能应用 /etc/tunables/nextboot,输入: tuncheck -r -f nextboot

25. Which of the following disk protection methods would be used to provide the maximum amount of data availability? A. RAID 0 B. RAID 1 C. RAID 3

D. RAID 5 Answer: B

26. A user is complaining that they ran out of paging space. Which of the following will address this and provide best performance? A. Expand the default paging space to the largest possible size B. Create a new larger paging space

C. Create additional paging space of equal size on different disks D. Reboot system Amswer: C

27. Given the following scripts, what output would be generated?

/usr/local/bin/script1 #!/usr/bin/ksh VAR1 = red

export VAR1 = green VAR1 = blue

/usr/local/bin/script2 VAR1 = yellow /usr/local/bin/script2 #!/bin/ksh

Echo ―The sky is ${VAR1}.‖

A. The sky is red B. The sky is blue C. The sky is green D. The sky is yellow Answer: C

28. Which of the following commands will increase the contiguous free space of a file system without having to add additional partitions? A. chfs B. fsck C. chlv

D. defragfs 增加文件系统的邻接可用空间 Answer: D

defragfs 命令通过重新组织分配使空间邻接而不是散布在整个磁盘从而增加了文件系统邻接可用空间。要整理碎片的文件系统可以通过指定 Device 变量来指定,它是逻辑卷的路径名(例如 /dev/hd4 )。它同样可以用 FileSystem 变量来指定,它是 /etc/filesystems 文件中的安装点。

29. What is the most likely problem with this script? --------------------------------------------

VAR = 1

((VAR=$VAR+1)) While [$VAR –lt 10] do

echo $VAR done

------------------------------- A. #!/bin/ksh line is missing

B. Variable name VAR is not properly initialized C. Loop variable is not incremented inside the loop D. Replace brackets with braces Answer: C

30. An administrator is at a remote data center assisting a colleague who is replacing a bad fibre channel adapter. Which command can be used to manage a hot plug slot without powering off or rebooting the server? A. drslot 管理可动态重配置插槽,例如热拔插插槽 B. lsslot 显示动态可重新配置的插槽(比如热插拔)及其特性 C. lsattr 显示系统中设备的属性特征和可能的属性值 D. prtconf 显示系统配置信息 Answer: A

31. An administrator has received an update CD with the latest technology level for AIX 5.3. The current operating syatem level of the server is base AIX 5.3. What action needs to be taken to apply the new technology level to the server? A. Run smit update_all B. Run smit install_all

C. Boot from the installation media

D. Run the update_all command from the mounted CD Answer: A

32. An administrator has received complaints from users that an application is not available while other applications run. This application

resides on an NFS mounted filesystem. Which of the following commands should be run as a reasonable first step to handle this problem? A. df B. showmount C. exportfs D. refresh –g nfs Answer: A

33. To load the base operating system on a machine using NIM, what are the minimum NIM resources that must be defined for the installation to succeed?

A. A mksysb resource, a SPOT resource, and an lpp_source resource B. A SPOT resource, an lpp_source resource, and a machine definition C. An lpp_source resource, A mksysb resource, and a machine definition D. A SPOT resource, an lpp_source resource,a bosinst_data resource, and a machine definition Answer: B

NIM中常用的资源类型

SPOT: 表示 Shared Product Object Tree

指向一个目录, 其中存放了NIM client在引导时需要用到的代码程序.与 AIX 5L中 /usr 文件系统的内容大致相同,包含: 设备驱动程序, BOS 的安装程序, 和 其他与安装相关的代码.

lpp_source 指向一个目录, 其内容等同于AIX 的系统光盘或应用程序的安装光盘. 包含了需要进行安装的 lpp 文件, 即可以是 bff格式 的也可是 RPM格式的.

Mksysb:指向一个文件. 是某服务器rootvg 的备份文件, 用于恢复或克隆系统

34. An administrator notices the / filesystem is 98% full. Which of the following files commonly grow rapidly? A. /var/adm/wtmp B. /etc/security/failedlogin C. /smit.script D. /proc Answer: B

wtmp 一个用户每次登录进入和退出时间的永久纪录

修复装满的 /(根)文件系统

当根文件系统 (/) 已装满时,请检查以下事项:

?

使用 who 命令读取 /etc/security/failedlogin 文件的内容:

# who /etc/security/failedlogin

TTY 重新产生得太快的情况会创建失败的登录条目。要在读取或保存输出之后清空该文件,可以执行以下命令:

# cp /dev/null

/etc/security/failedlogin

35. Which action changes the default editor for all users on the system from vi to edit? A. Issue the command:

Export EDITOR =/usr/bin/edit each usr .profile to change the EDITOR value to /usr/bin/edit

B. Modify /.profile and change the EDITOR variable to /usr/bin/edit C. Modify /etc/environment and add EDITOR =/usr/bin/edit Export EDITOR

D. Modify /etc/security/defaults and change the EDITOR value to /usr/bin/edit Aswer: C

36. A system P customer is planning to implement virtualization and is concerned about how to respond to an increased workload and what limitations there are for very small workloads. Which of the following describes the minimum size for an LPAR and the minimum amount that can be transferred from on LPAR to another?

A. Smallest partition 10% of all available processors, as small as 1% of all available processors may be transferred.

B. Smallest partition 10% of a processor, as small 1% of a processor may be transferred.

C. Smallest partition one processer, as small 1% of a processor may be transferred.

D. Smallest partition one core, as small 10% of a processor may be transferred Answer: B

37. An administrator has a server that must be upgraded from AIX 5.2 to AIX 5.3. The administrator also needs to use the 64-bit kernel with JFS2 filesystems in rootvg. All critical data resides in a non-rootvg volume group. Which of the following types of install could the administrator use to accomplish this? A. Migration Installation B. Update_All installation C. preservation installation

D. New and complete Overwrite installation Answer: D

38. Which of the following options applies to virtual Ethernet devices? A. A virtual Ethernet adapter can only connect to other partitions within the same system.

B. A virtual Ethernet adapter needs to be connect to an external VlAN capable switch to be able to communicate with other partitions on the same system.

C. A partition can support an unlimited number of virtual Ethernet devices.

D. A virtual Ethernet adapter in the VIO server that is part of a SEA should not have the ―trunk flag‖ set

21.A user‘s print jobs default to PRINTER_A.The user wants to change their default printer to PRINTER_B.Add the line’export PRINTER=PRINTER_B’ to the user’s .profile.

22.During reboot the system hangs with LED 0581 that indicates ―Configuring TCP/IP‖.Boot in maintenance mode after verifying the network connection, access the rootvg and check the /etc/rc.net file.

23.A system administrator issued the errpt command and had no results.The system administrator determined that error logging was turned off.

The command of /usr/lib/errdemon should be used to start logging errors. 24.A system administrator is considering enabling the 64-bit kernel but first must determine if the system hardware will support 64-bit.prtconf –c should be accomplished in AIX 5L.

25.The system administrator review root‘s current cron jobs should be use crontab –l. 26.A system administrator did not receive a response while attempting to ping loopback.The command of rc.tcpip can resolve this problem.

27.The command of mkitab would an administrator use to add startup scripts to the system startup process.

28.A system administrator is in the process of documenting the system.The command of lsdev –c will provide a list of the devices defined on the system.

29.The command of lsvg –p datavg lists out the physical volumes names as well as total / free PPs in volume group datavg..

30.An administrator has added a new device to a system and wants to determine if it has been correctly added to the ODM database.The command of odmget would the system administrator use.

65. given the following output what course of action should be undertaken for a long term solution?

A. implement regular monitoring to avoid full filesystems B. Double the size of /usr

C. reduce the size of /home to balance the filesystems D. add another disk allow for growth Answer: A

修复装满的 /(根)文件系统

当根文件系统 (/) 已装满时,请检查以下事项:

?

使用 who 命令读取 /etc/security/failedlogin 文件的内容:

# who /etc/security/failedlogin

TTY 重新产生得太快的情况会创建失败的登录条目。要在读取或保存输出之后清空该文件,可以执行以下命令:

# cp /dev/null

/etc/security/failedlogin

?

检查 /dev 目录中输入不正确的设备名称。如果设备名称输入不正确,例如将 rmt0 误输入为 rmto,则会在 /dev 中创建一个名为 rmto 的文件。此命令会正常继续运行,直到装满整个根文件系统,然后失败。/dev 是根 (/) 文件系统的一部分。查找不属于设备的条目(没有主要编号或次要编号)。要检查此情况,可以使用以下命令:

# cd /dev

# ls -l | pg

total 40

drwxrwx--- 2 root system 4096 Nov 29 14:19 .SRC-unix

crw-rw---- 1 root system 10, 0 Nov 10 17:18:00 IPL_rootvg

srwxrwxrwx 1 root system

0 Nov 28 17:30 SRC

crw------- 1 root system 22, 1 Nov 23 12:14 __pv22.1.323758

crw------- 1 root system 22, 1 Nov 23 12:14 __pv22.1.381014

crw------- 1 root system 22, 1 Nov 23 12:15 __pv22.1.397388

. . .

(省略的行)

. . .

crw-rw-rwT 1 root system 17, 0 Nov 10 16:22 usb0

crw-rw-rw- 1 root system 15, 0 Nov 10 16:22 usbhc0

crw-rw-rw- 1 root system 15, 1 Nov 10 16:22 usbhc1

crw------- 1 root system 11, 0 Nov 10 16:22 vio0

crw-rw-rw- 1 root system 21, 0 Nov 10 16:22 vty0

crw-rw-rw- 1 root system 21, 1 Nov 10 16:22 vty1

drwxr-xr-x 2 root system

256 Nov 10 17:18 xti

crw-rw-rw- 1 root system

2, 3 Nov 10 17:18 zero

#

在原本指示普通文件的文件大小的相同位置,设备文件有两个逗号分隔的编号。例如: crw-rw-rw- 1 root system 24, 0 Nov 10 16:22 rmt0

如果显示文件名或大小的位置指示某个无效设备,如下面的示例所示,则删除关联的文件: crw-rw-rw- 1 root system 9375473 Oct 25 10:19 rmto 注意:

1. 请不要删除 /dev 目录中的有效设备名称。无效设备的特点之一是一个大于 500 字节的关联文件大小。

2. 如果正在运行系统审核,则缺省的 /audit 目录会快速装满,并需要引起注意。 可以使用 find 命令来检查可删除的超大型文件。例如,要查找根 (/) 目录中大于 1 MB 的所有文件,可以使用以下命令:

# find / -xdev -size +1024 -ls |sort

-r +6

此命令查找所有大于 1 MB 的文件,并对它们进行从最大到最小的逆向排序。find 命令的其他标志,如 –newer,可能在此搜索中非常有用。有关详细信息,请参见 find 命令的命令描述。

注意:在检查根目录时, /dev 目录中设备的主要和次要编号将夹杂实际的文件和文件大小。可以忽略逗号分隔的主要和次要编号。

在删除任何文件之前,可以使用 fuser 命令确保当前没有任何用户进程正在使用该文件: fuser filename

其中,filename 是可疑大型文件的名称。如果文件在删除时已打开,则只会将其从目录清单中删除。在拥有打开的文件的进程终止之前,分配给该文件的块不会释放。

修复装满的 /var 文件系统

当 /var 文件系统装满时,请检查以下事项:

可以使用 find 命令查找 /var 目录中的大型文件。例如:

# find /var -xdev -size +2048 -ls|

sort -r +6

有关详细信息,请参见 find 命令的命令描述。 检查 /var/tmp 中过时或残余的文件。

检查 /var/adm/wtmp 文件的大小,该文件记录所有 login、rlogin 和 telnet 会话日志。除非记帐系统 (system accounting) 正在运行,否则该日志将无限增长。记帐系统在每晚清空

该日志。可以清空或编辑 /var/adm/wtmp 文件,以删除旧的或不需要的信息。要清空该文件,可以使用下面的命令:

# cp /dev/null /var/adm/wtmp

#

要编辑 /var/adm/wtmp 文件,请首先使

用下面的命令临时复制该文件:

# /usr/sbin/acct/fwtmp < /var/adm/wtmp >/tmp/out

#

编辑 /tmp/out 文件以删除不需要的条目,然后使用以下命令替换原始文件:

# /usr/sbin/acct/fwtmp -ic < /tmp/out > /var/adm/wtmp

使用下面的过程清空 /var/adm/ras 目录中的错误日志。除非手动清空,否则错误日志永远不会清空。

注意:切勿使用 cp /dev/null 命令来清空错误日志。零长度的 errlog 文件将禁用操作系统的错误日志记录功能,必须从备份中将其替换。

?

使用以下命令终止 error 守护进程:

# /usr/lib/errstop

?

b. 使用以下命令之一删除错误日志文件或将其移动到其他文件系统:

# rm /var/adm/ras/errlog

或者

# mv /var/adm/ras/errlog filename

其中 filename 是被移动的 errlog 文件的名称。

注意:如果删除错误日志文件,则会删除历史错误数据。

?

c. 使用以下命令重新启动 error 守护进程:

# /usr/lib/errdemon

#

注意:可以考虑在 cron 中运行以下条目以限制 errorlog : 0 11 * * * /usr/bin/errclear -d S,O 30 0 12 * * * /usr/bin/errclear -d H 90

检查此目录中的 trcfile 文件是否非常大。如果该文件非常大,并且当前没有运行跟踪,可以使用以下命令删除该文件:

# rm /var/adm/ras/trcfile

如果将转储设备设置为 hd6(缺省转储设备),/var/adm/ras 目录中可能存在许多 vmcore* 文件。如果这些文件的文件日期很旧或者您不希望保留它们,可以使用 rm 命令将其删除。 检查 /var/spool 目录,其中包含队列子系统文件。可以使用以下命令清空队列子系统:

# stopsrc -s qdaemon

0513-044 The qdaemon Subsystem was

requested to stop.

# rm /var/spool/lpd/qdir/*

# rm /var/spool/lpd/stat/*

# rm /var/spool/qdaemon/*

# startsrc -s qdaemon

0513-059 The qdaemon Subsystem has been started.Subsystem PID is

291042.

#

检查 /var/adm/acct 目录,其中包含记帐记录。如果记帐系统正在运行,此目录可能包含多个大型文件。

检查 /var/preserve 目录中的已终止 vi 会话。一般情况下,可以安全地删除这些文件。如果用户希望恢复某个会话,可以使用 vi –r 命令列出所有可恢复的会话。要删除某个特定会话,可以使用命令 vi –r filename。

修改 /var/adm/sulog 文件,其中记录了尝试使用 su 命令的次数,以及每次尝试是否成功。这是一个平面文件,可使用自己喜欢的编辑器进行查看和修改。如果删除该文件,则会在下次尝试使用 su 命令时重新创建它。

修改 /var/tmp/snmpd.log,其中记录了来自 snmpd 守护进程的事件。如果删除该文件,snmpd 守护进程将重新创建它。

注意:可以限制 /var/tmp/snmpd.log 文件的大小,以使其不会无限增长。可编辑 /etc/snmpd.conf 文件,以更改针对大小的适当部分中的数字(以字节为单位)。

修复装满的用户定义的文件系统

使用以下过程修复装满的用户定义的文件系统。

?

删除旧的备份文件和核心文件。下面的命令删除所有 *.bak、.*.bak、a.out、core、* 或 ed.hup 文件:

find / \\( -name \-o -name core

-o -name a.out -o \\

-name \

-name ed.hup \\) \\

-atime +1 -mtime +1 -type f -print |

xargs -e rm -f

?

要定期防止文件装满磁盘,可以作为 cron 进程的一部分运行 skulker 命令,并删除不必要的文件或临时文件。

skulker 命令清除 /tmp 目录中的文件、指定日期以前的文件、a.out 文件、核心文件和 ed.hup 文件。它作为记帐过程的一部分由 cron 命令在每天的非高峰时间段中运行(假设打开了记帐系统)。

cron 守护进程在指定的日期和时间运行 Shell 命令。可以按照 crontab 文件中包含的说明指定诸如 skulker 等定期计划的命令。使用 crontab 命令提交 crontab 文件。要编辑系统或根 crontab 文件,您必须拥有 root 用户权限。用户可以编辑他们自己的 crontab 文件。

修复其他文件系统和一般搜索技术

带 –size 标志使用 find 命令来定位大型文件,或者如果文件系统是最近装满的,可以使用 -newer 标志查找最近修改过的文件。要产生一个供 -newer 标志在查找时用作参照的文件,可使用以下 touch 命令:

touch mmddhhmm filename

其中 mm 是月份,dd 是日期,hh 是 24 小时格式的小时,mm 是分钟,filename 是要用 touch 命令创建的文件的名称。

在创建参照文件之后,可以使用以下命令查找较新的大型文件:

find /filesystem_name -xdev -newer

touch_filename -ls

还可以使用 find 命令来定位在最近 24 小时内更改过的文件,如下面的示例所示:

find /filesystem_name -xdev -mtime 0

-ls

修复损坏的文件系统

当文件系统目录结构的索引节 (i-node) 或超级块 (superblock) 信息受到破坏时,文件系统就会受到破坏。这可能是由硬件相关的问题或由直接访问索引节或超结块信息的程序受到破坏而导致的。(以汇编语言和 C 编写的程序可以绕过操作系统并直接向硬件执行写入。)受到破坏的文件系统的症状之一是系统无法对位于特定文件系统中的数据进行定位、读取或写入。

要修复损坏的文件系统,您必须诊断问题然后修复问题。fsck 命令执行底层诊断和修复。

1. 使用 root 权限,通过下列 SMIT 快速路经之一卸载损坏的文件系统:smit unmountfs(用于固定硬盘驱动器上的文件系统)或 smit unmntdsk(用于移动磁盘上的文件系统)。 2. 通过运行 fsck 命令访问损坏的文件系统。在下面的示例中,fsck 命令检查位于 /dev/myfilelv 设备上的已卸载文件系统:

# fsck /dev/myfilelv

fsck 命令检查并交互式地修复不一致的文件系统。正常情况下,文件系统是一致的,fsck 命令只是报告文件系统中的文件、已使用的块和空闲块的数量。如果文件系统不一致,fsck 命令将显示有关已发现的不一致性的信息,并提示您准许修复它们。fsck 命令在修复工作方面很谨慎,并尽量避免可能导致有效数据丢失的操作。但是在某些情况下,fsck 命令会建议销毁某个已损坏的文件。

3. 如果无法修复文件系统,则从备份中恢复。

1.System administrator find information regarding smit menu definitions:use ODM commands

2.Administrator can use lslpp to verify installation of the bos.adt.lib fileset. 3.The command of diag should be used to identify the missing hardware. 4.A system administrator identified a problem with an AIX command and implement a work-aroud. A call was made to IBM Support to report the problem.The administrator should choose Severity 3. 5.Restart the mail daemon should use refresh –s sendmail.

6.The administrator would like to see the console output to determine a possible cause of the crash and ensure that there were no reboot.The alog command should be used. 7.The command of lsvg –p testvg is used to list information about each paysical volume group testvg.

8.The command of lsvg –l testvg is used to list information about each logical volume and filesystem.

9.A system administrator has been asked to install an APAR but wants to be able to easily remove it. The install option of apply should be used.

10.A system administrator has just installed a new maintenance level,but ―oslevel -r‖ does not show the correct maintenance level.The command of instfix can be used to determine which filesets are downlevel.

11.For security reasons,an administrator is asked to modify the system to prevent someone from leaving a terminal logged in.To enable a five minute timeout for all users. Modify /etc/environment to add TMOUT=300.

12.The command of savevg –f /dev/rmt0 –v appvg will back up the contents of appvg to the tape in /dev/rmt0 and check for any read errors.

13.The stripe size of the logical volume can not be changed after it is created. 14.The number of bytes per inode of the filesystem can not be changed after it is created.

15.In order to upgrade from AIX Version 4.3 to AIX Version 5.2,Boot from the installation media actions should be performed.

16.A user wants to be permanently added to dba group.The command of chuser can be used to accomplish this.

17.A system administrator is attempting to unmount filesystem /dev/data and receives the following message:

umount 0506-349 Cannot unmount /dev/data:The requested resource is busy. The command of fuser can be used to determine which process has open references within the filesystem.

18.A system administrator has palced an AIX base media CD-ROM in a server and initiated a reboot.The server has an ascii terminal attached to it .The 5 key must the administrator press to initiate the maintenance mode.

19.During system boot , the system hangs at LED DC31.Check system console connections is the first step the system administrator should take to correct the problem.

20.Disks hdisk1 and hdisk2 are assigned to datavg.The command of lspv –l hdisk1 should be used to determine which logical volumes are present on hdisk1.

21.A user‘s print jobs default to PRINTER_A.The user wants to change their default printer to PRINTER_B.Add the line’export PRINTER=PRINTER_B’ to the user’s .profile.

22.During reboot the system hangs with LED 0581 that indicates ―Configuring TCP/IP‖.Boot in maintenance mode after verifying the network connection, access the rootvg and check the /etc/rc.net file.

23.A system administrator issued the errpt command and had no results.The system administrator determined that error logging was turned off.

The command of /usr/lib/errdemon should be used to start logging errors. 24.A system administrator is considering enabling the 64-bit kernel but first must determine if the system hardware will support 64-bit.prtconf –c should be accomplished in AIX 5L.

25.The system administrator review root‘s current cron jobs should be use crontab –l. 26.A system administrator did not receive a response while attempting to ping loopback.The command of rc.tcpip can resolve this problem.

27.The command of mkitab would an administrator use to add startup scripts to the system startup process.

28.A system administrator is in the process of documenting the system.The command of lsdev –c will provide a list of the devices defined on the system.

29.The command of lsvg –p datavg lists out the physical volumes names as well as total / free PPs in volume group datavg..

30.An administrator has added a new device to a system and wants to determine if it has been correctly added to the ODM database.The command of odmget would the system administrator use.

本文来源:https://www.bwwdw.com/article/muj2.html

Top