1.系统如果要看运行了多少时间就用uptime这个命令。
-bash-3.00$ uptime
1:35pm up 15 days 1:38, 59 users //运行了15天
2.系统运行级别有 S,s维护模式也是单用户模式,M,m就是多用户模式运行级别为2
3.进入单用户维护模式init s
4./etc/inittab控制着系统启动的过程,为init初始化提供了系统初始是所需运行的程序列表。
-bash-3.00$ cat /etc/inittab //以下就是inittab的文件格式为 Identifier:Runlevel:Action:Command
: @(#)49 1.28.2.11 src/bos/etc/inittab/inittab, cmdoper, bos530 2/19/04 11:22:58
: IBM_PROLOG_BEGIN_TAG
: This is an automatically generated prolog.
:
: bos530 src/bos/etc/inittab/inittab 1.28.2.11
:
: Licensed Materials - Property of IBM
:
: (C) COPYRIGHT International Business Machines Corp. 1989,1993
: All Rights Reserved
:
: US Government Users Restricted Rights - Use, duplication or
: disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
:
: IBM_PROLOG_END_TAG
:
: COMPONENT_NAME: CMDOPER
:
: ORIGINS: 3, 27
:
: (C) COPYRIGHT International Business Machines Corp. 1989, 1993
: All Rights Reserved
: Licensed Materials - Property of IBM
:
: US Government Users Restricted Rights - Use, duplication or
: disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
:
: Note - initdefault and sysinit should be the first and second entry.
:
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console # Power Failure Detection
mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1
load64bit:2:wait:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 # Set tunables
rc:23456789:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
rcemgr:23456789:once:/usr/sbin/emgr -B > /dev/null 2>&1
fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console # run /etc/firstboot
srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
rctcpip:23456789:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
ldapclntd:23456789:wait:/usr/sbin/start-secldapclntd > /dev/console 2>&1
sniinst:2:wait:/var/adm/sni/sniprei > /dev/console 2>&1
rcnfs:23456789:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
cron:23456789:respawn:/usr/sbin/cron
piobe:2:wait:/usr/lib/lpd/pioinit_cp >/dev/null 2>&1 # pb cleanup
qdaemon:23456789:wait:/usr/bin/startsrc -sqdaemon
writesrv:23456789:wait:/usr/bin/startsrc -swritesrv
uprintfd:23456789:respawn:/usr/sbin/uprintfd
shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
l7:7:wait:/etc/rc.d/rc 7
l8:8:wait:/etc/rc.d/rc 8
l9:9:wait:/etc/rc.d/rc 9
naudio2::boot:/usr/sbin/naudio2 > /dev/null
naudio::boot:/usr/sbin/naudio > /dev/null
ntbl_reset:2:once:/usr/bin/ntbl_reset_datafiles
rcml:2:once:/usr/sni/aix53/rc.ml > /dev/console 2>&1
logsymp:2:once:/usr/lib/ras/logsymptom # for system dumps
perfstat:2:once:/usr/lib/perf/libperfstat_updt_dictionary >/dev/console 2>&1
diagd:2:once:/usr/lpp/diagnostics/bin/diagd >/dev/console 2>&1
xmdaily:2:once:/usr/bin/xmwlm -L 2>&1 >/dev/null # Start xmwlm daily recording
ctrmc:2:once:/usr/bin/startsrc -s ctrmc > /dev/console 2>&1
dt:2:wait:/etc/rc.dt
cons:0123456789:respawn:/usr/sbin/getty /dev/console
ha_star:h2:once:/etc/rc.ha_star >/dev/console 2>&1
vty0:2:off:/usr/sbin/getty /dev/vty0
vty1:2:off:/usr/sbin/getty /dev/vty1
以上可以用vi来修改但对于有经验的系统管理员,因为用vi编辑容易出错,可以用chitab 修改/etc/inittab中的记录,lsitab 显示文件中的记录,mkitab添加记录,rmitab删除一条记录。
5.如果要查看引导信息,使用#alog -o -t boot
6.shutdown -Fr快速重启。
7.ODM(对象数据库管理器)大多数的对象存在/usr/lib/objrepos目录中而ODM数据库信息分别在/etc/objrepos,/usr/lib/objrepos ,/usr/share/lib/objrepos三个目录中。
-bash-3.00$ ls /usr/lib/objrepos/
CC FONT KEYBOARD.vc PDiagDev PDiagTask.vc PdCn XINPUT fix.vc inventory.vc product raid_method sm_cmd_opt.vc vendor
CC.vc FONT.vc MESSAGES PDiagDev.vc PdAt PdDv XINPUT.vc fix_lock lag product.vc raid_obj_class sm_menu_opt vendor.vc
DSMOptions GAI MESSAGES.vc PDiagRes PdAt.vc PdDv.vc crypto_module history lag.vc raid_attribute sm_cmd_hdr sm_menu_opt.vc
DSMOptions.vc GAI.vc PDiagAtt PDiagRes.vc PdAtXtd PdPathAt crypto_module.vc history.vc lpp raid_create_type sm_cmd_hdr.vc sm_name_hdr
DSMenu KEYBOARD PDiagAtt.vc PDiagTask PdAtXtd.vc PdPathAt.vc fix inventory lpp.vc raid_instruct sm_cmd_opt sm_name_hdr.vc
-bash-3.00$ ls /etc/objrepos/
ATM_PVC CuAt CuDv CuPathAt.vc DSMenu MenuGoal PDiagRes PdAt.vc PdDv.vc SRCodmlock TMInput diag_log_lock inventory.vc raid_attribute
CDiagAtt CuAt.vc CuDvDr CuVPD FRUB PDiagAtt PDiagRes.vc PdAtXtd PdPathAt SRCsubsvr config_lock errnotify lpp raid_create_type
CDiagAtt.vc CuData CuPath DAVars FRUB_SRC PDiagAtt.vc PDiagTask PdAtXtd.vc PdPathAt.vc SRCsubsys crypto_module history lpp.vc raid_instruct
CDiagDev CuData.vc CuPath.vc DSMOptions FRUs PDiagDev PDiagTask.vc PdCn SRCextmeth SWservAt crypto_module.vc history.vc product raid_method
Config_Rules CuDep CuPathAt DSMOptions.vc FRUs_src PDiagDev.vc PdAt PdDv SRCnotify SWservAt.vc diag_lock inventory product.vc raid_obj_class
ODM负责 设备配置信息,smit工具菜单选择项和对话框的显示信息,软件安装和更新过程中使用的关键产品数据库(SWVPD),网络通信配置信息,系统资源信息。
设备信息分两种,预先定制(predefined)和用户定义(customized) ODM数据库是文本形式存放的
对象类:ODM数据库有6种对象类,分别是预定义设备信息,用户定义设备,软件信息smit菜单,日志信息和网络安装管理器等。
预定义PdDV,PdAt,PdCn, 用户定义CuDv CuAt,CuDep,CuDvDr,config_rules,CuVPD
当系统Smit工具不能使用的时候才使用ODM,但是ODM命令效率非常低,对于系统管理员初学者,在使用ODM命令可能会导致系统无法启动无法正常工作。
ODM的命令有,odmget从数据中检索符合条件的对象,odmdelete删除符合规律的对象,odmadd添加对象,odmchange,修改对象,odmshow显示指定的对象,odmdrop删除一个对象。odmcreate创建一个新对象。
8.修改登录信息/etc/motd
-bash-3.00$ cat /etc/motd
*******************************************************************************
* *
* *
* Welcome to AIX Version 5.3! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
*******************************************************************************
如果不想别人看见登录信息,可以在/home/enjoygoodboy中用root权限创建.hushlogin的空文件即可。
9.用ulimt -a来查看所有限制的值。
-bash-3.00$ ulimit -a
core file size (blocks, -c) 1048575
data seg size (kbytes, -d) 131072
file size (blocks, -f) 1048575
max memory size (kbytes, -m) 32768
open files (-n) 2000
pipe size (512 bytes, -p) 64
stack size (kbytes, -s) 32768
cpu time (seconds, -t) unlimited
max user processes (-u) 128
virtual memory (kbytes, -v) unlimited
,
10.AIX创建用户的方法smit user用smit工具,mkuser su=FALSE enjoygoodboy创建一个不能su切换到改用户下,显示所有用户lsuser ALL,显示某个属性lsuser -f enjoygoodboy,修改属性chuser,AIX默认shell为ksh(korn shell)如果要改变可以用chsh 单个用户chsh enjogyoodboy /usr/bin/csh,删除用户用rmuser [p] name,
-bash-3.00$ lsuser -f enjoygoodboy
enjoygoodboy:
id=111557
pgrp=member
groups=member
home=/home/v/g/enjoygoodboy
shell=/bin/bash
registry=LDAP
roles=
bash-3.00$ chsh
Current available shells:
/bin/bash
/bin/sh
/bin/bsh
/bin/csh
/bin/ksh
/bin/tsh
/bin/ksh93
/usr/bin/sh
/usr/bin/bsh
/usr/bin/csh
/usr/bin/ksh
/usr/bin/tsh
/usr/bin/ksh93
/usr/bin/rksh
/usr/bin/rksh93
/usr/sbin/uucp/uucico
/usr/sbin/sliplogin
/usr/sbin/snappd
enjoygoodboy's current login shell:
/bin/bash