免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1921 | 回复: 0

[新手入门] AIX and SP FAQ [复制链接]

论坛徽章:
0
发表于 2007-11-21 08:30 |显示全部楼层

howto
usage
notes
automatically shut down a process on shutdown
create /etc/rc.shutdown
Check that /usr/sbin/shutdown checks for the presence of /etc/rc.shutdown and runs it, if it finds it.
test for rc.shutdown is/should be at about line 870 in /usr/sbin/shutdown - which is a Kornshell script.
It is missing in some versions of AIX esp 415
change PVid
chdev -l hdiskn -a pv=yes
used to allocate/force a change of disk PVid - needed sometimes when smitty fails to add disk to a VG as cannot allocate Pvid
Can also be used to check can read/write to a disk
check failed logins
who -a /etc/security/failedlogin
lists all failed login attempts
check memory usage - per process
svmon -Pau n (n=no of procs)
svmon is part of PerfAgent
svmon will show table of top n processes, paging space, address ranges etc..
check which shell you are running
echo $0
echo $SHELL
can check in /etc/passwd for login shell
clear out /var/adm/wtmp
:>/var/adm/wtmp (clears it)
/usr/sbin/acct/nulladm / var/adn/wtmp (recreates it with correct perms etc).
There appears to be no way to truncate it - is a binary file
copy filesystems between disks where can't use migratepv
cd source
find . | cpio -pdumv /target
cpio with pdumv flags will copy everything at a block level (not fs or LV) and will preserve permissions and all other block configurations
create BLV/make disk bootable
bosboot -ad /dev/hdiskn
determine active processors in SMP box
cpu_state -l
shows if processors are enabled
determine jfs types - i.e. large fs enabled
lsfs -q
lsfs -q will list fs parameters for JFS (AIX 42X> only)
determine process memory usage
ps -eo comm,vsz,pid| grep
3 columns:
process name virtual memory size process-id
determine processor type
lsattr -El proc0
lsattr -El proc0 shows if POWER,POWER2, PowerPC601, 604
To check 604 vs 604e on a J,R or Hi node use lscfg -vl cpucard0|grep FRU- X4D is 604e - C4D is 604
PSSP-2.4> spgetdesc adds node type - ie size & speed to Node class in SDR
determine size of disk?
lsdev -Ccdisk (if IBM)
lspv hdiskn (if in a VG)
bootinfo -s hdiskn
three ways -depending upon who user is and whether disk is in a VG or is IBM's
bootinfo is the only way for non-IBM kit , but can only be run as root
could use lscfg for IBM disks too - will give same as lsdev as uses data in ODM
determine type/use of a file
file filename
looks at first few byes of file to determine if text/binary/script/data
extract file from mksysb archive
AIX3: mt fsf 3
tar -xvf /dev/rmtx.1 ./full/path/filename
AIX4:
restore - xvq -s4 -f /dev/rmtx.1 ./full/path/filename
1. 325 does not do raw data - tar; 42x does do raw data so is a real image
2. 42x also does savevg equivalent for non-rootvg VGs
3. Beware blocksizes! - best to use 512 as a physical tape device size - guaranteed to work - see deRoest for details
Howto
Usage
Notes
invoke system dump
dump mode & device is setup via smitty
if kernel panic, system dumps automatically
if system halted but keyboard works Ctrl-Alt-NUMPAD1 will force a dump
if halted and keyboard not working turn key to service & press 'reset' once (pressing it twice causes a reboot).
list unsuccessful login attempts
lssec -f /etc/security/lastlog -s root -a unsuccessful_login_count
read /var/adm/wtmp
/usr/sbin/acct/fwtmp
Converts binary file to man-readable ASCII
reset EOF character
stty eof \ ^Z
run perl from command line - search for procs
ps -ef|perl -ane '$F[2]=~m#^1$# && print "@F \n";'
uses perl from command line
uses m#nnn# instead of /nnn/
set fast boot on J40/50 & equivalents
key to service: spmon -k service nodexx
s1term -w nodexx
> sbb
1 6 for fastIPL
remember to reset key!!
mpcfg -df 11 1 from cli
mpcfg -cf to see settings
Works on all MCA SMP systems - J40/50, R40/50 or high node equivalents
Should be set for next reboot from rc.shutdown - want fast boot unless node crashes, in which case rc.shutdown will not be run
set new passwd without user being forced to change it on first use
pwdadm -c
clears all flags set in /etc/security/paswd file.
ADMCHG flag is what forces user to change passwords
Alternatively edit /etc/security/passwd & remove ADMCHG flag for user
setup automatic creation of .kshrc for new user
Create /etc/security/.kshrc
Edit /etc/security/.profile to point to it
Edit /etc/security/mkuser.sys to copy both .profile &.kshrc on creation of a new user.
mkuser.sys gets run under covers by smitty
Beware - mkuser.sys may be a symlink to /usr/lib/security/mkuser.sys, or may not even exist in /etc/security
update NIM SPOT
inutoc .
nim-o check -F lppsource_name
smitty nim_res_op - select SPOT, then 'smitty update_all'
setup_server to finish
Adds filesets to SPOT that are needed in mksysb.. changes to lppsource may not get picked up by setup_server - so this forces it.
view route settings in ODM
lsattr - El inet0
Shows stuff in ODM - not the same as netstat -rn; chdev inet0 updates ODM, unix commands like 'route' do not so changes do not survive a reboot
view/gather SP Ethernet MAC addresses
dsh lscfg -vl en0
SDRGetObjects Node hdw_enet_addr
more /etc/bootptab.info
lsnim -l | grep if1
MAC addresses for en0 should be in /etc/bootptab.info - NIM will read them from there when setup_server is run.
Useful to have for debug purposes - bootp bootstrap of node will fail if NIM client has wrong MAC address

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/39352/showart_427210.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP