人人范文网 范文大全

AIX笔记

发布时间:2020-03-03 05:39:50 来源:范文大全 收藏本文 下载本文 手机版

开发机加硬盘

插入硬盘

1、cfgmgr lsvg(显示) hdisk6

none

None

2、chdev -l hdisk6 -a pv=yes

Lsvg(显示) hdisk6

00cc88ee35a14c43

None

3、smitty ---System Storage Management (Physical & Logical Storage)

---Logical Volume Manager ---Volume Groups

---Add a Volume Group

---Add an Original Volume Group

VOLUME GROUP name [dayendvg]

Physical partition SIZE in megabytes 128

PHYSICAL VOLUME names [hdisk6]

删除设备

rmdev -dl hdisk6 开发机加文件系统

1、smitty---System Storage Management (Physical & Logical Storage) ---Logical Volume Manager ---Logical Volumes

---Add a Logical Volume

Logical volume NAME [dayendlv]

* VOLUME GROUP name dayendvg

*Number of LOGICAL PARTITIONS [240]

Logical volume TYPE [jfs2]

---Add a Logical Volume(日志)

LogicalvolumeNAME [dayendloglv]

*VOLUMEGROUPname

dayendvg

* Number of LOGICAL PARTITIONS[1]

PHYSICAL VOLUME names [hdisk6]

Logical volume TYPE

[jfs2log]

2、logform /dev/dayendloglv(日志格式化)

3、smitty---System Storage Management (Physical & Logical Storage) ---File Systems ---Add / Change / Show / Delete File Systems

--- Add an Enhanced Journaled File System on a Previously Defined Logical Volume

*LOGICAL VOLUME name

dayendlv

* MOUNT POINT [dayend]

Mount AUTOMATICALLY at system restart? Yes

4、#mount dayend 3:安装

--------------------- installp常见选项:

installp -agX 以apply方式安装软件,X表示自动扩展文件系统,g表示自动安装需要的其他软件

installp -acgXd dir fileset 以commit方式安装软件,d指定安装文件目录,fileset指定要安装的fileset。

installp -acpX 安装预览

installp -cgX all commit所有软件

installp -r rejec安装过的软件,恢复到以前的版本 installp -u 卸载软件

installp -C 清除错误安装的软件

installp -L -d /dev/cd0 列出介质上的软件包

lslpp常见选项

lslpp -l 列出所有安装的软件当前的版本号 lslpp -f fileset 列出某个fileset包含的文件。

lslpp -h fileset 列出某个fileset的安装和更新历史

instfix常见选项

instfix -T -d /dev/cd0 列出介质上的补丁

instfix -ik IY73748 根据APAR号查询是否打过某个补丁。 instfix -aik IY73748 根据APAR号查询某个补丁的详细信息 instfix -i | grep ML 检查当前系统的ML(Maintenance Level) instfix -k IY73748 -d /dev/cd0 安装某个补丁

5:系统配置

---------------------- 网络配置

/etc/rc.tcpip 用于在系统启动时初始化TCP/IP服务

/etc/tcp.clean 用于停止TCP/IP服务,但不停止portmap和nfs 不要使用strtsrc -g tcpip启动网络服务,使用startsrc -s 刷新inetd,修改配置后使用以下命令刷新inetd refresh -s inetd 或者用

kill -1 PID lrc -ls inetd 检查当前inetd启用了哪些服务 缺省的域名解析顺序: DNS-NIS-LOCAL 修改/etc/netsvc.conf可以更改默认顺序: #cat /etc/netsvc.conf hosts = nis, local, bind # export NSORDER=bind,nis,local 设置NSORDER环境变量可以覆盖缺省的顺序 /etc/resolve.conf 配置DNS服务器 添加路由:

使用 route add -net 192.168.1 -netmask 255.255.255.0 9.3.1.124 或者使用smitty mkroute lsdev -Cc if 查看当前系统中定义的网络接口

ifconfig tr0 10.1.2.3 netmask 255.255.255.0 alias 建立别名

ifconfig tr0 10.1.2.3 netmask 255.255.255.0 delete 删除别名,如果不指定地址,该命令将删除主地址

lsattr -El en0 可以查看MTU Size /etc/hosts.equiv, .rhosts, .netrc, .forward 权限都应该设为600 /etc/hosts.equiv 和 $HOME/.rhosts 用于配置信任主机和用户,权限应设为600 root用户只使用 $HOME/.rhosts 格式:[ + |] UserName or @NetGroup (注意:配置文件是根据顺序从上到下一条条执行的)

lscfg |grep -i adapter 列出所有的适配卡

smitty chgenet 修改网卡属性,speed,duplex等等。

lsdev -Cc if 列出所有的网络接口(en是逻辑接口,上面列出的ent是物理接口) 从系统中删除网卡的步骤: 1:ifconfig interface down 2: ifconfig interface detach 3: rmdev -dl interface 4: rmdev -dl adapter 5: PowerOff 6: remove adapter

Paging Space配置

lsps -a 显示paging Space信息

chps -s 3 hd6 为Paging Space 增加3个LP大小的空间

chps -d 1 hd6 为Paging Space 减少1个LP大小的空间(hd6不能低于32M) 不要将hd6放在rootvg以外的其它vg里面,因为在系统启动的时候,只有rootvg是可以访问的。

migratepv -l hd6 hdisk0 hdisk1 将Paging Space 移动到同一vg中的另一个PV 删除Paging Space(除了hd6之外)不需要重启: 1:swapoff /dev/paging00 2: rmps paging00

设备管理:

lscfg -vp 显示系统中的设备信息

lscfg -vl 设备名 显示某个设备的具体信息(位置,微码版本,FRU等等) lsdev -C显示当前ODM中的设备信息 lsdev -P显示预定义的ODM设备信息

lsattr -El proc0 显示CPU的详细信息(CPU型号,频率等等) lsattr -El sys0 | grep realmem 显示系统中有多少内存 rmdev -dl rmt0 从ODM中删除设备

chdev -l sys0 -a maxuproc=100 修改系统每个用户的最大进程数 SMT简单配置

lsdev -Cc proceor 显示系统中的物理CPU个数 bindproceor -q 显示系统中当前逻辑CPU个数 lsattr -E -l proc0

frequency 1654344000 Proceor Speed False smt_enabled true Proceor SMT enabled False smt_threads 2 Proceor SMT threads False state enable Proceor state False type PowerPC_POWER5 Proceor type False smtctl -m off -w now 立即关闭SMT smtctl -m on -w boot 下次重启时打开SMT 32位和64位的切换

bootinfo -y显示硬件平台是32位还是64位 切换内核

# ln -sf /usr/lib/boot/unix_64 /unix # ln -sf /usr/lib/boot/unix64 /usr/lib/boot/unix # bosboot -ad /dev/ipldevice bosboot: Boot image is 23137 512 byte blocks.# shutdown -r

8:aix运行配置

------------------------- 快捷方式(fast path)为您进一步节省时 间直接到达您所希望的菜单: #smitty tape #smitty user #smitty tcpip #smitty nfs #smitty jfs #smitty lvm

系统环境 #smit system

停止系统

#smit shutdown

指定控制台 #smit chcons

时间设置

#smit chtz_date

语言环境 #smit mlang

设置操作系统特征 #smit chgsys

许可证用户数目

管理浮动的用户许可证 #smit netls_server

向所有用户广播消息

系统日志 #smit logs

转储设备 #smit dump

Internet与文档服务 #smit web_configure 改变系统用户界面 #smit dtconfig

改变缺省文档语言 #smit chdoclang

管理系统挂机探测

管理远程重新启动功能 #smit rrbtty

11:AIX逻辑卷管理器

磁盘安装:

#mkdev –c disk –s scsi –t osdiskIncrement| -n Increment ] Command [ Argument ...] nice后面可跟0-39,值越高优先级越低。 如果不指定值,缺省增长10。 例子:

$nice -10 Command 给Command减少10,即优先级增加10 $nice Command 默认给Command增加10,即优先级减少10

停止进程 kill AIX有两种kill命令:/usr/bin/kill和shell内建的命令kill。这两种命令使用的信号量不同。(通过$kill -l 可以查看信号量SIGNAL) To Send Signal to Procees kill [ -s { SignalName | SignalNumber } ] ProceID ...kill [SignalNumber ] ProceID ...To List Signal Names kill -l [ ExitStatus ] 几个简单例子:

$kill 1095 #强制1095进程退出(送的是默认信号量SIGTERM)。但是如果此进程已经被设置忽略SIGTREM则不能停止此进程。

$kill -kill 2098 1569 #送的信号量是SIGKILL(9)。此情况下2098和1596进程一定会被停止。

$kill -9 0 #同$kill -kill 0。此命令将会停止所有进程并将用户log off。 AIX还有killall命令,任何用户都能用来杀死除了发送的进程外所有进程。 killall [ - ] [ -Signal ]

性能检测

topas采用动态刷新显示系统性能。ps仅给出系统某一时刻的“快照”,而topas是按一定的时间间隔显示系统信息和它们的变化。 sar 显示累积的系统活动信息 vmstat 量化地显示系统进程所使用的虚存数量,也显示陷阱和CPU活动信息。 iostat 统计硬盘,终端,处理器的I/O情况。

SRC System Resource Controller:SRC系统资源控制器(AIX用于管理守候进程的守候进程)

SRC的指令是srcmstr,由init在/etc/inittab启动。 srcmstr /usr/sbin/srcmstr [ -r ] [ -B ] Flags -r Accepts remote requests if the daemon is started with the -r flag.If you start srcmstr without the -r flag, remote requests are ignored.-B Specifies the -B flag that causes the srcmstr daemon to run as in previous releases (AIX 4.3.1 and earlier).AIX按照一定的层次关系组织守候进程,这个组织结构被设置为对象类,存在ODM中。由底向上分别为: subservers(SRCsubsvr) subsystem(SRCsubsys) subsystem group 可以使用odmget查看信息。也可以用lrc命令。 lrc:Gets the status of a subsystem, a group of subsystems, or a subserver.To Get All Status lrc [ -h Host ] -a To Get Group Status lrc [ -h Host ] -g GroupName To Get Subsystem Status lrc [ -h Host ] [ -l ] -s Subsystem To Get Status by PID lrc [ -h Host ] [ -l ] -p SubsystemPID To Get Subserver Status lrc [ -h Host ] [ -l ] -t Type [ -p SubsystemPID ] [ -o Object ] [ -P SubserverPID ] To Get Subsystem Status in SMIT Format lrc -S [-s Subsystem | -d ] To Get Subserver Status in SMIT Format lrc -T [ -t Type ] To Get Notify in SMIT Format lrc -N [ -n NotifyName ] 最常使用的SRC命令:startsrc、stopsrc、refresh

进程的定时启动

可用cron守候进程来定时启动进程,该进程使用的crontab文件在/var/spool/cron/crontabs目录中,以用户名为文件名。 每条包含下列格式 分钟(0-59) 小时(0-23) 月的日子(1-31) 一年(1-12)

星期的日子(0-6) shell命令

AIX也可以直接调用crontab命令。可直接修改crontab文件并且很快生效。 crontab:Submits, edits, lists, or removes cron jobs.crontab [ -e | -l | -r | -v | File ] Flags -e Edits a copy of your crontab file or starts an editing seion if you don\'t already have a crontab file.When editing is complete, the entry is installed as your crontab file.The editing seion is started using the editor specified by the EDITOR environment variable.The default editor is vi.-l Lists your crontab file.-r Removes your crontab file from the crontab directory.-v Lists the status of your cron jobs.

25:备份与拷贝实用程序

-------------------

mksysb备份带的结构:

1、BOS boot image

2、mkinsttape image(包括三个文件:./tapeblksz ./bosinst.data ./image.data)

3、dummy.toc

4、rootvg data...

mksysb -e /dev/rmt0 备份系统,但不备份 /etc/exclude.rootvg文件中指定的文件。 smitty lsmksysb 列出mksysb备份的内容

smitty restmksysb 从mksysb备份中恢复某个文件(文件名前必须使用./) savevg -ivf /dev/rmtxx uservg 备份VG中的文件系统 find /userdirectory -depth | backup -ivf /dev/rmtxx find /userdirectory -depth | cpio -ocvB > /dev/rmtxx 不同的备份策略之间的区别: full: 全备份

differences: 只备份在上次full备份后修改过的文件,恢复时需要full+最近一次的备份介质 incremental: 只备份在上次备份后修改过的文件,恢复时需要从上一次full备份至今的所有备份介质

savevg -r 只备份VG的结构,不备份数据 restvg -r 同上

tcopy /dev/rmt0 校验磁带

26:系统监视与调整

------------------- 常用命令 •# ps •# sar •# vmstat •# iostat •# tprof •# svmon •# filemon 例:

CPU的使用情况(sar –u)这条命令的语法是: # sar [options] interval number 例如:

# sar –u 60 3 AIX NODE 2 3 00000211 07/06/99 %usr %sys %wio %idle 08:25:11 48 52 0 0 08:26:10 63 37 0 0 08:27:12 59 41 0 0 .Average 56 44 0 0 当 %usr+%sys > 80% 时,CPU 紧张

查看运行队列(sar –q)这条命令的语法是: # sar [options] interval number 14 例如:

# sar –q 60 3 AIX NODE 2 3 00000211 07/06/99 08:41:21 runq-sz %runocc swap-sz %swpocc 08:42:21 1.2 100 08:43:21 1.0 100 08:44:21 1.1 100 ..Average 1.2 100 注:命令#sar –q的输出:

-runq-sz = 运行队列的平均长度。(运行队列的平均长度就是等待在队列中的进 程数目)

-%runocc = 运行队列被占用的时间百分比。

-swap-sz = 等待被内存页交换的进程的平均数目。 -%swapocc = 内存页交换队列被占用的时间百分比。

这些数据会更有意义,如果收集一段时间并且研究它的趋势。在有些环境下可以 接受庞大的运行队列,而另外的环境就不一定适用。例如,在一个传统的商业环 境中,进程都是简单而运行快速的,这时系统性能还可以忍受大的运行队列。而 在一个工程或者科学计算环境中,进程一般都是巨大且需要更密集的资源的,此 时就不能忍受大的运行队列。 Paging 信息# vmstat 1 3 注:

命令vmstat的输出: -procs =(每秒)

r 在运行队列中的进程 b 在等待队列中的进程

-memory =( 那个时刻的统计数据) kthr memory page faults cpu ----- ----------- ------------------------ ------------ ----------- r b avm fre re pi po fr sr cy in sy cs us sy id wa 0 0 8087 13425 0 0 0 0 0 0 110 115 30 0 0 98 1 0 0 8087 13425 0 0 0 0 0 0 115 212 34 0 0 99 0 0 1 8087 13425 0 0 0 0 0 0 153 118 68 0 4 54 42 15 avm 活动的虚拟页的数目

fre 在空闲列表中的物理内存槽数 -page =(每秒) re 收回的页

pi/po 交换进内存的页/交换出内存的页 fr/sr 空闲的页/被时钟计算法则检测的页 cy 时钟循环(一般为0) -faults =(每秒) in 设备中断数 sy 系统调用数 cs 上下文交换数

-cpu =(就象命令sar –u,为百分比) us 用户进程 sy 核心进程 id 空闲时间 wa I/O等待时间

这些信息是sar报告的补充。

wa如果超过25%,那么磁盘子系统可能没有平衡好。

1:FS监控 quotaon/quotaoff 打开/关闭文件系统限额

edquota -p gpsilva tneiva 复制用户gpsilva的限额设置到tneiva who /etc/security/failedlogin 检查失败的登录日志

find / -xdev -size +2048 -ls |sort -rn +6 查找 / 目录下大于1K的文件并按从大到小排序。 find /filesystem_name -xdev -mtime 0 -ls 查找最近24小时修改过的文件 如何删除wtmp文件里面的陈旧内容:

/usr/sbin/acct/fwtmp /tmp/out

编辑 /tmp/out文件,删除历史纪录

/usr/sbin/acct/fwtmp -ic /var/adm/wtmp

如何清理系统错误日志: Never use the cp /dev/null command to clear the error log.A zero length errlog file disables the error logging functions of the operating system and must be replaced from a backup./usr/lib/errstop

rm /var/adm/ras/errlog

/usr/lib/errdemon

vi -r 列出可恢复的vi编辑

vi -r 文件名 恢复中断的VI编辑

/var/preserve 目录保存了中断的VI编辑文件,通常情况下可以删除。

/var/tmp/snmpd.log 可能会很大,可编辑/etc/snmpd.conf 设置日志文件的最大值。 /usr/lib/errdemon -l 确定errlog文件的位置

/usr/lib/errdemon -s 2000000 改变errlog文件的大小

errpt -s 1122164405 -e 1123100405 显示指定日期的错误日志 errclear 0 清除所有错误日志

errlogger 将信息记录到系统错误日志当中。

/usr/lib/errdead /dev/hd7 从系统dump文件中提取错误日志(执行命令时要先停掉errdemon) netstat -m 显示网络缓存的使用情况

netstat -v 显示网卡的驱动信息(包括设备类型,MAC地址,当前传输速率,错误统计信息等) netstat -s(p) 显示协议相关的统计信息。 iostat -A 显示AIO统计信息 iostat -t 显示CPU/TTY统计信息

iostat -AQ 显示文件系统的运行队列信息 iostat -a 显示适配卡的统计信息

/proc进程监控命令集:

procfiles Reports information about all file descriptors opened by

procees.proctree Prints the proce tree containing the specified proce IDs or

users.procsig

Lists the signal actions defined by procees.procstack Prints the hexadecimal addrees and symbolic names for all the

threads in the proce.procrun

Starts a proce that has stopped on the PR_REQUESTED

event.procmap

Prints the addre space map of procees.procflags Prints the /proc tracing flags, the pending and held signals, and

other /proc status information for each thread in the specified

procees.proccred Prints the credentials (effective, real, saved user IDs, and group

IDs) of procees.procldd

Lists the objects loaded by procees, including shared objects

explicitly attached using dlopen().procwait Waits for all of the specified procees to terminate.procwdx

Prints the current working directory of procees.procstop Stops procees on the PR_REQUESTED event.

/etc/tunables目录包含了系统中可调的参数(schedo, vmo, ioo, raso, no,nfso) nextboot 包含下次启动时生效的参数 lastboot 最近一次起动时的参数 常用命令如下:

tunsave

Saves current tunable parameter values to a file (backup).tunrestore Restores tunable parameter values from a file.tuncheck

Validates a tunable file.tunchange

Updates one or more tunable stanzas in a file.tundefault Reset all tunable parameters to their default value.llot -c pci 显示系统中的PCI插槽状态。 lsmcode -c 显示系统微码版本

lsmcode -A 显示所有设备的微码版本(内置硬盘,光纤卡,内置磁带机等等) lscfg -vp 显示系统VPD信息 prtconf 显示系统配置信息 lsrsrc 显示RSCT的类

xlpstat 监控LPAR的性能情况

27:问题分析与恢复

-------------------

系统dump,缺省的dump设备是hd6,如果系统内存大于4G,dump设备改为lg_dumplv.sysdumpdev -P -p /dev/dumpdev 修改缺省dump设备 sysdumpdev -L 显示上一次dump的信息 sysdumpdev -e 计算dump大小

lsattr -El sys0 -a autorestart 显示是否设置了dump后自动重启 dump时面板产生的 code格式: 888.102.xxx.xxx.888结束 第一个xxx表示crash code: 以 3,4,7开头的多为软件问题 以 2,5,8开头的多为硬件问题

特别的,000:Unexpected system interrupt.

558:There is not enough memory to continue the IPL.第二个xxx表示dump code,显示了系统dump当前的状态。 0c0 正常结束 0c4空间不足

使用pax打包(pax可打包超过2G的文件) pax -x pax -wvf /dev/rmt0 /var/adm/ras/cfglog /var/adm/ras/nimlog 使用pax解开tar包 pax -rvf /tmp/test.tar 将run.pax拷贝到/tmp目录 pax -rw run.pax /tmp

用snap命令收集系统信息

/usr/sbin/snap -gfkD -o /dev/rmt0

echo \" boot log resizing\" | alog -t boot -s 8192 改变bootlog大小

usrck -n ALL 检查所有用户

grpck -n ALL 检查组

检查并修复软件包安装的一致性(文件权限,大小,连接数等) sysck -i -f smart.rte.inventory smart.rte 卸载软件后清理相关的文件,连接等等。 sysck -u -f smart.rte.inventory smart.rte lsuser/lsgroup -f 以小结的格式显示用户/组的信息 lsuser/lsgroup -c 以列的格式显示用户/组的信息

不同情况下更换磁盘的步骤:

9.8.1 Scenario 1 If the disk you are going to replace is mirrored, we recommend following these steps: 1.Remove copies of all logical volumes that were residing on that disk using either the rmlvcopy command or unmirrorvg command.2.Remove the disk from the volume group using the reducevg command.3.Remove the disk definition using the rmdev command.4.Physically remove the disk.If the disk is not hot-swappable, you may be required to reboot the system.5.Make the replacement disk available.If the disk is hot-swappable, you can run cfgmgr; otherwise, you may need to reboot the system.6.Include the newly added disk into the volume group using the extendvg command.7.Recreate and synchronize the copies for all logical volumes using either mklvcopy or mirrorvg.

9.8.2 Scenario 2 If the disk you are going to replace is not mirrored and is still functional, we recommend following these steps: 1.Make the replacement disk available.If the disk is hot-swappable, you can run cfgmgr; otherwise, you may need to reboot the system.2.Include the newly added disk into the volume group using the extendvg command.3.Migrate all partitions from the failing disk to the new disk using either the migratepv command or the migratelp command.If the disks are part of the rootvg, you should consider the following: – If the disk to be replaced contains a copy of the BLV, you have to clear it using the chpv -c command.– A new BLV image must be created on the new disk using the bosboot command.– The bootlist must be updated to reflect these changes using the bootlist command.– If the disk to be replaced contains a paging space or a primary dump device, you should disable them.After the migratepv command completes, you should reactivate them.4.Remove the failing disk from the volume group using the reducevg command.5.Remove the disk definition using the rmdev command.

9.8.3 Scenario 3 If the disk is not mirrored, has failed completely, and there are other disks available in the volume group, we recommend following these steps: 1.Identify all logical volumes that have at least one partition located on the failed disk.2.Close the logical volumes and unmount all the corresponding file systems using the umount command.3.Remove the file systems and logical volumes using the rmfs command.4.Remove the failing disk from the volume group using the reducevg command.5.Remove the disk definition using the rmdev command.6.Physically remove the disk.If the disk is not hot-swappable, you may be required to reboot the system.7.Make the replacement disk available.If the disk is hot-swappable, you can run cfgmgr; otherwise, you may need to reboot the system.8.Include the newly added disk into the volume group using the extendvg command.9.Recreate all the logical volumes and the corresponding file systems using the mklv command and the crfs command.10.If you have a backup of your data, restore your data from backup. 9.8.4 Scenario 4 If the disk is not mirrored, has failed completely, there are no other disks available in the volume group (the volume group contained only one physical volume or all the physical volumes failed simultaneously), and the volume group is not rootvg, we recommend the following steps: 1.Export the volume group definition from the system using the exportvg command.2.Ensure that /etc/filesystems does not contain any incorrect stanzas.3.Remove the disk definition using the rmdev command.4.Physically remove the disk.If the disk is not hot-swappable, you may be required to reboot the system.5.Make the replacement disk available.If the disk is hot-swappable, you can run cfgmgr; otherwise, you may need to reboot the system.6.If you have a volume group backup, restore it using the restvg command.7.If you do not have volume group backup, recreate the volume group, all the logical volumes, and the corresponding file systems using the mkvg command, the mklv command, and the crfs command.8.If you have a backup of your data, restore your data from backup.

9.8.5 Scenario 5 If the disk is not mirrored, has failed completely, there are not other disks available in the volume group (the volume group contained only one physical volume or all physical volumes failed simultaneously), and the volume group is rootvg, we recommend following these steps: 1.Replace the failing disk.2.Boot the system in maintenance mode.3.Restore the system from an mksysb image.

启动CDE时系统hang 主要原因有: 1:/home 满了

2:无法解析主机名(修改了IP底之后没有修改/etc/host文件会出现这种情况) 无法打开显示时,采用以下步骤:

在远程主机server2上设置DISPLAY环境变量 export DISPLAY=server3:2.0 在server3上运行xhost命令允许连接 xhost +server2 终端显示异常时,设置TERM环境变量 export TERM=vt100 perfpmr 下载地址:ftp://ftp.software.ibm.com/aix/tools/perftools/perfpmr 运行perfpmr必须安装的包 bos.acct bos.sysmgt.trace perfagent.tools bos.net.tcp.server bos.adt.include bos.adt.samples

一、系统命令 检查系统状态: Ø 系统整体:prtconf Ø 文件系统:df –k,df -g(以什么样的单位查看.) 设备: lsdev –C 获取设备名称、状态、位置和描述。 例: 查看硬盘: lsdev –Cc disk 查看磁带机: lsdev –Cc tape 查看适配卡: lsdev –Cc adapter 处理器个数 lsdev –C|grep proc 2 系统配置 lscfg –vp 获取所有已配置硬件设备的详细信息。 例: 查看硬盘信息: lscfg –vl hdiskx x表示数字 查看网卡信息: lscfg –vl entx x表示数字 查看磁带机: lscfg –vl rmtx x表示数字

查看硬件属性: lsattr –El 获取已配置设备的属性信息。 例: 查看硬盘属性: lsattr –El hdiskx x表示数字(是EL) 查看网卡属性: lsattr –El entx x表示数字 查看磁带机属性: lsattr –El rmtx x表示数字 内存大小: lsattr –El mem0 Ø 磁盘 lspv Ø 交换分区 lsps -a Ø 软件 lslpp -l 文件包名字 Ø 用户 who

错误日志查看

•所有AIX错误都记录在一个记录文件中/var/adm/ras/errlog •显示错误

–errpt [-a] -a 为详细显示

可以输出到文件或用more、pg察看 •清空错误记录信息 –errclear 0 建立/修改口令通过errpt产生错误报告•显示所有的错误报告 –# errpt •只报告硬件错误 11 –# errpt -d -H •描述ID 为F49E2A17的错误报告 –# errpt -a -j F49E2A17 # errpt •标识‘C’:错误归类 –H:硬件 –S:软件

–O:操作错误 –U:不能确定 •标识‘T’:错误类型

–PERM(并且C 为H):显示系统遇到硬件问题并且无法自动修复 –PERD(并且C 为H):系统硬件变为不可用并引起一系列错误系统 –PERM(并且C 为S):显示系统遇到软件问题并且无法自动修复 –TEMP(并且C 为S):显示系统遇到软件问题并且已经自动修复 IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 192AC071 0106141400 T O errdemon ERROR LOGGING TURNED OFF 1581762B 0106115000 T H cd0 DISK OPERATION ERROR 1581762B 0106100100 T H cd0 DISK OPERATION ERROR 1581762B 0105152300 T H cd0 DISK OPERATION ERROR 2CCF66F7 0105111300 T H bl0 DEVICE ERROR 2BFA76F6 0105111100 T S SYSPROC SYSTEM SHUTDOWN BY USER 9DBCFDEE 0105111300 T O errdemon ERROR LOGGING TURNED ON 192AC071 0104174500 T O errdemon ERROR LOGGING TURNED OFF 2CCF66F7 0104143300 T H bl0 DEVICE ERROR 2BFA76F6 0104143100 T S SYSPROC SYSTEM SHUTDOWN BY USER 9DBCFDEE 0104143300 T O errdemon ERROR LOGGING TURNED ON 192AC071 0104143000 T O errdemon ERROR LOGGING TURNED OFF C60BB505 0104105800 P S SYSPROC SOFTWARE PROGRAM ABNORMALLY TERMINATED 12 工命令errclear直接清除错误日志 –# errclear 10 •清除10天以前的所有日志 –# errclear -d H 0 •清除所有硬件的错误 –# errclear -N disk 0 •删除所有资源组为disk的记录 –# errclear -T UNKN 0 •删除所有类型为unknown的记录 –# errclear 0 •删除所有记录

•显示error log的特性 –# /usr/lib/errdemon -l Error Log Attributes ------------- Log File /var/adm/ras/errlog Log Size 1048576 bytes Memory Buffer Size 8192 bytes

系统错误报告(Error Log)的检查:

硬件故障检测命令:# errpt –dH -T PERM

若有故障执行命令# errpt -a -dH -T PERM>/tmp/harderror.log保存,分析结果报告给客户

软件故障检测命令:# errpt -dS -T PERM

若有故障执行命令# errpt -a -dS -T PERM>/tmp/softerror.log保存,分析结果报告给客户

AI学习笔记

AI 学习笔记

AI论文

AI教案

Ai教案

学习ai

AI辩论

AI演讲稿

复韵母ai

AI演讲稿

AIX笔记
《AIX笔记.doc》
将本文的Word文档下载到电脑,方便编辑。
推荐度:
点击下载文档
相关专题 aix笔记 笔记
点击下载本文文档