Disk/storage/network/switchLDMģˣϧоܲǺܺá
Ŀѧϰ̣install&deploy FC/BIEE/Weblogic; webtierе⡣
WeblogicĽűУλDomianӦĿ¼µstartServerNameset MEM_ARGS=-Xms32m -Xmx200mԵСڴΪ32M200M ===============================
2 趨weblogicģʽ(ģʽ)Ʒģʽ?
̨ĶӦģʽΪƷģʽ֮һķļcommenvļset PRODUCTION_MODE=true
===============================
3 ʱû?
ķļ WLS_USERWLS_PWҲboot.propertiesļӼܹû.
===============================
鿴ȫ
SolarisFTPSSH
鿴ȫOracle Solaris11->Text install, then repo and install solaris desktop, after reboot, it's looks like OELinux...
http://hi.baidu.com/chenshengang/blog/item/a74755ac9f206c054a36d6f4.html
ͬԴвͬCPU飬ڴԴ
Global ZoneһΪpoolddaemon, ͻԴʱpooldԶͻرԴʱpooldԶʧpooladmǸرԴصʹԴصĻpooladm CeʹԴصƶȡ
bash-3.00# pooladm Ce
poolcfgԴصʹpoolcfg鿴еԴļͨ£һļԴص, һأ/etc/pooladm.confļ
Ĭ£/etc/pooladm.confļDzڵģʹápooladm Cs /etc/pooladm.conf Ժʹápooladm CcȡԴļĬϾǶȡ/etc/pooladm.confļ
bash-3.00# poolcfg -c info /etc/pooladm.conf
ʾ
system bennyluo
string system.comment
int system.version 1
boolean system.bind-default true
int system.poold.pid 341
pool db-pool
int pool.sys_id 1
boolean pool.active true
boolean pool.default false
string pool.scheduler FSS
int pool.importance 1
string pool.comment
pset pset_default
pool pool_default
int pool.sys_id 0
boolean pool.active true
boolean pool.default true
int pool.importance 1
string pool.comment
pset pset_default
ΪһЩͣĽУϵͳԴأֱdb-pool, pool-default
pool.sys_id -- ϵͳԴID
pool.active C ԴصĻ״̬
pool.default C ԴǷΪϵͳĬϵijء
pool.scheduler C Դصĵƶȡ
pool.importance C ԴصҪ
pool.comment C Դصע͡
pset_default C CPUΪĬϵCPU
ôνһCPU飬ԴأҽǰZoneأʵܼҪݻCPUCPU飬ȻCPU䵽ԴٰZone,һIJ蹩ο
4CPUͻϣһCPUĿCPU飬ʹpoolcfg
poolcfg -c 'create pset pset1 (uint pset.max=2)'
poolcfg -c 'modify pset pset1 (uint pset.min=1)'
ﶨΪpset1CPUһCPUCPUȻԴأ
poolcfg -dc 'create pool pool1'
ﶨһΪpool1Դء
Ȼpset1pool1
poolcfg -dc 'associate pool pool1 (pset pset1) '
zonecfg:test-zone> set pool= pool1
ͿCPU飬ԴأZoneķ
ȻǿSolaris 10ProjectȷԴ˵ڴκطͻӦóĽڵZone,һȤĻӦҪǿԳһƪϸⷽ
鿴ȫBash shell У¿ݼвЧʡ
鿴ȫ Editors
Graphical Internet
Text-based Internet
Development Libraries
Development Tools
Server Configuration Tools
Administration Tools
Base
System Tools
X Window System 鿴ȫ
KH2J9-PC326-T44D4-39H6V-TVPBY 鿴ȫ
DNFSǡDistributed Network File SystemļơһLinuxȺ֮ϵĿչֲʽļϵͳ
ϵͳܹ
DNFSһ3ܹԪݷMDS洢豸OSDͿͻˣCLIENTԪݷϵͳļԪݹԿͻĵȣ洢豸ļݵı棻ͻûDNFSڣûDNFSһļϵͳ
MDSϵͳĺġCLIENTҪͨMDSMDSCLIENTдļԪд뱾أͬģԪļУҰѸļݵ㷨CLIENTѷֲϴָOSDϣϢҲԪļСMDSزReiserfsļϵͳԪļҪǿǵԪļСļһС1KBReiserfsСļܱȽǿġ
OSDϴ洢CLIENTϴļݷCLIENTļݶдOSDеġOSDϲExt3ļϵͳ
CLIENTI/OķߡCLIENTͨFUSEṩһVFSӿڣCLIENTϵıļϵͳDzƵġ
ĿǰDNFSֻ߱ļܣڲϵС
鿴ȫ
#1Chromium Web Browser
ۡ
װ http://apt.ubuntu.com/p/chromium-browser
#2GIMP Image EditorLinuxܻӭͼ༭ǿ
װhttp://apt.ubuntu.com/p/gimp
#3VLCý岥VLCûвܲģ̨òġ
װhttp://apt.ubuntu.com/p/vlc
#4Cheese Webcam BoothԼ࣬ЧӣԴΪ֪^_^
װhttp://apt.ubuntu.com/p/cheese
#5Audacity¼༭Ƶļ
װhttp://apt.ubuntu.com/p/audacity
#6Inkscape༭/ʸ ͼ
װhttp://apt.ubuntu.com/p/inkscape
#7Skype绰ѱͨţǣһҸˡȻι硭
װhttp://apt.ubuntu.com/p/skype
#8Thunderbirdȫʼ/ŶĿͻˡ
װhttp://apt.ubuntu.com/p/thunderbird
#97zipĽѹߣѲܽĸǸ߽ǷΡ
װhttp://apt.ubuntu.com/p/p7zip-full
#10PidginʱͨѶĬϵIMۼߣ
װhttp://apt.ubuntu.com/p/pidgin
#11RhythmboxĬϹСֲ٣࣬Ѻã˵
װhttp://apt.ubuntu.com/p/rhythmbox
#12ClementineAmarokɳ졣
װhttp://apt.ubuntu.com/p/clementine
#13Calibre飬ľ˼¡
װhttp://apt.ubuntu.com/p/calibre
#14GuakeһQuakeնʹУһѣһء֧ȼȡ
װhttp://apt.ubuntu.com/p/guake
#15Blender༭/3DģӦ
װhttp://apt.ubuntu.com/p/blender
#16OpenShot Ƶ༭˵LinuxƵ༭֮һǣBlender֧֡
װhttp://apt.ubuntu.com/p/openshot
#17SuperTuxKartܿ^_^˵
װhttp://apt.ubuntu.com/p/supertuxkart
ֲãǶֺܸߵءҰװд֣^_^
ȻЩԴרƳͬ⼸һģǶӰϴĿԴӵкܶͬص㣬͵ЩһʹáڹȥļЩļԲƣһӦαøձ顣Ϊ˸Ʋ֮ͬЭѾijЩչܡĿǰеLinuxжĬϰЩƷLinuxϵͳApacheMySQLݿPerlPHP PythonԣЩƷͬһǿWebӦóƽ̨
ſԴչԴLAMPѾJ2EE.Netҵγ㶦֮ƣܵITĹעԽԽĹӦ̡ûҵͶʶLAMPĿԴɵƽ̨ԼиҵӦúЭӦóΪһֿܺʵøӾоͻLAMPܡǼ۸ΪҵϢ뿼ǵƽ̨
LAMPض1998ꡣʱMichael KunzeΪ¹־c'tдһƪγΪҵƷʱLAMPʣָLinux ϵͳApacheMySQL ݿPHP PerlPythonűԵϣּĿͷĸɣIT֪ĶдİãKunzeLAMPһܿͱгܡO'ReillyMySQL ABӢȺƹռ֮LAMPΪ˿ԴҵһյơʵϣLAMPһյԴָǰķ
۲
IJ
- ֧POSIXļϵͳӦֲ
- 32/64λļϵͳ16 billion billion
- Ӧ˵ZFSһPOSIXļϵͳֲ
- ϵͳԱ˵ZFSṩ洢صģͣ˾ĸӲ̷⣬ʹļϵͳô洢ص豸ķʴ100ά
- вcopy-on-writeʽӲ״̬ԶЧ fsck
- ݿ鱻64λУ飬 ֹ̱, ݿRaidһһ
- ṩݵĿգṩ
1. ԤװOS ZFS谲װ
# pkginfo |grep SUNWzfs
# pkgadd -d .
The following packages are available:
1 SUNWzfs Zettabyte File System (ZFS)
(sparc) 11.10.0,REV=2004.12.26.02.38
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:1
...
Installation of %26lt;SUNWzfs%26gt; was successful.
2. storage pool
# zpool create -f testpool mirror /dev/dsk/c0t1d0s0 /dev/dsk/c0t1d0s1
# zpool df testpool
Pool size used avail capacity
-------------------- ------ ------ ------ --------
testpool 500M 56.0K 500M 1%
# zpool vdevs -v testpool
mirror1
c0t1d0s0
c0t1d0s1
鿴ȫ
1)ʹroot˻¼/etc/systemļһݣ磺
cp /etc/system /etc/system.orig2)༭/etc/system:
set noexec_user_stack=1
set semsys:seminfo_semmni=300
set semsys:seminfo_semmns=1050
set semsys:seminfo_semmsl=400
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=64000000008Gڴ£ͬ
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=300
set shmsys:shminfo_shmseg=303)ϵͳʹЧ:
/usr/sbin/reboot
˵ʱ,װ˸Ubuntu ( VM),оXPȺԻ.
SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs
SUNWxwfnt SUNWcsl
..ʵ..
̫֡Ϊ1518ֽڣJumbo Frameijȸͬ9000ֽڡ64000ֽڲȡJumbo Frameܹǧַ̫ܳӣʹݴЧ50%100%洢ӦûУJumbo FrameзͬѰ塣
̫֡Ϊ1518ֽڣһļҪΪɿ飬ŵ̫֡Сÿݿ鴫ʱ֡ͷβĿܹһ֡ļĴ䣬ٺܶ֡ĿʺʹʡͨΪһӦƿûб
ʹþ֡ļȱ㡣ȣ֡Խζʧһ֡ݣһθΪص¼´ͶʧݰΪΪķʱĹΣеÿֳֶ֧֡֡ʹáInternetӲֳ֧֡һȳInternetֳ֧ȵ֡ڷǰֶΣӶInternetӵܺͿɿԡҪÿһվ֪ĸݰ͵磬ĸݰ͵InternetΪ˼·ϵݰȣIPִMTU·ɷ㷨ǣⲻDZңھܾǽ㷨йصICMPݰͨˣ֡Internetӵʹá
Windows 7SP1Windows7ȥ10·вԼһЩ¡Уش֧USB 3.0
ܵCESչϣպͻ˶PCչʾ֧USB3.0ʼDZԡʵʲԽʾ25GBĸӰUSB1.0ʱΪ9.3СʱUSB2.0Ϊ13.9ӣUSB 3.0Ϊ70롣
зʿʾ֮˼ƳWindows 7SP1ΪҵûδWindows7ڵȴSP1ķ
Now get more about these,many knowledge there...
A10,,ϧ...
ҵ,Ȼ;
Oracle10gR2RAC/postgreSQL/MySQL/MSSQL->Oracle/EMC/ESX/NetApp/BNT CX4 etc.... ã˽Ϥ,ô;
Ӧ/洢///˼·...
raid 0+1,raid 0Ĵraid1,ײĴraid 0,raid 1Դ̵࣬еһ̳raid 0+1Ҫ̵ؽڼ䣬̵ҲʧЧģĻָʱȽϳܻȽϺ,Ϊraid 0ڶдܱȽϿ졣
raid 1+0 raid 1Ļraid 0ãraid 1Դ࣬Ǵֽڵȫࡣһֻ̳һΪraid 1ǻãԲᵼ´ָ̳ʱֻǻ̵ָʱ䡣ڴд롢ҪI/O࣬ûraid 0+1죬ǻָʱ̡
raid 5raid1ڴʹϱȽ٣block࣬ûraid 1+0ߣûraid 1+0죬ڶд̻߶̣ҪһЩʱ2ʱ䡣ԿorionģOLTPϵͳǰһ¡
raidԺǿfile system, raw partition or ASM,ASMṩļϵͳIJԣṩraw partitionܡASMһݿֻʹ2Ϳԣһݷʣһȡȡ鵵־ȡ̻LUNʱǶǴӴ濪ʼڴȡݵĴôǰ벿ֵ棬죬뻮ش顣
install rpm Ĵ rpmReadSignature failed
鿴ȫafter install as4u6 with media DVD,hint that remove dvd and insert into egenera installation media(https://portal.egenera.com/_layouts/login.aspx?ReturnUrl=%2f part download patches)
鿴ȫ⻯洢⻯ϣʵһһڶЧĵ⻯ͬʱҪּ
δչ
Ӳ豸ʣ
ЧĸӦ֮Ӱ죬
ͰѶӦϵһϵͳijɱ
עĻNehalemʳITýƵԽԽ࣬ NehalemʲôNehalemʵӢضһCPUܹĴ룬뱾ûʲôʵʵ塣NehalemȷӦǣȫµĿܹ
Ϊ"Tick-Tock"ƷͼչսԵż2008ӢضҪչǷCPUһܹ----NehalemܹΪһ˸йܣܿƣദչԼЧơ
NehalemܹΪҪ֣ںǼں
һ. ں˵Դ֮ǰܹŻͼǿҪΪ¼棺
(1) ֳ֧߳----̼߳ĺʱ˸߳
(2) ֧⻯豸/ (VT-d)----֮ǰ⻯CPUΪĻ豸/⻯ЧܺЧʡ
(3) ں˼ģʽ(Turbo Mode)----ںж̬١ԸҪرԼٵں˵С磬һĺ˵Nehalem ܹУһֻҪںˣԹرں˵Уͬʱѹں˵ƵߡֻҪһںˣԹرںˣͬʱѹһںߵߵƵС̬ĵϵͳCPUЧʡ
(4) SSE 4.2ָȵȡ
. Ǽں˵ƸĶĿҪУ
(1) Cache----ȫںʽCacheƣL1ƺCore ܹһL2óӳٵƣÿں256KBL3ùʽƣƬں˹
(2) ڴ(IMC)----оƬƵCPUƬϣֶ֧ͨDDR3ڴ棬ڴȡӳٴȼ٣ڴɴ
(3) QPI----"ͨ"ȡǰ(FSB)һֵ㵽Ӽ20λQPIɴᆰ˵ÿ25.6GBԶFSBɱȡQPIܹʵֶ֧ķƽ̨QPIڶദ֮Ļ
ĿǰNehalemܹBloomfield(BloomfieldҲDzƷ)ѾʽΪ" i7"Ʒƣ"i7"ϵбšһںδӢض˾PCƷ콢Ʒơ
NehalemܹĴ̨ʽĴ i7ֵ֧оƬΪx584ںˣƻڽļСڷͱʼDZԵNehalemܹҲڽ½С
ӢضƷĿ
ϤӢض˾˴Ŷ֪ÿӢضIJƷ߾дԵļڿʱһƷĿ롣Щ벻ʽIJƷУֻڿεĹͨ
ӢضƷʱʹõʽƷƺͲƷȷҪԶԶڲƷͿΣƷƷƺͲƷ漰ķ̫࣬編ɷģ̱עᣬʹ÷Χķģûܶȵȵȡ
ˣΪ˹ͨ棬ʹô빵ͨӢض˾ѴѡȨĿĿĸˣǿԸԼϲ²Ʒ¼ȡ롣ҲпգиǰᣬΪ˱ⷨDZڵķգֵѡӦǵͼϿҵġ
ӢضܶƷĿŶڼ(California)ɽɽĹԼո(Oregon)ܱߣطӢضĿ鶼ԹΧĵֵɽȵΪƷĿĴ룬ڵͼ϶ҵ
ȻѡòݣĿĸҲԴԼĵͼطͼϿҵΪ롣ӡУйŶӸһЩĿùPearl River(齭)Yellow River(ƺ), O'River(걽)ȵȣΪĿԵģҲֻڲͨʹãڶ벢Ϊ֪
һ£NehalemʵոݲеһССdzǡ
鿴ȫvi wu-ftpdChange the disable field from "yes" to "no" and save changes.
vi telnetChange the disable field from "yes" to "no" and save changes.
OS | patchlevel | memory | I/O Info | CPU Info | CPU / Memory |
Sun Solaris | showrev -p | sysinfo | sar -d | /opt/RICHPse/bin/se | /opt/RICHPse/bin/se |
| Linux | grep MemTotal /proc/meminfo free | vmstat 3 5 | grep "model name" /proc/cpuinfo cat /proc/cpuinfo sar -u 2 5 sar -b | top sar -W 5 5 | |
HP-UX | swlist | sam | vmstat -n 2 200 | ||
AIX/RS-6000 | instfix -ivqk | smit or sar |
|
File and Directory Navigation
The "pwd" command displays the current directory:The "ls" command lists all files and directories in the specified directory. If no location is defined it acts on the current directory. The "-a" flag lists hidden "." files. The "-l" flag lists file details.root> pwd
/u01/app/oracle/product/9.2.0.1.0
More Examples:root> ls
root> ls /u01
root> ls -al
ls -al | pg do a full directory listing and prompt to stop stuff whizzing off the page.
ls | wc -l count the files in the current directory.
ls -alt list files in date order
ls -alt | head -10 as above but only display the first 10
ls -l $ORACLE_HOME/reports60/printer/admin/spoolcmd.sh Verify that the spoolcmd.sh file has execute permissions
ls -s | awk '{if ($1 > 50) print $1 " " $2 }' list all files over 50 blocks in size.
ls -alq List files with hidden characters. Very useful when you cannot delete a file for an unknown reason, as sometimes a file can be created with hidden control characters. (very common when stty not set properly)
ls -1 Shows the files in a list (just the file names, this option is useful in shell scripts where the files names need to be fed into another program or command for manipulation)
ls -1h The option "-h" comes handy to display the size of the files in a human readable form.
ls -lr The parameter -r shows the output in the reverse order
ls -lR The -R operator makes the ls command execute recursivelythat is, go under to the subdirectories and show those files too
The "cd" command is used to change directories:
The "touch" command is used to create a new empty file with the default permissions:root> cd /u01/app/oracle
The "rm" command is used to delete files and directories. The "-R" flag tells the command to recurse through subdirectories.root> touch my.log
The "mv" command is used to move or rename files and directories. The "." represents the current directoryroot> rm my.log
root> rm -R /archive
The "cp" command is used to copy files and directories:root> mv [from] [to]
root> mv my.log my1.log
root> mv * /archive
root> mv /archive/* .
The "mkdir" command is used to create new directories:root> cp [from] [to]
root> cp my.log my1.log
root> cp * /archive
root> cp /archive/* .
The "rmdir" command is used to delete directories:root> mkdir archive
The "grep" command performs a search for a specified string or pattern.root> rmdir archive
The "find" command can be used to find the location of specific files. The "/" flag represents the staring directory for the search. Wildcards such as "dbms*" can be used for the filename.
Display only the lines in /etc/oratab where the lines do not (-v option; negation) start with # character (^ is a special character indicating beginning of line, similarly $ is end of line).root> find / -name dbmspool.sql
root> find / -print | grep dbmspool.sql Search everywhere for the specified file
root> find . -exec grep "DISPLAY" {} ; -print | pg Search all files for the text string "DISPLAY" - takes a while to run !
root> grep -v '^#' /etc/oratab
























choose vsphere enterprise õһsn,һֱʾcdrom;ѵsnԲ choose vsphere enterprise plus -sn -> install successfully
File1
This maps to this test:
Test: mytest
Small IO size: 8 KB
Large IO size: 1024 KB
IO Types: Small Random IOs, Large Random IOs
Simulated Array Type: CONCAT
Write: 0%
Cache Size: Not Entered
Duration for each Data Point: 60 seconds
Small Columns:, 0
Large Columns:, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
Total Data Points: 38
Name: /dev/sdb1 Size: 1069254144
1 FILEs found.
Maximum Large MBPS=1915.12 @ Small=0 and Large=13
Maximum Small IOPS=40539 @ Small=30 and Large=0
Minimum Small Latency=0.08 @ Small=1 and Large=0
File2
TEST START
...................
鿴ȫ-m reserved-blocks-percentage
Specify the percentage of the filesystem blocks reserved for the super-user. This avoids fragmentation,
and allows root-owned daemons, such as syslogd(8), to continue to function correctly after non-privi-
leged processes are prevented from writing to the filesystem. The default percentage is 5%.
/dev/sdbr1 917G 104M 871G 1% /u09
Ҫwin7ļ룬Ҫи Windows Live ID (MSN ˺)˵ֻҪhotmail msn˺żɡ
ȻѾɵWindows 7ЧCD-KEYҾӦһרԼģѾṩ Windows 7 к룬ҪЩƽⲹͿԳɹ Windows 7 Beta ʹõ 20098
鿴ȫr b swpd free buff cache si so bi bo in cs us sy id wa
1 3 616 893472 563880 2798072 0 0 18782 446 0 1 13 2 66 19
0 3 616 893152 563880 2798072 0 0 228817 17576 3400 5444 5 2 75 18
0 3 616 889496 563880 2798072 0 0 254042 489 3056 4260 5 2 76 18
1 2 616 889496 563880 2798072 0 0 258193 172 2230 3125 3 1 78 17
1 1 616 897688 563880 2798072 0 0 152570 80 1825 2412 3 1 81 15
1 2 616 898432 563884 2798068 0 0 54074 144 1822 3130 5 3 79 13
2 1 616 898432 563884 2798068 0 0 55129 340 1821 2250 3 1 82 14
0 2 616 898552 563884 2798068 0 0 50585 64 1782 2156 3 1 85 12
1 2 616 898568 563884 2798068 0 0 59555 1863 2073 3031 5 1 82 13
1 1 616 898688 563884 2798068 0 0 51909 4013 2403 5213 11 2 70 17
0 2 616 898712 563896 2798056 0 0 58209 3068 2024 2602 4 1 82 14
0 3 616 898784 563896 2798056 0 0 50562 324 2163 2774 3 0 82 14
0 2 616 898784 563896 2798056 0 0 51377 416 2415 3134 4 1 81 14
0 2 616 898936 563896 2798056 0 0 42921 8 1761 2277 3 0 85 12
5 10 616 898936 563896 2798056 0 0 55712 9976 3321 8656 25 3 55 18
0 3 616 899008 563896 2798056 0 0 42506 3878 2340 5561 11 2 66 21
0 2 616 899104 563896 2798056 0 0 44961 16419 2239 3255 4 1 82 13
0 2 616 899352 563896 2798056 0 0 45778 86 1840 2578 3 1 83 14
1 1 616 899352 563896 2798056 0 0 48153 272 1802 2530 3 1 83 13
0 3 616 899504 563896 2798056 0 0 46881 764 2157 2817 3 1 83 13
0 3 616 899512 563896 2798056 0 0 36450 636 3140 4132 4 1 81 15
1 1 616 899600 563900 2798052 0 0 37345 896 3469 4592 4 1 79 16
0 2 616 899616 563900 2798052 0 0 41705 552 3075 4057 4 1 81 14
0 2 616 907760 563900 2798052 0 0 43754 17 1759 2523 3 1 85 12
0 2 616 907760 563900 2798052 0 0 36545 164 1829 2438 3 0 84 12
0 2 616 907760 563900 2798052 0 0 45277 3239 2110 3582 6 1 81 13
0 2 616 907760 563900 2798052 0 0 41924 3295 2231 4437 10 1 73 15
0 2 616 907824 563908 2798044 0 0 35122 524 1528 1727 2 0 84 13
0 2 616 907824 563908 2798044 0 0 34161 4396 1429 1599 2 1 85 12
1 2 616 907824 563908 2798044 0 0 53786 81 1462 1609 3 0 85 12
2 3 616 897240 563908 2798044 0 0 67273 503 2624 3239 22 12 54 11
1 2 616 901280 563908 2798044 0 0 75840 11374 3444 7052 44 3 37 16
1 2 616 901280 563908 2798044 0 0 25697 308 1742 1710 15 0 72 13
0 2 616 907384 563908 2798044 0 0 18850 90 1177 1047 10 0 78 12
0 2 616 907280 563908 2798044 0 0 55489 13116 1577 1818 3 1 84 12
0 2 616 907304 563920 2798100 0 0 50842 32 1213 1182 2 0 86 11
1 1 616 907304 563920 2798100 0 0 60457 304 1392 1473 3 0 84 13
0 2 616 907448 563920 2798100 0 0 44009 108 1333 1281 2 0 86 12
0 2 616 907448 563920 2798100 0 0 52114 151 1465 1521 3 0 85 12
0 3 616 907576 563920 2798100 0 0 69529 376 1512 1664 3 1 85 11
0 2 616 907520 563920 2798100 0 0 35913 228 1676 1720 8 0 79 12
0 3 616 907584 563928 2798092 0 0 39642 484 2452 2922 3 0 82 14
1 3 616 907584 563928 2798092 0 0 47935 1468 2445 2911 3 1 82 14
7 12 616 899840 563928 2798092 0 0 207717 3892 2366 4947 11 2 67 20
0 4 616 891248 563928 2798092 0 0 298528 697 2446 4217 5 3 72 20
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
2 4 616 882240 563936 2798152 0 0 296298 268 2219 4726 5 3 71 20
0 4 616 888240 563952 2798136 0 0 292026 4656 2430 3643 3 2 75 19
0 4 616 887008 563952 2798136 0 0 294024 206 2327 4027 3 4 70 23
2 3 616 888688 563952 2798136 0 0 299777 9954 3239 7795 24 4 39 33
0 4 616 888152 563972 2798116 0 0 293185 11971 2358 3622 5 2 73 20
0 4 616 888672 563980 2798108 0 0 298128 172 2540 3334 3 2 74 21
2 2 616 888696 563980 2798108 0 0 257370 461 2606 3600 3 2 74 21
2 4 616 888744 563980 2798108 0 0 307521 420 2858 4084 3 2 74 21
0 4 616 889328 563980 2798108 0 0 302833 36 2308 3547 3 2 77 18
1 4 616 889352 563992 2798096 0 0 291585 128 2249 3370 3 2 76 19
̸ʹܶʱα
ûѡƽ̨ʱԵһͷӵ硣ûϣһ ֶ,ܹϵͳܣԴΪѡ͵ݡ ¹۹ᵽܺһֶ ۣңκζȱ㣬ǵʹ߶ܶ˽ⲻʱ ױһЩݳĽۡTPCΪһ Щʵʽ飬ûЩ
һʲôTPCtpmC?
tpmCֵڹⱻ ںϵͳʲôtpmCֵ?һЩ ûԱijЩ˾ļԱʹ⣬شľȷ tpmCֵг̶ԶơtpmCһҲдΪTPMTPMC
1TPC
TPC(TransactionProcessing PerformanceCouncilίԱ)10һԱ˾ķӯ ֯ܲ֯ȫ翪ţΪֹԱ աŷĴ˾TPCijԱҪǼӲңǼûĹ ƶӦû(Benchmark)ı淶ܺͼ۸ Խķ
TPCijǿ ģͨȡ(http://www.tpc.org)TPCĴ룬ֻ ı淶(StandardSpecification)κγһ߶ Ըݹ淶ŵعԼϵͳ(ƽ̨ͲԳ)Ϊ֤Խ Ŀԣ(ͨdz)ύTPCһı(FullDisclosure Report)ϵͳϸá۸Ͱάڵܼ ñTPCȨԱʵ(TPC)ȫֻм Աȫ
2tpmC
TPCѾƳ ΪTPCATPCBTPCCTPCDABѾʱʹ ˡTPCC(OLTP)ĻTPCDǾ֧(DecisionSupport) ĻTPCƳTPCEΪҵ(Enterprise)ϢĻ
TPCCģһ ̵Ļ˾Nֿ⣬ÿֿӦ10ÿ Ϊ3000˿ͷÿֿ10նˣÿһնһ ʱ10Nն˲Ա˾ݿⷢ5һֿв 洢˾еĻһЩ뷢ֿ⣬ˣݿ ֲġNһɱ߿ıNԻѲЧ
TPCCʹ ͼ۸TPCCʺλtpmCtpmtransactionsper minuteļƣCָTPCеCĶÿϵͳ¶ Ҫעǣڴ¶ͬʱϵͳҪ1Ҫ4 ӱ1Կ¶ܳȫ45ˣһ ϵͳΪ1000tpmCʱÿʵʴ2000۸ָϵ ͳܼ۸λԪ۸ܱΪܼ۸ܣλǡ/tpmC
κϵͳ
ܺͼ۸
ϵͳѡʱһ ҪΪضûеضӦѡϵͳмΪˡʽ 족äĿáͨáĶԽͨõĶԽDz ȷġ֪һЩûӲκΡͨáĶǻ Ԥ5ʹԼӦϵͳѡ͡ʹκһ ܺͼ۸ʱһҪŪöĶ壬Լʲôϵͳú лµõģνȡɺõַʽ
1ʵ ʵӦ
ķʽǸһ Ե㣬Ҫ̻ϵͳϽϵͳ(ƽ̨Ͳ)һ ʵûһʱ䡣ûܿʵܣҲܹ۲쵽ϵ ͳǷȶɿʹǷ㡢ǷܵǷ㹻ȫ۸Ƿ һҪһͬϵͳַʽӦΪѡΪ ȷףҲЧʣûһϵͳΪԵ㡣ַʽõ Ķֵкȷʵʵĺ塣
2ʹûĻ
ijԭ һַʽУûԶһ麬ԼʵӦûӦû ҾӣR/3ӦòSAP˾ĻԽ ԽҵϿɣй˰ܾҲԼĻ˰ ϵͳмѡַ͡ʽйҪΪйϢϵͳ ԡ
3ʹͨû
1ֺ͵2ַ ʽУʹTPCC֮ͨûDzѵһֽƷ ˣtpmCֵֻοӦע¼㣺
(1)ʵӦǷ
ƶģйҵλʽһ(Ҳ Ӧûһ)ʹTPCCʱӦ֪ҵӦǷ ģʽ?Ƿ1?ӦʱҪǷ1? ǣtpmCֵIJοֵͲ̫ˡ
(2)TPCĽ
TPC ϵͳDzģҿ϶ҪŻǵıϵͳ˴ġϵͳ (Ӳ̻RAID)˲ϵͳݿͻ˼ ϵͳݿӵȡںܶ೧ҵTPCϵͳУļ۸ ֻϵͳܼ۸1/4СӲ̵ļ۸пռܼ۸1/3ϣΪTPC CҪϵͳ뱣180¼ͬõûĻ УұtpmCֵ岻Ϊûʵϵͳ볧ԭTPC ϵͳһͬڲͬϵͳʱtpmCֵ൱ı ںܶûûʶһ㡣
Ҿһӡ ϣһͬϵͳÿһϵͳҪ1GBڴ50GBӲ̡ABC ۸൱ϵͳtpmCֱֵΪ300028002600ûǷӦѡ AIJƷ?ǣһڲtpmCֵϵͳʵṩû ϵͳôһtpmC͵ijCṩûϵͳпã ʵϵͳtpmCֵûʵӦ
(3)TPCԵijɱ
TPCCTPCD ܸӵĻһϸIJǺԴģҵȻ˵ ˶Ǯʱ䡣ݹ֪ʿ¶һһTPCC ҪʮϰԪʽͰҵʱͶ롣ˣܶTPCĶֵ ǹƵġڼϵͳƵûһҪͨ˵Ķֵͱ ȴʱ䣬˶Ƚϵͳйijͨ˵ʱ
Ƕй û(Ǵû)ڼϵͳѡͷ½飺
ýһʵԵ㣬ΪʵӦûǼϵͳñ
йҵӦýԼʵӦõĻͲԱй˰ֵֵܾᳫйزӦýIJģƶҵйҵģʽܲԱ
ͨáĶΪοֵӦΪҪһҪŪЩжʲô壬ʲôϵͳвõģԼǷҵʵҵ̺ģʽ
¸ôϤʵ
鿴ȫִظɾķ
̲ɵִظɾĻ֡һǻɢУhashķData DomainɿڵDXiϵ豸DzSHA-1, MD-5 Ƶ㷨Щбݵϳɿ鲢ΪÿݿһɢУhashݿɢУhash뱸豸ɢеһɢƥ䣬Ѿݣ豸ֻı˵λҲڸݡ
ɢУhashķõĿչ⡣Ϊ˿ʶһݿǷѾݣֻɢУhashķڴӵɢУhashݵݿʱҲ֮һ豸ڴбֵ֧ܻἱ½ͬʱڴˣĿǰֻɢУhashϵͳǶģԱִ洢ڴ̿ռƽ⣬ɢУhashԶ̫
ڶַǻʶظɾַҪʶ¼ݸʽǶڱеļϵͳԪʶļȻݴ洢е汾ֽڵرȽϣҵð汾һѴ洢İ汾IJ֮ͬΪЩͬݴһļַԱɢУhashͻġҪ³ͻҪʹֵ֧ıӦ豸Ա豸ȡԪݡ
ExaGrid SystemsInfiniteFilerһʶظɾ豸ʱCommVault Galaxy Symantec Backup ExecͨõıӦüԴϵͳʶļɱݺҳѾαݵļļdeltas InfiniteFilersϳһָ֧ߴ30 TBıݡظɾExaGridڴ洢һ1GB .PSTļϢʱ죬Ϊͬļظݣĸ.PSTļͬĸ¡
Sepaton VTL DeltaStorҲʶļͬλϵǰļ汾бȽϣͬʱҲλϱݵļ汾бȽϣܹλϵظݡ
ַDiligent TechnologiesProtecTier VTLļɢУhashIJƷݷֳɿ飬Ҳе㷨ݿǷơȻƿеݽֽڵıȽϣжϸݿǷѾݡ
Linux Kernel - Version:
Linux x86-64
Linux x86
Give index of Metalink Notes for the Linux Operating System and Oracle on Linux
鿴ȫLinux Kernel - Version:
Linux x86-64
Linux x86
Give index of Metalink Notes for the Linux Operating System and Oracle on Linux
鿴ȫlinuxװϣῴкܶбôЩʲôأЩӦЩܣˡ
1....6.....
7crond
7.1crond ļ/etc/crontab
7.2˵ִػ
7.3ǷҪ
cups (PORT 631)
8.1 ˵Common UNIX Printing SystemUNIXӡ֧֣ΪLinuxṩӡܡ
8.2 ǷҪװӡͲҪ
...........
11irqbatance
11.1 irqbalance Զϵͳµϵͳжиƽػ
11.2 ǷҪֻװһCPUͲҪػ
..........
16microcode_ctl
161˵microcode_ctl ԱԼµ뵽kernelԸIntel IA32ϵдPentium ProPIIPIIIPentium 4Celeron, Xeon ȵ - ȫ P6 Լ, pentium classics
16.2
...................
24smartd
24.1 ˵ҼӲǷ
24.2
Fri Jan 16 09:59:39 2009
WARNING: You are creating/reusing datafile /oradata/bldb/sysaux01.dbf.
WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/usr/sbin/mklv -y LVname
-T O -w n -s n -r n VGname NumPPs" can be used. Please contact Oracle customer support for more details.
WARNING: You are creating/reusing datafile /oradata/bldb/sysaux01.dbf.
WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/usr/sbin/mklv -y LVname
-T O -w n -s n -r n VGname NumPPs" can be used. Please contact Oracle customer support for more details.
WARNING: You are creating/reusing datafile /oradata/bldb/sysaux01.dbf.
WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/usr/sbin/mklv -y LVname
-T O -w n -s n -r n VGname NumPPs" can be used. Please contact Oracle customer support for more details.
WARNING: You are creating/reusing datafile /oradata/bldb/sysaux01.dbf.
WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/usr/sbin/mklv -y LVname
-T O -w n -s n -r n VGname NumPPs" can be used. Please contact Oracle customer support for more details.
Sat Jan 17 16:59:32 2009
-rw-r----- 1 root system 92653064 Jan 12 11:50 appddts02.dbfcp.gz
-rw-r----- 1 root system 134575069 Jan 12 11:51 appddts02.dbfcp.init.Z
ЩڸʽĸȥҾͰҵһЩд,ο:
1:HBAĸ
HBAȫΪHost Bus Adapter
2:Lunĸ
lunȫlogical unit numberҲԪš֪scsiϿɹҽӵ豸ģһΪ615ǿtarget ID(ҲгΪscsi id)Щ豸豸ֻҪһϵͳһţ豸ʱ,ֻҪ˵żžokˡ
ʵҪĶԶԶֵģlunĸҲ˵lun idþtarget idÿtarget¶жlun deviceͨlun deviceΪlunͿ˵ÿ豸ԭtarget xtarget x lun y,ôԶ,豸ǿ
startsrc -g ssh
һ豸
1.1AIXϵͳ豸ķֲ㼰
aixϵͳ豸ΪΣ㣺ܷ࣬ǰ豸Ļܷ飬ʾ豸ʲôadapter࣬дӡprinterܷ࣬е߶busܷ࣬еĴŴtapeܷڶ㣺࣬ǰijһ֣ʾ豸ʲôʽӵϵͳϣISAisa_sioࣩ/ PCIpciࣩadapterܷĹ࣬ӡַΪУrs232Ͳнӿ(parallel) 㣺豸ͣǰͺź ϵͳе豸豸豸֣Ӳ豸Щ豸ϵͳеƾ豸Ӧóͨ豸豸ģ豸Ϊ豸ļ/devĿ¼£ûͨ豸ļ豸ʵ豸Ķд豸ɵ unixϵͳе豸дʽࣺ豸block deviceһ־һṹȡ豸豸Ķдǰеģʹûʱݣӻһд豸豸һԶ뵽̺ļϵͳ ַ豸Character deviceһ˳豸豸ĶдǰַеģЩַγһ߱Զ豸ĶдʵʱģնˡŴȡĿ豸Ӧһȼ۵ַ豸/dev/fd0豸Ӧַ豸Ϊ/dev/rfd0 ls -l /dev ļȨʾУһַbıʾǿ豸ļcıʾַ豸ļе5豸ı־豸źʹ豸ɣ豸ű־豸,
鿴ȫ| ̵߳Ȳģͽܼ |
̵߳Ȳ |
smitty etherchannel;
inet and so on
banner njuigug
# # # # # # #### # # ####
## # # # # # # # # # # #
# # # # # # # # # # #
# # # # # # # # ### # # # ###
# ## # # # # # # # # # # #
# # #### #### # #### #### ####
have a look at
鿴ȫ1:chdev -l hdisk31 -a pv=yes
2:mknod /dev/ocr_disk c 25 5
from {
ls -lL /dev/zero /dev/null /dev/random
crw-rw-rw-1 root root 1, 3 2003-09-15/dev/null
crw-r--r--1 root root 1, 8 2003-09-15/dev/random
crw-rw-rw-1 root root 1, 5 2003-09-15/dev/zero
mknod dev/null c 1 3
mknod dev/zero c 1 5
mknod dev/random c 1 8 }
3:ļ
mknod /dev/o9_sysaux c 25 7
2Ǻ;ģֵüס
/dev/zeroļһԶ 0豸ļʹԵõȫΪյļ
dd if=/dev/zero of=/dev/rdsk/V1064_vote_01_20m.dbf bs=8192 count=2560
dd if=/dev/zero of=/dev/rdsk/ocrV1064_100m.ora bs=8192 count=12800
instead of ssh and scp. .
Դijһʱ̵״̬ѴڶʱڸƵĿϵͳС
νָֻݸƹͨڼɣʹԴݵϵͳֻܵӰ졣
ƹں̨Уƹ̽ڼԴݺĿݶܱӦóʹãǰ̨ϵͳͺ̨ϵͳͬʱУʹòͬݡ
1. dump豸ҪĴС
# sysdumpdev -e
0453-041 Estimated dump size in bytes: 981467136
2. ϵͳᶨʱdump deviceĴС,rootcron:
0 15 * * * /usr/lib/ras/dumpcheck >/dev/null 2>&1
dump deviceռ䲻,ᱨerrpt,:
837E0DE7 1112202205 P O dumpcheck The largest dump device is too small.
ĴϢһ㶼dump豸Ŀռ̫С
3. dump deviceСķ:
3.1 鿴ǰϵͳdump device
# sysdumpdev -l
primary /dev/lg_dumplv
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
AIX 52ϣdump豸ǽrootvgϵһlg_dumplvϡ
3.2 dump豸λ
Խdump豸ʱָ/dev/hd6(swap)/dev/sysdumpnull(dump豸,Ҳû)
-P primary dump device
-p Makes permanent the dump device specified by -p or -s flags.
#sysdumpdev -P -p /dev/hd6
primary /dev/hd6
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
3.3 չlg_dumplvĴСԴijߴ紴lv
# extendlv lg_dumplv xxx
3.4 ıdump豸lg_dumplv
# sysdumpdev -P -p /dev/lg_dumplv
primary /dev/lg_dumplv
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
3.5 мǷ
#/usr/lib/ras/dumpcheck
paging swapdump deviceͬ,ϵͳmirror(The system dump devices (primary /dev/hd6 and secondary /dev/sysdumpnull)
should not be mirrored.)
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 2 2 closed/syncd N/A
hd6 paging 244 488 2 open/syncd N/A
hd8 jfs2log 1 2 2 open/syncd N/A
hd4 jfs2 8 16 2 open/syncd /
hd2 jfs2 40 80 2 open/syncd /usr
hd9var jfs2 40 80 2 open/syncd /var
hd3 jfs2 16 32 2 open/syncd /tmp
hd1 jfs2 40 80 2 open/syncd /home
hd10opt jfs2 80 160 2 open/syncd /opt
lg_dumplv sysdump 16 16 1 open/syncd N/A
:hdisk0hdisk1Ϸֱdump device,:
rootvgÿһӲһdump device
mklv -t sysdump -Y sysdumplv00 rootvg 50 hdisk0
mklv -t sysdump -Y sysdumplv01 rootvg 50 hdisk1
sysdumpdev -P -p /dev/sysdumplv00
sysdumpdev -P -s /dev/sysdumplv01
Ӧ
sysdumpdev -P -p /dev/sysdumplv0000
sysdumpdev -P -s /dev/sysdumplv0100
½ܺAIXڴصһЩ.
ڴ
ڵڴ,鿴:
# prtconf |grep Memory
Memory Size: 15936 MB
Good Memory Size: 15936 MB
ڴķ
(1) persistentͣworkͣڴ
Persistentָ뵽ڴݱļϵͳǴڵģݵļִļ; ָеStack, ڴε(working segments, as are the kernel text segment, the kernel-extension text segments, as well as the shared-library text and data segments. )ǽ;ġPersistentڴ汻page outʱдļϵͳУworkڴ汻page outʱдpaging space.
ͨsvmonԿڴ.
# svmon -G
size inuse free pin virtual
memory 4079616 3477314 602302 535874 894316
pg space 7995392 2915
work pers clnt
pin 535874 0 0
in use 894316 0 2582998
(2) ComputationalͣFileļͣ
Computationalڴworking-storage segments or program text (executable files) segments. ҲǰworkͣټpersistentͣеĿִļIJ. Fileļͣdzȥ͵ڴ. ComputationalͿΪִļĵطļͿΪļеdata.
ͨtopasڴ.
MEMORY
Real,MB 15936
% Comp 22.8
% Noncomp 63.3
% Client 63.8
(3) Client
Persistent͵ڴһ,client͵ڴ汻map remote files(ͨNFSʵļ). Enhanced JFS file systemʹclients pagecache,svmonĽпʵûpersistentֵ,clntֵ, ΪõĶEnhanced JFS ļϵͳ.
work pers clnt
pin 535874 0 0
in use 894316 0 2582998
ڴ
ڴڴPaging Spaceγɵڴռ,ͨĵַռӳ䵽ڴPaging Space.
Paging space
Paging spaceϵͳһ洢ռ, ռһĴ̿ռ, logical volumeļʽ. AIXںҪ Paging Space ڴ档ڴҳһAIX Paging SpaceҲ4KBΪλʵڴĿֵһԺϵͳҪʵڴеijЩҳ棨Computation PageдصPaging SpaceУpage outԱͷųʵڴҳ鿴ǰpaging space:
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk1 rootvg 31232MB 1 yes yes lv
Page Fault
If the access is going to a page of virtual memory that is stored over to disk, or has not been brought in yet, a page fault occurs, and the execution of the program is suspended until the page has been read from disk. 鿴page fault:
# sar -r 5
System configuration: lcpu=8 mem=15936MB
10:28:12 slots cycle/s fault/s odio/s
10:28:17 7992467 0.00 3.39 0.20
pi(Page In)
The number of pages paged in from paging space. paging space pageڴеpageĿ, Щҳضǰpage outpage spaceе. ͨvmstat鿴
# vmstat
System configuration: lcpu=8 mem=15936MB
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------
r b avm fre re pi po fr sr cy in sy cs us sy id wa
1 1 894750 601858 0 0 0 2 3 0 15 861 286 0 0 99 1
po(Page Out)
The number (rate) of pages paged out to paging space. poûпpi,һThrashing, ϵͳڶȡpersistent pagesᵼ¿page out, ʱҪ鿴һӦõ. page outȥ,нҪٴreferenceʱ,page fault,Ȼͨpage inٴд뵽ڴ. ͨvmstat鿴
Thrashing
ʾϵͳpaging inout, ϵͳȱڴ.
Repage
Page faultһµpage fault,Ҳһrepage fault. A new page fault occurs when there is no record of the page having been referenced recently. A repage fault occurs when a page that is known to have been referenced recently is referenced again, and is not found in memory because the page has been replaced (and perhaps written to disk) since it was last accessed. һpage faultƣӦñⷢεpage faultAIXһͳƣֱͳƼͺͷǼڴ淢repagecountǿvmtuneȥڴ pageĻƣvmtune -p -Pminperm maxperm ķҳ滻ɵɵָ AIX ںӦʹöڴǼԵķҳmaxperm ɵָӦڻǼԷҳڴ
ȱʡ£maxperm һϸġƣζijЩ¿Գơ maxperm 趨ΪϸƣھпÿڴʱڴлķǼļͨ strict_maxperm ɵΪ 1Ϳʹ maxperm ƳΪϸơ maxperm ϸƵʱʹпɹʹõĿڴ棬ںҲǼԷҳĿ maxperm ơˣ maxperm ΪϸƵȱǣǼԷҳĿܳ maxperm ƣϵͳопڴʱҲʹøڴ档
minperm ָӦڷǼԷҳڴ
ǼԷҳĿΪ numpermvmstat Cv ʾϵͳ numperm ֵռϵͳʵڴİٷֱȡ
ͼ 1 йЩɵڲͬϵͳνйĸſ
ͼ 1.
minperm maxperm ǼԷҳĿnumpermڻߵ maxperm ʱAIX ҳ滻ػϸѡǼԷҳ磬ķǿִļв
ǼԷҳĿnumpermСڻߵ minperm ʱAIX ҳ滻ػ̽ѡԷҳͷǼԷҳв£AIX ɨҳһսʹõķҳ
ǼԷҳĿnumperm minperm maxperm ֮ʱlru_file_repage ɵ AIX ҳ滻ػ滻ķҳͣμͼ 2
ͼ 2. lru_file_repage ɵ
numperm minperm maxperm ֮ʱ lru_file_repage ɵΪ 1ô AIX ҳ滻ػ̽ڲ·ҳȷѡ͵ķҳв
AIX ںάһ·ҳԱȷЩҳڻܿػ롣ں˽һҳȻٽ任ʱͨʾҳᱻʹãҸ÷ҳӦñڴСں˼¼˶ԼԷҳ·ҳĴԼԷǼԷҳ·ҳĴȻAIX ں˿ʹϢȷһҳ·ҳƵʾһҳƵʹã lru_file_repage ɵΪ 1 ʱAIX ںʹ·ҳϢȷǷѡǼԵķҳвѡԵĺͷǼԵķҳвԷҳ·ҳٶȱȷǼԷҳ·ҳٶȸߣô AIX ں˽ѡǼԵķҳвΪԷҳʹøΪƵǼԷҳ·ҳٶȱȼԷҳ·ҳٶȸߣô AIX ں˽ѡԵķҳͷǼԵķҳв
ڴĿͻУķʽʼںֻѡǼԵķҳвΪԷǼԵķҳļ棩зҳȣԼԵķҳ磬̵ĶջݵȵȣзҳͨԽ̲ܿˣԽ lru_file_repage ɵΪ 0£ numperm minperm maxperm ֮ʱAIX ںʼѡǼԵķҳв
minperm maxperm ɵ֮⣬һ maxclient ɵmaxclient ɵָӦڻǼԿͻ˷ҳڴơΪзǼԿͻ˷ҳǷǼô洢ҳӼ maxclient ƱʼСڻߵ maxperm ơ
ǼԿͻ˷ҳĿΪ numclientvmstat Cv ʾϵͳ numclient ֵռϵͳʵڴİٷֱȡ
ȱʡ£maxclient ϸơζţAIX ں˲ǼԵĿͻļ泬 maxclient ƵķΧҲ˵AIX ں˲ numclient maxclient numclient ﵽ maxclient ʱAIX ں˽ġͻ˵ģʽʼҳ滻ֽͻ˵ģʽУAIX ҳ滻ػ̽ϸѡͻ˷ҳв
AIX ṩ˼ֹߣṩϵͳвͬҳļϢ
vmstat ԱϵͳڴʹϢԼҳ滻 VMM ͳϢ
ʹô -v ѡ vmstat ʾͬҳʹõʵڴٷֱȣμ嵥 1
嵥 1.
vmstat -v # vmstat -v
4980736 memory pages
739175 lruable pages
432957 free pages
1 memory pools
84650 pinned pages
80.0 maxpin percentage
20.0 minperm percentage <<- systems minperm% setting
80.0 maxperm percentage <<- systems maxperm%
setting
2.2 numperm percentage << % of memory containing
non-comp. pages
16529 file pages <<- # of non-comp. pages
0.0 compressed percentage
0 compressed pages
2.2 numclient percentage <<- % of memory containing
non-comp. client pages
80.0 maxclient percentage <<- systems maxclient%
setting
16503 client pages <<- # of client pages
0 remote pageouts scheduled
0 pending disk I/Os blocked with no pbuf
0 paging space I/Os blocked with no psbuf
2484 filesystem I/Os blocked with no fsbuf
0 client filesystem I/Os blocked with no fsbuf
0 external pager filesystem I/Os blocked with no fsbuf
0 Virtualized Partition Memory Page Faults
0.00 Time resolving virtualized partition memory page faults
|
ˣʾУһ 16529 ǼԵļҳӳ䵽ڴСЩǼԵķҳʹ 2.2% ڴ档 16529 ǼԵļҳУ 16503 ǿͻ˷ҳ
vmstat ûṩڼļҳϢڼļҳϢʹ svmon Ѽõ
һʾϵͳڴʹõϢ svmon svmon ִ֧ͬѡЩѡṩйϵͳڴʹõϸϢ
svmon -G ѡʾͬͷҳʹõڴϢμ嵥 2
嵥 2.
svmon -G ѡ# svmon -G
size inuse free pin virtual
memory 786432 209710 576722 133537 188426
pg space 131072 1121
work pers clnt
pin 133537 0 0
in use 188426 0 21284
PageSize PoolSize inuse pgsp pin virtual
s 4 KB - 103966 1121 68929 82682
m 64 KB - 6609 0 4038 6609
|
Ҫ˽ϵͳʵڴʹsvmon ʾУ
work洢pers־Դ洢־Դ洢ҳǷǿͻ˷ҳ JFS ҳclntͻ˴洢
ÿַҳͣsvmon ʾУ
inuseӳ䵽ڴе 4K ҳĿpinӳ䵽ڴеġҹ̶ 4K ҳĿpininuseӼ
ˣʾУһ 188426 洢ҳӳ䵽ڴС 188426 洢ҳУ 133537 ǹ̶ģҲ˵ܻģ
ʾʾûг־õĴ洢ҳΪϵͳûʹ JFS ļϵͳһ 21284 ͻ˴洢ҳûһǹ̶ġ
svmon ûʾô洢ҳĿĿ svmon õǰô洢ҳĿdz־Դ洢ҳĿͿͻ˴洢ҳĿܺ͡ˣʾУϵͳһ 21284 ô洢ҳ
0 persistent storage pages + 21284 client storage pages = 21284 permanent storage pages |
svmon Ϣ vmstat һ㲻ͬsvmon 治ͬڴҳĿϢġ־õģǿͻ˵ģͿͻ˵ġsvmon ûṩԷҳͷǼԷҳĶԱϢsvmon ֻÿַҳڴзҳ
෴vmstat ṩǼԷҳͼԷҳĶԱϢ
Ϊ˵𣬿Կ svmon ʾ 21284 ͻ˷ҳеijЩҳǼԵģ 21284 ͻ˷ҳʣµЩҳǷǼԵġҪȷЩͻ˷ҳڼԺͷǼ֮Ļ֣ʹ vmstat ȷ 21284 ͻ˷ҳжٷҳǷǼԵġ
vmo VMM ɵнvmo ʾڿɵϢԼÿɵֵ
Ҫʾ VMM ɵĵǰֵд CL ѡ vmo
# vmo -L |
Ҫʾѡ VMM ɵĵǰֵʹ CL ѡгɵơ磬ʾг minperm%maxperm%maxclient% lru_file_repage ɵǰֵʱμ嵥 3
嵥 3. ɵ
# vmo -L minperm% -L maxperm% -L maxclient% -L lru_file_repage
NAME CUR DEF BOOT MIN MAX UNIT TYPE
DEPENDENCIES
--------------------------------------------------------------------------------
lru_file_repage 1 1 1 0 1 boolean D
--------------------------------------------------------------------------------
maxclient% 80 80 80 1 100 % memory D
maxperm%
minperm%
--------------------------------------------------------------------------------
maxperm% 80 80 80 1 100 % memory D
minperm%
maxclient%
--------------------------------------------------------------------------------
minperm% 20 20 20 1 100 % memory D
maxperm%
maxclient%
|
1. ɵ
| CUR | гɵĵǰֵ |
| DEF | гȱʡֵ |
| BOOT | гɵϵͳʱֵ |
| MIN | гɵСֵ |
| MAX | гɵֵ |
| UNIT | ˵ɵĵλ |
vmo ּ֧ʱĿɵֵ߽ĿɵֵIJӳٵϵͳ֮СҪĿɵʹЩЧԺʱܹЧָ -p ѡṩһʾμ嵥 4
嵥 4.
-p ѡ# vmo -p -o lru_file_repage=0 -o maxclient%=90 -o maxperm%=90 -o minperm%=3 Setting minperm% to 3 in nextboot file Setting maxperm% to 90 in nextboot file Setting maxclient% to 90 in nextboot file Setting lru_file_repage to 0 in nextboot file Setting minperm% to 3 Setting maxperm% to 90 Setting maxclient% to 90 Setting lru_file_repage to 0 |
VMM ҳ滻ػ̽ѡǼԷҳвôضл档ˣƼĿɵΪṩѵܣμ嵥 5
嵥 5. ܵĿɵ
lru_file_repage = 0 maxperm = 90% maxclient = 90% minperm = 3% strict_maxclient = 1 (default) strict_maxperm = 0 (default) |
ʹ vmo Щɵμ嵥 6
嵥 6. ʹ
vmo õĿɵ# vmo Cp Co lru_file_repage=0 Co maxclient%=90 Co maxperm%=90 Co minperm%=3 # vmo Cp Co strict_maxclient=1 Co strict_maxclient=0 |
ʹ vmo CL 鿴Щá
Щɵ AIX Version 5.2 AIX Version 5.3Ҫ AIX Version 5.2 ЩɵҪʹ AIX Version 5.2 TL6 ߸߰汾Ҫ AIX Version 5.3 ĿɵҪʹ AIX Version 5.3 TL1 ߸߰汾
ɵ AIX Version 6.1 ȱʡá
AIX VMM ʹԷҳзࡣʹøϵͳɵ AIX ҳ滻ػ̵Ϊ AIX ͬͷҳķҳ滻ķʽ AIX VMM ŻʹøֹػԵܸơ
鿴ȫԭ:˽Ӧ,ļдͻݿ. ֤ӦҪݳֵڴ. ĹTipsμڴŵĹ̾ƪ.
SwapռÿɼΪϵͳڴ治õʱҪڴеһֿռͷųԹǰеijʹáЩͷŵĿռһЩܳʱûʲôijЩͷŵĿռ䱻ʱ浽SwapռУȵЩҪʱٴSwapлָݵڴСϵͳڴ治ʱŽSwapڼʹǾġ
һҪǣдڴнݶᱻŵSwapУĻSwapظ൱һֱֵӽļϵͳ磬еijһЩļļжд(ʵÿٴһļǾг)ЩڴռҪȥʱļֵݾûбҪŵSwapռˣǶļôڴֱӾͷˣҪΪ´ҪʱֱӴļϵͳָܻ;дļֻҪ仯ݱ浽ļУԱָЩmalloc(3C)newɵĶͬҪSwapռ䣬ΪļϵͳûӦġļ˱Ϊ(Anonymous)ڴݣݻջеһЩ״̬ͱݵȣ˵SwapռǡݵĽռ䡣
SwapöܵӰ
̫Swapռ˷Ѵ̵Ŀռ䣬̫ٵSwapռ䣬ϵͳᷢ
ϵͳڴùˣϵͳͻܵУSwapռùˣôϵͳͻᷢ磬Webܸݲͬ(߳)Swapռ꣬ͨ"application is out of memory"Ĵʱɷ̵SwapռķǺҪġ
ͨ£SwapռӦڻڴĴССӦС64MͨSwapռĴСӦڴ22.5(Solaris 2ϵİ汾仯)ݲͬӦãӦвͬãСϵͳֻҪСSwapռ䣬ķϵͳͬҪͬСSwapռ䡣رݿWebŷӣSwap ռҪҲӣòμԷƷ˵
⣬SwapҲкܴӰ졣ΪSwapIJǴI/OIJжSwapSwapռķķʽеSwapI/OĸأӿSwapٶȡֻһеĽʹúæʹϵͳʱλڵȴ״̬Чʺܼܵͣӹ߾ͻ֣ᷢʱCPUæϵͳȴ˵ƿI/OϣCPUٶǽġ
鿴ȫ
,֪ȴҲô;
SANStorage Area Storage洢һٵе豸ԴжͨSANRAIDӹͨFibre ChannelɣSAN
NASNetwork Attached Storage總Ӵ洢ĵʹTCP/IPЭ̫ļ
svc.startd: 77 system services are now being stopped.
Nov 16 15:28:22 oracleapp rpcbind: rpcbind terminating on signal.
Nov 16 15:28:22 oracleapp syslogd: going down on signal 15
Nov 16 15:28:25 rpc.metad: Terminated
umount: /u04 æ
umount: /s01 æ
umount: /d01 æ
umount: /u05 æ
umount: /d02 æ
umount: /u03 æ
umount: /u01 æ
umount: /u02 æ
svc.startd: The system is down.
syncing file systems... done 鿴ȫ
vmstat <Ƶ>гϵͳϸ. гȤ:
free: ڴ(ֱsolaris 7ֵӽ, Ϊô̻. solaris8ʼӳ˵ȷֵ.)
page pi/po: ҳΪ. ϵͳֱڽ豸i/o!
Cpu us: user-time. Ӧóĵİٷֱ.
Cpu sy: system-time.solarisϵͳĵİٷֱ.
Cpu id: idle-time.
VmstatͣԭûУRACEע
procs ״̬Ľ
r--жеȺ
b--ԴI/0ҳȣȵ.)
w--еDZ
memory ڴʵϢ
swap--ǧֽΪλĵǰýռ
free--ǧֽΪλҳɱС
page ÿҳȻϢ:
re-ɱҳ
mf--ҪĴ;ַռӲַת
pi--ҳǧֽ
po -ҳǧֽ
fr- ͷŵǧֽ
de--ǧֽΪλĿɽܵĶڴ治
sr--ҳʱ㷨ɨ
disk Ϊĸ̱ÿI/O
faults ÿϵͳжϺӲжϵ
in-豸жϣϵͳʱж
sy-ϵͳ
cs-CPUģ
cpu-- CPUʱİٷֱȣڶദϵͳϣȫƽֵ:
us- ûʱ
sy-- ϵͳʱ
id-- ʱ
12 زο鼮վ
12.1 ο
A valuable collection of Hints&Tricks for UNIX:
Jerry Peek, Tim O'Reilly, Mike Loukides "UNIX Power Tools"
ISBN 1565922603
A detailed view on all UNIX-variants incl. Solaris software and Linux
Evi Nemeth, Garth Snyder, Scott Seebass, Trent R. Hein "UNIX System
Administration Handbook"
ISBN 0130206016
12.2 վ
http://www.sun.com Homepage of Sun Microsystems
http://www.sun.com/bigadmin Everything a sys admin needs
http://www.sun.com/blueprints Blueprints on various topics, monthly additions
http://docs.sun.com All documentation for Sun products online
http://sunsolve.sun.com Technical faq's, infodocs, symptom/resulution database,
patch download etc.
http://www.sunfreeware.com All Freeware-Tools for Solaris, precompiled
http://www.sunhelp.org FAQ portal, other information
http://bhami.com/rosetta.html A Sysadmin's Unixersal Translator (ROSETTA STONE)
OR What do they call that (command) in this world (Unix)?
9.1 NFS
SolarisĿ¼Ϣ洢/etc/dfs/dfstab УԱϵϵͳװļһshareʹõĽű ļûаκshareSolaris OE(OEϵͳ??)ʱԶʼļϵͳ ʹȷĵִ/etc/init.d/nfs.server startdfstabҲǿյġ 磺/export/home
1 share /export/home /etc/dfs/dfstab
2 ǵһӸļеݣִ/etc/init.d/nfs.server start
3 shareall
4 /export/homeȷĻʹshare
8.1 /etcĿ¼µļ
Solaris /etcĿ¼´ļеݱipַصȿԱвģֻЩ/etcĿ¼ļеĶϵͳԱЧ Щļҵhostname
/etc/nodename
/etc/hostname.<interface-name>
/etc/inet/hosts
/etc/net/{ticlts,ticots,ticotsord}/hosts
/etc/nodename ļϵͳĹ۵㿴һжͶipַϵͳж֡ÿ/etc/inet/hostsж塣 Щеκһȼϵͳ nodenameDzDZ Щļipַӿ֮ӡ/etc/hostname.<interface-name><number> interface nameǣ
le ʽsparcϵͳϵ̫
hme Ultra sparcϵͳϵĿ̫
eri UltraSPARC-III ϵͳϵĿ̫
qfe Ŀչ̫ϵĿ̫
7.1 admintoolsmcбļhostsֱӱ༭/etc/inet/hostsļʾ/etc/hostsļ/etc/inet/hostsļӡ ʹøcp /etc/host.old /etc/hostsḲȷļSolarisĬϰװʽsendmailػ̡ţ.Ļsendmailػ̻ϢΪƴϢ/etc/inet/hostsļӦϢ 192.168.0.2 myhost myhost.domain.com loghost
7.2 ͬõѹadmintoolSolaris 9µġSolaris ̨Solaris Management Consolesmc
7.3 ӡ ͬõѹadmintoolSolaris 9£ϵͳԴġӡ/usr/sadm/admin/bin/printmgr
ͨtar/compress/zipȹѹһЩĿ¼ļ£ǰĸдĸиð˾USƱ룬Сдĸ书ܡSUNWspci2SUN-pciǰSUNWSUNĹƱ룬spci2书ܣPCI װ£Ŀ¼
pkgadd -d /cdrom/cdrom0
pkginfo ӡðϢpkgrm <Package-Name>ɾжأѾװİ 磺ĻԭװʾCreator3DffbElite3D(afb)ʱʾ"no console framebuffer"ûʾ˵ûװElite3Dʹ
pkginfo | grep -i afb 飬û˵װϵͳʱûаװElite3DʾElite3Dڰװ̵s0/Solaris/Product. Ŀ¼ʹװɣ
pkgadd -d . *afb* °װʾͿʾˡ
4.3װ
ִ֣6λֵIJţλֵİ汾ţԱ123456-78
Solaris8ʹõ*.zipʽIJѹǰʹõ*.tar.Zĸʽİװʱȿ/tmp棬Ȼѹװ֮ҪɾЩʱļѹ취
zcat 123456-78.tar.Z | tar xvf -
unzip 123456-78.zip Ȼʹpatchadd 123456-78װʹpatchadd 123456-78װIJʹpkgrmɾжأ/var/sadm/patch¼Щװ¼Ŀ¼ûеĻpkgrmͲɾˡ
showrev -p | grep <patch number>ԲҵѾװIJ
Ҫע
X-ServerCDEǰ˳ļ
1. $HOME/.dt/...
2. /etc/dt/...
3. /usr/dt/... ע⣬ԶҪĶϵͳΧڶЧ/usr/dt/еݡϵͳX-ServerCDE ⣬ʹ/etc/dt/µļȥάָáûԼչťĸıȣDZ$HOME/.dt/Ŀ¼¡ڱµУ<DT>ЩĿ¼$HOME/.dt, /etc/dt,/usr/dt
5.2 Ƶ½ ļ<DT>/config/$LANG/Xresources
Logo(ͼλͼ24λɫ£㷺װʱ)
Dtlogin*logo*bitmapFile: /usr/local/lib/X11/dt/bitmaps/Mylogo.bm ͨûӭ½:
Dtlogin*greeting*labelString: Here's %LcoalHost%! ûĻӭ
Dtlogin*greeting*persLabelString: Hello %s
5.3 ӶϽXinerama,24λɫ Ȳ鿴 /dev/fbsҳмʾã. ȷ /dev/fbs/ifb0/dev/fbs/ifb1, Expert 3Dʾ ȻX-Serverļ/usr/dt/configƵ/etc/dt/config༭ļȷһͬ
:0 Local local_uid@console root /usr/openwin/bin/Xsun :0 -nobanner
5.3.1 Ļ ĻָCDEÿĻһû塣ĻƶĻϵĴڲĻƶifb0ĵʾĻΪ :0.0, ifb1ʾĻΪ :0.1
:0 Local local_uid@console root /usr/openwin/bin/Xsun :0 -dev /dev/fbs/ifb0 -dev /dev/fbs/ifb1 -nobanner
5.3.2 Xinerama
XineramaSolaris 7 11/99 OEԺİ汾ЧһǶʾĻĵʾĻͳڿڶʾĻ֮ƶ CDEֻһûǰ塣ֻһʾ룺 0:0. Xinerama ֻʹͬʾʱſá
:0 Local local_uid@console root /usr/openwin/bin/Xsun :0 +xinerama -dev /dev/fbs/ifb0 -dev/fbs/ifb1 -nobanner
Xinerama һXYصʹʾչʾϣʹʾʾһͼδڣXoverlap=<ˮƽ>һ1280صĵˮƽֱʣ20%Եصʾӣ
:0 Local local_uid@console root /usr/openwin/bin/Xsun :0 = xinerama -xoverlap 256 -dev /dev/fbs/ifb0 -dev /dev/fbs/ifb1 -nobaaner
3.1 ̶ļ /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes C
/dev/dsk/c0t0d0s1 - - swap - no C
/usr/local/swapfile.1 - - swap - no C
...
swap - /tmp tmpfs - yes C ļϵͳʹ/dev/dsk/c0t0d0s1/usr/local/swapfil.1Ŀļ ԶļϵͳЩϰҽӵ/tmpҽӵ㡣ζֻҪڴǿõģ/tmpдļдڴ沢ľڴ棨not very sure 磺
/dev/dsk/c0t0d0s1 - - swap - no C
/dev/dsk/c0t1d0s1 - - swap - no C
/dev/dsk/c0t2d0s1 - - swap - no C
...
swap - /tmp tmpfs - yes C 洴6GBڴ棨еķСΪ2G.SolarisʶеĴ̡
3.2 "ͿļıȽ ٵĽDzнɱ⣬ʹڶɴķʵҪڴûпõķ̣ʹÿļϵͳ
3.3 ʱ ڱSOLARISУļԼ뵽ռ䡣
# mkfile 100m /usr/local/swapfile.1
# swap -a /usr/local/swapfile.1
# swap -l ϵͳ֮ǰЩĿռʱġʹswap -d /usr/local/swapfile.1ȥЩĽռ
鿴ȫ
2.1 豸 еӲ̶һͬ÷һĸ֣
c
t ĿţSCSU豸ǶӦSCSIַ
d ŻRAID豸LUN ţһַӲ̣
S ţһΣ Щ豸ӷʽ/dev/dsk/dev/rdskĿ¼棬ָ豸Щ豸ڸı豸ʱõһ豸Ϊ 磺
c0t0d0s0 ͨǹվĵ1Ӳ̣c0t1d0s0 ǵ2 c0t6d0s0 ڲSCSIַ6 OKʾ boot CrԸ/dev/dsk and /dev/rdskĿ¼ݣdevfsadmҲԡ
Solaris8ǰҪdrvconfig;disks;devlinks3ɣˢ֮probe-scsi-all豸Ҳܿˡ
2.2 һӲ̵Ĺվformat 鿴ȫ
BannerʾϢ
. CPUͺƵ
. ڴ
. MACַַţ
. ̨ʾ
. Sun-Globe: Creator 3D
. Sun with face: Elite 3D
. Self-describing Logo: PGX, Raptor GFX (=PGX32), Expert3D(lite) XVR-500, XVR-1000 etc.
1.4.2
probe-scsi-allгúõSCSI豸IDEӲ̣ʹãprobe-ide-all.
1.4.3
test-all.еԼ죬ԼǷ
1.4.4 printenv and devalias
devaliasгбprintenvгбboot-device˼·һdiskdiskһָض豸ı
1.4.5ֹϢ ûʱ"Interface: No link"ֶΣOK
setenv tpe_link test false ֹϢ
1.1 OKʾ ÿSUNһBoot-PROMģʽϵͳ֮ǰʣҲеʱʣSTOP+A룬ûSTOPPCctrl+break.һBoot-PROMģʽOKʾϵͳʱ֣go
1.2 ̨
Boot-PROMģʽֱӵļ̺ʾҲնˡ ϵͳʱûм̣Զת1ڣ/dev/ttya,Aһն˻һͨ洮ߣ˿ڡ ļSUNվʹtip hardwire鿴̨Tip֮еϢӦն˴棬۲ĻSTOP+AʹStrg-]tipijtelnetģʽȻһBREAKtelnet>send brk
1.3 SUNվ ֮ǰվҪһʵ״̬ʹ漰˳
# init 5
# init 6
# init 0
SUNվ֮ǰһķʽرϵͳǼֿѡķ áɾķ
- # init 5 رн̣ȻϵͳԶصԴ
- #init 6رн̣ȻϵͳԶ
- #init 0رн̣ȻϵͳԶصOK״̬ 3£ϵͳر֮ǰִ/etc/rc0.dK*űڹرݿ⣬߹رWEBĽIDļȡ ûкʵshellڣʹԶ̵¼ִԶҲԣʹķ
- STOP-A
- OK sync ͬļϵͳжOSȻ ע⣺Ҫ쿴֮ı/var/crash/<hostname>ںתļ STOP-AҲʹõرռԴڴԴ
1.4 ϵͳIJ
ϵͳִеڴԵʱSTOP-A
ĶֻҪ
ϸСHardware Diagnostics for Sun TM Systems: A Toolkit for System Adminis-trators(Infodoc Number 23476 on http://sunsolve.sun.com)
below
鿴ȫlinux,metadb;
Ϲ.Ǻ,blogܻӭ
Ҫhaڵ.˳ڲԻϰװos&patch
format disk
meta raid(0+1)
3û,ĿǰϵͳѾʹ1,ϵͳ.
ƻװsolaris10ʹzfs
鿴ȫRAID5RAID5һִУλRAIDʽRAID5ĹҪ3Ӳ̡ڰӲstripingʽмУλRAID5УУλZε˳еġеĺôǣһκһӲRAID5ռ2ģһУģһܿԸѾڵҲ˵RAID5ĿռӵûRAID5֮ǰX1ͬʱֿκһӲ̹϶ʧݣXΪRAID5еӲ̸RAID5ľṹԲͼ
metainitRAID 5һRAID 5ʵ
# metainit /dev/md/dsk/d12 Cr /dev/dsk/c0t0d0s3 /dev/dsk/c0t0d0s4 /dev/dsk/c0t0d0s5 Ci 8k
-rRAID5-rҪRAID5Ӵ̣ Ci ָRAID5ÿĴСԽΪ/dev/dsk/c0t0d0s3/dev/dsk/c0t0d0s4/dev/dsk/c0t0d0s5һΪd12RAID5ÿĴСΪ8kͬmetastat鿴RAID5ĸϢRAID5źܺõݴƽԣʵĿʵʩУRAID5Ӧʮձ顣ͨRAID5洢ݣϵͳԱҪ۲RAID5Ľ״Ӷȷݰȫ
RAID 1УӾʵʱͬġҲ˵ӾͬһʱͬĶдRAID 1ķʽ㷺Ӧõϵͳ̵Ĵ̹֮СҸ˵ľ飬ĿͻҪԱ߹ʦϵͳ̽оԱڵһӲ֮Դһ龵ϵͳ һϵͳRAID 1ʵ1.ȹ滮ҪӲd0 d10 d20 / s0d1 d11 d21 /var s1d2 d12 d22 swap s3d3 d13 d23 /export/home s6
d0d1d2d3ΪӦmetadevice֣d10ÿmetadeviceӦӾһϵͳ̾ǰù滮һ¸metadeviceĶӦϵӾңͬʱҲںڵά
2.Ӳ̷ͬ# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
ϵͳ̾Ҫ̷ȫһ£Ӳ̷СҲͬӲ̴Сһ£ڱзС˳ȫһºĿռ佫˷ѵprtvtocʹӲc0t1d0ķӲc0t0d0ķͬc0t0d0ϵݲᱻƻc0t1d0ϵݽᱻȫ𡣳֮⣬ҲϵͳеformatֶĴ̷ȫһ¡
3metadb# metadb -a -f -c 3 c0t0d0s7 c1t0d0s7
c0t0d0s7c0t1d0s7Ӳ̷ϽʼmetadbÿӲ̷ϵıĿΪ3
4.·Ӿ# metainit -f d10 1 1 c0t0d0s0
c0t0d0s0ƳΪd10ӾʵӾһֻһRAID 0c0t0d0s0Dzϵͳĸ̣дļϵͳʹò-fļϵͳķǿִmetainit
# metainit d20 1 1 c0t1d0s0
c0t1d0s0Ϊd20Ӿ
5ľ# metainit d0 -m d10
Ϊd0ḷ̌һ·ӾΪd10ʹmetainit-f̣Ƶḻ̌һ·Ӿ·Ӳ̱ǾԴӦķҲ˵·Ӿбļϵͳ
6vfstab# cp /etc/vfstab /etc/vfstab.backup
ҪvfstabļҪvfstabļԱʧʱͨû߹̵ûʽָ
7vfstabļйڸĿ# metaroot d0# lockfs# reboot
ϵͳ豸metadeviceҪ/etc/vfstabļӶʹ´֮ϵͳmetadevice·ҽļϵͳͨҪ/dev/dsk/c0t0d0s0/dev/rdsk/c0t0d0s0иΪ/dev/md/dsk/c0t0d0s0/dev/md/rdsk/c0t0d0s0metarootԶvfstabļйظݣ vfstabļзǸҪֶġʱעĿ֮Ҫtabÿոϵͳɹdf CkԿϵͳĹҽĿ¼Ѿԭc0t0d0s0Ϊڵ·Ӿmetadevicemetadeviced0
8ľ
̵ڸ
# metainit -f d11 1 1 c0t0d0s1c0t0d0Ӳϵ1ŷmetadeviceΪd11
# metainit d21 1 1 c0t1d0s1c0t1d0Ӳϵ1ŷmetadeviceΪd21
# metainit d1 -m d11/varmetadeviceΪd1У·Ӿd11d11ǰļϵͳԴ̶Ӧķ
# metainit -f d12 1 1 c0t0d0s3c0t0d0Ӳϵ3ŷmetadeviceΪd12
# metainit d22 1 1 c0t1d0s3c0t1d0Ӳϵ3ŷmetadeviceΪd22
# metainit d2 -m d12swapmetadeviceΪd2а·Ӿd12d12ǰļϵͳԴ̶Ӧķ
# metainit -f d13 1 1 c0t0d0s6c0t0d0Ӳϵ6ŷmetadeviceΪd13
# metainit d23 1 1 c0t1d0s6c0t1d0Ӳϵ1ŷmetadeviceΪd23
# metainit d3 -m d13/export/homemetadevice Ϊd3а·Ӿd13d13ҲǰļϵͳԴ̶Ӧķ
ǿʹmetastat鿴SUN Solstice DiskSuiteʹõ״̬metastatԲ鿴metadeviceҲǵRAID𣬸metadevice֮ϵmetadeviceϵͳӲ̷ĹϵmetadeviceĽ״ԼͬʱʾͬٷֱȡʵӦУmetastatһdzõϵͳԱʦԺشmetastatй۲쵽metadeviceĽṹͽ״ ǻʹmetaclearӲ̵metadeviceΪmetainitķ磺# metaclear d0
9һ·Ӿ̼뵽
# metattach d0 d20# metattach d1 d21# metattach d2 d22# metattach d3 d23
ֱӾd20d21d22d23Ӧľ̡ʹmetattachһ·ӾӵСmetattachĸʽǣmetattach Ӿֱ붼metadeviceơͬģǻʹmetadetachһ·Ӿ̴Ӿзȥmetadetachmetattach෴ġʹmetattachһ·Ӿӵ֮·ӾͬͬḺ́Ƚ
#metastat | grep %
鿴ͬٷֱȡʹô鿴зͬİٷֱȡ
10/etc/vfstabļйĿmetarootֻvfstabļйڸĿǸĿҪֶġvfstabļͬȫ֮ϵͳˣϵͳ̾ϡ
Ǵӵһblock˳дģˣconcatenationʽõĿչԡҲ˵ԱԸļϵͳʵʱʹʱmetadeviceĴСȻΪ˳дĽṹʹconcatenationʽиȱ㣬IOܽ͡ΪдʱֻҪһӲûдӲϣκεд붯Ҳ˺ӲIO˷ѣӶʹconcatenationʽRAID 0 IOܽ͡һConcatenationʽRAID 0ʵ# metainit d1 2 1 /dev/dsk/c0t0d0s1 1 /dev/dsk/c0t1d0s5metainitΪmetadeviced1Ϊmetadevice֣metadevicedNʾNԴ01272 ΪRAID 0̸ʵstripingķʽɵģ1 ΪÿstripingķʽɵеķֻеΪ1ʱɵmetadeviceconcatenationʽ/dev/dsk/c0t0d0s1 ΪҪmetadevice ԽΪmetainitһconcatenationʽİΪd1RAID 0̷ֱΪ/dev/dsk/c0t0d0s1/dev/dsk/c0t1d0s5
2. stripingʽstripingʽѶӲķʽӳһmetadevice巽ʽͼ
stripingʽǰӲ̷ָдʱconcatenationʽͬstripingʽдݵʱķָеĴ̶дstripingʽconcatenationʽõIOǣҲṹstripingʽļϵͳһstripingʽRAID 0ʵ# metainit d2 1 2 /dev/dsk/c0t0d0s4 /dev/dsk/c0t0d0s5 Ci 32kmetainitΪmetadeviced2Ϊmetadevice֣1 ΪRAID 0̸ֻеΪ1ʱɵRAID 0stripingʽ2 Ϊstripingʽɵеķ/dev/dsk/c0t0d0s4 ΪҪmetadevice-i ΪÿĴС-i 32k˼ÿΪ32kֽڡ ԽΪmetainitһstripingʽİΪd2RAID 0̷ֱΪ/dev/dsk/ c0t0d0s4/dev/dsk/ c0t0d0s4ÿСΪ32kstripingʽconcatenationʽǻͨmetainitϷʽRAID 0пͻҪRAID 0ɻϷʽ һRAID 0ʵ#metainit d12 3 2 c0t1d0s1 c1t1d0s1 1 c0t2d0s3 3 c0t3d0s4 c1t3d0s4 c2t3d0s4ԽΪmetainitһ3Ϊd12RAID 0һ̷ֱΪc0t1d0s1c1t1d0s1ɵstripingڶ̷ֱΪc0t2d0s3̷ֱΪc0t3d0s4 c1t3d0s4 c2t3d0s4ɵstriping
һɾMetadbʵ# metadb Cd cxtxdxsx-dΪɾmetadbԽΪcxtxdxsxɾԭеMetadbҪ鿴ѾڵMetadb# metadb CIܽһmetadbIJ-a Ϊһmetadb-f ΪһʼMetadb-c n nΪ֣˲ΪÿһнnMetadbݣָ˲ĬֻһMetadb-d ΪɾһMetadb-IΪѯеMetadbϢݸֲMetadbĽ״SUN Solstice DiskSuiteʹýӿ֣ͼνϵͳGUI淽ʽзʽ/etc/opt/SUNWmd/md.tabļʽУзʽӦù㷺ؽзʽ
SUN Solstice DiskSuiteװSUN Solstice DiskSuiteṩSolaris 2.6Solaris 7Solaris 8Solaris 9·Solaris 10СSolaris 9Solaris 10УSUN Solstice DiskSuiteѾڲϵͳУҪװͿֱʹáSolaris 2.6Solaris 7 Solaris 8IJϵͳ£ҪSUN Solstice DiskSuiteаװ½ܾ尲װ̣Solaris 8ΪSUN Solstice DiskSuiteSolaris8ϵͳװ̵software 2of2УҲƽ˵Solaris 8װ̵ĵ3ţͨ˵Solaris 8װ4ţinstall software 1of 2software 2 of 2languageĿ¼£ /sol_8_401_sparc_2/Solaris_8/EA/products/DiskSuite_4.2.1 Уsol_8_401Ϊϵͳ汾ţеIJϵͳ汾ΪSolaris 8 0401DiskSuite_4.2.1ΪSUN Solstice DiskSuite汾ţ˰汾Ϊ4.2.1ûаװʣԵSUNվSUN Solstice DiskSuiteİװ·/usr/opt£/usrҪ30ռװSUN Solstice DiskSuiteװ֣ͼν滷¿ֱִ·еinstallerűͼν棬һʾɰװinstallerűͨͨװװSUN Solstice DiskSuiteSUN Solstice DiskSuiteĿ¼Ϊsol_8_401_sparc_2/Solaris_8/EA/products/DiskSuite_4.2.1/sparc/packages/
Ϊװʵ1PackagesڵĿ¼#cd /cdrom/cdrom0/Solaris_8/EA#cd /products/DiskSuite_4.2.1/sparc/Packages2鿴# lsSUNWlvma SUNWlvmg SUNWlvmr SUNWmdg SUNWmdja SUNWmdnr SUNWmdnu SUNWmdr SUNWmdu SUNWmdx
3# pkgadd -d . ע.Ϊװ·ΪǰĿ¼ʡԣhe following packages are available:1 SUNWlvma Solaris Volume Management API's(sparc) 1.0,REV=2001.11.02.03.172 SUNWlvmg Solaris Volume Management Application(sparc) 1.0,REV=2001.11.14.03.193 SUNWlvmr Solaris Volume Management (root)(sparc) 1.0,REV=2001.11.14.03.194 SUNWmdg Solstice DiskSuite Tool(sparc) 4.2.1,REV=1999.11.04.18.295 SUNWmdja Solstice DiskSuite Japanese localization(sparc) 4.2.1,REV=1999.12.09.15.376 SUNWmdnr Solstice DiskSuite Log Daemon Configuration Files(sparc) 4.2.1,REV=1999.11.04.18.297 SUNWmdnu Solstice DiskSuite Log Daemon(sparc) 4.2.1,REV=1999.11.04.18.298 SUNWmdr Solstice DiskSuite Drivers(sparc) 4.2.1,REV=1999.12.03.10.009 SUNWmdu Solstice DiskSuite Commands(sparc) 4.2.1,REV=1999.11.04.18.2910 SUNWmdx Solstice DiskSuite Drivers(64-bit)(sparc) 4.2.1,REV=1999.11.04.18.29Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]:
allװʵʰװУڽIJϵͳװɹԭSUN Solstice DiskSuite8SUNWmdrṩȰװ8ٰװҲ8ȴ8װɹٶаװ
һ SUN Solstice DiskSuiteSUN˾зĴ̹ûṩ֧Solaris 2.6 Solaris 7 Solaris 8ȻSolaris 9иΪSun Volume Managerԭûκθı䡣SUN Solstice DiskSuiteõ;Ǵ̾RAID 1RAID 0stripingconcatenationRAID 5RAID 01RAID 10ȱhotspareDisksetϵͳݣgrowfsļϵͳ־UFS logging
ZFSΪSolaris 10һļ洢ZFSZettabyte File SystemҲж̬ļϵͳDynamic File System, ǵһ128λļϵͳŻԶһ¡
- ֧POSIXļϵͳӦֲ
- 32/64λļϵͳ16 billion billion
- Ӧ˵ZFSһPOSIXļϵͳֲ
- ϵͳԱ˵ZFSṩ洢صģͣ˾ĸӲ̷⣬ʹļϵͳô洢ص豸ķʴ100ά
- вcopy-on-writeʽӲ״̬ԶЧ fsck
- ݿ鱻64λУ飬 ֹ̱, ݿRaidһһ
- ṩݵĿգṩ
1. ԤװOS ZFS谲װ
# pkginfo |grep SUNWzfs
# pkgadd -d .
The following packages are available:
1 SUNWzfs Zettabyte File System (ZFS)
(sparc) 11.10.0,REV=2004.12.26.02.38
Select package(s) you wish to process (or ''all'' to process
all packages). (default: all) [?,??,q]:1
...
Installation of <SUNWzfs> was successful.
2. storage pool
# zpool create -f testpool mirror /dev/dsk/c0t1d0s0 /dev/dsk/c0t1d0s1
# zpool df testpool
Pool size used avail capacity
-------------------- ------ ------ ------ --------
testpool 500M 56.0K 500M 1%
# zpool vdevs -v testpool
mirror1
c0t1d0s0
c0t1d0s1
3. ļϵͳ
# zfs create testpool/user1
# zfs create testpool/user2
# mkdir -p /disk/user1 /disk/user2
# zfs mount testpool/user1 /disk/user1
# zfs mount testpool/user2 /disk/user2
# df -h -F zfs
ļϵͳ С ҽ
testpool/user1 484M 27K 484M 1% /disk/user1
testpool/user2 484M 27K 484M 1% /disk/user2
4. ZFSĶд仯
# cp /etc/n* /disk/user1; cp /etc/m* /disk/user2
# df -h -F zfs
ļϵͳ С ҽ
testpool/user1 484M 60K 484M 1% /disk/user1
testpool/user2 484M 123K 484M 1% /disk/user2
5. µĴ洢storage poolչZFS
# zpool add -f testpool mirror c0t1d0s3 c0t1d0s4
# zpool df testpool
Pool size used avail capacity
-------------------- ------ ------ ------ --------
testpool 1000M 303K 1000M 1%
s6a# zpool vdevs -v testpool
mmirror1
c0t1d0s0
c0t1d0s1
mirror2
c0t1d0s3
c0t1d0s4
# df -h -F zfs
ļϵͳ С ҽ
testpool/user1 982M 60K 982M 1% /disk/user1
testpool/user2 982M 123K 982M 1% /disk/user2
6. ƻstorage poolӲ̵ݣ۲ZFSݲӰ죺
# dd if=/dev/urandom of=/dev/rdsk/c0t1d0s1 count=10000
10000+0 ¼
10000+0 ¼
# df -h -F zfs
ļϵͳ С ҽ
testpool/user1 982M 60K 982M 1% /disk/user1
testpool/user2 982M 123K 982M 1% /disk/user2
# diff /etc/nsswitch.conf /disk/user1/nsswitch.conf
ܽ
ļϵͳZFSṩһµʹõԶģͣԣٴʵʩʱ䡣
ݰȫԣ ZFSκʱ䶼һµġ
ԴãZFS洢ؿΪļϵͳ
ԣ ZFSչСǶ̬ģϵͳԱ
ͷãľɷá
- To remove the mirror metadevice and submirrors, use the metadetach and metaclear commands as follows:
- # metadetach d20 d22
d20: submirror d22 is detached
# metadetach d20 d21
metadetach: alex: d20: attempt to detach last running submirror
# metaclear d22
d22: Concat/Stripe is cleared
# metaclear d20
d20: Mirror is cleared
# metaclear d21
d21: Concat/Stripe is cleared
öĽ IP IP aliasingѰʱҪɵIJ־ȷȷʱӿڣvirtual interface IPvirtual IP ǼѵѰŹЩϢʶѰҵĶͨΪ IP ܵĸҵ˹ڸĸסIP ʱҲΪӿڱnetwork interface aliasing ӿڣlogical interface
|
IP ĸܼһӿö IP ַܹʹõһӿڵͬһж Web IP Ҳdzסֻϵͳϵӿڣ IP ַ Linux™ ϵͳϣʹñùߣ ifconfig route IP Ҳͼλߡ
һ£Ϊÿ̫һԪšҪѾõ̫Ӷ IP ӦΪһӿͬԪţҪһԪ磬ԪΪ eth0 ̫Ѿһе IP ַôͨһԪ :1 IP 嵥 1 ʾͨԪӸ IP ַע⣬ҪΪ root û¼
嵥 1. еӿӶ IP ַ
ifconfig eth0:1 192.168.0.2 netmask 255.255.255.0
|
õϵͳϣLinux ں˱֧ IP ʹּںûṩ֧֣Ҫ¹ںˡҪ˽ںǷ֧ IP ɼ /proc/net/alias* ļǷڡ
µ IP ַ֮ҪΪµĽӿ·ɣ嵥 2 ʾ
嵥 2. Ϊµ IP ַ·
route add -host 192.168.0.2 dev eth0:1
|
ڴµ IP ַ֮Ҫ /etc/hosts ļиµַ嵥 3 ʾ
嵥 3. Ϊµ IP ַ
192.168.0.1 primaryserver
192.168.0.2 secondaryserver
|
Ҫ Solaris™ IP ʹõвͬӿڵ嵥 4 ʾҪΪ root û¼
嵥 4. Solaris IP
ifconfig eth0:1 plumb
ifconfig eth0:1 192.168.0.2 netmask 255.255.255.0
ifconfig eth0:1 up
|
Ϊ IP ֮ȻЧԽ /etc/hosts е IP ַӵ /etc/hostname.eth0:1 ļС
Linux Solaris ϵͳϣһ̫ϴӿڣӵͬϵ IP ַǣͨӦñôΪΪ֮ƿϵ豸ܶ
copy from
鿴ȫ: 2007.03.08 17:54
: ϵͳ
: http://yangtingkun.itpub.net/post/468/269715
---------------------------------------------------------------
¼һSolarisһIPķõʱҲ
plumbȻip㲥ַͿˡ
# ifconfig hme0 plumb
# ifconfig hme0 192.168.107.200 netmask 255.255.255.0 broadcast 192.168.107.253 up
ϣipϵͳʱԶӣԽ༭ɽűӵ/etc/rcN.dĿ¼¡
ոսõSolarisϵͳԶTELNET½ϵͳʹrootû½/etc/default/loginļCONSOLE=/dev/consolegicǰ#עͣͿͨrootûTELNET½
Proposed Change(s) to Update the Volume Configuration
Volume configuration is up-to-date with robot contents.
鿴ȫ/etc/hosts.allow/etc/hosts.denyļǿԶ̷õģͨ߾ܾijipipεĿͻlinuxijSSHֻͨԹԱţǾͿԽòҪIPֻŹԱʹõIPΡ
ʹã
/etc/hosts.allowļ
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the /usr/sbin/tcpd server.
#
sshd:210.13.218.*:allow
sshd:222.77.15.*:allow
дʾ210222ipsshdȻҪhosts.denyļʹãȻ:allowȫʡԵġ
ȻԱһIPôдDZȽʡµ
all:218.24.129.110//ʾ110ip
/etc/hosts.denyļļǾܾбļ£
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the /usr/sbin/tcpd server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
sshd:all:deny
ע⿴sshd:all:denyʾܾsshdԶӡ:denyʡԡ
ԣhosts.allow host.denyͻʱhosts.allowΪ
עʱҪִУ
service xinetd restart
øղŵĸЧ
ַܽͨԿƲַȨʣһݵķڿ־ʱῴܶɨ¼ǻֱrootûģʱķбͷdzˣ
1.鿴ϵͳSwapռʹ
[root@oracle root]# free
total used free shared buffers cached
Mem: 513980 493640 20340 0 143808 271780
-/+ buffers/cache: 78052 435928
Swap: 1052248 21256 1030992
2.ڿռʴswapļ
[root@oracle root]# mkdir swap
[root@oracle root]# cd swap
[root@oracle swap]# dd if=/dev/zero of=swapfile bs=1024 count=10000
10000+0 records in
10000+0 records out
[root@oracle swap]# ls -al
total 10024
drwxr-xr-x 2 root root 4096 8 15 10:18 .
drwxr-xr-x 19 root root 4096 8 15 10:17 ..
-rw-r--r-- 1 root root 10240000 8 15 10:18 swapfile
[root@oracle swap]# mkswap swapfile
Setting up swapspace version 1, size = 9996 KiB
3.swapļ
[root@oracle swap]# swapon swapfile
[root@oracle swap]# ls -l
total 10016
-rw-r--r-- 1 root root 10240000 8 15 10:18 swapfile
[root@oracle swap]# free
total used free shared buffers cached
Mem: 513980 505052 8928 0 143900 282288
-/+ buffers/cache: 78864 435116
Swap: 1062240 21256 1040984
[root@oracle swap]#
How to Configure it:
(1)Install kdump/kexec Tools/kernel-*-debuginfo Packages.# rpm -qa|grep kdump
system-config-kdump-1.0.9-3.el5
# rpm -qa|grep kexec
kexec-tools-1.101-164.el5
# rpm -qa|grep debuginfo
kernel-debuginfo-2.6.18-8.el5
kernel-debuginfo-common-2.6.18-8.el5
(2)Modify /etc/grub.conf
Example:
# cat /etc/grub.conf
...
title Red Hat Enterprise Linux Server (2.6.18-8.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet crashkernel=128M@16M
initrd /initrd-2.6.18-8.el5.img
...(3)Update Two Configration Files
/etc/kdump.conf : specify the location where the vmcore should be dumped. This can be another server via scp, a RAW device, or a local filesystem.
/etc/sysconfig/kdump: define the dump-capture kernel specification, including its name/location, and command line for the kernel if it is to be different from the currently running kernel
If you do not modify /etc/sysconfig/kdump, the dump-capture kernel is the same as the running kernel.
(4)Turn on kdump init script:
# chkconfig kdump on(5)Reboot system to put Kdump configuration into effect.
Verify after reboot that it is effected:
# cat /proc/cmdline
ro root=/dev/VolGroup00/LogVol00 rhgb quiet crashkernel=12 M@16M
# /etc/init.d/kdump status
Kdump is operational
# /sbin/chkconfig --list |grep kdump
kdump 0:off 1:off 2:on 3:on 4:on 5:on 6:off(6)Trigger System to Start Kdump
#echo c > /proc/sysrq-triggerHow to Analyse Vmcore.
Make sure vmcore is the correct size, it should be about the size of memory on the crashed system.Use the crash utility to get information from vmcore:
crash /usr/lib/debug/lib/modules/${KERNEL_VERSION}/vmlinux /var/crash/${DATE}/vmcore
- Run "bt -a" - Does crash display the backtrace for every CPU on the system?
- Run "ps" - Does crash display status for the current system processes?
- Run "rd" command - read memory at the specified address or range of addresses.
- Run "kmem -s" and "kmem -S" commands - display kmalloc() slab cache information. You can see which part of objects are in use and which part are free.
- Run "task" - see the current task_struct displayed.
- Run "mod" and "mod -S" commands - see the loaded modules information.
for more command, please see help menu.
#crash /usr/lib/debug/lib/modules/${KERNEL_VERSION}/vmlinux /var/crash/${DATE}/vmcore
crash>&nb p;help
* files nbsp; mod runq &n sp; union
alias for ach mount search nbsp; vm
ascii fuser net set vtop
bt & bsp; gdb p nbsp; sig nbsp; waitq
btop help &nbs ; ps struct whatis
dev i q pte &nbs ; swap wr
dis nbsp; kmem ptob & bsp; sym q br>eval list &nb p; ptov sys
exit &nb p; log rd & bsp; task
extend ma h repeat t mer
crash version: 4.0-3.14 gdb version: 6.1
For help on any ommand above, enter "help <command>".
For help on input options, enter "help input".
For help on output options, enter "help output".
crash> The Server Load Average gives the sum of the average number of jobs in the queue over the last 1, 5, and 15 minutes. Load average is not a UNIX command - it is an embedded metric that appears in the output of other UNIX commands such as uptime and procinfo.
The uptime command ($ uptime) is used to display the system load average. The top facility displays the uptime line at the top of its display. The uptime command displays 1 line of output:
The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5 and 15 minutes. There are other commands that display the Server Load Average: procinfo, w and others. Nevertheless, the most informative command by far is the 'top' command. Viewing ALL running processes on your machine using ps -aux is also another good command.
The Top command has lots of command-line options to help you manipulate the way the processes are presented. View the man top pages to view them all. 'Top' is also a great way to view sleeping, running, zombie and stopped processes.
Amount of RAM, hardware config
- cat /proc/meminfo
- cat /proc/cpuinfo
- /bin/dmesg
- cat /var/log/dmesg
- How to Read '/proc/meminfo' Output
- Check swap activity (Oracle Note 225451.1)
- /sbin/swapon -s
- free -t
- xosview
- cat /proc/swaps
- Swap Space on RedHat Advanced Server - FAQ
- sar -W 5 5
Swapping is one of the Unix mechanisms to accommodate the size limitation of memory by moving entire processes to disk to reclaim memory.
Paging is another Unix machanism to manage the limitations of memory. Unlike swapping, where entire processes are moved in and out of memory, paging moves only individual pages of processes to disk. Paging is not as serious a problem as swapping, as the entire program does not have to reside in memory to run. A small amount of paging may not noticeably affect the performance of a system. However, the performance of a system may degraderapidly as paging activity increases.
Swap space on disk is used to hold pages of memory that have been paged or swapped out. A shortage of swap space may cause symptoms such as system hanging, poor response times, and unsuccessful spawning of new processes.
Swap space can be a dedicated swap partition (recommended), a swap file, or a combination of swap partitions and swap files.
When analyzing your UNIX machine, make sure that the machine is not swapping at all and at worst paging lightly. This indicates a system with a healthy amount of memory available.
running.
In the following examples, first the preferred and then the
obsolete way of specifying sort keys are given as an aid to
understanding the relationship between the two forms.
Example 1: Sorting with the second field as a sort key
Either of the following commands sorts the contents of
infile with the second field as the sort key:
example% sort -k 2,2 infile
example% sort +1 -2 infile
Example 2: Sorting in reverse order
Either of the following commands sorts, in reverse order,
the contents of infile1 and infile2, placing the output in
outfile and using the second character of the second field
as the sort key (assuming that the first character of the
second field is the field separator):
160G,Լ100Сļ
ʵʹ
1 ipַ
#ifconfig Ca
lo0: flags=1000849
inet 127.0.0.1 netmask ff000000
eri0: flags=1000843
inet 192.168.1.254 netmask ffffff00 broadcast 192.168.1.255
ether 0:3:ba:b:a:83
ge0: flags=1000843
inet 192.168.0.254 netmask ffffff00 broadcast 192.168.0.255
ether 0:3:ba:b:a:83
2 ifconfig ge0 192.168.0.188 netmask 255.255.255.0 up
3 ifconfig local-mac-address?=true
4 netstat Ca:гϢ
netstat CiгӿϢ
netstat Cs:ÿһЭгͳϢ
netstat Cr:гǰ·ɱϢ
netstat Crn:ipʽг·ɱϢ
鿴ӿٶȣ
# ndd /dev/eri link_speed
1
1֤100m,Ϊ0˵10m
# ndd /dev/ge link_speed
1000
speed
(ٶΪ1000m)
# ndd /dev/ge link_status
1
1˵up,0 down
鿴ȱʡ·ɣroute get default
ȱʡ·ɣroute change default *.*.*.*
·ɱroute flush
שתдߣлл
һDiskֲ
0:c0t0d0
1:c0t1d0
ע0,1Raid1
ϵͳ(c0t0d0)(c0t1d0)
c0t0d0s0(d10) d0 c0t1d0s0(d20) / 9534M
c0t0d0s1(d11) d1 c0t1d0s1(d21) swap 2049M
c0t0d0s2 c0t1d0s2 overlap
c0t0d0s3(d13) d3 c0t1d0s3(d23) /usr 3584M
c0t0d0s6(d16) d6 c0t1d0s6(d26) /metadb 50M
c0t0d0s7(d17) d7 c0t1d0s7(d27) /export/home 2048M
װDiskSuite
ϵͳװɺʹSolarsi8 software 2 of 2װDiskSuite_4.2.1װ·/cdrom/cdrom0/Solaris_8/EA/installer & ѡĬϰװͿԡ
rootû½У
1ڶӲ(c0t1d0)ļΪһ
#prtvtoc /dev/rdsk/c0t0d0s2|fmthard Cs C /dev/rdsk/c0t1d0s2
fmthard:New volume table of contents now in place
2DiskSuiteʹõmetadbռ
#umount /metadb **50MBСռôڽռ
#rm Cr /metadb
#vi /etc/vfstab
ע͵ɾ,£
#/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /metadb ufs 1 yes C
3Mirror
replicas,DiskSuiteڲ
#metadb Ca Cf Cc 2 c0t0d0s6 c0t1d0s6 //֮ǰ
#metadb
Creating a mirror from /
#metainit -f d10 1 1 c0t0d0s0
#metainit -f d20 1 1 c0t1d0s0
#metainit d0 -m d10
#metaroot d0
Creating a mirror from swap
#metainit -f d11 1 1 c0t0d0s1
#metainit -f d21 1 1 c0t1d0s1
#metainit d1 -m d11
Creating a mirror from /var
#metainit -f d13 1 1 c0t0d0s3
#metainit -f d23 1 1 c0t1d0s3
#metainit d3 -m d13
Creating a mirror from /export/home
#metainit -f d17 1 1 c0t0d0s7
#metainit -f d27 1 1 c0t1d0s7
#metainit d7 -m d17
ޱ༭ /etc/vfstab ļ
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /var ufs 1 no -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes -
swap - /tmp tmpfs - yes -
Ϊ
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no -
/dev/md/dsk/d3 /dev/md/rdsk/d3 /var ufs 1 no -
/dev/md/dsk/d7 /dev/md/rdsk/d7 /export/home ufs 2 yes -
swap - /tmp tmpfs - yes -
ļϵͳ
#lockfs Cfa
#reboot
ļϵͳ
#metattach d0 d20
#metattach d1 d21
#metattach d3 d23
#metattach d7 d27
鿴ͬ״̬
#metastat d0
#metastat d1
#metastat d3
#metastat d7
ҲͨDiskSuiteͼλ߲鿴
#metatool
100%ÿļϵͳStatus:OK㾵ɡ
ע⣺ಽеÿǧɲֵǰ漸зֱִУִһļϵͳļϵͳͲmetainitϵͳʾԴռá
ġ̵boot
Ϣ
#installboot /usr/platform/`uname Ci`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
EEPROM
ƼOKģʽ
#ls Cl /dev/dsk/c0t0d0s0 **
lrwxrwxrwx 1 root root 41 Jun 14 11:08 /dev/dsk/c0t0d0s0 -> ../../devices/pci@1f,4000/scsi@3/sd@0,0:a
#init 0
ok devalias 쿴豸
ok nvalias rootdisk /pci@1f,4000/scsi@3/disk@0,0
ok nvalias mirrdisk /pci@1f,4000/scsi@3/disk@1,0
ok setenv boot-device rootdisk mirrdisk disk:a
۲
ok boot rootdisk **ϵͳҵļ
ok boot mirrdisk **ϵͳҵļ
ע⣺nvaliasʱġdisk@*,0Щĵдǡsd@*,0ǾԣDzġ
nohup *.ksh > /u01/*.lst 2>&1 &
ں̨Ƴִ
1ǵ/etc/resolv.confļϢ
2ǵ/etc/hostsϢ
127.0.0.1/ip and hostname/trusted ip &DNS
netstat -rn:·ɵȷ
Ҫʹinetd/xinetdṩҪķ
cat /etc/services
ڰװSolarisʱĬϰװֻװһϡûʹһ̡¼һmount̵IJ衣
ȼһµǰã
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s0 10232602 873037 9257239 9% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c1t0d0s1 1016122 8549 946606 1% /var
swap 11815608 24 11815584 1% /var/run
/dev/dsk/c1t0d0s5 5161437 2133 5107690 1% /opt
swap 11815600 16 11815584 1% /tmp
/dev/dsk/c1t0d0s7 10323610 9 10220365 1% /export/home
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cfd99114,0
1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w2100000c50acf424,0
Specify disk (enter its number): 1
selecting c1t1d0
[disk formatted]
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> p
PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit
partition> p
Current partition table (original):
Total disk cylinders available: 24620 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wu 0 0 (0/0/0) 0
2 backup wu 0 - 24619 33.92GB (24620/0/0) 71127180
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 - 24618 33.91GB (24619/0/0) 71124291
ԿĿǰʹõֻc1t0d0̣c1t1d0ûʹá
# mkdir /data
# mount /dev/dsk/c1t1d0s7 /data
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s0 10232602 873038 9257238 9% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c1t0d0s1 1016122 8549 946606 1% /var
swap 11815640 24 11815616 1% /var/run
/dev/dsk/c1t0d0s5 5161437 2133 5107690 1% /opt
swap 11815632 16 11815616 1% /tmp
/dev/dsk/c1t0d0s7 10323610 9 10220365 1% /export/home
/dev/dsk/c1t1d0s7 35007716 9470804 25186835 28% /data
ȽmountĿ¼ȻͨmountͿԼˣעԭʼݲûҪݵĻmount֮ǰʹnewfs
# umount /dev/dsk/c1t1d0s7
# newfs /dev/rdsk/c1t1d0s7
newfs: /dev/rdsk/c1t1d0s7 last mounted as /data
newfs: construct a new file system /dev/rdsk/c1t1d0s7: (y/n)? y
Cylinder groups must have a multiple of 16 cylinders with the given parameters
Rounded cgsize up to 256
Warning: 1 sector(s) in last cylinder unallocated
/dev/rdsk/c1t1d0s7: 71124290 sectors in 24619 cylinders of 27 tracks, 107 sectors
34728.7MB in 770 cyl groups (32 c/g, 45.14MB/g, 5632 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 92592, 185152, 277712, 370272, 462832, 555392, 647952, 740512, 833072,
925632, 1018192, 1110752, 1203312, 1295872, 1388432, 1480992, 1573552,
1666112, 1758672, 1851232, 1943792, 2036352, 2128912, 2221472, 2314032,
.
.
.
70726000, 70818560, 70911120, 71000096, 71092656,
# mount /dev/dsk/c1t1d0s7 /data
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s0 10232602 873038 9257238 9% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c1t0d0s1 1016122 8549 946606 1% /var
swap 11813160 24 11813136 1% /var/run
/dev/dsk/c1t0d0s5 5161437 2133 5107690 1% /opt
swap 11813152 16 11813136 1% /tmp
/dev/dsk/c1t0d0s7 10323610 897713 9322661 9% /export/home
/dev/dsk/c1t1d0s7 35007716 9 34657630 1% /data
mountֻԱЧϣ´ȻЧҪֹϢӵ/etc/vfstabļС
# more /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s3 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
/dev/dsk/c1t0d0s1 /dev/rdsk/c1t0d0s1 /var ufs 1 no -
/dev/dsk/c1t0d0s7 /dev/rdsk/c1t0d0s7 /export/home ufs 2 yes -
/dev/dsk/c1t0d0s5 /dev/rdsk/c1t0d0s5 /opt ufs 2 yes -
swap - /tmp tmpfs - yes -
# cp /etc/vfstab /etc/vfstab.bak
# echo "/dev/dsk/c1t1d0s7 /dev/rdsk/c1t1d0s7 /data ufs 1 yes -" >> /etc/vfstab
# more /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s3 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
/dev/dsk/c1t0d0s1 /dev/rdsk/c1t0d0s1 /var ufs 1 no -
/dev/dsk/c1t0d0s7 /dev/rdsk/c1t0d0s7 /export/home ufs 2 yes -
/dev/dsk/c1t0d0s5 /dev/rdsk/c1t0d0s5 /opt ufs 2 yes -
swap - /tmp tmpfs - yes -
/dev/dsk/c1t1d0s7 /dev/rdsk/c1t1d0s7 /data ufs 1 yes -
/etc/vfstabļ֮ǰñݡ
һ solaris IP ַ
ģ
#ifconfig hme0 inet 192.168.1.1 netmask 255.255.255.0 up (֮µipᶪʧ)
øģ
1༭ļ/etc/hostsӦip롰ping Ӧhostname£һҲԲһ˵/etc/hostsļеӦҲҪ/etc/hostname.hme0ļеҲ˵ļ/etc/hosts/etc/hostname.hme0еӦһ£ͬʱҪ
1/etc/dumpadm.confļеdumpļĴλã
2/etc/net/ticlts/hosts
3/etc/net/ticots/hosts
4/etc/net/ticotsord/hosts
2༭ļ/etc/netmasks,༭Ӧip룻
3ִʹipЧ
#ifconfig hme0 inet ip_address netmask up
øģ
༭ļ/etc/nodenameµļɣִС hostname µɿµѾЧˣ
༭½ļ/etc/defaultrouter,ipַɣͬʱ롰route add default gateway IPַµؼЧˣ
һipһӵڶip
1ϵͳ/etc/hostname.hme0,һļ/etc/hostname.hme0:1,ļΪtest
2/etc/hostsļһм¼192.168.100.1 test,µipΪ192.168.10.1 Ϊtest
3/etc/netsmasksļһм¼ 192.168.100.0 255.255.255.0
4)Чˣ
sunv890 Solaris10ͻȻtelnet:
֪ô?
/usr/lib/inet/inetd startҲ.
ڽSolarisϵͳϵͳ֮ǰSUNϵͳһBOOT-PROM״̬״̬ķͬʱϵstop+aûSTOPܼPC̣ʹCtrl+break롣BOOT-PROM״̬OKʾ£SolarisϵͳУokʾʹgoʹϵͳС
1.2 ڴ״̬
BOOT-PROMԽζżһ̨ʾͼ̻ʾնˡϵͳˣûм̺ʾôĬΪһڣ/dev/ttyaͨǽAʹն˻ļʹý洮ӵ
1.3SUNĹվ
֮ǰsunĹվҪһʵķʽԴµļѡһ
# init 5 رеḶ̌ҹرռԴ
# init 6 رеḶ̌
# init 0 رеḶ̌ʹصOK״̬
3ʽУ/etc/rc0.dĿ¼µK*ĽűᱻִУʹϵͳ߹ػҪݿҲᱻرգҲرеĽIDϵûзӦԳʹµ
-stop+a
-sync
ע⣺ϵͳĺĽʱ洢/var/crash/<hostname>;С
Apr 3 10:18:29 oracleapp unix: sysctrl: allowing debug enter
Apr 3 10:21:42 oracleapp unix: SUNW,hme0: Link Down - cable problem?
Apr 3 10:21:45 oracleapp unix: SUNW,hme0: Using Internal Transceiver
Apr 3 10:21:45 oracleapp unix: SUNW,hme0: 100 Mbps full-duplex Link Up 鿴ȫ
messages:
Solaris:pseudo-device: lockstat0
messages:´Ϣ֪ʲô⣿
Mar 18 22:05:38 hostname peudo-device: lockstat0
Mar 18 22:05:38 jopstname stat0 is /pseudo/lockstat@0
Ӧûûз⡣
ûгȷһЩԴ
## ·, DZر
pseudo-device loop
## ʹ̫ӿ, DZر
pseudo-device ether
## Berkerley , tcpdump ,dhcp Ҫ, DZر
pseudo-device bpfilter 4
## syslogd Ҫ, DZر
pseudo-device log
## ʹtty , ¼, A256
pseudo-device pty 256
## PC speaker, DZر
pseudo-device speaker
## ֱִgzip ijʽ, DZرIJֻ֧a.out ʽ
pseudo-device gzip # Exec gzipped a.out's
## ּ֧tty ʹ
pseudo-device snp 4 #Snoop device - to look at pty/vty/etc..
## һļģһ, ͨÁΪļ̾ļʱ
pseudo-device vn 4 #Vnode driver (turns a file into a device)
## ں˼PPP (man pppd) LKM
#pseudo-device ppp 2 #Point-to-point protocol
## ûPPP (man ppp) LKM
#pseudo-device tun 1 #Tunnel driver(user process ppp)
## SLIP LKM ں
#pseudo-device sl 2 #Serial Line IP
## ̓, д,ȡϢ, ڿ·سLKM
#pseudo-device disc #Discard device
## ṩRAID-0 Striping Mirroring parity(not complete) Ĺ
## ЧĽSCSI ̺ϲΪһٵļϵͳ
## man ccdconfig
#pseudo-device ccd 4
pseudo-device 豸
ȣҪ豸
pseudo-device pty 16 #ttys - can go as high as 256
pseudo-device log #syslog interface (/dev/klog)
networkʹõijϣӦ
pseudo-device loop
pseudo-device ether
£
pseudo-device bpfilter 4 #berkeley packet filter
pseudo-device tun 1 #Tunnel driver ( PPP)
floppyʱҪ
pseudo-device vn #Vnode driver ( turns a file into a device)
()
tar
tar cvf lidong.rar *.*
tar cvf *.rar /etc/
tarΪļĿ¼tarûΪijһضļļҲڵиıļмµļtarڴŴϴڣûκ豸ϴ̡tarһѵļĿ¼ȫһļڱļļϳΪһļԱ紫ǷdzõġLinuxϵtarGNU汾ġ
tar [ѡ+ѡ] ļĿ¼
ʹøʱѡDZҪеģtarҪʲô飬ѡǸʹõģѡá
ѡ
c µĵļû뱸һĿ¼һЩļҪѡѡ
r Ҫ浵ļӵļδβûѾñļַֻһĿ¼һЩļDZˣʱʹøѡǵĿ¼ļӵļС
t гļݣ鿴ѾЩļ
u ļ˵ļȡԭļڱļҲҪµļӵļ
x ӵļͷļ
ѡ
b ѡΪŴ趨ġһ֣˵ĴСϵͳԤֵΪ2020*512 bytes
f ʹõļ豸ѡͨDZѡġ
k ѾڵļǰijļԭڻԭĹУͬļиǡ
m ڻԭļʱļʱ趨Ϊڡ
M ĵļԱڼдš
v ϸtarļϢѡtarļϢ
w ÿһҪȷϡ
z gzipѹ/ѹļϸѡԽļѹԭʱҲһҪʹøѡнѹ
gzip
ļСԵĺôһǿԼٴ洢ռ䣬ͨ紫ļʱԼٴʱ䡣gzipLinuxϵͳоʹõһļѹͽѹȷֺá
gzip [ѡ] ѹѹļ
ѡĺ壺
-c дϣԭļ
-d ѹļѹ
-l ÿѹļʾֶΣ
ѹļĴС
δѹļĴС
ѹ
δѹļ
-r ݹʽزָĿ¼ѹеļǽѹ
-t ԣѹļǷ
-v ÿһѹͽѹļʾļѹȡ
-num ָnumѹٶȣ-1--fastʾѹѹȣ-9--bestʾѹѹȣϵͳȱʡֵΪ6
unzip
MS WindowsµѹwinzipѹļLinuxϵͳչأunzipڽչΪ.zipѹļ
unzip [ѡ] ѹļ.zip
ѡĺֱΪ
-x ļб ѹļָfileļ
-v 鿴ѹļĿ¼ѹ
-t ļѹ
-d Ŀ¼ ѹļָĿ¼¡
-z ֻʾѹļע⡣
-n Ѿڵļ
-o ѴڵļҲҪûȷϡ
-j ؽĵĿ¼ṹļѹͬһĿ¼¡
ֹlinuxӾ̬·
cd /etc/sysconfig
vi static-routes
any net 192.168.1.0/24 gw 192.168.0.246
isainfo -v/b ==show bit to support
cat /etc/release
showrev
prtconf|grep Memory
psrinfo -pv
localeadm -l
change date:
date 0216093107
/etc/motd
ʹdf ʾ̿ռʹϢ
ʹô-lh ѡls ʾйļСϢ
ʹls -s ɰСļн
ʹô-size ѡָĴСֵfind ҲʾָСļơ
ʹdu ʾһĿ¼Ŀ¼ļĴС
ʹquot -a ʾļӵȨ
ftp -n -i IP <
cd ĿĿ¼
put file
get file
#ѯļ
ls
#˳
bye
EOF
time dd if=/dev/zero of=/oradata/biddb/testind/testfile.dbf bs=1024000 count=1000
ڼϵͳIO ʹÿ(unix):
iostat -xnp 2 ʾBusy̶
Sun™ Cluster v3 was launched at the end of 2000 and is a complete re-design (i.e. not built on Sun Cluster v2 technologies) and consequently is radically different from older versions of the Sun Cluster product. This notes intends to act as an introduction to this product.
2.0 Scope & Application
This introduction will act as a simple overview of the product for the novice but will also delve deeper into some more technical issues relating to the product.
3.0 Introduction to Sun Cluster v3
Sun™ Cluster 3.0 is Sun's next-generation clustering technology. Based on technology developed by Sun Labs, it delivers Sun's most powerful cluster solution. Sun Cluster 3.0, according to Sun, focuses on delivering integrated availability, scalability, manageability, and ease of use with the core delivery platform -- the Solaris Operating System (SPARC)™ Environment. Key to the SunPlex™ system (SunPlex™ is the "family" name for Sun Cluster - previously code-named internally as "full-moon") is Sun Cluster 3.0. Built around Sun Cluster 3.0, as well as the Solaris 8 Operating System (SPARC) Environment and Sun server, storage, and network connectivity products, and services, a SunPlex system is designed to manage application services for tightly coupled environments.
Sun Cluster (SC) v3 extends the Solaris Operating System (SPARC) environment into a cluster operating system. A cluster is a collection of loosely coupled computing nodes that provides a single client view of network services or applications, including databases, web services, and file services. Each cluster node is a standalone server that runs its own processes. These processes can communicate with one another to form what looks like (to a network client) a single system that co-operatively provides applications, system resources, and data to users. A cluster offers several advantages over traditional single server systems. These advantages include support for highly available and scalable applications, capacity for modular growth, and low entry price compared to traditional hardware fault-tolerant systems. This version is heavily kernalized and consequently faster in operation. Two choices are available for volume management, Veritas Volume Manager and Solstice DiskSuite.
The goals of Sun Cluster are:-- Reduce or eliminate system downtime because of software or hardware failure
- Ensure availability of data and applications to end users, regardless of the kind of failure that would normally take down a single server system
- Increase application throughput by enabling services to scale to additional processors by adding nodes to the cluster
- Provide enhanced availability of the system by enabling you to perform maintenance without shutting down the entire cluster
4.0 Sun Cluster v3 New Features
The Sun Cluster 3.0 software release has the following new features:-
Up to eight nodes
Sun Cluster 3.0 supports up to eight cluster nodes. Sun plans to extend this to 64 nodes eventually. Sun Cluster v2.2 had a previous limit of four nodes. Real Application Clusters (RAC) is supported with Solaris Operating System (SPARC) 8 (also known as v2.8 or v5.8) and Sun Cluster 3.0, though only two nodes are supported and limited four node support at this current stage. The limitation on SC 3.0/RAC is due to the lack of an implementation of SCSI 3 Persistent Group Reservation (PGR) in the storage subsystem. SC 3.0 uses PGR for quorum management for more than 2 nodes. SCSI 2 Reserve is used by SC 2.2 and 3.0 for 2 node clusters. SC 2.2 uses a terminal concentrator for greater than 2 nodes. Sun will support PGR in T3 storage in an update but Sun will not support PGR in earlier storage offerings (e.g. photons - A5200). EMC, however, does supports PGR and these third-party vendors are now responsible for certification against Sun Cluster. Up to four node OPS/RAC is supported with Sun Cluster 3.0 Update 2 (or higher versions) in several configurations. The key component in each four node configuration being the shared storage device. 4 node support is now available for Sun T3 Single Brick (requires VxVM 3.2) and SE 9910/9960 (SUN Enterprise Series, OEM of Hitachi HDS). Please check with Sun for more details and latest updates to node support. Certification to 8 nodes will happen at a later date.
Cluster File System
The Cluster File System allows mounting of cluster-wide user file systems (UFS) or High Sierra file systems (HSFS), allowing concurrent, continuous access to the file systems from any node in the cluster.
Global device access
Sun Cluster can access disk devices, tape devices, and CD-ROM drives from any node in the cluster.
Cluster networking (shared address)
While each node retains its own publicly accessible Internet Protocol (IP) address, a global IP address can be configured for the applications on the cluster, where the data services requests received through the global address are distributed to nodes in the cluster based on a selected load balancing policy.
Scalable application support
Sun Cluster 3.0 supports scalable data services in which client requests are distributed to any number of cluster nodes. This is used in conjunction with the shared address feature.
Sun Management Center-based monitoringSun Cluster 3.0 nodes can be monitored using the Sun Management Center system management tool.
Solaris Operating System (SPARC) 10/00 Operating Environment is supported
The Solaris Operating System (SPARC) 8 10/00 (October 2000) or above platform release is recommended because the number of required patches has been significantly reduced. Early versions of Solaris Operating System (SPARC) e.g. v7, v2.6 are not supported. SC v3 has now been kernalized for performance reasons and is, hence, strongly OS version dependant.
Two new installation methods
You can now configure the first cluster node and automatically use it to assist in configuring all additional nodes. If you have an existing
JumpStart™ server (networked installation image server), you can also automatically add the Sun Cluster 3.0 installation to the JumpStart configuration.
5.0 Cluster Hardware Components
The minimum hardware components that are necessary for a cluster configuration include:-
One administration workstation
The administration workstation can be any Sun workstation, providing it has adequate resources to support graphics and compute intensive applications. A simple Sunblade 100 500MHz workstation is usually recommended by Sun for this purpose. You can use cluster administration tools to monitor many clusters from one administration workstation. This is not mandatory but clearly helpful.
One Terminal Concentrator
The Sun terminal concentrator (TC) provides direct translation from the network to serial port interfaces. Each of the serial port outputs connect to a separate node in the cluster through serial port A. The Sun nodes commonly do not have frame buffers so to display the boot prompt on a screen the Terminal Concentrator is the only access path when the operating system is down. While this is also not a mandatory prerequisite it is certainly useful for administration purposes.
Two hosts (up to eight)
A wide range of Sun hardware platforms are supported for use in the clustered environment. Mixed platform clusters are not supported.
One or more public network interfaces per system
Currently Gigabit Ethernet, ethernet and SCI are supported for the cluster interconnect.
A private cluster transport interface
All nodes in a cluster are linked by a private cluster transport. The transport is redundant and can be used for the following purposes:-
- Cluster-wide monitoring and recovery
- Parallel database lock and query information
- Global data access
- Dual hosted, mirrored disk storage
The Sun Cluster environment can use several Sun and third-party storage devices. They must all accept at least dual-host connections.
6.0 Memory Requirements
Sun Cluster 3.0 requires extra memory above what is configured for a node under a normal workload. The extra memory equals 128 Mbytes + 10%. For example, if a standalone node normally requires 1 Gbyte of memory, you need an extra 256 Mbytes to meet memory requirements.
http://www.itpub.net/showthread.php?s=&threadid=720028
DBA Linux Shell ű
7 ǰOracle Linux ϵĵһҵݿ⡣ʱOracleRed Hat Novell/SUSE Ͳϵغ Linux ںˣӶݿӦóܡΪ Linux Oracle ݿ 10g ŰϵͳصǿܡDBA κʱҪ˽ʹôƽ̨¶ϵͳѹ
ϵͳԱ DBA ְ֮ڲ𡣵ʵϣֲͨԡ IT ŹӶһЩɽݿ⼶ԼϵͳԱȻOracle ݿⱾʹòϵͳԴ价ܽ⣬ϵͳԱ DBA ֽ乤صԶбҪȽϷ㡣װϵͳԴԼϵͳ漰һЩظ׳Զ̿Ա̸ֶõЩ
ЩԶķ֮һ shell űShell ű Linux ϵͳװ֮ҪáرϵͳʱͻøֽűOracle Ӧ̵ʵóҲͨ shell űɵõġЩűԿٿǹӦóԭ͡ϵͳԱͨ shell űʵֵĹṩӵϵͳضҪƵĽˡ
ڱУҽbashshell űʵֵġ Linux ƽ̨ϰװкά Oracle ݿصĹܡע⣬ Linux űѧ Linux İ DBAԴḻ Linux ϵͳԱá
Shell űʲô
shell űһеıļļűʱִиļа shell ָ Linux ںͨʹõضû档Ŀǰжͬ shellа C shell (csh)Korn shell (ksh)Bourne shell (sh) Bourne-Again shell (bash)shell һļն˶ȡЩִͨBourne-Again shell ϲ shell ԣľʹøýűʾ
űļеĵһпָʹĸ shell иýűнűʾаĵһеĺ壺
#!/bin/bash
Ϊʲôʹ Shell ű
shell ű DBA ĹأܲϿ shell űļֵĹйءǰδʹù UNIX UNIX ϵͳôܻԴɬеһĪչ⣬Ϊϵݿ⣬Oracle 10g ṩһڴݿݵǿƽ̨Լݿⲿϵͳķ
ּᷢ̽ shell űԭа
- ֧ѾڵĽű
- Ҫڰװ Oracle ǰԶϵͳ磬Աдһű OS ijʼ״̬氲װǰκǰýűԴص OS û鲢Ϊûû
- ʹе Oracle ݿִֶƻݿδ ʱҪijЩʹýűֹͣݿ⣨Լصݿ̣ݿڲද
- Ҫһּݿ״̬磬Ƿвɽн̲ѯĻơĽűԼӷض Oracle ̺ԴӶṩϵͳǰĸϸϢ
- ҪԶOracle Recovery Manager (RMAN) һڿκƽ̨еıݽűʵóԴ shell űе Oracle Recovery Manager ʹִиֱݺͻָ
- һضijݿҪһ̨ϰװ˶ݿ⡣ҪʹõݿҪΪDZڵİȫ⡣Щ£shell űṩһּȿҪֲὫ뵥ݿķ
ʲô ʹ Shell ű
Oracle ݿ˳ RDBMS ͳĹܡκһʹòϵͳṩԴ价ij̶ԶԶSQL Oracle Ĺ̶ͼݿڲṩϵͳͼ shell űݿⲿṩϵͳͼShell űĽ
ʶϵͳԴݿڲмӺġʹ Oracle Ĺ̶ͼ v$ ǰͼȷ (v$instance) ݿеƽ̨ (v$database)ַͨʽȷݿصļλúԡֱӴݿвѯļv$datafiledba_data_filesʱļv$tempfiledba_temp_files־ (v$logfile)浵־ (v$archived_log) Ϳļ (v$controlfile) λúԡͨͼԼͨ鿴ijЩ init.ora db_recovery_file_destdb_recovery_file_dest_sizeȷйػָ ($recovery_file_dest) ϢԲѯ (v$process) ڴ棨v$sgav$sgastat ȣ״̬иõ PL/SQL ܹԵײ OS ʵ Java C ݿ
ڿΪһҪݿʵдűűܲѡĵԺֽʹ SQL*Plus ݿ⣬ںܶ£ʹԿԸõؽ⡣
±˿ԴݿзʵϢ
/ϵͳϢ
ʶ | Ͳѯ | ע |
ʵڵ | select host_name | Ҳͨ bash øϢ hostname
uname Cn |
ϵͳƽ̨ | select platform_name from v$database C-(10g) | uname CsϢ |
ļϢ
Oracle ļλ | Ͳѯ | ע |
ļ | select name | ݿļλáinit.ora IJ control_files ҲϢ |
ļ | select file_name | ݿļλ |
ʱļ | select file_name | ݿʱļλ |
־ļ | select member | ־λ |
鵵־ | select name | 鵵־λáinit.ora IJ log_archive_dest_n ҲϢݿⲻ Archivelog ģʽ£òѯؽ |
ػָ | select name | Oracle 10g װػָĿ¼init.ora db_recovery_file_dest ҲϢ |
ɲָʾļϵͳϵʵ | select * where value like '%/%'
value like '%/%'; | Oracle ݿⰲװͰ汾IJͬòѯĽȻܷͬصIJУ spfile |
ñ̵ķʽļϵͳ | select directory_path from dba_directories | ʹ Oracle UTL_FILE_DIR DIRECTORY ݿʱݿļ |
Ϣ
/ | Ͳѯ | ע |
Ự | select p.spid, s.username, s.program from v$process p, v$session s where p.addr=s.paddr order by 2, 3, 1 | Խ spid ps Cef ԽݿеĿϢ̵IJϵͳϢбȽϡ |
벢صĽ | select slave_name, status | Oracle ݿĺܶ棨ءѯָƣòӿԷָĻ parallel_threads_per_cpu ʵĬϲжȡ |
ڴϢ
ڴ | Ͳѯ | ע |
ȫ | select * from V$PGASTAT | pga_aggregate_target Ϊר÷ڴ档 ʹ vmstat top Linux ʵóڴʹ |
ϵͳȫ | select * from v$sga | SGA_MAX_SIZE SGA_TARGET Oracle ݿ 10g Ķ̬ڴԡʹΪ;ֶڴ档 ͬʱи Linux ʵóڼڴ䡣 |
BASH ű
űҪôΪԶ̵һֱãΪԤҪôԽʽУûʾִвֻҪӵļִȨޣԴмļûļִȨޣӵȡȨޣͨڽűǰ sh иýű
űΪûУʹöֿѡں̨нűʹڶϿӵ£ԿͨʽУ
nohup /path_to_dir/myscript_here.sh &
ҪܳʱɵĽűáat ڽִнű cron ڼƻҪظִеĽű
ʾṩͼʹ echoѭԼֵҪ档
print_args.shλҲಢݵűеĴʡҪʵһʹ $1 $0 űơ$# űеIJһֵݵвıݷʹ while ѭ shift ʹԵбевDZѭ
while [ $# -ne 0 ]
do
echo $1
shift
done
űļΪʾûļںȡļԺͿɶԡ磬漰ѡݿļĻָűʾûѡڽű沿ڻָļıݿļ
if [ !-r $1 ]; then # not exists and is readable
echo "File $1 does not exist or is not readable."
exit;
fi
ַ
if [ !-r $1 ];
ʵִвԵIJ֮֡ݽΪ trueִλ if fi ֮ʵʲʾڷ֮䡣̾ڶִеIJȡ-r ѡļǷɶضʾҪԵǴݸűĵһͨʹһ (-d )ԼĿǷĿ¼μ is_a_directory.sh
do_continue.shʾһڶȡĿĵûļ͵СпijЩӽűڲȷµݶʧýĽǰһʾѯûǷȷʵϣűִнʾѯûǷҪжȡһΪ doContinue ıû롣ûIJy֪ûű˳Ҳִ if (fi) ű
doContinue=n
echo -n "Do you really want to continue?(y/n) "
read doContinue
if [ "$doContinue" != "y" ]; then
echo "Quitting..."
exit
fi
ֻӵӦȨͻûиűڽűмͼнűûáڵ () ַУĽظűʾڽűʹ whoami ǰ¼ûԺʹ date ʾڡ
echo "You are logged in as 'whoami'";
if [ whoami != "oracle" ]; then
echo "Must be logged on as oracle to run this script."
exit
fi
echo "Running script at date"
Ϊ Oracle ݿ⽻дĽűʱҪݿȻϢstty Cecho رĻӦΪĶȡϢͲʾĻˡڶȡϢ洢ڱʾе pwкʹ stty echo ´ʾ
stty -echo
echo -n "Enter the database system password: "
read pw
stty echo
Oracle ű
ijЩļλڸ Oracle װĹ̶λáͨ鿴 /etc/oraInst.loc ļ Oracle 嵥/etc/oratab ļʶϰװݿ⣨ Oracle
get_inv_location.shýűǰʾֱۡͨýűΪõýűĹɡ
Ҫȷ嵥λã cat ʾļݣĽ͵ grepһӡƥģʽеʵó inventory_loc С
cat /etc/oraInst.loc | grep inventory_loc
жװ´ڶ嵥λãҪų # ע͵СCv ѡų ģʽС
cat /etc/oraInst.loc |grep -v "#"|grep inventory_loc
Ľʾ
inventory_loc=/u01/oraInventory
ʹ > ضضһļļڣļļѴڣ串ǡ
cat /etc/oraInst.loc|grep -v "#"|grep inventory_loc > tmp
һñϢλõļ¼Ҫɾü¼ȺǰIJ֡Σ cat Ľ͵ awkһͨڲֿɱ䳤ֶεģʽɨʹԣʵǽַǻCF ѡָʾ awk ȺָȻӡַĵڶ ($2)ȺҲݡҪҵ嵥λ (/u01/oraInventory)
cat tmp | awk -F= '{print $2}'
ûбҪʱļ (tmp)˿Խɾ
rm tmp
list_oracle_homes.shҪȷݿ ORACLE_HOMEжѡݿûݵ¼ $ORACLE_HOME ִ echo /etc/oratab ļѡʵơļеݿĿʽ
$ORACLE_SID:$ORACLE_HOME:<N|Y>:
µдĿORACLE_SID Ϊ TESTDB ORACLE_HOME
cat /etc/oratab | awk -F:'{if ($1=="TESTDB") print $2 }'
Ҫ /etc/orainst ļгÿ ORACLE_HOME ִвô죿ʹ´εб
dblist='cat /etc/oratab | grep -v "#" | awk -F:'{print $2 }''
for ohome in $dblist ; do
echo $ohome
done
dblist 顣 ORACLE_HOME ·ɸñ档for ѭڵбÿĿ ohomeȻ䷢͵
search_log.shOracle Ʒɸ־Ҫǡݿ⾯־ݿҪϢװжزƷԼӦòʱҲ־ļ½űԲʽݸļκΰ ORA- УָĽ߷͵ʼ
cat $1 | grep ORA- > alert.err
if [ 'cat alert.err|wc -l' -gt 0 ]
then
mail -s "$0 $1 Errors" administrator@yourcompany.com < alert.err
fi
ִеľͳļ alert.errض alert.err ʱд룩дڵĵ (wc) (-gt) 㣬ִ if 顣ʾУʹ mailҲʹ send mailʼʼִеĽű ($0)־ ($1)ʼʼ (ORA-) ƥС
ʹ ORACLE_HOMEORACLE_BASE ORACLE_SID Ȼҵ Linux й̶λõԴ Oracle 11i ӦóʵʹλԴЩ APPL_TOPTWO_TASKCONTEXT_NAME Լ CONTEXT_FILE ȡҪ鿴ебִ鿴ɵļ (myenv.txt)
env > myenv.txt
ԽЩĸļλá磬Խ־λָΪ
$ORACLE_BASE/admin/$ORACLE_SID/bdump/alert_$ORACLE_SID.log
ݸýűԭԱдһĽűƻִУýű־עļݲڷκδʱ͵ʼȻԽ־ƶļֻµĴϢͨʼ͡
Oracle Recovery Manager űOracle Recovery Manager (RMAN) һڹݿⱸݺͻָʵóڱдбݽű RMAN Уƽ̨ضĴԼ˶ƽ̨ĹRMAN ɵײϵͳòܴĽű磬 (cold.sh) ݿ½űɣ
#!/bin/bash
rman target / <<EOF
shutdown immediate;
startup mount;
backup spfile;
backup database;
alter database open;
delete noprompt obsolete;
quit;
EOF
1 бʹ bash shell 2 е Oracle Recovery Manager ָ OS û¼Ŀݿ⣨ڻ $ORACLE_SID ָк <<EOF ʾݵ RMAN ȥһϵ EOF ʾѾҪݵ RMAN ееĽβȻʹ RMAN رݿ⡢װݿⲢݷļݿݡȻݿ⡣ɾȱָıݾɵκαݡμ RMAN ĵصıݡ
䱸ͨƻԶСʹϽűݷ͵ʼַ
sh cold.sh | mail -s"Backup `date`" administrator@yourcompany.com
ͬԴ shell űڲ Oracle ʵóʹ tnsping ʵó鿴 Oracle ӱʶܷӼиʵó⣺
tnsping ptch04 |grep TNS-
ݿ͵루ͳĺݱãȽʺڱдظ̽ű
ݿⰲװݿ漰ಽ趼ʵԶ Linux ϰװ Oracle 10g ֮ǰҪиֲ֤С汾Լں˲áʹô Cq ѡ rpm ѯİ汾
rpm -q compat-libstdc++
ͨ鿴 /procαļϵͳȷϵͳĸ档ʵʵļǰԲ鿴ʱϵͳϢͺλļһ磬/proc/meminfo ϵͳڴϢ grep MemTotal /proc/meminfo ʾϵͳڴͨʹ awkǰIJͬԷָڴ (KB)巽£
grep MemTotal /proc/meminfo | awk '{print $2}'
ڽӦıȽϺӦϵͳĽűʹʾű 10gchecks_kernel.sh 10gchecks.sh ֻʾ Oracle ĵĵǰͽİ汾á
ݿӡʹ ps ״̬ݿ⡢űκؽǷСҪгϵǰеݿ⣬
echo "'ps -ef | grep smon|grep -v grep|awk '{print $8}'| awk -F "_"
'{print$3}'`"
ܸУһеѡһ psʹ -ef ѡн̵бڷен̡ڶ grep SMONOracle System Monitor ̨̣ʾݿСҪɾе grep ĿȻʹ awk ҵбеĵڰУа ora_smon_<oracle_sid> ʽϵͳơȻawk һʵʹ»ַΪָӡӵд SMON ̵ݿơ»ַҪУÿ֮ǰʹһбܽЩת壨Ϊַʾһ˫У
exec_sql.shǰָģûӵ sqlplus ķȨޣԴ shell űвѯݿ⡣ʾصǰݿбֻỰ״̬ļбɿոָ
#!/bin/bash
output='sqlplus -s "
vvm+vvr+cs+gcm=vcs fundation suite;
һֻҪcsͿʵHA:
(oracleʵֵĹܣԲʹvcsƷʵظĹ)vvrͿȫҪͬvvmǽҪģgcs˷ѣ
DzƷĿոտʼϺɣ
Solaris8sun clusterװʼ --copy
Ҫҵsun clusterV3.1صַSUNվϺҵ3.2صַ3.2֧Solaris8ֻ3.1İ汾3.1صַΪhttp://www.sun.com/software/javaenterprisesystem/previous/r3/get.xml
3.1ļunzipļѹSolaris_sparcĿ¼ͼģʽУʹrootִ./installer
ѡԣȻѡеаװ
װԶǷеİװҪһΰװļʧܣвֲҪͨView Report鿴ȷʵЩԵǰϵͳΪȱ112798-01
ַУPATCHţͿԲѯزhttp://sunsolve.sun.com/private-cgi/show.pl?target=patches/patch-access
112798-01ŵ/var/spool/patchĿ¼patchĿ¼ڿֹʹupzipѹ112798-01.jarȻͨpatchadd
bash-2.03# unzip 112798-01.jar
Archive: 112798-01.jar
inflating: 112798-01/.diPatch
inflating: 112798-01/SUNWcsu/pkgmap
inflating: 112798-01/SUNWcsu/pkginfo
inflating: 112798-01/SUNWcsu/install/checkinstall
inflating: 112798-01/SUNWcsu/install/copyright
inflating: 112798-01/SUNWcsu/install/i.none
inflating: 112798-01/SUNWcsu/install/patch_checkinstall
inflating: 112798-01/SUNWcsu/install/patch_postinstall
inflating: 112798-01/SUNWcsu/install/postinstall
inflating: 112798-01/SUNWcsu/install/preinstall
inflating: 112798-01/SUNWcsu/reloc/usr/kernel/strmod/rlmod
inflating: 112798-01/SUNWcsxu/pkgmap
inflating: 112798-01/SUNWcsxu/pkginfo
inflating: 112798-01/SUNWcsxu/install/checkinstall
inflating: 112798-01/SUNWcsxu/install/copyright
inflating: 112798-01/SUNWcsxu/install/i.none
inflating: 112798-01/SUNWcsxu/install/patch_checkinstall
inflating: 112798-01/SUNWcsxu/install/patch_postinstall
inflating: 112798-01/SUNWcsxu/install/postinstall
inflating: 112798-01/SUNWcsxu/install/preinstall
inflating: 112798-01/SUNWcsxu/reloc/usr/kernel/strmod/sparcv9/rlmod
inflating: 112798-01/README.112798-01
inflating: META-INF/manifest.mf
inflating: META-INF/es-signature.sf
inflating: META-INF/es-signature.rsa
inflating: 112798-01/LEGAL_LICENSE.TXT
bash-2.03# patchadd /var/spool/patch/112798-01
Checking installed patches...
Verifying sufficient filesystem capacity (dry run method)...
Installing patch packages...
Patch number 112798-01 has been successfully installed.
See /var/sadm/patch/112798-01/log for details
Patch packages installed:
SUNWcsu
SUNWcsxu
ٴμϵͳͨNEXTװڵ㻹ûнаװѡԺٽãһֱNEXTOKˡ
UUʵһﲻõ˫+dzԴͷʼװһcluster
Ӳ
1. Node1: Netra 20 (2 X UltraSPARC-III+, 2048M RAM, 72G*2 HardDisk)
2. Node2: Netra 20 (2 X UltraSPARC-III+, 2048M RAM, 72G*2 HardDisk)
3. Shared Storage: D1000 (36G*3 HardDisk)
һ װϵͳ
װ2/04汾20042·ݣSolaris 8ڰװҪѡӢΪҪԡ
װEIS-CD
װEIS-CD 2/04汾EIS-CDʹclusterĻ
װpatch
Ϊ˱CPUߵ⣬Ҫװ117000-05òԴSUN˾ٷվءظòԺѹ117000-05Ŀ¼ʹװpatch
patchadd 117000-05
ģ װ
ڱλУʹSUN D1000Ϊ̣SCSIӿڵǹ˽ӿڵҪá
1 ӵ
2 Node1SCSI
3 Node1ӵ
4 ʹNode1okģʽconsoleڼNode1ϢʱѸٰCtrl+Breakɽokģʽ
5 {0} ok probe-scsi-all
6 {0} ok boot Cr
7 ԺϵͳʹformatȷѾϵͳ
8 Node1ϵ磬Node2ӵ磬ظ4-7ȷҲԱ̨
9 Ϊʹ̨ͬʱȡ洢Ҫһ̨SCSI IDNode1ӵ磬okģʽʱ״̬ӦNode1Node2洢Ѽӵ磬Node2ĿǰʹformatѾԹ۲쵽أNode1okģʽ
10 Node1SCSI IDΪ5ĬΪ7
{0} ok setenv scsi-initiator-id 5
11 ͨ5еĻϢǿ֪SCSI豸ϵͳʾΪ/pci@8,700000/scsi@2,1ʶһʹ
12 Node1SCSI IDΪ5(ע2е" scsi-initiator-id"˫֮һո)
{0} ok nvedit
0: probe-all
1: cd /pci@8,700000/scsi@2,1
2: 5 " scsi-initiator-id" integer-property
3: device-end
4: install-console
5: banner
13 12
{0} ok nvstore
14 û
{0} ok setenv use-nvramrc? true
use-nvramrc? = true
{0} ok setenv auto-boot? true
auto-boot? = true
15 Node1
{0} ok reset-all
16 Node1Node2Ͼformat飬ȷ϶ɹ˹洢
壮 װVCS
1 rhostsļ̨϶ҪִУNode1Ϊ
/Ŀ¼rhostsļʹԶ̵½ЧԼ̨ͬʱװVCS
root@uulab-s22 # echo + > /.rhosts
root@uulab-s22 # more /.rhosts
+
2 öIP
Clusterϵͳеһ豸̨һIPַר豸̨϶ҪִУNode1Ϊ
root@uulab-s22 # echo "uulab-p22" > /etc/hostname.qfe0
root@uulab-s22 # touch /etc/notrouter
root@uulab-s22 # vi /etc/hosts
:
192.168.0.6 uulab-p22
192.168.0.8 uulab-p23
root@uulab-s22 # vi /etc/netmasks
:
192.168.0.0 255.255.255.0
root@uulab-s22 # sync
root@uulab-s22 # reboot
3 ʼװ
VCS 4.0İװѾԼֻʹһͬʱװVeritas Volume Manager 4.0, Veritas File System 4.0Veritas Cluster Server 4.0ԼһЩֻҪһڵִмɡ
root@uulab-s22 # cd /opt/sf_ha.4.0.sol/storage_foundation
root@uulab-s22 # ./installsf
װһ·ѡ߰ʾ룬ܵ˵Ƚϼ
VCSװԺҪʹнڵ㣺
shutdown -y -i6 -g0
ϣʼ顣ֻҪһڵִмɡ
ʹformatȷҪӵеĹΪc4t0d0c4t8d0c4t9d0
root@uulab-s22 # format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100000c50569190,0
1. c1t1d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100000c5056c1a7,0
2. c4t0d0
/pci@8,700000/scsi@2,1/sd@0,0
3. c4t8d0
/pci@8,700000/scsi@2,1/sd@8,0
4. c4t9d0
/pci@8,700000/scsi@2,1/sd@9,0
Specify disk (enter its number):
root@uulab-s22 # vxdisksetup -i c4t0d0
ִԺ£ôο¼еĽ1
VxVM vxdisksetup ERROR V-5-2-3535 c4t0d0s2: Invalid dmpnodename for disk device c4t0d0.
ִԺ£ôο¼еĽ2
VxVM vxdisksetup ERROR V-5-2-1813 c4t0d0: Disk is part of ipasdg disk group, use -f option to force setup.
root@uulab-s22 # vxdisksetup -i c4t8d0
root@uulab-s22 # vxdisksetup -i c4t9d0
root@uulab-s22 # vxdg init hlrdg hlrdg-01=c4t0d0
root@uulab-s22 # vxdg -g hlrdg adddisk hlrdg-02=c4t8d0
root@uulab-s22 # vxdg -g hlrdg adddisk hlrdg-03=c4t9d0
ߣ
root@uulab-s22 # vxassist -g hlrdg -b make oradata_vol 15g layout=nostripe,nolog nmirror=2 &
root@uulab-s22 # vxassist -g hlrdg -b make oraredo_vol 5g layout=nostripe,nolog nmirror=2 &
root@uulab-s22 # vxassist -g hlrdg -b make oraarch_vol 8g layout=nostripe,nolog nmirror=2 &
root@uulab-s22 # vxassist -g hlrdg -b make hlr_vol 4g layout=nostripe,nolog nmirror=2 &
ˣ ʹVxFSļϵͳ
root@uulab-s22 # mkfs -F vxfs -o bsize=8192,largefiles /dev/vx/rdsk/hlrdg/oradata_vol
root@uulab-s22 # mkfs -F vxfs -o bsize=8192,largefiles /dev/vx/rdsk/hlrdg/oraredo_vol
root@uulab-s22 # mkfs -F vxfs -o bsize=8192,largefiles /dev/vx/rdsk/hlrdg/oraarch_vol
root@uulab-s22 # mkfs -F vxfs -o bsize=8192,largefiles /dev/vx/rdsk/hlrdg/hlr_vol
ţ VCS
ǵĻǴ4ļϵͳֱoradata_vol, oraredo-vol, oraarch_vol, hlr_volļϵͳԱʹҪأmountӦĿ¼СȴӦĿ¼̨϶ҪִУNode1ΪϵͳdbaoracleûѾ
root@uulab-s22 # mkdir -p /opt/oracle/data
root@uulab-s22 # mkdir -p /opt/oracle/redo
root@uulab-s22 # mkdir -p /opt/oracle/arch
root@uulab-s22 # mkdir Cp /opt/hlr
root@uulab-s22 # chown oracle:dba /dev/vx/rdsk/hlrdg/oradata_vol
root@uulab-s22 # chown oracle:dba /dev/vx/rdsk/hlrdg/oraredo_vol
root@uulab-s22 # chown oracle:dba /dev/vx/rdsk/hlrdg/oraarch_vol
root@uulab-s22 # chown oracle:dba /opt/oracle/data
root@uulab-s22 # chown oracle:dba /opt/oracle/redo
root@uulab-s22 # chown oracle:dba /opt/oracle/arch
/etc/VRTSvcs/conf/config/main.cfļVCSļļĿʹУhagrp,haresģҲʹκı༭viֱģ˴ѡʹviġֲΪҪӵС
Ժļ£
include "types.cf"
cluster vcs_hlr_cluster (
UserNames = { admin = hijBidIfjEjjHrjDig }
ClusterAddress = "10.7.1.7" --˴ΪClusterIP
Administrators = { admin }
CounterInterval = 5
)
system uulab-s22 (
)
system uulab-s23 (
)
group ClusterService (
SystemList = { uulab-s22 = 0, uulab-s23 = 1 }
UserStrGlobal = "LocalCluster@https://10.7.1.7:8443;LocalCluster@https://10.7.1.7:8443;"
AutoStartList = { uulab-s22, uulab-s23 }
OnlineRetryLimit = 3
OnlineRetryInterval = 120
)
DiskGroup hlrdg (
DiskGroup = hlrdg
MonitorReservation = 1
)
IP webip (
Device = eri0
Address = "10.7.1.7"
NetMask = "255.255.0.0"
)
Mount arch_mnt (
MountPoint = "/opt/oracle/arch"
BlockDevice = "/dev/vx/dsk/hlrdg/oraarch_vol"
FSType = vxfs
FsckOpt = "-y"
)
Mount data_mnt (
MountPoint = "/opt/oracle/data"
BlockDevice = "/dev/vx/dsk/hlrdg/oradata_vol"
FSType = vxfs
FsckOpt = "-y"
)
Mount hlr_mnt (
MountPoint = "/opt/hlr"
BlockDevice = "/dev/vx/dsk/hlrdg/hlr_vol"
FSType = vxfs
FsckOpt = "-y"
)
Mount redo_mnt (
MountPoint = "/opt/oracle/redo"
BlockDevice = "/dev/vx/dsk/hlrdg/oraredo_vol"
FSType = vxfs
FsckOpt = "-y"
)
NIC csgnic (
Device = eri0
)
VRTSWebApp VCSweb (
Critical = 0
AppName = vcs
InstallDir = "/opt/VRTSweb/VERITAS"
TimeForOnline = 5
RestartLimit = 3
)
VCSweb requires webip
arch_mnt requires hlr_mnt
data_mnt requires redo_mnt
hlr_mnt requires hlrdg
redo_mnt requires arch_mnt
webip requires csgnic
ϣʹ飺
root@uulab-s22 # hacf -verify /etc/VRTSvcs/conf/config
ʮ VCS
Ժͬʱ̨ϣʹVCSǷ
root@uulab-s22 # hares -display -group ClusterService
Ӧʾ
#Resource Attribute System Value
VCSweb Group global ClusterService
VCSweb Type global VRTSWebApp
VCSweb AutoStart global 1
VCSweb Critical global 0
VCSweb Enabled global 1
VCSweb LastOnline global uulab-s22
VCSweb MonitorOnly global 0
VCSweb ResourceOwner global unknown
VCSweb TriggerEvent global 0
VCSweb ArgListValues uulab-s22 vcs /opt/VRTSweb/VERITAS 5
VCSweb ArgListValues uulab-s23 vcs /opt/VRTSweb/VERITAS 5
VCSweb ConfidenceLevel uulab-s22 100
VCSweb ConfidenceLevel uulab-s23 0
VCSweb Flags uulab-s22
VCSweb Flags uulab-s23
VCSweb IState uulab-s22 not waiting
VCSweb IState uulab-s23 not waiting
VCSweb Probed uulab-s22 1
VCSweb Probed uulab-s23 1
VCSweb Start uulab-s22 1
VCSweb Start uulab-s23 0
VCSweb State uulab-s22 ONLINE
VCSweb State uulab-s23 OFFLINE
VCSweb AppName global vcs
VCSweb ComputeStats global 0
VCSweb InstallDir global /opt/VRTSweb/VERITAS
VCSweb ResourceInfo global State Valid Msg TS
VCSweb RestartLimit global 3
VCSweb TimeForOnline global 5
VCSweb MonitorTimeStats uulab-s22 Avg 0 TS
VCSweb MonitorTimeStats uulab-s23 Avg 0 TS
#
ҲʹdfǷҪصļϵͳȷNode1ϣNode2
лԣ
root@uulab-s22 # hagrp -switch ClusterService -to uulab-s23
5ңеԴIPļϵͳص㶼תƵNode2ϡ
ʮһ ¼
1
root@uulab-s22 # vxdiskadm
Volume Manager Support Operations
Menu: VolumeManager/Disk
1 Add or initialize one or more disks
2 Encapsulate one or more disks
3 Remove a disk
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
8 Enable access to (import) a disk group
9 Remove access to (deport) a disk group
10 Enable (online) a disk device
11 Disable (offline) a disk device
12 Mark a disk as a spare for a disk group
13 Turn off the spare flag on a disk
14 Unrelocate subdisks back to a disk
15 Exclude a disk from hot-relocation use
16 Make a disk available for hot-relocation use
17 Prevent multipathing/Suppress devices from VxVM's view
18 Allow multipathing/Unsuppress devices from VxVM's view
19 List currently suppressed/non-multipathed devices
20 Change the disk naming scheme
21 Get the newly connected/zoned disks in VxVM view
22 Change/Display the default disk layouts
23 Mark a disk as allocator-reserved for a disk group
24 Turn off the allocator-reserved flag on a disk
list List disk information
? Display help about menu
?? Display help about the menuing system
q Exit from menus
Select an operation to perform: 17
Exclude Devices
Menu: VolumeManager/Disk/ExcludeDevices
VxVM INFO V-5-2-1239
This operation might lead to some devices being suppressed from VxVM's view
or prevent them from being multipathed by vxdmp (This operation can be
reversed using the vxdiskadm command).
Do you want to continue ? [y,n,q,?] (default: y) y
Volume Manager Device Operations
Menu: VolumeManager/Disk/ExcludeDevices
1 Suppress all paths through a controller from VxVM's view
2 Suppress a path from VxVM's view
3 Suppress disks from VxVM's view by specifying a VID:PID combination
4 Suppress all but one paths to a disk
5 Prevent multipathing of all disks on a controller by VxVM
6 Prevent multipathing of a disk by VxVM
7 Prevent multipathing of disks by specifying a VID:PID combination
8 List currently suppressed/non-multipathed devices
? Display help about menu
?? Display help about the menuing system
q Exit from menus
Select an operation to perform: 5
Exclude controllers from DMP
Menu: VolumeManager/Disk/ExcludeDevices/CTLR-DMP
Use this operation to exclude all disks on a controller from being multipathed
by vxdmp.
As a result of this operation, all disks having a path through the specified
controller will be claimed in the OTHER_DISKS category and hence, not
multipathed by vxdmp. This operation can be reversed using the vxdiskadm
command.
VxVM INFO V-5-2-1263
You can specify a controller name at the prompt. A controller name is of
the form c#, example c3, c11 etc. Enter 'all' to exclude all paths on all
the controllers on the host. To see the list of controllers on the system,
type 'list'.
Enter a controller name [
VxVM INFO V-5-2-1129
All disks on the following enclosures will be excluded from DMP ( ie
claimed in the OTHER_DISKS category and hence not multipathed by vxdmp) as a
result of this operation :
Disk OTHER_DISKS
Continue operation? [y,n,q,?] (default: y) y
Do you wish to exclude more controllers ? [y,n,q,?] (default: n) n
Volume Manager Device Operations
Menu: VolumeManager/Disk/ExcludeDevices
1 Suppress all paths through a controller from VxVM's view
2 Suppress a path from VxVM's view
3 Suppress disks from VxVM's view by specifying a VID:PID combination
4 Suppress all but one paths to a disk
5 Prevent multipathing of all disks on a controller by VxVM
6 Prevent multipathing of a disk by VxVM
7 Prevent multipathing of disks by specifying a VID:PID combination
8 List currently suppressed/non-multipathed devices
? Display help about menu
?? Display help about the menuing system
q Exit from menus
Select an operation to perform: q
VxVM vxdiskadm NOTICE V-5-2-1187 Please wait while the device suppression/unsuppression operations take effect.
Goodbye.
2
root@uulab-s22 # vxdisksetup -fi c4t0d0
;
ٽ̵ϵͳá̬װûáյźźɵĻϡtruss ִָг̱ʶϣϵͳáյźźͽɵĻϵĸ١ÿи Fault Signal ƻ Syscall ƺͲֵ 鿴ȫ
snoop ipaddress
snoop ip1 ipserver
vi
vi filename :½ļڵһ
vi +n filename ļڵn
vi + filename ļһ
vi +/pattern filenameļڵһpatternƥĴ
vi -r filename ϴvi༭ʱϵͳָfilename
vi filename....filename ļα༭
ƶ
h һַ
l һַ
spaceһַ
Backspaceһַ
kCtrl+pһ
jCtrl+n һ
Enter һ
wW һ
bB һ
eE һjβ
) β
(
}俪ͷ
{β
nGn
n+n
n-n
n$nβ
H Ļ
M Ļм
L Ļ
0ע㣩ǰ
$ǰβ
Ļ
Ctrl+uļ
Ctrl+dļβ
Ctrl+fļβһ
Ctrlbļһ
nznйĻָnʱǰйĻ
ı
i ڹǰ
I ڵǰ
a
Aڵǰβ
oڵǰ֮¿һ
Oڵǰ֮¿һ
r滻ǰַ
R滻ǰֱַַESC
sӵǰλôʼıָĿַ
SɾָĿУı֮
ncwnCWָĿ
nCCָĿ
ɾ
ndwndWɾ괦ʼn-1
doɾ
d$ɾβ
nddɾǰмn-1
xXɾһַxɾģXɾǰ
Ctrl+uɾ뷽ʽı
滻 :
/patternӹ꿪ʼļβpattern
?patternӹ꿪ʼļpattern
nͬһظһ
Nڷظһ
s/p1/p2/gǰp1p2
n1,n2s/p1/p2/gn1n2p1p2
g/p1/s//p2/gļp1p2滻
ѡ
allгѡ
termն
ignoranceкԴСд
listʾƱλ(Ctrl+I)β־$)
numberʾк
reportʾеĹĿ
terseʾ̵ľϢ
warnתļʱû浱ǰļʾNO writeϢ
nomagicģʽУʹǰ治ַ
nowrapscanֹviļʱִһ˿ʼ
mesgviʾûwriteдԼնϵϢ
зʽ
n1,n2 co n3n1еn2֮ݿn3
n1,n2 m n3n1еn2֮n3
n1,n2 d n1еn2֮ɾ
w 浱ǰļ
e filenameļfilenameб༭
x浱ǰļ˳
q˳vi
q!ļ˳vi
!commandִshellcommand
n1,n2 w!commandļn1n2еΪcommand벢ִָ֮
n1n2ʾļΪcommand
r!commandcommandŵǰ
Solaris ContainerǰֽN1һSolarisϵͳڻֶÿֱ SolarisʵSolarisʵɶ8000. ӲͬSolaris ContainorǴ ʵ֡ һϻֵĶSolarisϵͳ˴룬ͺͬʱӵж һҵɽʡ¿ɹ۵Ӳ üɱ, ʹӲõЧá
1.
2. Solaris Container and Zone
a) Zone daemon
b) Zone file system
c) Zone network
d) Zone status
3. Zone
4. ZoneԴ
5. Դ
Solaris Container and Zone
Solaris ContainerResource Manager Zoneͬɡ
ʲôResource Manager?
Resource ManagerÿͻӦкطϵͳԴ˵CPUʹʱ䣬ϵͳԴʣҪʱԵϵͳԴķ䡣
ʲôZone?
ͬʱSolaris Containerͬһϰ8000SolarisʵSolaris ʵZone.ÿZoneӵжռ䡢Դ䡢û. Zone뻷,һЩӵӦڵһZone棬ӦõĹ,С
ڳ÷,гкܶ취. ûѡֽϲ:
1. Domains and Partitions -- ЩǻӲĽϲ. ЩIBM LPARsȵȡ
2. Virtual Machines -- ӦòĽϲ>IBM VMVMware.
3. Operating System Partitions> -- ϵͳ,DzϵͳĽ. аFreeBSD Jails Linux Vservers.
Solaris ZoneǵֻڲϵͳĽ
Solaris Zoneṩϵͳ,вͬûӦõĶSolarisʵ.
Solaris ZoneGlobal Zone Non-global Zone֣֮Non-global zone Global ZoneÿSolaris Non-global ZoneԼrootûûϣԼļϵͳռ䣬ԴԼֻܿԼZoneḶ̌һַƶϵͳΪȫַͨʽǰҪڶಿϵķֲʽӦûĶӦھͿֱͬһͬSolarisʵС
Global ZoneNon-global ZoneĶԱ
ÿһ̨Solaris 10, һGlobal Zone, Global Zone ܣһϵͳĬϵZone, ҲǵSolaris 10ոսڷϣĬϾкʹõSolarisʵȫԴķԼ,װжNon-global ZoneֻGlobal ZoneӲֱNon-global ZoneGlobal ZoneGlobal ZoneṩһӲݿ⣬ݿУͬʱijЩضGlobal ZoneʹõϢ˵Global ZoneļϵͳGlobal ZoneΨһһԿ豸ļϵͳZone.
ÿһZone, Global Zone, ԼֺΨһ֣Zone IDGlobal ZoneͨʹGlobal֣Non-Global Zoneûж塣ZoneʱϵͳԶɷһΨһZone IDZone, Global Zoneͨ0Non-global ZoneͨǷֵЩֵNon-global Zoneʱı䡣
Non-global ZoneGlobal ZonePackage, ͬʱҲԼIJͨPackageʽװĸӵ, Global ZoneNon-global Zone Package װĻGlobal ZoneͱҪͬʱӵPackageNon-global ZoneаװĻǿPackageֻNon-global ZoneڵģֻҪNon-global Zone pkgadd CG Package Non-global ZoneGlobal ZoneǹͬһSolarisں˵ģNon-global Zone˴֮䲻֪ĴڣһNon-global ZoneDzԶһNon-global ZoneɾػȲġ
a) Zone daemon
Solaris 10 daemonZoneвһzoneadmd, һzsched.
ZoneadmdҪĶzoneмܵḶ̌Global Zone棬ÿһNon-global Zoneмأ״̬ػȵȡ
Non-global ZoneϵͳӦzoneadmdḶ̌ϵͳԭѾzoneadmd
ÿһNon-global Zone涼һصzschedں˽̣ҪNon-global Zoneں̵߳Ļġ
b) Zone File System
Solaris 10вͨ÷ʽʵNon-global ZoneĸļϵͳһSparse Root Model, һWhole Root Model.
Sparse Root ModelNon-global ZoneСļװģʽģʽ£ֻвֵRoot PackageᰲװNon-global Zone棬ȻϵͳPackage, PackageǷװϵͳԱȷֵļϵͳֻģʽGlobal ZoneNon-global Zone棬˵/lib, /platform, /sbin, /usr. ģʽ£һؼļNon-global Zone汻ɾôֻNon-global ZoneӰ죬ǣؼļǴGlobal Zone汻ɾGlobal ZoneIJϵͳʧܵĻôÿNon-global ZoneIJϵͳҲʧܣеGlobal ZoneɾļϵͳȻNon-global ZoneϵͳҲҪļĻNon-global ZoneҲͬʱڡ
Whole Root ModelNon-global Zoneļװģʽģʽ£Solaris PackagesװNon-global Zone£һװ꣬DzܵGlobal ZoneӰ죬ļϵͳҲNon-global ZoneȫӵУĺôǿûɵضԼļϵͳиõضԡ
c) Zone networking
˵ÿSolaris 10Non-global Zone翴һ̨ķôȻÿһSolaris 10Non-global ZoneԼIPַôһ̨߱ĻǾͿÿطÿNon-global Zone棬DZȽϷģֻһǷֿ䲻ͬIPַͬNon-global Zoneأǿ϶ģ˵Ļֻһ, Global Zonece0, ô㽨Non-global ZoneʱIPַʱϵͳԶΪce0:1Non-global Zone, ȻӦIPַ㽨Non-global ZoneʱϵͳֿΪ㽨ce0:2, ce0:3 ԴȥôĶNon-global ZoneͿӵвͬIPַֻеtrafficǷͬһϡ
zonecfgNon-global zoneʱԶplumbIPַ㲻ĻѡifconfigNon-global zoneʱĶIPַ
d) Zone status
zoneadm鿴ÿzone״̬ҪעǣNon-globalϺGlobal ZoneΪһµģûpower-on self-test (POST)OpenBoot Programmable Read-Only Memory (OBP)ӦҲNon-global Zoneʱdzٵһԭɡ
ôzoneadmԴӡzoneЩ״̬أǰ
1 Undefined C Non-global Zoneûûɻûõݿʱ״̬
2 Configured C Non-global Zoneɲҷõݿ
3 Incomplete -- Non-global Zone ״̬ڰװжؽ״̬С
4 Installed -- Non-global Zoneװϡ
5 Ready C Non-global ZoneʱzscheḏѾplumb, ļϵͳMountϡ
6 Running C Non-global Zone УӦNon-global ZoneĽ̶Ѿ
7 Shutting down and Down C Non-global Zone ڹػͳֹػ״̬
Non-global Zone
ҪNon-global ZoneõӲԴʱӦϸƻͿ漰غͲǰ
1 Non-global Zone
2 Non-global Zoneİװ·
3 Non-global Zone Դ
4 Non-global Zone ļϵͳ
5 Non-global Zone Ӳ豸
֣װ·綼DZȽϺýģϵͳӲԴĺֲԺۣļϵͳͨأDzsparse root modelģʽװĻҪ100MBĿеļϵͳռװSolaris Package, Ĭ£Global ZoneеPackageᰲװNon-global Zone棬ļϵͳռҪӴȻͨƶInherit-pkg-dirָװPackage.
ã֪ЩʼNon-global Zoneõһ, ϽNon-global ZoneҪʹGlobal Zone rootûȨ:
AҪzonecfgNon-global Zone, zonecfgһʽSolarisϵͳеն˿ʼ
bash-3.00# zonecfg -z test-zone
(עͣϣһΪtest-zoneNon-global Zoneõʾ)
test-zone: ûô
ʹ 'create' ʼ
zonecfg:test-zone> create
zonecfg:test-zone> set zonepath=/export/home/test-zone
עͣtest-zoneǽGlobal Zone/export/hom/test-zoneĿ¼£
zonecfg:test-zone> set autoboot=true
עͣӲƽ̨ʱһtest-zoneһ
zonecfg:test-zone> set pool=pool_default
עָͣĬϵԴطtest-zone, ʱԶtest-zone, ȻԼƶԴأԺۣ
(עͣļϵͳ)
zonecfg:test-zone> add inherit-pkg-dir
(עͣʼֱӴGlobal Zoneϼ̳mountļϵͳЩļϵͳNon-global Zone涼ֻ)
zonecfg:test-zone:inherit-pkg-dir> set dir=/opt/sun
(עͣ趨/opt/sunֱӴGlobal Zone̳ȡʹ, /opt/sun Golbal ZoneѰװpackageĿ¼)
zonecfg:test-zone:inherit-pkg-dir> end
(עͣinherit-pkg-dir)
zonecfg:test-zone> add net
(עͣʼ)
zonecfg:test-zone:net> set physical=bge0
(עͣ趨test-zoneʹõ)
zonecfg:test-zone:net> set address=129.158.163.232
(עͣ趨test-zone IPַ)
zonecfg:test-zone:net> end
(עͣ)
zonecfg:test-zone> verify
(ע֤ͣȷ)
zonecfg:test-zone> commit
(עͣύtest-zone)
zonecfg:test-zone> exit
(עͣ˳)
test-zoneѾúãһаװʹ.
ʹzonecfg鿴ͼոõtest-zoneã
bash-3.00# zonecfg -z test-zone info
õϢ
zonepath: /export/home/test-zone
autoboot: true
pool: pool_default
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
inherit-pkg-dir:
dir: /opt/sun
net:
address: 129.158.163.233
physical: bge0
ҿܻΪʲôûѡ/lib, /platform, /sbin, /usrЩĿ¼ȴtest-zoneЩĿ¼ԣΪڰװNon-global ZoneʱĬǻ/lib, /platform, /sbin, /usrЩĿ¼İװ㿴װtest-zoneǴЩĿ¼ġ
BȻǿʼʹzoneadmװNon-global Zone.
zoneadm -z test-zone install
Ļʾ½
Preparing to install zone
Creating list of files to copy from the global zone.
Copying <13496> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1086> packages on the zone.
Initialized <1086> packages on zone.
Zone
Installation of these packages generated errors:
Installation of <68> packages was skipped.
Installation of these packages generated warnings:
֤test-zoneǷװɹ
bash-3.00# zoneadm list Ccv
Ļʾ
bash-3.00# zoneadm list -cv
ID NAME STATUS PATH
0 global running /
- test-zone installed /export/home/test-zone
CʹzoneadmNon-global Zone.
bash-3.00# zoneadm -z test-zone boot
ֻ輸ʱ䣬ǾͿtest-zone.
zoneadm鿴test-zone״̬
bash-3.00# zoneadm list Ccv
ID NAME STATUS PATH
0 global running /
1 test-zone running /export/home/test-zone
DʹzloginNon-global Zoneв
bash-3.00# zlogin test-zone
[ӵ 'test-zone' pts/3]
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
áifconfig Caȷtest-zone IPǷ
bash-3.00# ifconfig -a
lo0:2:flags=2001000849
inet 127.0.0.1 netmask ff000000
bge0:1: flags=1000843
inet 129.158.163.232 netmask ffffff00 broadcast 129.158.163.255
ZoneԴ
ϵͳԴCPUڴ棬Ӳ̶ǿÿZoneʹõ. ÿһZoneȼͬһЩԵһЩȼZone, ˵ڲԱʹõϢվNon-global Zone, һЩȼȽϸߵZone,縺ӦȫʡļϵͳNon-global ZoneǶʹͬһԴӦZoneĻܿɱ˴֮ӰͳͻǿͨԴЩZoneʵʵҪ
ͬԴвͬCPU飬ڴԴ
Global ZoneһΪpoolddaemon, ͻԴʱpooldԶͻرԴʱpooldԶʧpooladmǸرԴصʹԴصĻpooladm CeʹԴصƶȡ
bash-3.00# pooladm Ce
poolcfgԴصʹpoolcfg鿴еԴļͨ£һļԴص, һأ/etc/pooladm.confļ
Ĭ£/etc/pooladm.confļDzڵģʹápooladm Cs /etc/pooladm.conf Ժʹápooladm CcȡԴļĬϾǶȡ/etc/pooladm.confļ
bash-3.00# poolcfg -c info /etc/pooladm.conf
ʾ
system bennyluo
string system.comment
int system.version 1
boolean system.bind-default true
int system.poold.pid 341
pool db-pool
int pool.sys_id 1
boolean pool.active true
boolean pool.default false
string pool.scheduler FSS
int pool.importance 1
string pool.comment
pset pset_default
pool pool_default
int pool.sys_id 0
boolean pool.active true
boolean pool.default true
int pool.importance 1
string pool.comment
pset pset_default
ΪһЩͣĽУϵͳԴأֱdb-pool, pool-default
pool.sys_id -- ϵͳԴID
pool.active C ԴصĻ״̬
pool.default C ԴǷΪϵͳĬϵijء
pool.scheduler C Դصĵƶȡ
pool.importance C ԴصҪ
pool.comment C Դصע͡
pset_default C CPUΪĬϵCPU
ôνһCPU飬ԴأҽǰZoneأʵܼҪݻCPUCPU飬ȻCPU䵽ԴٰZone,һIJ蹩ο
4CPUͻϣһCPUĿCPU飬ʹpoolcfg
poolcfg -c 'create pset pset1 (uint pset.max=2)'
poolcfg -c 'modify pset pset1 (uint pset.min=1)'
ﶨΪpset1CPUһCPUCPUȻԴأ
poolcfg -dc 'create pool pool1'
ﶨһΪpool1Դء
Ȼpset1pool1
poolcfg -dc 'associate pool pool1 (pset pset1) '
ǿNon-global ZonezonecfgӦԴء
zonecfg:test-zone> set pool= pool1
ͿCPU飬ԴأZoneķ
ȻǿSolaris 10ProjectȷԴ˵ڴκطͻӦóĽڵZone,һȤĻӦҪǿԳһƪϸⷽݡ
iostatͣԭûУRACEע
tinÿַ
toutÿַ
kpsÿ봫ǧַ
tpsÿ봫IJ
servԺƵĵƽʱ
һ鱨CPUʹʣ
usû״̬ռٷֱ
syϵͳ״̬ռٷֱ
wtȴ״̬ռٷֱ
idʱռٷֱ
usû״̬ռٷֱ
ninicereniceĽ̵ʱռٷֱ
syϵͳ״̬ռٷֱ
idʱռٷֱ
r/sÿĶ
w/sÿд
kr/sÿǧֽ
kw/sÿдǧֽ
wait豸еȴƽĿ
actvڴеƽĿ
svc_tʱ䣨* ָΪһƽʱ䣬Ϊȴڴǰķѵʱ䣩
%wڶеȴʱİٷֱ
%b豸æʱİٷֱ
sar -u(cpu)/w(swap)/b(buffer) 5 10
vmstat 5 10 >>/dir
man vmstat
Reformatting page. Wait... done
Maintenance Commands vmstat(1M)
NAME
vmstat - report virtual memory statistics
SYNOPSIS
vmstat [ -cisS ] [ disks ] [ interval [ count ] ]
DESCRIPTION
vmstat delves into the system and reports certain statistics
kept about process, virtual memory, disk, trap and CPU
activity. Note: vmstat statistics are only supported for
certain devices.
Without options, vmstat displays a one-line summary of the
virtual memory activity since the system was booted. If
interval is specified, vmstat summarizes activity over the
last interval seconds, repeating forever. If a count is
given, the statistics are repeated count times. Note:
interval and count do not apply to the -i and -s options.
If disks are specified, they are given priority when vmstat
chooses which disks to display (only four fit on a line).
Common disk names are id, sd, xd, or xy, followed by a
number, for example, sd2, xd0, and so forth. For more gen-
eral system statistics, use sar(1), iostat(1M), or sar(1M).
See Solaris 1.x to 2.x Transition Guide for device naming
conventions for disks.
OPTIONS
-c Report cache flushing statistics. By default, report
the total number of each kind of cache flushed since
boot time. The types are: user, context, region, seg-
ment, page, and partial-page.
-i Report the number of interrupts per device.
-s Display the total number of various system events since
boot.
-S Report on swapping rather than paging activity. This
option will change two fields in vmstat's ``paging''
display: rather than the ``re'' and ``mf'' fields,
vmstat will report ``si'' (swap-ins) and ``so'' (swap-
outs).
SunOS 5.6 Last change: 3 Apr 1997 1
Maintenance Commands vmstat(1M)
EXAMPLES
The following command displays a summary of what the system
is doing every five seconds.
example% vmstat 5
procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 s1 s2 s3 in sy cs us sy id
0 0 0 11456 4120 1 41 19 1 3 0 2 0 4 0 0 48 112 130 4 14 82
0 0 1 10132 4280 0 4 44 0 0 0 0 0 23 0 0 211 230 144 3 35 62
0 0 1 10132 4616 0 0 20 0 0 0 0 0 19 0 0 150 172 146 3 33 64
0 0 1 10132 5292 0 0 9 0 0 0 0 0 21 0 0 165 105 130 1 21 78
1 1 1 10132 5496 0 0 5 0 0 0 0 0 23 0 0 183 92 134 1 20 79
1 0 1 10132 5564 0 0 25 0 0 0 0 0 18 0 0 131 231 116 4 34 62
1 0 1 10124 5412 0 0 37 0 0 0 0 0 22 0 0 166 179 118 1 33 67
1 0 1 10124 5236 0 0 24 0 0 0 0 0 14 0 0 109 243 113 4 56 39
^C
example%
The fields of vmstat's display are:
procs Report the number of processes in each of the
three following states:
r in run queue
b blocked for resources (I/O, paging, and so
forth)
w runnable but swapped
memory Report on usage of virtual and real memory.
swap amount of swap space currently available
(Kbytes)
free size of the free list (Kbytes)
page Report information about page faults and paging
activity. The information on each of the follow-
ing activities is given in units per second.
re page reclaims - but see the -S option for
how this field is modified.
mf minor faults - but see the -S option for how
this field is modified.
pi kilobytes paged in
po kilobytes paged out
fr kilobytes freed
de anticipated short-term memory shortfall
(Kbytes)
sr pages scanned by clock algorithm
disk Report the number of disk operations per second.
There are slots for up to four disks, labeled with
a single letter and number. The letter indicates
the type of disk (s = SCSI, i = IPI, and so
forth); the number is the logical unit number.
SunOS 5.6 Last change: 3 Apr 1997 2
Maintenance Commands vmstat(1M)
faults Report the trap/interrupt rates (per second).
in (non clock) device interrupts
sy system calls
cs CPU context switches
cpu Give a breakdown of percentage usage of CPU time.
On MP systems, this is an average across all pro-
cessors.
us user time
sy system time
id idle time
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
__________________________________
| ATTRIBUTE TYPE| ATTRIBUTE VALUE|
|__________________________________
| Availability | SUNWcsu |
|_______________|_________________|
SEE ALSO
sar(1), iostat(1M), sar(1M), attributes(5)
Solaris 1.x to 2.x Transition Guide
System Administration Guide
SunOS 5.6 Last change: 3 Apr 1997 3
cat alert_pord.lo
^alert_pord.lo^alert_prod.log
----
FTP on Linux and other Unix systems allows you to pass shell commands to the ftp client by using the pipe symbol '|' as the first character of the file name. With this feature you can send a very large file to a remote host using /dev/zero as input and /dev/null as output.
Example:
ftp> put "|dd if=/dev/zero bs=1M count=100" /dev/null
This command transfers a large file without involving the disk and without having to cache the file in memory. If you use a large file on a disk it might become a bottleneck. In this example, "|dd if=/dev/zero bs=1M count=100" becomes the input file. Since a dd command without the "of=" paramater prints the content of the file to standard output (stdout), the ftp client can read the output and pass it on to the remote file which is /dev/null on the remote host.
rename .aud .aud.log *
ls | xargs - t -i mv {} {}.old/{}.`date+%F-%H:%M:%S`
cmt:xargs reads each item from the ls ouput and executes the mv command. The '-i' option tells xargs to replace '{}' with the name of each item. The '-t' option instructs xargs to print the command before executing it.






