aix commands(2)

第 14 楼:何为AIX 5L?

AIX 5L 是AIX的下一代产品(当前为AIX V4),它支持IBM POWER 和Intel 64位(IA-64)平台.“L” 指Linux affinity.

第 15 楼:使用命令行安装删除文件包

在AIX 中, 一般使用”smit”命令来安装和删除文件包,但有时经常会遇到”smit”本身被破坏的情况, 我们可以使用”installp”命令来安装及删除文件包.
安装: installp -ac -Q -d /dev/cd0
删除: installp -u

第 16 楼:何为AIX/Montery

AIX/Monterey是IBM下一发展阶段的UNIX操作系统,其中AIX核心为Intel系统带来了极易扩展、高度可用、具有业界非凡实力的UNIX操作系统所具有的全部优势。AIX/Monterey是一项主要的UNIX操作系统方案的成果,该项方案由IBM领导,并与SCO和 Intel合作,获得了业界领先的软件和系统厂商的广泛支持。AIX/Monterey是一个大规模的企业级UNIX操作系统,目前运行于各种Intel 32位体系架构(IA-32)及POWER体系架构之上。该产品将于今年晚些时候扩展到IA-64这一Intel的64位体系架构。 AIX/Monterey所支持的系统十分广泛,包括从部门级服务器到大型数据中心服务器。AIX/Monterey融合了多种操作系统的最佳特性,包括 AIX系统、IBM的DYNIX/ptx,以及SCO的UnixWare,其中DYNIX/ptx来自Sequent,运行NUMA-Q,而 UnixWare则是当今运行于Intel平台上的最大份额的一种UNIX操作系统。今年晚些时候,对于那些偏爱基于Intel64位Itanium3系统的客户而言,IBM将为其提供AIX/Monterey/64,使其拥有与运行于RS/6000上的AIX同样强大的功能。AIX/Monterey则将继续满足客户对跨越各种基于Intel和POWER的系统、行业性强的企业级UNIX平台的需求。我们将在AIX/Monterey中构建强大的 Linux兼容性,以帮助使Linux应用在AIX/Monterey上得以轻松实现,并帮助推动AIX/Monterey应用运行于未来版本的 Linux之中。应用的可移植性有望比Linux的成熟提前实现,这将为客户的顺利过渡提供坚实的基础。另外,我们还将与开放源码团体共同合作,将 AIX/Monterey技术应用于Linux之中,以便帮助建立起一种更好的Linux系统。
IBM完全能够帮助客户适应Linux的发展,其所具备的出众能力是其它任何UNIX厂商都无法企及的。对于运行于AIX/Monterey这一功能强大的全新操作系统之上的应用而言,IBM计划使其在未来能够轻松地移植到Linux中,并帮助客户保护其在硬件、应用、数据、过程和技术等方面的投资,因此,现今投资AIX/Monterey的客户可以充满自信地应对Linux的不断发展。

第 17 楼:如何查找系统中的某个文件存在于哪个文件集中?

当操作系统上由于未安装特定的文件集而无法执行某个命令时, 可以参考下面的方法确定所需的文件集.
首先确认系统中已安装了文件集 bos.content_list:
# lslpp -l bos.content_list
然后用下面的命令查找与指定文件相关的文件集:
# /usr/sbin/which_fileset
如, # /usr/sbin/which_fileset iostat
/usr/bin/iostat bos.acct
查找指定的文件集中包含哪些文件:
# lslpp -f
如, # lslpp -f bos.acct
….
/usr/bin/iostat
….

第 18 楼:如何减小 /var/adm/wtmp 文件的大小?

文件 /var/adm/wtmp 的大小会在每次用户登录时增长, 但从不自动减小. wtmp 文件的内容会被命令 last 使用, 用于显示登录系统和重启机器的情况.该文件不能被删除, 但它的内容可用如下命令清除:
# > /var/adm/wtmp

第 19 楼:AIX使用异步I/O(aio)提高系统性能

如果是同步I/O,当一个I/O操作执行时,应用程序必须等待,直到此I/O执行完.
相反,异步I/O操作在后台运行,I/O操作和应用程序可以同时运行,提高了系统性能.
使用异步I/O会提高I/O流量,如果应用是对裸设备进行操作,这种优势更加明显.
因此象数据库,文件服务器等应用往往会利用异步I/O,使得多个I/O操作同时执行.
1. 如何知道是否需要异步I/O?
* 执行命令:”vmstat # #” 如果”wa”值超过25%.
* 执行命令:”iostat # #” 如果”%tm_act”值超过35%.
2. 查询有几个AIO服务器: pstat -a | grep aios | wc -l
3. 应该设几个AIO服务器?
一般为硬盘数的10倍,但不要超过80.
4. AIO驱动程序: bos.rte.aio
5. 配置AIO为可用: # smit chgaio ->
STATE to be configured at system restart [available]

第 20 楼:AIX如何管理Paging Space

Paging Space 的大小应符合应用的需要.太大会浪费硬盘空间,太小会影响系统的运行.Paging Space的确定原则: 1. 系统实际内存小于64MB, paging space= 2 * RAM
2. 系统实际内存在 64MB to 256MB 之间, Page Space = RAM size + 16MB
3. 系统实际内存大于 256MB , Page Space = 512 + ( RAM - 256 ) * 1.25
4. 对于AIX 4.3.3 当内存达到4GB 到8GB,因为AIX 4.3.3 使用延迟的(deferred )paging space.Paging Space主要根据应用的要求来定.
一般可初始3GB, 然后观察paging space的使用情况,如果使用率超过70%, 则需要增加paging space.
以上计算方法只是粗略地算法,用户可根据实际情况调整.
* 如果系统出现以下几种情况,则说明需要扩大paging Space: 1. 下列任意错误信息之一:
INIT: Paging space is low
ksh: cannot fork no swap space
Not enough memory
Fork function failed
fork () system call failed
Unable to fork, too many processes
Fork failure - not enough memory available
Fork function not allowed. Not enough memory available.
Cannot fork: Not enough space
2. 使用命令” lsps -a” ,其结果%USED 列的平均值大于80%.
3. 使用命令”lsps -s” 其结果%USED 列大于80%.

* 使用下列命令也可以检查paging space是否够用:
iostat
vmstat
lsps

第 21 楼:如何在AIX 4.3中安装联机手册?

使用联机手册之前,需安装相应的软件包。
解答 AIX 4.3 安装介质包含两张联机文档光盘(Documentation CD): Base Documentation CD 和 Extended Documentation CD。使用命令man查看系统命令之前
需要按照下列步骤安装相应的软件包: 1. 正确设置环境变量LANG的值,如“en_US”为英文环境,“zh_CN”为简体中文环境。可以用命令
export LANG=en_US
设置。
2. 使用man查看系统命令之前必须安装下列软件包:
bos.html.en_US.topnav.navigate - Top Level Navigation
bos.html.en_US.nav - Online Navigation
bos.html.en_US.cmds.cmds1 - AIX Commands Reference 1
bos.html.en_US.cmds.cmds2 - AIX Commands Reference 2
bos.html.en_US.cmds.cmds3 - AIX Commands Reference 3
bos.html.en_US.cmds.cmds4 - AIX Commands Reference 4
bos.html.en_US.cmds.cmds5 - AIX Commands Reference 5
bos.html.en_US.cmds.cmds6 - AIX Commands Reference 6
使用命令
lslpp -l
检查上述软件包是否已经安装。

3. 如果需要查询AIX 系统调用及C语言库函数,则要安装软件包 bos.html.en_US.techref.base - AIX Base Tech Ref
bos.html.en_US.techref.commo - AIX Commo Tech Ref
4. Documentation CD中还包含许多其它的手册,可根据需要安装相应的软件包。
在AIX系统中安装软件包可使用smit管理菜单。在命令行输入
smit install_all

选择:
1. CD-ROM 设备(通常为/dev/cd0)。
2. 将光标移至”SOFTWARE to install” 并按下或“+7”。
3. 将光标移至要安装的软件包并按下 或 “+7”选择要安装的软件包。
4. 选中所有要安装的软件包后按?lt;Enter> 开始安装,之后需再次按下确认后继续安装,直至成功。
此时就可以使用man查看系统命令了!

第 22 楼:如何在AIX中设置中文环境

环境
平台:RS/6000
软件版本: AIX 4.2 或更新版本
在AIX中使用中文有两种途径:第一是在安装AIX时选择中文语言,装好的系统自动显示中文(这种方法不推荐使用,它没有第二种方法使用起来灵活)。第二是安装AIX时选择英文,系统启动后手工设置中文环境,方法如下:
1. 将AIX系统盘的第一张光盘放入光驱;
2. 运行命令:
smitty
–> System Environments
–> Manage Languange Environment
–> Change/Show Primary Language Environment
–> Change/Show Cultural Convention, Language, or Keyboard
在随后显示的菜单中将光标分别移到以下字段:
Primary CULTURAL Convention
Primary LANGUAGE translation
Primary KEYBOARD
按下,从弹出的菜单中选择“IBM-eucCN”将上述字段改为简体中文,按下回车键后系统自动从光盘安装中文环境软件包。此操作完成后重新启动系统,操作界面即为简体中文。
需要输入中文时使用下列功能键切换输入方法:
AIX 4.3.3 以前的版本: + F1 — + F4 切换到各种中文输入方法;
右 — 切换到英文输入;

AIX 4.3.3: CTRL + [F2] : 智能 ABC ;
CTRL + [F4] : 拼音输入;
CTRL + [F5] : 五笔输入;
CTRL + [F6] : 郑码输入 ;
CTRL + [F7] : 表形码输入;
CTRL + [F9] : 内码输入;
CTRL + [F10] :英文半角;

此外,AIX还包含另外两种中文环境,即“UTF8”和“GBK”,它们与“IBM-eucCN”之区别在于包含了繁体汉字的使用。上述三种中文环境的设置方法均相同。

第 23 楼:AIX 的许可权限—ACL

ACL是对标准权限位的扩展。通过修改分配给个人或组的标准权限,对每个文件或目录进行更精细的控制。对每个组或用户,有3种权限分配情况:
PERMIT : 准许对文件或目录的特定权限。
DEMY : 限制对文件或目录的特定权限。
SPECIFY : 明确地定义文件或目录权限。
“acledit “命令用于建立ACL。首先必须设置文本编辑器.如:export EDITOR=/usr/bin/vi。
然后使用:acledit file_name
屏幕上将会显示:
attributes:
base permissions
owner (rcunning): rwx
group (staff): r—
others: —
extended permissions
disabled
要设置扩展的权限,将“disabled ”设置改为“enabled”:
extend permissions
enabled
使用permit、deny 或specify关键字来定义扩展权限。前面的例子表明只有所有者能对这个文件写操作。组成员能读此文件而其他用户则没有任何许可权限。如果要使用户” joe”能够读写这个文件,用以下命令:
extended permissions
enabled
permit rw- u: joe.
要允许组用户joegroup读这个文件,用以下命令:
rermit r– g: joegroup
你能够通过在同一行中合并多个条目来对权限进行微调。如果只想为pete提供读写权,而他是系统组的一部分,则用以下命令:
permit rw- u: pete, g: system
要为几个用户或组增加许可权限,则使用分行命令 :
permit rw- u: joe
permit rw- u: pete
使用” ls -el”命令,查看ACL是否已在文件中设置。如”ls -el profile”命令显示:
— rwxw——–+
最后的+表示文件已具 有有效的ACL 。
注意:使用有数字争议的chmod 命令将使文件或目录的ACL无效。

第 24 楼:AIX管理经验谈

在AIX中可以通过打开acct功能来查看用户的资源使用情况, 主要包括:
用户连接情况、用户CPU使用情况、磁盘使用情况和打印机使用情况等。
具体的步骤(共7步)有:
1. 在/var/adm/acct目录下创建三个子目录:nite,sum,fiscal

2. 以root登录,到/var/adm目录下,执行/usr/lib/acct/nulladm wtmp pacct。

3. 通过在/etc/rc文件中添加两行(最后一行”exit 0″之上):
echo “Starting Process Accounting” /usr/bin/su - adm -c /usr/lib/acct/startup
打开记帐功能。

4. 将/etc/filesystems中要加入磁盘记帐的文件系统相关节中的account值改成true
5. 修改/etc/qconfig文件,要加入打印机使用记帐的打印队列的描述节中添加一行,
如: lp0: device=dlp0 acctfile = /var/adm/qacct # 添加行

6. 修改cron,例/var/spool/cron/crontabs/adm文件:
10 23 * * 0-6 /usr/lib/acct/runacct \
2> /usr/adm/acct/nite/accterr > /dev/null
0 23 * * 0-6 /usr/lib/acct/dodisk > /dev/null 2>&1
0 * * * * /usr/lib/acct/ckpacct > /dev/null 2>&1
15 4 1 * * /usr/lib/acct/monacct > /dev/null 2>&1

7. 如果要使用adm用户进行记帐管理,首先要给它分配密码,
然后在PATH环境变量中包括/usr/lib/acct以方便命令执行。

完成这些步骤后,系统会在步骤一生成的目录下定期生成报告文件,
记录各用户的资源使用情况。

第 25 楼:AIX简介

AIX 全名为(Advanced Interactive Executive),它是IBM 公司的UNIX操作系统,
整个系统的设计从网络、主机硬件系统,到操作系统完全遵守开放系统的原则。
下面对AIX 作以介绍。
RS/6000 采用IBM 的UNIX操作系统-AIX作为其操作系统。这是一
个目前操作系统界最成功,应用领域最广,最开放的第二代的UNIX系
统。它特别适合于做关键数据处理(CRITICAL)。
AIX 包含了许多IBM 大型机传统受欢迎的特征,如系统完整性,系统可管理
性和系统可用性。
在 AIX 操作系统上,有许多的数据库和开发工具,用户除了选用已有的应用
软件外,还可以根据各自的需要进行开发。
此外,在AIX 之上,有一组功能强,使用方便的系统管理工具。对于异种平台
互存,互操作有很成熟的解决方案。
由于该 UNIX 的先进的内核技术和最好的开放性,因此,虽然RS/6000
从宣布到今天只有短短的5 年多的时间,它已在各行各业有了广泛的运用,
并在1993和1994年连续二年在MIDRANGE商用 UNIX 领域处于第一位。
RISC SYSTEM/6000的操作系统是AIX ,它是性能卓越的、开放的
UNIX,汇集了多年来计算机界在UNIX上的研究成果,以IBM 在计算机
体系结构、操作系统方面40多年极其丰富的经验。最大限度的使用RISC
技术,安装了象AIX 这样的具备工业界实力的UNIX操作系统。
它既可连接SAA 体系结构,又能与非IBM 系统的网络相连,因此,可以
和多数专业银行现有的系统实现互连,这对今后业务系统拓展将带来极大的
灵活性,并降低投资。
AIX 遵循一系列的国际标准:
* IEEE POSIX1004.1-1990
* X/OPEN 移植指南ISSUE3的基本级(XPG3)
* AES/OS REVISION A (OSF/1 LEVEL 2 资格)
* FIPS 151-1
* AIX的编译器: XLC、C++(可选)、FORTRAN(可选)、PASCAL(可选)、COBOL(可选)
* ADA 的编译器已达到XPG3“成员”级的认可。
* AIX 支持多用户、多任务。
AIX有一些其它特性包括:
AIX 提供了3 种SHELL :SYSTEM V的KORN、BOURNE SHELL和4.3BSDC
SHELL作为可选择的UNIX系统界面;
安全设施满足TCB (Trusted Computing Base)的C2级;
实时处理能力,这对于“面向交易”的应用至关重要(如零售业
和银行等),它使RS/6000 获得极高的响应和吞吐量;
虚拟存储管理,当需要时,可将一些不常用的模块转送至外存,
提高内存的可利用性。
先进的文件系统,使得系统管理更加有效,并提高了数据可靠性
以及完整性。
能兼容DOS 应用程序和数据。
InfoExplorer,快速信息超文本索引系统- 不仅包括文字,而且
对包含声音、图像的索引系统,这是个联机的文件接口。包括全部的
超文本的索引和查找,以及面向任务和坐标的多重导引和索引系统。
这个文字及图形索引系统以一个灵活的、基于任务的方式去使用详细
资料及培训资料。
高级系统管理工具(SMIT,System Management Interface Tool)。
提供一级菜单驱动程序,诸如完成软件的安装与设置、设备的设置及
管理、问题的测定、存贮管理等。可以自动地进行I/O 设备设置,
ASCII 终端也可充当系统控制台。在LAN 上可以进行远程系统的安装。

第 26 楼:AIX网络诊断及解决现场实例

AIX网络诊断及解决现场实例
http://www.chinaunix.net/ 作者:viperonline 发表于:2004-05-12 20:55:52
问题:有两台aix的测试机器,一台做应用,一台做数据库,都在同一个网段下(无双机),其中应用网络没有问题,而数据库这台网络有问题,内网下载只有30几K。
解决方法:对比法
由于这两台机器属于同一网段,机型完全一样,可以将两台机器的网络设置进行细致的对比,看看有何差异,然后改之。
使用netstat -v ent0 | grep -p “Specific Statistics”命令分别查看两台机器
应用:
netstat -v ent0 | grep -p “Specific Statistics”
10/100 Mbps Ethernet PCI Adapter II (1410ff01) Specific Statistics:
——————————————————————–
Link Status: Up
Media Speed Selected: Auto negotiation
Media Speed Running: 100 Mbps Full Duplex
Receive Pool Buffer Size: 1024
Free Receive Pool Buffers: 1024
No Receive Pool Buffer Errors: 0
Receive Buffer Too Small Errors: 0
Entries to transmit timeout routine: 0
Transmit IPsec packets: 0
Transmit IPsec packets dropped: 0
Receive IPsec packets: 0
Receive IPsec packets dropped: 0
Inbound IPsec SA offload count: 0
Transmit Large Send packets: 0
Transmit Large Send packets dropped: 0
Packets with Transmit collisions:
1 collisions: 0 6 collisions: 0 11 collisions: 0
2 collisions: 0 7 collisions: 0 12 collisions: 0
3 collisions: 0 8 collisions: 0 13 collisions: 0
4 collisions: 0 9 collisions: 0 14 collisions: 0
5 collisions: 0 10 collisions: 0 15 collisions: 0
数据库:
netstat -v ent0 | grep -p “Specific Statistics”
10/100 Mbps Ethernet PCI Adapter II (1410ff01) Specific Statistics:
——————————————————————–
Link Status: Up
Media Speed Selected: 100 Mbps Half Duplex
Media Speed Running: 100 Mbps Half Duplex
Receive Pool Buffer Size: 1024
Free Receive Pool Buffers: 1024
No Receive Pool Buffer Errors: 0
Receive Buffer Too Small Errors: 0
Entries to transmit timeout routine: 0
Transmit IPsec packets: 0
Transmit IPsec packets dropped: 0
Receive IPsec packets: 0
Receive IPsec packets dropped: 0
Inbound IPsec SA offload count: 0
Transmit Large Send packets: 0
Transmit Large Send packets dropped: 0
Packets with Transmit collisions:
1 collisions: 233543413 6 collisions: 0 11 collisions: 0
2 collisions: 0 7 collisions: 0 12 collisions: 0
3 collisions: 0 8 collisions: 0 13 collisions: 0
4 collisions: 0 9 collisions: 0 14 collisions: 0
5 collisions: 0 10 collisions: 0 15 collisions: 0
仔细对比发现数据库这台显然是双工模式与应用这台不同,应用的机器是自适应的,运行时是100M全双工模式,而数据库的机器限制为100M半双工模式,现在就是要将数据库这台改成与应用一样
更改双工模式的命令为smitty chgenet
但是在此之前要将需要更改的网卡down掉,以及所有经过此网卡的服务停止
步骤如下:
ifconfig -a
输出:
en0: flags=5e080863,80
inet 10.100.10.6 netmask 0xffffff00 broadcast 10.100.10.255
再输入:
ifconfig en0 down
ifconfig en0 detach
smitty chgennt
输出:
[Entry Fields]
Ethernet Adapter ent0
Description 10/100 Mbps Ethernet PCI Adapter II (1410ff01)
Status Available
Location 1L-08
Transmit descriptor queue size [512] +#
Receive descriptor queue size [512] +#
Software transmit queue size [8192] +#
Receive buffer pool size [1024] +#
Media Speed Auto_Negotiation +
IPsec Offload no +
Enable hardware transmit and receive checksum yes +
Enable TCP Large Send Offload no +
Enable Link Polling no +
Time interval for Link Polling [500] +#
Enable ALTERNATE ETHERNET address no +
ALTERNATE ETHERNET address [0x000000000000] +
Apply change to DATABASE only no +
更改之后需要重新设置默认网关(原来的会丢失)
smitty tcpip
Minimum Configuration & Startup
输出:
HOSTNAME [TEST1-CRM-APP-CLS]
* Internet ADDRESS (dotted decimal) [10.100.10.6]
Network MASK (dotted decimal) [255.255.255.0]
* Network INTERFACE en0
NAMESERVER
Internet ADDRESS (dotted decimal) []
DOMAIN Name []
Default Gateway
Address (dotted decimal or symbolic name) [10.100.10.1]
Cost [0] #
Do Active Dead Gateway Detection? no +
Your CABLE Type N/A +
START TCP/IP daemons Now no +
最后将网卡启用
ifconfig en0 up
问题得到解决!!!!

我的主页:http://tlcshxd.3322.org/index.html

第 27 楼:IBM巡检流程

1、检查系统硬件情况:设备故障灯是否有亮
2、系统错误报告(errlog)
3、有否发给root用户的错误报告(mail)
4、检查hacmp.out,smit.log,boot.log
5、关键系统的文件使用率不大于80%
6、逻辑卷有否stale
7、内存交换区使用率是否超过70%
8、内存交换区的大小是否为物理内存的1.5倍
9、检查备份情况(有否系统备份、用户数据备份、磁带机是否需要清洗)
10、通信(网卡、IP、路由表、ping、/etc/hosts、DNS设置等)
11、是否有数据保护方式如RAID10/RAID5,是否有Hot spare
12、系统DUMP设置是否正确
13、检查系统参数是否正确
1)/etc/enviroment中的TZ不能有夏时制
2)如有数据库:Aio:available
3)HACMP中I/O pacing:High Water Mark/Low Water MArk:33/24
4)HACMP中Syncd:10
5)HACMP中Power Monitorff
14、检查rootvg是否有镜象
15、检查errdemon,srcmstr是否正常运行
16、机房环境(电压、湿度)
17、系统性能:有否性能瓶颈(topas,vmstat)
18、补丁程序(PTF)、微码(是否需要升级)
19、HACMP测试:Cluster Verification
20、系统硬件诊断
21、运行#snap -ac,生成文件snap+s/n.pax.Z
22、机器清洁
注:1~15为A类维护(季度维护),16~18为B类维护(半年维护),19~22为C类维护(年度维护)

我的主页:http://tlcshxd.3322.org/index.html

第 28 楼:AIX Useful Commands

compress -c file.txt > file.Z Create a compressed file.
uuencode (infile) (extract-file-name) > (output file)
Converts a binary file to an ASCII file for transfer by modem or email
uudecode (encoded file)
Extracts a binary file from encoded file and calls it the extract-file-name
examples :-
uuencode maymap maymap > maymap.enc
uudecode maymap.enc
od -c /tmp Displays contents of the /tmp directory file
ls -i Lists files with their inode numbers
echo * Lists files, can be used if ls is corrupt/missing
chtz (timezone eg GMT0BST) Changes the timezone in /etc/environment file
chlang (language eg En_GB) Changes the language in /etc/environment file
ar -v -t (archive file) List contents of an archive
ar -v -x (archive file) Extracts the archive
ar -v -t /usr/lib/libC-r.a Lists contents of the libC_r.a library
find /source -print | cpio -pdm /target
Copying directories using cpio, creates /target/source directory.
dump -nTv (binary executable) Displays the contents of an executable file
dump -c Displays string information
dump -o Displays object file headers
dump -l Displays line numbers
dump -s Displays the text section
snap -ao /dev/rmt0 Create a snapshot onto tape
snap -ad (directory) Create a snapshot into a named directory other
than the default (/tmp/ibmsupt)
/usr/dt/bin/dtconfig -d Disables desktop logins
/usr/dt/bin/dtconfig -e Enables desktop logins
/var/dt/Xpid PID of the dtlogin process
——————————————————————————–
LICENSES / SOFTWARE INSTALLATION
——————————————————————————–

lslicense Displays number of current user licenses
chlicense -u (number) Changes the number of user licenses
( ftp,rexec and rsh (without -i flag) do not need an AIX user license to be
able to access the system.

oslevel Returns operating system level
4 . 3 . 3 . 0 <——— Preventive Maintenance Level
| | |
| | +—————-Modification
| +——————–Release
+————————Version
oslevel -l 4.3.3.0 Displays all filesets that are “downlevel”
whence (program) Returns full path of program
whereis (program) Returms full path of program
what (program) Displays identifying info from the executable
like version number, when compiled.
lslpp -L all list all installed software
lslpp -L (program set name) Check if software installed
lslpp -f Lists filesets vs packages
lslpp -ha Lists installation history of filesets
lslpp -w /usr/bin/swapon Lists the fileset that the file belongs to
lppchk -c Checks file checksums against SWVPD
lppchk -l Checks symbolic links against SWVPD
instfix -ik (fix number eg IX66617) Checks id fix is installed
instfix -ik 4330-02_AIX_ML
instfix -i | grep ML Displays all ML’s installed
instfix -k IX38794 -d /dev/cd0 Installs a fix from cdrom
/usr/sbin/install_assist Smitty Installation Assistant
/usr/sys/inst.images/sys.bundles Software bundle files
alt_disk_install -c hdisk1 Clones a running rootvg onto hdisk1
alt_disk_install -w Wakes up alt vg
alt_disk_install -s Sends alt vg to sleep !
alt_disk_install -x Removes alt vg from disk
/usr/lpp/bosinst/blvset -d /dev/hdisk0 -p 4.2
Resets the pad string in the BLV to the correct AIX version. Needed if the
migration option is missing when installing.
installp -ad (device) (fileset) (level) Install apply and commit fileset
installp -pad (device) (fileset) (level) Preview install
installp -u (fileset) Remove fileset
installp -ld (device) List all software on device
example:-
installp -pad /dev/rmt0 X11.base 4.3.3.0
installp -C Cleans up after a premature cancel or interrupted installation.
——————————————————————————–
TERMINALS / DISPLAYS
——————————————————————————–
/usr/share/lib/terminfo Directory with all support terminal info files.
tty Displays what the tty/pty number of the terminal is.
termdef reports the termtype setup in smit for the tty port
that termdef is run on.
chdev -l (device eg tty1) -a term=vt100 Sets tty to a vt100 terminal type
penable tty0 adds getty line into /etc/inittab for tty0 and starts getty
pdisable tty0 disables the getty line and disables getty
penable / pdisable -a option is for all
stty erase ^? Set backspace key for vt100 terminals
stty erase ^H Set backspace key for wyse50 terminals
lscons Displays the console device
chcons -a login=enable (device eg /dev/tty1) Changes the console device
lsdisp Display adapter device information
chdisp Change default display used by LFT subsystem

Create ttys on ports 0 to 7 on adapter sa2 :-
for i in 0 1 2 3 4 5 6 7
do
mkdev -c tty1 -t tty -s rs232 -p sa2 -w$i -a login=enable -a term=vt100
done
portmir -t /dev/tty0 Mirror current terminal onto /dev/tty0
portmir -o Turns off port mirroring

——————————————————————————–
NETWORK
——————————————————————————–
host (ip or hostname) Resolves a hostname / ip address
hostname Displays hostname
hostname (hostname) Sets the hostname until next reboot
lsdev -Cc if Lists all available/defined network interfaces
chdev -l (device name) -a hostname=(hostname) Changes hostname permanently
chdev -l inet0 -a hostname=thomas
ifconfig (device name) Displays network card settings
ifconfig (device name) up Turns on network card
chdev -l (device name) -a state=up Turns on network card
ifconfig (device name) down Turns off network card
ifconfig (device name) detach Removes the network card from the
network interface list
ifconfig en0 inet 194.35.52.1 netmask 255.255.255.0 up
ifconfig lo0 alias 195.60.60.1 Create alias ip address for loopback
route (add/delete) (-net/-host) (destination) (gateway)
Adds or deletes routes to other networks or hosts, does not update
the ODM database and will be lost at reboot.
route add -net 194.60.89.0 194.60.90.4
chdev -l inet0 -a “net,-hopcount,1,-netmask,255.255.255.0,207.156.168.0,10.0.15.254″
(destination) ( gateway
Adds route and adds entry into ODM, route survives a reboot,
route -rn Display route table
odmget -q “attribute=route” CuAt Displays routes in the ODM.
lsattr -EHl inet0 Displays routes set in ODM and hostname
odmget -q “name=inet0″ CuAt Displays routes set in ODM and hostname
refresh -s inetd Refresh inetd after changes to inetd.conf
kill -1 (inetd PID) Refresh inetd after changes to inted.conf
netstat -i Displays interface statistics
entstat -d (ethernet adapter eg en0) Displays ethernet statistics
arp -a Displays ip to mac address table from arp cache
no -a Displays network options use -o to set individual options or
-d to set individual options to default.
no -o option=value (this value is reset at reboot)
no -o “ipforwarding=1″
traceroute (name or ipaddress) Displays all the hops from source to
destination supplied.
ping -R (hostname or ipaddress) Same as traceroute except repeats.
spray (hostname or ipaddress) Send a stream of packets to a host
stopsrc -g tcpip Stops all running TCP/IP daemons
/etc/tcp.clean Stops all running TCP/IP daemons and removes all
lock files
/etc/rc.tcpip Start all TCP/IP daemons.
Do not use startsrc -g tcpip as this will start all
TCP/IP daemons including routed & gated
——————————————————————————–
N.F.S.
——————————————————————————–
exportfs Lists all exported filesystems
exportfs -a Exports all fs’s in /etc/exports file
exportfs -u (filesystem) Un-exports a filesystem
mknfs Configures and starts NFS services
rmnfs Stops and un-configures NFS services
mknfsexp -d /directory Creates an NFS export directory
mknfsmnt Creates an NFS mount directory
mount hostname:/filesystem /mount-point Mount an NFS filesystem
nfso -a Display NFS Options
nfso -o option=value Set an NFS Option
nfso -o nfs_use_reserved_port=1



评论暂缺

(Required)
(Required, will not be published)