Sie sind auf Seite 1von 702

Advanced Technology Services Group

A ! Sys"em Adminis"ra"ion Class

#us"in $ichard %leis"ein %& '()*$ Sys"ems+'o,er-&+A !+'o,er.A+TS&+(racle da"abase+'rogrammer

December 2010

2010 ATS Group, LLC

Class Syllabus
&onday "hru /riday 0 1230am "o 4230pm 9:30am 0 Class s"ar"s 10:30am 0 14 minu"e morning brea5 10:45am 0 Class resumes 6rom 6irs" brea5 12:00pm 0 %rea5 6or lunch 1:00pm 0 Class resumes 6rom lunch 3:00pm 0 14 minu"e a6"ernoon brea5 3:15pm 0 Class resumes 6rom second brea5 5:30pm 0 Class ends 6or "he day ns"ruc"or2 Justin Richard Bleistein 'hone2 (856) 912 0861 *mail2 !leistein"theats#r$up%c$m

A ! %asic Sys"em Adminis"ra"ion

Ge""ing "o 5no, you7


&$in# ar$und the r$$m: 8 )ha" is your name9 8 )ha" is your curren" posi"ion ,i"h "he company9 8 )ha" is your 6ield o6 "echnical e:per"ise9

A ! %asic Sys"em Adminis"ra"ion

;ni: (vervie,

A ! %asic Sys"em Adminis"ra"ion

;< ! (vervie,
;ni: is an opera"ing sys"em originally developed by a group o6 AT=T %ell lab employees7 " ,as developed in 11>17 0 ?Dennis $i"chie, and @en Thompson ,ere "he main developersA7 The curren" o,ner o6 "he ;< ! "rademar5, is "he (pen Group7 The curren" o,ner o6 "he ;< ! Sys"em - code, ,hich AT=T originally ,ro"e is SC(7 The ;< ! code ,as licensed "o commercial companies such as %&, (racle+Sun, and .e,e"" 'ac5ard, so "hey could crea"e "heir o,n version o6 "he ;< ! opera"ing sys"em7 ;niversi"y o6 Cali6ornia, %er5eley developed "heir o,n versions o6 "he ;< ! opera"ing sys"em called /ree %SD, and <e" %SD7 These are no" as ,idely used as "he commercial, or Linu: li5e opera"ing sys"ems7
A ! %asic Sys"em Adminis"ra"ion 5

;< ! (vervie,
The his"ory o6 ;< ! goes bac5 "o "he 11>0Bs7 &assachuse""s ns"i"u"e o6 Technology ?& TA, AT=T %ell Labs, and General *lec"ric ?G*A developed an e:perimen"al opera"ing sys"em called &ul"ics7 ?&ul"iple:ed n6orma"ion and Compu"ing ServiceA7 AT=T a" some poin" pulled ou" o6 "he &ul"ics proCec"7 Some o6 "he developers con"inued "o ,or5 on i"7 n "he 11D0Bs a proCec" 5no,n as ;nics, ,hich la"er changed "o ;< ! commenced7 The 6irs" version ,as ,ri""en in assembly language, bu" in 11D3 i" ,as re8,ri""en using "he C programming language7

A ! %asic Sys"em Adminis"ra"ion

A ! (vervie,

A ! %asic Sys"em Adminis"ra"ion

'

A ! (vervie,
A ! s"ands 6or Advanced n"erac"ive e!ecu"ive A ! is %&Bs version o6 "he ;< ! opera"ing sys"em7 A !, %&Bs version o6 ;< ! compe"es ,i"h &icroso6" )indo,s server opera"ing sys"ems, and o"her proprie"ary ;< ! opera"ing sys"ems such as, (racleBs Sun Solaris, .e,e"" 'ac5ardBs .'8;!, and Tru>E ;ni:7 A ! is mainly used 6or en"erprise business compu"ing7 The la"es" version o6 A !, is A ! >717 This version ,as made generally available by %& in 200D7 A ! version D71 is curren"ly as o6, 2010, available via "he %& (pen %e"a release program7

A ! %asic Sys"em Adminis"ra"ion

A ! (vervie,
A ! comes ,i"h an L-&, Logical -olume &anager, in"egra"ed in"o "he opera"ing sys"em by de6aul"7 " has 6or years7 A ! suppor"s L'A$S, Logical 'ar"i"ions7 A ! suppor"s bo"h hard,are?L'A$SA and so6",are?)'A$SA vir"ualiFa"ion7 A ! suppor"s ne,es" hard,are o66erings such as 10 gig e"herne" adap"ers, and G gig 6ibre channel adap"ers7 A ! is complian" ,i"h Sys"em - ;ni: sys"em s"andards7 A ! provides advanced sys"em securi"y 6ea"ures, a" many levels7 A ! has advanced diagnos"ic applica"ions 6or hard,are and so6",are errors7

A ! %asic Sys"em Adminis"ra"ion

A ! (vervie,
A ! has a lo" in common ,i"h o"her proprie"ary ;ni: opera"ing sys"ems7 'roprie"ary ;ni: opera"ing sys"ems "ypically di66er ,i"h sysadmin "ools, and vir"ualiFa"ion "echnology7 A ! comes ,i"h a Cournaled 6ilesys"em 0 #/S27 The older version #/S is s"ill shipped ,i"h A !7 #/S2 ,ill allo, mul"i "eraby"e 6iles, and mul"i pe"aby"e 6ilesys"ems7 A ! provides in"egra"ed securi"y audi"ing 6ea"ures, allo,ing you "o audi" sys"em ac"ivi"y a" a very granular level7 A ! provides an in"egra"ed accoun"ing sys"em, so "ha" you can accoun" 6or user, and applica"ion usage o6 resources on "he sys"em7 This is especially use6ul in chargebac5 environmen"s7

A ! %asic Sys"em Adminis"ra"ion

10

A ! (vervie,
%y de6aul" A ! comes ,i"h a so6",are componen" 5no,n as )or5Load &anager 0 )L&7 This so6",are allo,s you "o logically divide a single A ! opera"ing sys"em in"o mul"iple classes by resources 6or applica"ions and users "o run i"7 'o,er.A, 6ormerly 5no,n as .AC&', provides high availabili"y clus"ering 6or A ! sys"ems7 This provides au"oma"ed 6ailover and 6allbac5 con6igura"ions7 This produc" does no" come ,i"h A ! by de6aul"7 Hou mus" purchase a separa"e so6",are license 6rom %&7 %y de6aul" A ! comes ,i"h a sys"em moni"oring "ool 0 $&C, $esource &oni"oring and Con"rol, ,hich can moni"or and reac" "o cer"ain A ! even"s, and "hen e:ecu"e a cer"ain ac"ion based on "ha" even", such as au"oma"ically email "he sysadmin, or some o"her sys"em based ac"ion7

A ! %asic Sys"em Adminis"ra"ion

11

A ! (vervie,
A ! comes ,i"h a bac5up u"ili"y 5no,n as m5sysb 0 &a@e SHS"em %ac5up7 This u"ili"y ,ill allo, you "o crea"e a boo"able sys"em bac5up ,hich you ,ill use 6or sys"em disas"er recovery scenarios7 A ! comes ,i"h ano"her bac5up u"ili"y, called bac5up7 This command allo,s you "o bac5up a" a 6ile, and+or direc"ory level7 The coun"erpar" "o "his command is "he res"ore command, ,hich allo,s you "o res"ore "he 6iles and+or direc"ories you bac5ed up ,i"h "he bac5up command7 A ! comes ,i"h i"Bs o,n so6",are managemen" subsys"em, 6or so6",are7 " can manage so6",are inven"ory 6or bo"h L'' 6orma" so6",are, and $'& 6orma" so6",are7

A ! %asic Sys"em Adminis"ra"ion

12

A ! (vervie,
S"ar"ing in A ! version 471, Linu: a66ini"y is in"egra"ed in"o "he opera"ing sys"em7 &edia comes ,i"h A ! called, Linu: Applica"ions Toolbo: 6or A !7 Con"en"s o6 media are also available 6or 6ree do,nload via "he in"erne" 6rom %&7 This media con"ains %& cer"i6ied Linu: applica"ions compiled "o run on '()*$ sys"ems7 The rpm command, ,hich ins"alls Linu: so6",are is included by de6aul" in A !7 The source code "o "hese applica"ions are also available7 S"ar"ing in A ! version 471, a lo" o6 A ! no, con"ains archi"ec"ure, ,hich is mos" commonly 6ound on Linu: based sys"ems7

A ! %asic Sys"em Adminis"ra"ion

13

A ! overvie,
A ! version release his"ory2 11G> 0 A ! version 170 0 270 11G1 0 A ! version 171 6or "he 'S+2 'C 11G1 0 A ! version 370 6or $ SC+>000 line o6 servers 1112 0 A ! version 372 6or $ SC+>000 line o6 servers 111E 0 A ! version E70 6or $ SC+>000 line o6 servers 1114 0 A ! version E71 6or $ SC+>000 line o6 servers 111> 0 A ! version E72 6or $ SC+>000 line o6 servers 111D 0 A ! version E73 6or $ SC+>000 line o6 servers 1111 0 A ! version E7373 6or $ SC+>000 line o6 servers 2001 0 A ! version 471 6or $ SC+>000 and '()*$ servers 2002 0 A ! version 472 6or '()*$ servers 200E 0 A ! version 473 6or '()*$ servers 200D 0 A ! version >71 6or '()*$ servers 2011 0 A ! version D717 0 T*<TAT -*7
A ! %asic Sys"em Adminis"ra"ion 14

A ! overvie,

A ! %asic Sys"em Adminis"ra"ion

15

A ,ord on Linu:
Linu: is a clone o6 "he ;< ! opera"ing sys"em7 " is "echnically no" considered ;< !7 The 6irs" Linu: 5ernel ,as developed by Linus Trorvalds in 11117 Linu:Bs origins are 6ound in "he & <! opera"ing sys"em proCec" ,hich ,as a minimal ;ni: li5e opera"ing sys"em used 6or educa"ional purposes, e"c7 " ,as released in 11GD7 Linu: ac"ually s"ar"ed because Linus ,as 6rus"ra"ed ,i"h "he licensing o6 "he & < ! opera"ing sys"em7 There are many di66eren" dis"ribu"ions o6 "he Linu: opera"ing sys"em, aimed 6or di66eren" "hings, "he ",o mos" used in "he business compu"ing ,orld ho,ever are2 <ovell Suse Linu: and $ed .a" Linu: used mos"ly in *urope and in "he ;7S7 respec"ively7

A ! %asic Sys"em Adminis"ra"ion

16

%& '()*$ Servers

A ! %asic Sys"em Adminis"ra"ion

1'

%& '()*$ line o6 servers p> 0 420 *:press

A ! %asic Sys"em Adminis"ra"ion

18

%& '()*$ line o6 servers p> 0 440 *:press

A ! %asic Sys"em Adminis"ra"ion

19

%& '()*$ line o6 servers p> 0 4>0 *:press

A ! %asic Sys"em Adminis"ra"ion

20

%& '()*$ line o6 servers p> 8 4D0

A ! %asic Sys"em Adminis"ra"ion

21

%& '()*$ line o6 servers p> 0 414

A ! %asic Sys"em Adminis"ra"ion

22

%& '()*$ Servers

A ! %asic Sys"em Adminis"ra"ion

23

%& '()*$ line o6 servers pD 0 D10 *:press


- Low end class Up to 64 GB of memory/RAM Up to 1 X 3. G!"a#ert$ processors 6 core %&'(R processors )M* and %ower+M capa,!l!t!es &t#er processor opt!ons1 %&'(R 3.. G)$ processors / 4 cores 1 %&'(R 3.00 G)$ processors / 1 cores

A ! %asic Sys"em Adminis"ra"ion

24

%& '()*$ line o6 servers pD 0 D20 *:press


- Low end class Up to 121 GB of memory/RAM Up to 1 X 3.. G!"a#ert$ processors 1 core %&'(R processors )M* and %ower+M capa,!l!t!es &t#er processor opt!ons1 %&'(R 3.. G)$ processors / 4 cores 1 %&'(R 3.. G)$ processors / 6 cores

A ! %asic Sys"em Adminis"ra"ion

25

%& '()*$ line o6 servers pD 0 D30 *:press


- Low end class Up to 121 GB of memory/RAM Up to 2 X 3. G!"a#ert$ processors 1 core %&'(R processors )M* and %ower+M capa,!l!t!es &t#er processor opt!ons2 %&'(R 3.. G)$ processors / 1 cores 2 %&'(R 3. G)$ processors / 12 cores 2 %&'(R 3.00 G)$ processors / 16 cores

A ! %asic Sys"em Adminis"ra"ion

26

%& '()*$ line o6 servers pD 0 DE0 *:press


- Low end class Up to 206 GB of memory/RAM Up to 2 X 3. G!"a#ert$ processors 1 core %&'(R processors )M* and %ower+M capa,!l!t!es &t#er processor opt!ons2 %&'(R 2 %&'(R 2 %&'(R 2 %&'(R 2 %&'(R 2 %&'(R 2 %&'(R 3.3 G)$ processors / 4 cores 3.3 G)$ processors / 1 cores 3. G)$ processors / 4 cores 3. G)$ processors / 6 cores 3. G)$ processors / 12 cores 3.00 G)$ processors / 1 cores 3.00 G)$ processors / 16 cores

A ! %asic Sys"em Adminis"ra"ion

2'

%& '()*$ line o6 servers pD 0 D40 *:press


- Low end class Up to 012 GB of memory/RAM Up to 4 X 3.00 G!"a#ert$ processors 1 core %&'(R processors )M* and %ower+M capa,!l!t!es &t#er processor opt!ons4 %&'(R 3.. G)$ processors / 1 cores 4 %&'(R 3.3 G)$ processors / 6 cores 4 %&'(R 3.3 G)$ processors / 1 cores

A ! %asic Sys"em Adminis"ra"ion

28

%& '()*$ line o6 servers pD 8 DD0


- M!dran"e class - Up to 4 ,3!ld!n" ,loc4s Up to 012 GB of memory/RAM Up to 2 X 3.0 G!"a#ert$ processors 6 core %&'(R processors )M* and %ower+M capa,!l!t!es &t#er processor opt!on2 %&'(R 3.1 G)$ processors 1 cores

A ! %asic Sys"em Adminis"ra"ion

29

%& '()*$ line o6 servers pD 8 DG0


- M!dran"e class - Ma!nframe !nsp!red Up to 012 GB of memory/RAM Up to 2 X 4.1 G!"a#ert$ processors 4 core %&'(R processors )M* and %ower+M capa,!l!t!es &t#er processor opt!on2 %&'(R 3.1 G)$ processors 1 cores

A ! %asic Sys"em Adminis"ra"ion

30

%& '()*$ line o6 servers pD 8 D14


- )!"# end/(nterpr!se class - Ma!nframe !nsp!red - Most powerf3l U56X ser7er Up to 1 8B of memory/RAM Up to 32 X 4 G!"a#ert$ processors 1 core %&'(R processors / 98otal 206 cores: )M* and %ower+M capa,!l!t!es 83r,o opt!on121 %&'(R 4.20 G)$ processors

A ! %asic Sys"em Adminis"ra"ion

31

%& '()*$ %lade Servers

A ! %asic Sys"em Adminis"ra"ion

32

%& '()*$ line o6 servers p> 0 #S12, #S22, #S23, and #SE3

;43

A ! %asic Sys"em Adminis"ra"ion

33

%& '()*$ %lade Servers

A ! %asic Sys"em Adminis"ra"ion

34

%& '()*$ line o6 servers pD 0 'SD00, 'SD01, PS700 Single wide blade. and 'SD02
Up to 64 GB of memory/RAM Up to 1 X 3.. G!"a#ert$ processors 4 core %&'(R processors %ower+M capa,!l!t!es PS701 Single wide blade. Up to 121 GB of memory/RAM Up to 1 X 3.. G!"a#ert$ processors 1 core %&'(R processors %ower+M capa,!l!t!es PS702 Double wide blade. Up to 206 GB of memory/RAM Up to 2 X 3.. G!"a#ert$ processors 16 core %&'(R processors %ower+M capa,!l!t!es

A ! %asic Sys"em Adminis"ra"ion

35

%& '()*$ line o6 servers pD 0 %ladecen"ers

A ! %asic Sys"em Adminis"ra"ion

36

Throughou" %& A ! sys"em his"ory

A ! %asic Sys"em Adminis"ra"ion

3'

Throughou" %& A ! sys"em his"ory


$T 0 A ! version 170 0 270 only7

A ! %asic Sys"em Adminis"ra"ion

38

Throughou" %& A ! sys"em his"ory


320 sys"em

A ! %asic Sys"em Adminis"ra"ion

39

Throughou" %& A ! sys"em his"ory


410

A ! %asic Sys"em Adminis"ra"ion

40

Throughou" %& A ! sys"em his"ory


$S+>000 E3'

A ! %asic Sys"em Adminis"ra"ion

41

Throughou" %& A ! sys"em his"ory


Ano"her E3'

A ! %asic Sys"em Adminis"ra"ion

42

Throughou" %& A ! sys"em his"ory


/40

A ! %asic Sys"em Adminis"ra"ion

43

Throughou" %& A ! sys"em his"ory


E2T

A ! %asic Sys"em Adminis"ra"ion

44

Throughou" %& A ! sys"em his"ory


$S+>000 %40

A ! %asic Sys"em Adminis"ra"ion

45

Throughou" %& A ! sys"em his"ory


.G0

A ! %asic Sys"em Adminis"ra"ion

46

Throughou" %& A ! sys"em his"ory


SG0

A ! %asic Sys"em Adminis"ra"ion

4'

Throughou" %& A ! sys"em his"ory


$S+>000 S'

A ! %asic Sys"em Adminis"ra"ion

48

Throughou" %& A ! sys"em his"ory


&ore $S+>000 S's

A ! %asic Sys"em Adminis"ra"ion

49

(ur Lab
The con6igura"ion o6 "he ATS lab, The nnova"ion Cen"er, ,eBll be using in "his ,ee5Bs class is as 6ollo,s7 T,o '()*$D blades2 'SD007 They have "he 6ollo,ing specs2 8 E %& 'o,er D processors7 8 32 Gigaby"es o6 real memory+$A&7 8 2 ! 300 Gigaby"e in"ernal hard dis5s7

A ! %asic Sys"em Adminis"ra"ion

50

(ur Lab
*ach blade has 13 A ! L'A$S crea"ed on "hem7 A ! version >71 TL > S' 27 )e ,ill be using 4 L'A$s 6rom "he 6irs" blade, %lade I 132 Gvicai:01 Gvicai:02 Gvicai:03 Gvicai:0E Gvicai:04

A ! %asic Sys"em Adminis"ra"ion

51

(ur Lab
)e ,ill be using 2 L'A$s 6rom "he second blade, %lade I 1E2 Gvicai:0> Gvicai:0D 8 The login name is roo", and "here is curren"ly no pass,ord se"7

The ns"ruc"or ,ill no, assign "hem7 *very s"uden" ,ill be assigned "heir o,n L'A$7
A ! %asic Sys"em Adminis"ra"ion 52

(ur Lab
(ur lab ne",or5 is a s"andard, Class C, 6la" ne",or5, on subne" 11271>G72E07 The ' addresses o6 "he L'A$S are lis"ed belo,2 &(icai)01 0 11271>G72E07123 &(icai)02 0 11271>G72E0712E &(icai)03 0 11271>G72E07124 &(icai)04 0 11271>G72E0712> &(icai)05 0 11271>G72E0712D &(icai)06 0 11271>G72E07134 &(icai)0' 0 11271>G72E0713>

A ! %asic Sys"em Adminis"ra"ion

53

(ur Lab
(n your des5"op you should have an applica"ion called, 'u""y7 Go ahead and double8clic5 on i"2

A ! %asic Sys"em Adminis"ra"ion

54

(ur Lab
(nce "he applica"ion s"ar"s "ype in "he ' address o6 your assigned L'A$2

%e sure "ha" J"elne"K is selec"ed, and "hen clic5 J(penK7


A ! %asic Sys"em Adminis"ra"ion 55

(ur Lab
The n"egra"ed -ir"ualiFa"ion &anager, -&, is a ,eb in"er6ace ,hich allo,s you "o manage a physical sys"em ,hich has vir"ual A ! opera"ing sys"ems running on i"7 n "his class ,e ,ill use "his in"er6ace "o gain console access "o our L'A$S7 (pen "he &icroso6" n"erne" *:plorer "o "he 6ollo,ing address2 http:**192%168%240%101 ?/or s"uden"s on L'A$S2 Gvicai:01, "hru Gvicai:04A (r http:**192%168%240%102 ?/or s"uden"s on L'A$S2 Gvicai:0>, and Gvicai:0DA Login 6or bo"h2 padmin 'ass,ord 6or bo"h2 i!mi!m A6"er you open i" minimiFe "he ,indo,, you ,ill need i" in la"er labs7
A ! %asic Sys"em Adminis"ra"ion 56

(ur Lab

A ! %asic Sys"em Adminis"ra"ion

5'

(ur Lab

A ! %asic Sys"em Adminis"ra"ion

58

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

59

ns"alling "he A ! (pera"ing Sys"em


The A ! opera"ing sys"em is shipped 6rom %& "radi"ionally on G CDs, or 2 D-Ds7 )hen you ins"all "he opera"ing sys"em, you are ins"alling ,ha"Bs re6erred "o as "he %(S 0 %ase (pera"ing Sys"em7 (n mos" sys"ems "he opera"ing sys"em ins"alla"ion ,ill "a5e abou" LE4 minu"es "o L1 hour "o comple"e7 The A ! %ase (pera"ing Sys"em reMuires L412 &% o6 memory+$A&, and L4 G% o6 dis5 space7 <(T*2 ns"alla"ion o6 "he opera"ing sys"em ,ill no" be done in class as a lab, in "he in"eres" o6 "ime7
A ! %asic Sys"em Adminis"ra"ion 60

ns"alling "he A ! (pera"ing Sys"em


There are "hree "ypes o6 A ! %(S ins"alla"ions7

8 <e, and Comple"e (ver,ri"e 8 &igra"ion 8 'reserva"ion

A ! %asic Sys"em Adminis"ra"ion

61

ns"alling "he A ! (pera"ing Sys"em


%(S ins"alla"ions can be accomplished ,i"h "he 6ollo,ing me"hods7 8 <e, ins"all 6rom "he D-D media 6rom %&7 8 ns"all over "he ne",or5 ,i"h < & 0 <e",or5 ns"alla"ion &anager7 8 $ecovery o6 a boo"able sys"em bac5up 0 ?Tape, CD, D-D, or < &A7 8 /rom an S( 6ile 0 - (7 8 Al"Ndis5Nins"all me"hod+cloning7

A ! %asic Sys"em Adminis"ra"ion

62

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

63

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

64

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

65

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

66

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

6'

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

68

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

69

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

'0

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

'1

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

'2

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

'3

ns"alling "he A ! (pera"ing Sys"em

A ! %asic Sys"em Adminis"ra"ion

'4

Logging in"o "he Sys"em

A ! %asic Sys"em Adminis"ra"ion

'5

.igh level Componen"s o6 a ;ni: sys"em

A ! %asic Sys"em Adminis"ra"ion

'6

A ! 0 Logging in"o "he sys"em

A ! %asic Sys"em Adminis"ra"ion

''

A ! 0 Logging in"o "he sys"em


A6"er "he sys"em boo"s, or any"ime you connec" "o "he sys"em you ,ill be presen"ed ,i"h a login screen ,hich is 5no,n as "he herald message7 This is promp"ing you 6or a login name ,hich ,ill iden"i6y you as a valid user "o "he sys"em7
A ! -ersion > Copyrigh" %& Corpora"ion, 11G2, 20017 login2

%y A ! %(S ins"alla"ion de6aul" "he only user ,hich is available "o log in"o is "he user Jroo"K7 $oo" is "he adminis"ra"or o6 "he sys"em7 "Bs "he mos" po,er6ul user8id on "he sys"em7 <o"e2 A synonym 6or roo" is Super user7
A ! %asic Sys"em Adminis"ra"ion '8

A ! 0 Logging in"o "he sys"em


%y ins"alla"ion de6aul", ,hen you login as "he roo" user, you are no" promp"ed 6or a pass,ord7 The pass,ord is no" se" 6or "he roo" user by de6aul"7
A ! -ersion > Copyrigh" %& Corpora"ion, 11G2, 20017 login2 r$$t
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO O O O O O )elcome "o A ! -ersion >71P O O O O O O 'lease see "he $*AD&* 6ile in +usr+lpp+bos 6or in6orma"ion per"inen" "o O O "his release o6 "he A ! (pera"ing Sys"em7 O O O O O OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO I

A ! %asic Sys"em Adminis"ra"ion

'9

A ! 0 Logging in"o "he sys"em


A6"er success6ully iden"i6ying yoursel6 "o "he sys"em, and logging in you ,ill be presen"ed ,i"h a message 5no,n as "he &essage (6 The Day ?&(TDA7 A6"er "ha" message you ,ill see "he symbol I, pound sign7 This is "he @orn shell promp" ,hich indica"es "ha" "he sys"em is no, ready 6or you "o communica"e ,i"h i"7 "Bs ,ai"ing 6or a command7 The I, pound sign, is "he promp" 6or "he roo" user7
A ! -ersion > Copyrigh" %& Corpora"ion, 11G2, 20017 login2 r$$t OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO O O O O O )elcome "o A ! -ersion >71P O O O O O O 'lease see "he $*AD&* 6ile in +usr+lpp+bos 6or in6orma"ion per"inen" "o O O "his release o6 "he A ! (pera"ing Sys"em7 O O O O O OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO I

A ! %asic Sys"em Adminis"ra"ion

80

A ! 0 Logging in"o "he sys"em


A shell is ho, "he user+you communica"es ,i"h "he opera"ing sys"em7 Thin5 o6 i" as a "e:" version o6 "he )indo,s Des5"op7 There are many shells available 6or ;ni: sys"ems7 They are lis"ed belo,2 8 8 8 8 8 +sh Q @orn Shell ?De6aul" shell 6or A !A7 Bsh Q %ourne Shell Bash Q %ourne Again Shell ,sh Q C8shell -sh Q Trus"ed shell

*TCR The @orn shell is "he de6aul" in A !7 )hen you ins"all "he sys"em, and crea"e regular users, "hey ,ill be placed in"o "he @orn shell in "heir home direc"ory au"oma"ically ,hen "hey log in"o "he sys"em7
A ! %asic Sys"em Adminis"ra"ion 81

A ! 0 Logging in"o "he sys"em


A user communica"es ,i"h a ;ni: sys"em ,i"h commands, ,hich are submi""ed "o "he sys"em via a shell7 A command e:ecu"es ,i"hin a shell environmen"7 A command is a program+e:ecu"able ,hich is used "o accomplish "as5s on a ;ni: sys"em7 A command obeys rules 5no,n as syn"a:, ho, "he command is "o be en"ered7 A command consis"s o6 "he 6ollo,ing componen"s2 17 'rogram 27 (p"ions 37 Argumen"s

A ! %asic Sys"em Adminis"ra"ion

82

A ! 0 Logging in"o "he sys"em


*: o6 a command2
I ls l *h$me

ls Q Command+program .l Q (p"ion *h$me Q Argumen"

A ! %asic Sys"em Adminis"ra"ion

83

A ! 0 Logging in"o "he sys"em


The id command ,ill display "he user you are logged in"o "he sys"em as7 <o"ice ho, roo" is ; D, ;ser D2 07 This is "he numeric user8id "ha" "he sys"em in"ernally uses "o iden"i6y you7 ; D 0, means "he roo" user, or a user ,i"h roo" privilege7
I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I

To se" "he pass,ord o6 "he roo" user, or any user 6or "ha" ma""er use "he pass,d command7
I pass/d Changing pass,ord 6or Sroo"S roo"Ts <e, pass,ord2 *n"er "he ne, pass,ord again2 I

The pass,ord ,ill no" be visible as you are en"ering i"7 Hou ,ill have "o con6irm i", once i"Bs "yped in7 The sys"em does "his "o preven" "ypos, and 6or securi"y reasons7
A ! %asic Sys"em Adminis"ra"ion 84

A ! 0 Logging in"o "he sys"em


To e:i" "he @orn shell, "ype in "he command Je:i"K7 (nce you do "ha" you ,ill be disconnec"ed 6rom "he sys"em7
I e)it

Connec"ion closed 0 ?'u""y closesA7 (pen ano"her connec"ion "o "he sys"em, and login as "he roo" user again2
A ! -ersion > Copyrigh" %& Corpora"ion, 11G2, 200D7 login2 r$$t roo"Ts 'ass,ord2 O&(TD S D S'LAH*D, T.*< @($< S.*LL '$(&'TO

<o"ice "ha" "he sys"em no, promp"s you 6or a pass,ord because you se" i" 6or "he roo" user7
A ! %asic Sys"em Adminis"ra"ion 85

A ! 0 Logging in"o "he sys"em


<o"ice ho, "he pass,ord ,as no" visible ,hen you en"ered i"7 This is done 6or securi"y reasons7 6 you en"er "he ,rong pass,ord, A ! ,ill no" "ell you ,hich one, user id, or pass,ord ,as invalid, i" ,ill "ell you "ha" one o6 "hem is incorrec"7 This is done 6or securi"y reasons7
A ! -ersion > Copyrigh" %& Corpora"ion, 11G2, 200D7 login2 r$$t roo"Ts 'ass,ord2 Hou en"ered an invalid login name or pass,ord7 login2

A ! %asic Sys"em Adminis"ra"ion

86

n"erac"ing ,i"h ;ni:

A ! %asic Sys"em Adminis"ra"ion

8'

n"erac"ing ,i"h ;ni:


"Bs very impera"ive "o unders"and "ha" ;ni: is case sensi"ive7 Tha" means "ha" Cus" abou" every"hing is lo,er case7
I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA

<o" "he same as "yping2


I 01 5sh2 D2 no" 6ound I

A ! %asic Sys"em Adminis"ra"ion

88

n"erac"ing ,i"h ;ni:


Hou can see "he curren" mon"hBs calendar ,i"h "he 6ollo,ing command2

I cal Sep"ember 2001 Sun &on Tue )ed Thu /ri Sa" 1 2 3 E 4 > D G 1 10 11 12 13 1E 14 1> 1D 1G 11 20 21 22 23 2E 24 2> 2D 2G 21 30 I

A ! %asic Sys"em Adminis"ra"ion

89

n"erac"ing ,i"h ;ni:


Hou can see "he ,hole year calendar by 6eeding "he command "he year7 <o"e, doesnB" have "o be "he curren" year7
I cal 2009 2001 #anuary /ebruary Sun &on Tue )ed Thu /ri Sa" Sun &on Tue )ed Thu /ri Sa" 1 2 3 1 2 3 E 4 > D E 4 > D G 1 10 G 1 10 11 12 13 1E 11 12 13 1E 14 1> 1D 14 1> 1D 1G 11 20 21 1G 11 20 21 22 23 2E 22 23 2E 24 2> 2D 2G 24 2> 2D 2G 21 30 31 &arch April Sun &on Tue )ed Thu /ri Sa" Sun &on Tue )ed Thu /ri Sa" 1 2 3 E 4 > D 1 2 3 E G 1 10 11 12 13 1E 4 > D G 1 10 11 14 1> 1D 1G 11 20 21 12 13 1E 14 1> 1D 1G 22 23 2E 24 2> 2D 2G 11 20 21 22 23 2E 24 21 30 31 2> 2D 2G 21 30

A ! %asic Sys"em Adminis"ra"ion

90

n"erac"ing ,i"h ;ni:


Hou can also speci6y a speci6ic mon"h o6 a year7
I cal 8 2010 Augus" 2010 Sun &on Tue )ed Thu /ri Sa" 1 2 3 E 4 > D G 1 10 11 12 13 1E 14 1> 1D 1G 11 20 21 22 23 2E 24 2> 2D 2G 21 30 31 I cal 10 2010 (c"ober 2010 Sun &on Tue )ed Thu /ri Sa" 1 2 3 E 4 > D G 1 10 11 12 13 1E 14 1> 1D 1G 11 20 21 22 23 2E 24 2> 2D 2G 21 30 31

A ! %asic Sys"em Adminis"ra"ion

91

n"erac"ing ,i"h ;ni:


Le"Bs say you ,an"ed "o 5no, "he curren" da"e, and "ime7 ;se "he ;ni: da"e command

I date /ri Sep E 1424D21G *DT 2001 I

*ven "hough you Cus" "yped in "he da"e command, you ,ill also ge" "he curren" "ime as ,ell7 <o"e "ha" "ime is mili"ary by de6au" in ;ni:7

A ! %asic Sys"em Adminis"ra"ion

92

n"erac"ing ,i"h ;ni:


;ni: also has a buil" in calcula"or7 "Bs called bc 6or %asic Calcula"or7
I !c 422 > 53' 34 '.2 4 100 * 50 2 4uit I

<o"e, even "hough bc s"ands 6or basic calcula"or, i" does have "he capabili"y o6 doing more comple: calcula"ions o"her "han Cus" ari"hme"ic, as sho,n above7
A ! %asic Sys"em Adminis"ra"ion 93

n"erac"ing ,i"h ;ni:


;ni: comes ,i"h a "e:" edi"or called vi7 This s"ands 6or - sual edi"or7 Hou can use "his edi"or "o crea"e ne, "e:" 6iles, or edi" e:is"ing ones7 <o"e2 There are o"her "e:" edi"ors ,hich are available in ;ni: such as ed, emacs, e"c7 .o,ever, vi is more ,idely used7
I (i *5ile L L L L L L L L L L J+6ileK U<e, 6ileV 17 (nce in "he edi"or "ype in a "o en"er inpu" mode7 27 S"ar" en"ering "e:", e: 0 JThis is "he bes" ;ni: class have ever been "o7 W*<T*$X W*<T*$X ,ould recommend i" "o anyone7K 37 <o, hi" "he *scape 5ey "o ge" ou" o6 inpu" mode, and "o en"er command mode7 E7 Type in "he colon, and "ype in ,M 0 ? , Q ,ri"e?saveA M Q Mui" vi A7

A ! %asic Sys"em Adminis"ra"ion

94

n"erac"ing ,i"h ;ni:


Shor" - re6erence 0 J&oving aroundK 67, 2 ) Q Dele"es a single charac"er 67, 2 Q &ove do,n a line7 67, 2 8 Q &ove up a line7 67, 2 l Q &ove righ" one space7 67, 2 h Q &ove le6" one space7

<o"e2 (n mos" "erminals "oday, you can move around ,i"h "he normal 5eyboard arro,s7

A ! %asic Sys"em Adminis"ra"ion

95

n"erac"ing ,i"h ;ni:


To vie, "he con"en"s o6 "he 6ile you Cus" crea"ed ,i"h "he vi "e:" edi"or, or any 6ile on "he sys"em 6or "ha" ma""er, use "he ca" command, ,hich is shor" 6or ConcATena"e7 This means conca"ena"e "he by"es on dis57

I cat *5ile This is "he bes" ;ni: class have ever been "o7 ,ould recommend i" "o anyone7 I

A ! %asic Sys"em Adminis"ra"ion

96

n"erac"ing ,i"h ;ni:


Hou can vie, "he 6irs" < lines o6 a 6ile ,i"h "he head command7

I head .1 5ile This is "he bes" ;ni: class have ever been "o7 I

%y de6aul" "he head command ,ill sho, you "he 6irs" "en lines o6 a 6ile7

A ! %asic Sys"em Adminis"ra"ion

9'

n"erac"ing ,i"h ;ni:


Hou can vie, "he las" < lines o6 a 6ile ,i"h "he "ail command7
I tail .2 5ile ,ould recommend i" "o anyone7 Y

%y de6aul" "he "ail command ,ill sho, you "he las" "en lines o6 a 6ile7 <o"e2 There is also a "ail 06, ,hich provides s"reaming ou"pu" o6 "he las" line o6 a 6ile7
A ! %asic Sys"em Adminis"ra"ion 98

n"erac"ing ,i"h ;ni:


Hou can lis" "he con"en"s o6 a 6ile ,i"h all o6 "he lines in "he 6ile numbered ,i"h "he ca" command ,i"h "he 0n argumen"7
I cat .n *5ile 1 This is "he bes" ;ni: class have ever been "o7 2 3 ,ould recommend i" "o anyone7 I

A ! %asic Sys"em Adminis"ra"ion

99

n"erac"ing ,i"h ;ni:


6 you ,an"ed "o coun" "he number o6 lines, ,ords, or charac"ers o6 a 6ile, "hen you can use "he ,c command, ,hich s"ands 6or )ord Coun", bu" i" coun"s "he abovemen"ioned en"i"ies o6 a 6ile as ,ell7
I cat *5ile This is "he bes" ;ni: class have ever been "o7 ,ould recommend i" "o anyone7 I /c .c *5ile G2 +6ile I /c ./ *5ile 1D +6ile I /c .l *5ile 3 +6ile I

A ! %asic Sys"em Adminis"ra"ion

100

n"erac"ing ,i"h ;ni:


Hou can use "he cu" command "o display cer"ain por"ions o6 a 6ile, or o"her ou"pu" ou"7
I cat *5ile This is "he bes" ;ni: class have ever been "o7 ,ould recommend i" "o anyone7 I cut .c1.3 5ile Thi , I cut .c195 5ile T u I

A ! %asic Sys"em Adminis"ra"ion

101

n"erac"ing ,i"h ;ni:


The command grep, ,ill search 6or a speci6ic s"ring in a 6ile, or o"her ou"pu", and ,ill display "he line i" 6ound "ha" s"ring on7
I cat *5ile This is "he bes" ;ni: class have ever been "o7 ,ould recommend i" "o anyone7 I I #rep /$uld *5ile ,ould recommend i" "o anyone7 I I #rep is *5ile This is "he bes" ;ni: class have ever been "o7 I

A ! %asic Sys"em Adminis"ra"ion

102

n"erac"ing ,i"h ;ni:


The banner command can be very use6ul7 "Bs a ,ay o6 displaying s"rings, ,hich are impera"ive "o your users7 A good e:ample o6 "his may be "he ,ord '$(D;CT (<7 Hou ,ould de6ini"ely ,an" your users "o 5no, "hey are on a produc"ion sys"em
# banner production ##### # # # # # # # ##### # # ## # # # ##### # # # # #### # # # # # # # # ##### # # # # # # # # # # # # # # # # # # #### # # # # # # ##### # # # # # # # # # # # #### # # # # # # # # # ## # # # # # #

##### # # # #

####

#####

####

####

####

A ! %asic Sys"em Adminis"ra"ion

103

n"erac"ing ,i"h ;ni:


;ni: has online help available7 This is "he eMuivalen" o6 pressing W/1X on a )indo,s sys"em7 The command is man, ,hich is shor" 6or &A<ual, as in manual pages7
I man id Commands $e6erence, -olume 3, i 8 m id Command 'urpose Displays "he sys"em iden"i6ica"ions o6 a speci6ied user7 Syn"a: id UuserV id 8G U8n V U;serV id 8g U8n l Z U 8n r V U;serV id 8u U8n l Z U 8n r V U;serV Descrip"ion The id command ,ri"es "o s"andard ou"pu" a message con"aining "he sys"em iden"i6ica"ions ? DA 6or a speci6ied user7 The sys"em Ds are numbers ,hich iden"i6y users and user groups "o "he sys"em7 The id command ,ri"es "he 6ollo,ing in6orma"ion, ,hen applicable2 O ;ser name and real user D R

A ! %asic Sys"em Adminis"ra"ion

104

n"erac"ing ,i"h ;ni:


There is a special symbol called a pipe7 The symbol is Z, "he ver"ical bar7 "Bs loca"ed righ" above "he W*<T*$X 5ey, on "he s"andard American compu"er 5eyboard7
I date /ri Sep E 2023E211 *DT 2001 I cut ;sage2 cu" [8b Wlis"X U8nV Z 8c Wlis"X Z 86 Wlis"X U8d WcharXV U8sV\ 6ile 777 I

<o"e, "he ;ni: cu" command doesnB" do much ,i"hou" "his pipe symbol, or 6eeding a 6ile "o i"7 Le"Bs say you ,an"ed only "o display "he 6irs" "hree charac"ers o6 "he da"e command ou"pu"7 Hou ,ould have "o use "he cu" command "o accomplish "his7 Le"Bs say you ,an"ed "o accomplish "his ,i"h one command7 )ha" you can do is e:ecu"e "he da"e command, "hen "ie i" "o "he cu" command ,i"h a ;ni: pipe7
I date /ri Sep E 2023>2EG *DT 2001 I date : cut .c1.3 /ri I

A ! %asic Sys"em Adminis"ra"ion

105

n"erac"ing ,i"h ;ni:


)ha" happened ,i"h "he pipe in "he previous e:ample, is i" "oo5 "he ou"pu" o6 "he da"e command, as i"Bs inpu"7 .ere are some more e:amples2
I /h$ roo" p"s+0 Sep E 20211 ?11271>G72207GA

I /h$ : /c .l 1 I /h$ : /c .c 4G I /h$ : /c ./ > I

A ! %asic Sys"em Adminis"ra"ion

106

n"erac"ing ,i"h ;ni:


Le"Bs say you issued "he command2 pr"con6, "he command ,hich lis"s "he hard,are con6igura"ion o6 "he server , bu" "he ou"pu" is "oo long 6or you "o read "he en"ire "hing7 " scrolls o66 o6 "he screen "oo Muic5ly7 ;nless you can read a" "he speed o6 ligh", "his ,onB" do you much good7
I prtc$n5 Sys"em &odel2 %&,111D8&&A &achine Serial <umber2 1011G/0 'rocessor Type2 'o,er'CN'()*$> <umber (6 'rocessors2 G 'rocessor Cloc5 Speed2 340E &.F C'; Type2 >E8bi" @ernel Type2 >E8bi" L'A$ n6o2 4 gvicai:1E &emory SiFe2 20EG &% Good &emory SiFe2 20EG &% 'la"6orm /irm,are level2 <o" Available /irm,are -ersion2 %&,*&3E0N0E1 Console Login2 enable Au"o $es"ar"2 "rue

T.* $*&A <D*$ (/ T.* (;T';T SC$(LLS (// (/ T.* SC$**<7


R

A ! %asic Sys"em Adminis"ra"ion

10'

n"erac"ing ,i"h ;ni:


There are ",o ,ha" "hey call pager commands you can use ,hich ,ill preclude long ou"pu"s such as "his one 6rom scrolling o66 o6 "he screen be6ore you had a chance "o read i"7 (ne command is more, and "he o"her command is pg, ,hich is shor" 6or 'aGer7
I prtc$n5 : m$re Sys"em &odel2 %&,111D8&&A &achine Serial <umber2 1011G/0 'rocessor Type2 'o,er'CN'()*$> <umber (6 'rocessors2 G 'rocessor Cloc5 Speed2 340E &.F C'; Type2 >E8bi" @ernel Type2 >E8bi" L'A$ n6o2 4 gvicai:1E &emory SiFe2 20EG &% Good &emory SiFe2 20EG &% 'la"6orm /irm,are level2 <o" Available /irm,are -ersion2 %&,*&3E0N0E1 Console Login2 enable Au"o $es"ar"2 "rue /ull Core2 6alse (;T';T 'A;S*S ).*< T / TS T.* SC$**<, ;<T L H(; . T T.* W*<T*$X @*H T( C(<T <;* T( T.* <*!T 'AG*7

A ! %asic Sys"em Adminis"ra"ion

108

n"erac"ing ,i"h ;ni:


I prtc$n5 : p# Sys"em &odel2 %&,111D8&&A &achine Serial <umber2 1011G/0 'rocessor Type2 'o,er'CN'()*$> <umber (6 'rocessors2 G 'rocessor Cloc5 Speed2 340E &.F C'; Type2 >E8bi" @ernel Type2 >E8bi" L'A$ n6o2 4 gvicai:1E &emory SiFe2 20EG &% Good &emory SiFe2 20EG &% 'la"6orm /irm,are level2 <o" Available /irm,are -ersion2 %&,*&3E0N0E1 Console Login2 enable Au"o $es"ar"2 "rue /ull Core2 6alse <e",or5 n6orma"ion .os" <ame2 gvicai:1E ' Address2 11271>G72E0713D Sub <e"mas52 2447244724470 Ga"e,ay2 11271>G72E071 <ame Server2 Domain <ame2

6 you use a ], or a 0 here i" ,ill allo, you "o move 6or,ard, or bac5 by one page respec"ively7
A ! %asic Sys"em Adminis"ra"ion 109

n"erac"ing ,i"h ;ni:


-ariables are used "o s"ore o"her values7 They are mos" use6ul in programming languages7

I e)p$rt ;<=>6? ustin I ech$ @;<=>6 Cus"in I

<o"e, variables are no" discussed in dep"h in "his course7 They ,ould be discussed in more de"ail in a ;ni: shell scrip"ing+programming course7
A ! %asic Sys"em Adminis"ra"ion 110

n"erac"ing ,i"h ;ni:


There are some pre8de6ined variables ,hich come se" ,i"h "he shell7 These are some"imes re6erred "o as sys"em variables7
I set A;T.STAT*Qcompa" *D T($Q+usr+bin+vi *$$<(Q0 /C*D TQ+usr+bin+ed /<A&*QCus"in .(&*Q+ /SQT T LA<GQC LCNN/AST&SGQ"rue L <*<(Q1 L(C'AT.Q+usr+lib+nls+loc L(G <Qroo" L(G<A&*Qroo" &A LQ+usr+spool+mail+roo" &A LC.*C@Q>00 &A L&SGQTUH(; .A-* <*) &A LVT <LS'AT.Q+usr+lib+nls+msg+^L+^<2+usr+lib+nls+msg+^L+^<7ca" (D&D $Q+e"c+obCrepos ('T <DQ1 'AT.Q+usr+bin2+e"c2+usr+sbin2+usr+ucb2+usr+bin+!112+sbin2+usr+Cava1E+Cre+bin2+us r+Cava1E+bin '' DQ30DE22 'S1QTI T 'S2QTX T 'S3QTI9 T

A ! %asic Sys"em Adminis"ra"ion

111

n"erac"ing ,i"h ;ni:


(ne "hing you can do ,i"h "he pre8de6ined shell variables is change "he 5orn shell roo" promp", 6rom "he de6aul" I, "o uni:X7
I ech$ @A71 I I e)p$rt A71?Buni)C B uni:X uni:X uni:X uni:X

Log ou" o6 "he sys"em via "he e:i" command, and "hen login as roo" again, by opening ano"her 'u""y session7 Hou ,ill no"ice "ha" "he promp" rese" i"sel6 bac5 "o ,ha" i" ,as originally7 This behaivor is discussed ,i"h more de"ail in "he ;ser &anagemen" sec"ion7

A ! %asic Sys"em Adminis"ra"ion

112

<aviga"ing around "he sys"em

A ! %asic Sys"em Adminis"ra"ion

113

A ! 0 <aviga"ing around "he sys"em


;< !+A ! has a 6iling sys"em ,hich i" uses "o organiFe "he da"a ,hich is s"ored on "he sys"emBs .DD7 This organiFed sys"em is 5no,n as a 6ile "ree hierarchy7 /iles are used "o s"ore da"a+in6orma"ion7 /iles can ei"her have human readable "e:" in "hem, li5e an email message, or i" can have machine readable binary code, li5e a compiled program+e:ecu"able7 /iles are 5ep" in direc"ories7 Direc"ories are a ,ay o6 organiFing 6iles7 Thin5 o6 direc"ories as 6iling cabine"s, 6or your 6iles7 Direc"ories are eMuivalen" "o 6olders in "he )indo,s ,orld7 Direc"ories can con"ain direc"ories as ,ell as 6iles7 The direc"ories ,hich reside in ano"her direc"ory is called "he sub8direc"ory7 /iles are a collec"ion o6 by"es logically grouped "oge"her and s"ored in an obCec" 0 a 6ile7
A ! %asic Sys"em Adminis"ra"ion 114

A ! 8 <aviga"ing around "he sys"em


Direc"ory s"ruc"ure e:ample

A ! %asic Sys"em Adminis"ra"ion

115

A ! 0 <aviga"ing around "he sys"em


Type in "he command2 Jp,dK
I p/d + I

This command s"ands 6or 'resen" )or5ing Direc"ory7 This ,ill "ell you ,here e:ac"ly on "he direc"ory hierarchy+"ree you curren"ly are7 <o"ice ho, you are in J+K7 This means you are a" "he "op o6 "he direc"ory "ree7 This is roo"Bs home direc"ory7 <ormally ,hen you crea"e a regular user "he de6aul" home direc"ory ,ill be +home+userNname7 Since "his is "he roo" user, +, is "he home direc"ory7 &ore de"ails on user home direc"ories in "he ;ser &anagemen" sec"ion7
A ! %asic Sys"em Adminis"ra"ion 116

A ! 0 <aviga"ing around "he sys"em


To lis" all o6 "he direc"ories, and 6iles in your curren" direc"ory "ype in "he JlsK command7 This is shor" 6or LiS"7
# ls .sh_history .vi_history admin audit bin bosinst.data # dev esa etc home image.data lib lost+found lpp mnt opt pconsole proc sbin smit.log smit.script smit.transaction tftpboot tmp u unix usr var

This is "he roo" direc"ory lis"ing ,hich is de6aul" a6"er %(S ins"alla"ion7
A ! %asic Sys"em Adminis"ra"ion 11'

<aviga"ing around "he sys"em


To de"ermine ,hich obCec" is a 6ile, and ,hich one is a direc"ory issue "he ls command ,i"h "he 0/ argumen"7 <o"e, argumen"s are charac"ers a6"er "he command ,hich ins"ruc" "he command "o behave in a cer"ain ,ay7
I ls .; 7rhos"s 7shNhis"ory 7viNhis"ory admin+ I audi"+ dev+ bin_ esa+ bosins"7da"a e"c+ core home+ image7da"a m5sysb+ lib_ mn"+ los"]6ound+ op"+ lpp+ pconsole+ proc+ smi"7"ransac"ion uni:_ sbin+ "6"pboo"+ usr+ smi"7log "mp+ var+ smi"7scrip" u_

This command added + a" "he end o6 "he obCec"s ,hich are direc"ories7 <o"e, "his command also sho,s "he _ symbol a" "he end o6 cer"ain direc"ories7 This means "hese are lin5s7 Lin5s mean "ha" "he direc"ory, or 6ile ac"ually re6ers "o ano"her 6ile, or direc"ory7

A ! %asic Sys"em Adminis"ra"ion

118

<aviga"ing around "he sys"em


Long lis"ing o6 a direc"ory7
I ls .l "o"al 13>G 8r,8r88r88 1 roo" sys"em 1G <ov 2E 2122E 7rhos"s 8r,8888888 1 roo" sys"em GGG> <ov 2D 112E> 7shNhis"ory 8r,8888888 1 roo" sys"em 1E4 <ov 2D 1G221 7viNhis"ory dr,:r8:r8: E roo" sys"em 24> <ov 2E 21211 admin dr,:r8:888 2 roo" audi" 24> Apr 14 2010 audi" lr,:r,:r,: 1 bin bin G <ov 2E 21222 bin 8X +usr+bin 8r,8r88r88 1 roo" sys"em >0GE <ov 2E 11241 bosins"7da"a 8r,8888888 1 roo" sys"em D1GG <ov 2> 12231 core dr,:r,:r8: 4 roo" sys"em E01> <ov 2D 11232 dev dr,:r8:r8: 1> esaadmin sys"em E01> <ov 2E 1123D esa dr,:r8:r8: 3E roo" sys"em 122GG <ov 2> 13240 e"c dr,:r8:r8: 4 bin bin 24> <ov 2E 21211 home 8r,8r88r88 1 roo" sys"em 111>0 <ov 2E 11241 image7da"a lr,:r,:r,: 1 bin bin G <ov 2E 21222 lib 8X +usr+lib dr,:888888 2 roo" sys"em 24> <ov 2E 2121D los"]6ound dr,:r8:r8: 1>3 bin bin G112 <ov 2E 2122E lpp dr,:r8:r8: 3 roo" sys"em 24> <ov 2E 2121D m5sysb dr,:r8:r8: 2 bin bin 24> Apr 14 2010 mn" dr,:r8:r8: 1D roo" sys"em E01> <ov 2E 21211 op" dr,:r8:r8: E pconsole pconsole 24> <ov 2E 1D2ED pconsole dr8:r8:r8: 1 roo" sys"em 0 <ov 2D 112E> proc dr,:r8:r8: 3 bin bin 24> <ov 2E 1D2E3 sbin 8r,8r88r88 1 roo" sys"em 4>G404 <ov 2> 10201 smi"7log 8r,8r88r88 1 roo" sys"em 1E01E <ov 2> 01241 smi"7scrip" 8r,8r88r88 1 roo" sys"em 1D041 <ov 2> 01241 smi"7"ransac"ion dr,:r,:r8: 2 roo" sys"em 24> <ov 2E 1E231 "6"pboo" dr,:r,:r," 13 bin bin E01> <ov 2D 112E4 "mp lr,:r,:r,: 1 bin bin 4 <ov 2E 21222 u 8X +home lr,:r,:r,: 1 roo" sys"em 21 <ov 2E 21222 uni: 8X +usr+lib+boo"+uni:N>E I

A ! %asic Sys"em Adminis"ra"ion

119

<aviga"ing around "he sys"em


)ha" "he obCec"s in + are used 6or2
admin 0 Direc"ory 6or admin "emp 6iles7 audit 0 Direc"ory 6or "he user audi" logs7 6 A ! audi"ing is enabled, ,hich i" is no" by de6aul"7 !in 0 Direc"ory ,here "he commands you e:ecu"e, such as ls, and p,d are 5ep"7 de( 0 Direc"ory ,hich represen"s all devices on a sys"em7 $emember every"hing on a ;ni: sys"em is a 6ile, and is con"rolled "hrough a 6ile7 etc 0 Direc"ory ,here con6igura"ion 6iles 6or "he opera"ing sys"em, and i"Bs componen"s live7 h$me 0 Direc"ory ,here all o6 "he regular userBs de6aul" home direc"ories live7 li! 0 Direc"ory ,here "he C libraries 6or "he ;ni: opera"ing sys"em live7 l$st25$und 0 This direc"ory is crea"ed by de6aul" in every 6ilesys"em 0 < D*'T. LAT*$7 lpp 0 This direc"ory is ,here "he in6orma"ion abou" "he so6",are ins"alled on "he sys"em lives7 mnt 0 This is an emp"y direc"ory ,hich gives you a place "o "emporarily moun" 6ilesys"ems, i6 you donB" ,an" "o crea"e direc"ories7 $pt 0 Direc"ory ,here Linu: so6,are is ins"alled 6or A !7 pc$ns$le 0 Direc"ory 6or some graphic 6unc"ionali"y7 pr$c 0 Direc"ory ,here curren"ly running process in6orma"ion lives7 s!in 0 Direc"ory ,here sysadmin commands live 6or A !7 t5tp!$$t 0 Direc"ory used "o s"ore boo" images, 6or sys"ems ,ho ,an" "o boo" o66 o6 "he ne",or57 tmp 0 Temporary area 6or every user "o ,ri"e "o7 #;<@7 u 0 This is 6or bac5,ard compa"ibili"y7 This is ,here "he userBs home direc"ories used "o live7 uni) 0 This direc"ory is ,here "he sys"em 5ernel lives7 usr 0 This direc"ory is ,here %&, and %& complian" so6",are is ins"alled7 " also holds impera"ive sys"em da"a7 (ar 0 This direc"ory is ,here "he sys"em s"ores log 6iles 6rom "he opera"ing sys"em, and i"Bs componen"s7

A ! %asic Sys"em Adminis"ra"ion

120

<aviga"ing around "he sys"em


Le"Bs move "o "he +"mp direc"ory7 Hou change direc"ories in ;ni: ,i"h "he cd command, and "he name o6 "he direc"ory as "he argumen"7 CD s"ands 6or Change Direc"ory7
I p/d + I cd *tmp I p/d +"mp I

<o"ice, ho, "he ou"pu" o6 "he p,d command changes7 <o, you are in "he +"mp direc"ory7 Hou are no longer in "he + direc"ory7

A ! %asic Sys"em Adminis"ra"ion

121

<aviga"ing around "he sys"em


To move bac5 "o "he direc"ory you ,ere Cus" in, you can use "he 0 argumen" "o "he cd command7
I p/d +"mp I cd . + I p/d + I cd . +"mp I p/d +"mp I

This is a shor"cu" in ;ni: shells "o move bac5 "o your previous direc"ory7
A ! %asic Sys"em Adminis"ra"ion 122

<aviga"ing around "he sys"em


To move bac5 "o your home direc"ory, use "he cd command ,i"h no argumen"s7
I p/d +"mp I cd I p/d + I

A ! %asic Sys"em Adminis"ra"ion

123

<aviga"ing around "he sys"em


Crea"ing a direc"ory, ,ill give you a place "o s"ore 6iles, and o"her direc"ories ?sub8direc"oriesA7 ;se "he m5dir command, shor" 6or &a@e D $ec"ory, "o crea"e a direc"ory7
I cd *tmp I p/d +"mp I m8dir dira I cd dira I p/d +"mp+dira I ls I

<o"ice "he ne, direc"ory pa"h, and ho, "here are no 6iles in "his ne, direc"ory7 <o"e, direc"ory names have a limi" o6 256 charac"ers 0 ?alphanumericA7
A ! %asic Sys"em Adminis"ra"ion 124

<aviga"ing around "he sys"em


Go ahead and crea"e ano"her sub8direc"ory in "his curren" direc"ory, and also some emp"y 6iles7 *mp"y 6iles are crea"ed ,i"h "he ;ni: command "ouch7
I p/d +"mp+dira I ls I I m8dir dira! I t$uch 5ilea 5ile! 5ilec I ls dirab 6ilea 6ileb 6ilec I I ls .; dirab+ 6ilea 6ileb 6ilec I

<o"e, 6ile names have a limi" o6 256 charac"ers 0 ?alphanumericA7


A ! %asic Sys"em Adminis"ra"ion 125

<aviga"ing around "he sys"em


(ne impera"ive concep" "o 5eep in mind ,hen discussing direc"ories, and 6iles, is "he concep" o6 loca"ion7 $emember "he direc"ory and 6ile s"ruc"ure on ;ni: sys"ems are se"up as an hierarchy7 There are ",o loca"ion "ypes ,hen i" comes "o direc"ories and 6iles7 17 Absolu"e 0 ?/ully `uali6ied 'a"h nameA 27 $ela"ive An e:ample o6 a an absolu"e+6ully Muali6ied pa"hname is2
I ls .l *tmp*dira*5ilea 8r,8r88r88 1 roo" sys"em I 0 Dec 02 0120G +"mp+dira+6ilea

An e:ample o6 a rela"ive pa"hname is2


I cd *tmp*dira I p/d +"mp+dira I ls .l 5ilea 8r,8r88r88 1 roo" <o"e, moved "o "he dira direc"ory via i"Bs absolu"e+6ully Muali6ied pa"hname7

sys"em

0 Dec 02 0120G 6ilea

A ! %asic Sys"em Adminis"ra"ion

126

<aviga"ing around "he sys"em


Ge""ing bac5 "o crea"ing direc"ories7 Le"Bs say you ,an"ed "o crea"e a 6ile called "es"6ile, bu" "he 6ully Muali6ied pa"h o6 "his 6ile ,as "o be2 +"mp+"es"dir+"es"dir2+"es"dir3+"es"6ile <o problem, righ"9 Go ahead and crea"e "he 6ile2
I t$uch *tmp*testdir*testdir2*testdir3*test5ile "ouch2 0>4280E> Canno" crea"e +"mp+"es"dir+"es"dir2+"es"dir3+"es"6ile7 I

Hou canB" because "he direc"ories donB" e:is"7 (5, no problem again, righ"9 Le"Bs go ahead and crea"e "he direc"ories 6or "his 6ile2
I m8dir *tmp*testdir*testdir2*testdir3 m5dir2 0>43834D Canno" access direc"ory +"mp+"es"dir+"es"dir27 +"mp+"es"dir+"es"dir22 A 6ile or direc"ory in "he pa"h name does no" e:is"7 I

A ! %asic Sys"em Adminis"ra"ion

12'

<aviga"ing around "he sys"em


This did no" ,or5 ei"her7 )hy9 " didnB" ,or5 because a direc"ory needs "o e:is" be6ore i"s subdirec"ory can e:is"7 To direc" "he m5dir command "o au"oma"ically crea"e all direc"ories in "his 6ully Muali6ied pa"h use "he 0p op"ion2
I m8dir .p *tmp*testdir*testdir2*testdir3 I t$uch *tmp*testdir*testdir2*testdir3*test5ile I ls .ld *tmp*testdir*testdir2*testdir3 dr,:r8:r8: 2 roo" sys"em 24> Dec 02 0G24> +"mp+"es"dir+"es"dir2+"es"dir3 I I ls .l *tmp*testdir*testdir2*testdir3 "o"al 0 8r,8r88r88 1 roo" sys"em 0 Dec 02 0G24> "es"6ile

A ! %asic Sys"em Adminis"ra"ion

128

<aviga"ing around "he sys"em


There are ",o special 6iles called, J7K and J77K 7 $epresen"s "he presen" direc"ory, ,hile 77 represen"s "he direc"ory a level above, "he one you are curren"ly in7
I ls .l "o"al 1> dr,:r8:r8: 3 roo" sys"em dr,:r,:r," E bin bin dr,:r8:r8: 2 roo" sys"em 8r,8r88r88 1 roo" sys"em 8r,8r88r88 1 roo" sys"em 8r,8r88r88 1 roo" sys"em I p/d +"mp+dira I cd %% I p/d +"mp I cd %% I p/d + I cd *tmp*dira

24> Sep E 2320E 7 E01> Sep 4 1>204 77 24> Sep E 2222E dirab 0 Sep E 22223 6ilea 0 Sep E 22223 6ileb 0 Sep E 22223 6ilec

A ! %asic Sys"em Adminis"ra"ion

129

<aviga"ing around "he sys"em


Hou can use ,ildcards as a ,ay "o display 6iles on a ;ni: sys"em7 )ilds cards are a ,ay "o lis" 6iles ,hen you donB" really 5no, "he 6ull name o6 "hem, and only 5no, a por"ion o6 "heir names7 The ,ildcard charac"ers ,e use in ;ni: are2 O, 9, and URV7
I ls dirab 6ilea 6ileb 6ilec I ls 53 6ilea 6ileb 6ilec I ls 5ileDa.!E 6ilea 6ileb I ls 5FFFFa 69999a no" 6ound I ls 5FFeF 6ilea 6ileb 6ilec I

A ! %asic Sys"em Adminis"ra"ion

130

<aviga"ing around "he sys"em


Ano"her ,ay "o crea"e a 6ile is "o re8direc" a commandBs ou"pu" "o a 6ile7 This is called re8direc"ing s"dou" 0 STanDard (;Tpu"7
I date C 5iled I cat 5iled /ri Sep E 2223421> *DT 2001 I ls .l "o"al G dr,:r8:r8: 8r,8r88r88 8r,8r88r88 8r,8r88r88 8r,8r88r88 I

2 roo" 1 roo" 1 roo" 1 roo" 1 roo"

sys"em sys"em sys"em sys"em sys"em

24> Sep E 2222E dirab 0 Sep E 22223 6ilea 0 Sep E 22223 6ileb 0 Sep E 22223 6ilec 21 Sep E 22234 6iled

6 you use double grea"er "han sign XX, "hen "ha" commandBs ou"pu" ,ill append "o "he end o6 "he already e:is"ing 6ile
I date CC 5iled I cat 5iled /ri Sep E 2223421> *DT 2001 /ri Sep E 2223D233 *DT 2001 I

A ! %asic Sys"em Adminis"ra"ion

131

<aviga"ing around "he sys"em


6 you use a single grea"er "han sign again, i" ,ill over,ri"e "he con"en"s o6 "he e:is"ing 6ile
I date C 5iled I cat 5iled /ri Sep E 2223G24D *DT 2001 I

Commands ,hich end ,i"h errors do no" ge" direc"ed "o a 6ile by de6aul"7 They ge" direc"ed "o some"hing ,hich called s"derr 0 STanDard *$$or7
I dati C 5iled @sh2 da"i2 no" 6ound I cat 5iled I I dati 2C 5iled I cat 5iled 5sh2 da"i2 no" 6ound I dati 2CC 5iled I cat 5iled 5sh2 da"i2 no" 6ound 5sh2 da"i2 no" 6ound

A ! %asic Sys"em Adminis"ra"ion

132

<aviga"ing around "he sys"em


There is a special 6ile in ;ni: called +dev+null, among o"hers7 This is commonly re6erred "o as "he J%lac5 .oleK "Bs a place "o re8direc" ou"pu" you donB" ,an"7 )ha"ever you re8direc" "o i" Cus" ge"s "hro,n a,ay7 " goes no,here7
I ls .l *de(*null cr,8r,8r,8 1 roo" I date C *de(*null I ls .l C *de(*null I cat *de(*null G I ls .l *de(*null cr,8r,8r,8 1 roo" I sys"em 2, 2 Dec 03 13212 +dev+null

sys"em

2, 2 Dec 03 13212 +dev+null

A ! %asic Sys"em Adminis"ra"ion

133

<aviga"ing around "he sys"em


6 you ,an"ed ou"pu" "o be re8direc"ed "o a 6ile and "o your s"dou", "he screen simul"aneously, "hen you ,ould use "he "ee command7
I date : tee 5iled /ri Sep E 2224E20D *DT 2001 I cat 5iled /ri Sep E 2224E20D *DT 2001 I

6 you ,an"ed "o append "o a 6ile using "ee, you ,ould use "he 0a op"ion o6 "he "ee command7
I date : tee 5iled /ri Sep E 2224>22D *DT 2001 I cat 5iled /ri Sep E 2224>22D *DT 2001 I I date : tee .a 5iled /ri Sep E 2224D22E *DT 2001 I cat 5iled /ri Sep E 2224>22D *DT 2001 /ri Sep E 2224D22E *DT 2001 I

A ! %asic Sys"em Adminis"ra"ion

134

<aviga"ing around "he sys"em


6 you ,an"ed "o copy a 6ile, you ,ould use "he cp command7
I ls .l 5iled 8r,8r88r88 1 roo" I cp 5iled 5ilee I ls .l 5iled 5ilee 8r,8r88r88 1 roo" 8r,8r88r88 1 roo" sys"em 4G Sep E 2224D 6iled

sys"em sys"em

4G Sep E 2224D 6iled 4G Sep E 23201 6ilee

I cat 5iled /ri Sep E 2224>22D *DT 2001 /ri Sep E 2224D22E *DT 2001 I cat 5ilee /ri Sep E 2224>22D *DT 2001 /ri Sep E 2224D22E *DT 2001 I

A ! %asic Sys"em Adminis"ra"ion

135

<aviga"ing around "he sys"em


6 you ,an"ed "o move+rename a 6ile, you ,ould use "he mv command7
I ls .l 5iled 5ilee 8r,8r88r88 1 roo" 8r,8r88r88 1 roo" I m( 5iled 5ilee I ls .l 5iled 5ilee 6iled no" 6ound 8r,8r88r88 1 roo" I ls .l "o"al G dr,:r8:r8: 8r,8r88r88 8r,8r88r88 8r,8r88r88 8r,8r88r88 I sys"em sys"em 4G Sep E 2224D 6iled 4G Sep E 23201 6ilee

sys"em

4G Sep E 2224D 6ilee

2 roo" 1 roo" 1 roo" 1 roo" 1 roo"

sys"em sys"em sys"em sys"em sys"em

24> Sep E 2222E dirab 0 Sep E 22223 6ilea 0 Sep E 22223 6ileb 0 Sep E 22223 6ilec 4G Sep E 2224D 6ilee

A ! %asic Sys"em Adminis"ra"ion

136

<aviga"ing around "he sys"em


To remove a direc"ory you use "he rmdir command, ,hich is shor" 6or $e&ove D $ec"ory2
I ls .ld dira! dr,:r8:r8: 2 roo"

sys"em

24> <ov 2D 1124D dirab

I rmdir dira! I ls .ld dira! ls2 0>4383E1 The 6ile dirab does no" e:is"7 I

A ! %asic Sys"em Adminis"ra"ion

13'

<aviga"ing around "he sys"em


To remove a 6ile use "he rm command, ,hich is shor" 6or $e&ove7
I ls .l "o"al 0 8r,8r88r88 8r,8r88r88 8r,8r88r88 8r,8r88r88 I I rm 5ilea I ls .l "o"al 0 8r,8r88r88 8r,8r88r88

1 roo" 1 roo" 1 roo" 1 roo"

sys"em sys"em sys"em sys"em

0 Sep E 1E2E3 6ilea 0 Sep E 1E2E3 6ileb 0 Sep E 1E2E3 6ilec 4G Sep E 23201 6ilee

1 roo" 1 roo"

sys"em sys"em

0 Sep E 1E2E3 6ileb 0 Sep E 1E2E3 6ilec

I rm 5ile! 5ilec 5ilee I ls .l "o"al 0 I

A ! %asic Sys"em Adminis"ra"ion

138

<aviga"ing around "he sys"em


Ge""ing bac5 "o direc"ories 6or a momen"2 Crea"e a direc"ory called2 +"mp+"es"dir
I m8dir *tmp*testdir

<o, popula"e "ha" direc"ory ,i"h 6iles2


I t$uch *tmp*testdir*5ile1 I t$uch *tmp*testdir*5ile2 I t$uch *tmp*testdir*5ile3 I ls .l *tmp*testdir "o"al 0 8r,8r88r88 1 roo" sys"em 8r,8r88r88 1 roo" sys"em 8r,8r88r88 1 roo" sys"em I

0 Dec 02 0G2EE 6ile1 0 Dec 02 0G2EE 6ile2 0 Dec 02 0G2EE 6ile3

A ! %asic Sys"em Adminis"ra"ion

139

<aviga"ing around "he sys"em


<o, a""emp" "o remove "his direc"ory2
I rmdir *tmp*testdir rmdir2 0>438>11 Direc"ory +"mp+"es"dir is no" emp"y7 I

Hou ,ere no" able "o do so, because "his direc"ory is no" emp"y7 Hou have ",o op"ions, you can dele"e every"hing in "his direc"ory manually, or you could issue "he 6ollo,ing command2
I rm .r *tmp*testdir I ls .ld *tmp*testdir ls2 0>4383E1 The 6ile +"mp+"es"dir does no" e:is"7 I

A ! %asic Sys"em Adminis"ra"ion

140

S& T 0 Sys"em &anagemen" n"er6ace Tool

A ! %asic Sys"em Adminis"ra"ion

141

S& T
A ! has "he mos" e:"ensive uni: sys"ems managemen" "ool 0 smi" S& T
Sys"ems &anagemen" n"er6ace Tool

nvo5e using "he command smit or smitty Logging under user home direc"ory
0 $oo" "his is "ypically +smi"7log

Commands run are s"ored in user home direc"ory


0 $oo" "his is "ypically +smi"7scrip"

;sed 6or audi"ing, building scrip"s S& T covers abou" L14^ o6 sys"em adminis"ra"ion "as5s7 S& T e:ecu"es commands under "he covers "o accomplish i"Bs "as5s7 Con6igura"ion en"ered via S& T menus are persis"en" across reboo"s7 S& T menus can be crea"ed, and "ailored "o any environmen"7
A ! %asic Sys"em Adminis"ra"ion 142

S& T
I smittH

A ! %asic Sys"em Adminis"ra"ion

143

S& T

A ! %asic Sys"em Adminis"ra"ion

144

S& T

A ! %asic Sys"em Adminis"ra"ion

145

S& T

To move bac5 a screen in smi" press "he W/3X 5ey7

A ! %asic Sys"em Adminis"ra"ion

146

S& T

'ressing W/10X ,ill e:i" smi" all "oge"her7


I

A ! %asic Sys"em Adminis"ra"ion

14'

S& T
/as" pa"hs are a shor"cu" in S& T, allo,ing you "o Cump do,n "he menu hierarchy righ" "o "he menu you desire7
I smittH users

A ! %asic Sys"em Adminis"ra"ion

148

S& T
The 6as" pa"h o6 a speci6ic menu screen can be de"ermined by pressing "he W/GX 5ey ,hile in "ha" menu7 <o"e, i6 i"Bs a "e:" screen session press *SC]I7

'ress W/10X "o e:i" smi"7


A ! %asic Sys"em Adminis"ra"ion 149

S& T
Hou can use "he smi" W/>X 5ey ,hile in a menu, "o de"ermine ,hich command smi" is calling under "he convers7
I smittH shutd$/n

W/10X
A ! %asic Sys"em Adminis"ra"ion 150

S& T
Hou could use "he S& T W/1X 5ey "o e:i" ou" "o an A ! command shell promp", "emporarily, 6rom ,i"hin a S& T menu7
I smittH I smi""y

'ress W/1X I

A ! %asic Sys"em Adminis"ra"ion

151

S& T

A ! %asic Sys"em Adminis"ra"ion

152

S& T
Type in "he command e:i", "o re"urn "o "he S& T menu session7
I I e)it

A ! %asic Sys"em Adminis"ra"ion

153

S& T
Hou can press W/1X a" any poin" ,hile in S& T "o vie, "he help o6 "ha" par"icular S& T menu screen

W/10X
A ! %asic Sys"em Adminis"ra"ion 154

S& T
Go "o "he change user a""ribu"e smi""y ,indo, via i"Bs 6as"pa"h7 .i" W/EX7 This ,ill genera"e a pic5 lis"7 Smi" provides "his as a easy ,ay "o selec" "he obCec", in "his case user name, you ,ould li5e "o edi"7
I smittH chuser

A ! %asic Sys"em Adminis"ra"ion

155

S& T
Smi""y also has a search s"ring 6unc"ion7 )hen you ,an" "o search 6or some"hing in a smi" screen use "he + 5ey, and "hen "ype in "he s"ring you ,ish "o search 6or in "ha" smi" menu7

A ! %asic Sys"em Adminis"ra"ion

156

S& T

.i" W/10X "o e:i" smi""y7


A ! %asic Sys"em Adminis"ra"ion 15'

S& T
S& T also has a graphical version7

A ! %asic Sys"em Adminis"ra"ion

158

S& T
n graphical S& T, "here is a graphic o6 a man, Jroc5yK, running ,hen a command is running2

A ! %asic Sys"em Adminis"ra"ion

159

S& T
n graphical S& T "here is a graphic o6 a man, Jroc5yK, ,ho 6alls 6la" on his 6ace ,hen a command 6ails7

A ! %asic Sys"em Adminis"ra"ion

160

S& T
n graphical S& T "here is a graphic o6 a man, Jroc5yK, ,ho raises his hand in "riumph 6ollo,ing a success6ul command e:ecu"ion

A ! %asic Sys"em Adminis"ra"ion

161

S& T

A ! %asic Sys"em Adminis"ra"ion

162

A ! ;ser &anagemen"

A ! %asic Sys"em Adminis"ra"ion

163

A ! ;ser &anagemen"
To crea"e a user8id on A !, ei"her use "he smi", Sys"em &anagemen" n"er6ace Tool, or "he command m5user, ,hich is shor" 6or &a@e;S*$7 <o"e, "here is a limi" o6 G alphanumeric charac"ers 6or a user name7 pre6er "o use smi"7 "Bs more produc"ive "han "he command line7 8
I smittH m8user I76 JKIR ;0R7- <=>6

A ! %asic Sys"em Adminis"ra"ion

164

A ! ;ser &anagemen"
)ha" is "he m5user doing 9
&odi6ying 6iles2 +e"c+pass,d7 +e"c+group Also +e"c+securi"y+pass,d, group, users, limi"s

These 6iles can be edi"ed 6 "hey ge" ou" o6 sync, chec5 6or consis"ency2
usrc5 p,dc5 grpc5

A ! %asic Sys"em Adminis"ra"ion

165

A ! ;ser &anagemen"
;sers on "he sys"em are de6ined in "he +e"c+pass,d 6ile7 This 6ile has "he 6ollo,ing 6orma"7 I76RL<=>6 : MK&0<L7J>BKM : I01 : &01 :&6,K7: NK>6L10R6,-KRJ : 7N6MM The P in "he second 6ield indica"es "ha" "he pass,ord is in "he shado, 6ile7 The O in "he second 6ield indica"es "ha" "he user canB" login7
I ls .l *etc*pass/d 8r,8r88r88 1 roo" securi"y EGE Sep 4 2123G +e"c+pass,d

I cat *etc*pass/d roo"2P202022+2+usr+bin+5sh daemon2P212122+e"c2 bin2P222222+bin2 sys2P232322+usr+sys2 adm2P2E2E22+var+adm2 uucp2P242422+usr+lib+uucp2 gues"2P2100210022+home+gues"2 nobody2P2E21E1>D21E2E21E1>D21E22+2 lpd2P212E21E1>D21E22+2 lp2O21121122+var+spool+lp2+bin+6alse snapp2O22002122snapp login user2+usr+sbin+snapp2+usr+sbin+snappd nuucp2O2>242uucp login user2+var+spool+uucppublic2+usr+sbin+uucp+uucico

A ! %asic Sys"em Adminis"ra"ion

166

A ! ;ser &anagemen"
The shado, 6ile, is ,here "he encryp"ed pass,ord o6 all users are 5ep"7 The +e"c+pass,d 6ile is read by user8ids as "hey log in"o "he sys"em, "he P ne:" "o "heir userid in "ha" 6ile, "ells "he login program "o chec5 "he shado, 6ile, +e"c+securi"y+pass,d, 6or "he ac"ual pass,ord "o au"hen"ica"e you in"o "he sys"em7 (lder ;ni: sys"ems used "he +e"c+pass,d 6ile "o s"ore "he encryp"ed pass,ord7
I ls .l *etc*securitH*pass/d 8r,8888888 1 roo" securi"y 313 Sep 4 212E2 +e"c+securi"y+pass,d

I cat *etc*securitH*pass/d roo"2 pass,ord Q /y0ub:g..%r/& las"upda"e Q 12420G232D 6lags Q daemon2 pass,ord Q O bin2 pass,ord Q O R7

A ! %asic Sys"em Adminis"ra"ion

16'

A ! ;ser &anagemen"
The +e"c+group 6ile con"ains "he user+group memberships o6 all users de6ined "o "he sys"em7 <o"e "he second 6ield, P , is no" valid anymore7
I ls .l *etc*#r$up 8r,8r88r88 1 roo" securi"y 32D Sep 4 2123D +e"c+group

I cat *etc*#r$up sys"em2P202roo",pconsole s"a662P212Cus"in bin2P222roo",bin sys2P232roo",bin,sys adm2P2E2bin,adm uucp2P242uucp,nuucp mail2P2>2 securi"y2P2D2roo" cron2P2G2roo" prin"M2P212lp audi"2P2102roo" ecs2P22G2 nobody2P2E21E1>D21E2nobody,lpd usr2P21002gues" per62P2202 shu"do,n2P2212 lp2P2112roo",lp snapp2P2122snapp pconsole2P2132pconsole

A ! %asic Sys"em Adminis"ra"ion

168

A ! ;ser &anagemen"
A6"er "he user is crea"ed you ,ill see i" via "he id command, or lis"users command7
I id ustin uidQ202?Cus"inA gidQ1?s"a66A I listusers gues" Cus"in lp nobody pconsole snapp snapp login user I

A6"er you crea"e "he user id, you as roo" ,ill have "o se" "ha" user idBs login pass,ord
I pass/d ustin Changing pass,ord 6or SCus"inS Cus"inTs <e, pass,ord2 $e8en"er Cus"inTs ne, pass,ord2 I

<o"e, "here is a limi" o6 G alphanumeric charac"ers 6or a userBs pass,ord7


A ! %asic Sys"em Adminis"ra"ion 169

A ! ;ser &anagemen"
<o, log o66, by "yping in e:i", and "hen login again as user Cus"in7
I e)it Connec"ion Closed7 ?'u""y closesA7

Connec" "o "he sys"em again, and login as ne,ly crea"ed user Cus"in
A ! -ersion > Copyrigh" %& Corpora"ion, 11G2, 200D7 login2 ustin Cus"inTs 'ass,ord2 Ucompa"V2 Hou are reMuired "o change your pass,ord7 'lease choose a ne, one7 Cus"inTs <e, pass,ord2 $e8en"er Cus"inTs ne, pass,ord2 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO O O O O O )elcome "o A ! -ersion >71P O O O O O O 'lease see "he $*AD&* 6ile in +usr+lpp+bos 6or in6orma"ion per"inen" "o O O "his release o6 "he A ! (pera"ing Sys"em7 O O O O O OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO Y

A ! %asic Sys"em Adminis"ra"ion

1'0

A ! ;ser &anagemen"
<o"ice, even "hough you as roo" se" "his userBs pass,ord7 The sys"em s"ill promp"s "he user "o change "his pass,ord upon ini"ial login7 This is done 6or securi"y reasons7 Also, no"ice "ha" "he same message o6 "he day is displayed "o "his user ,hen "hey login7 A6"er "he user logs in no"ice "he dollar8sign, Y, shell promp"7 This shell promp" indica"es "ha" "his user is a regular, non8roo"+admin user7 The id command ,ill veri6y "ha" you are no, logged in as user Cus"in7
Y id uidQ202?Cus"inA gidQ1?s"a66A Y

Also no"ice "he de6aul" user group7 The user is au"oma"ically pu" in "he s"a66 user group ,hen crea"ed7 This is 6or all non8admin users7
A ! %asic Sys"em Adminis"ra"ion 1'1

A ! ;ser &anagemen"
<o"ice "his ini"ial direc"ory you are placed in ,hen you 6irs" log in"o "he sys"em7 The de6aul" home direc"ory 6or non8roo" users is +home+userNname7
Y p/d +home+Cus"in Y

There is a special charac"er ,hich is used as a shor" cu" 6or someoneBs home direc"ory7 A ,ay "o go "o your home direc"ory use L;S*$
Y ls .ld O dr,:r8:r8: 2 Cus"in s"a66 Y ls .ld O ustin dr,:r8:r8: 2 Cus"in s"a66 Y ls .ld O#uest dr,:r8:r8: 2 gues" usr Y #rep .i #uest *etc*pass/d gues"2P2100210022+home+gues"2 Y 24> Dec 02 10234 +home+Cus"in 24> Dec 02 10234 +home+Cus"in 24> Apr 14 2010 +home+gues"

A ! %asic Sys"em Adminis"ra"ion

1'2

A ! ;ser &anagemen"
$ecommended home direc"ory se"up 6or environmen"s7 Justin -ipPPP Se"up a sub home direc"ory up 6or each user group ,i"hin your organiFa"ion7 D%AsB home direc"ories2
I ls .ld *h$me*d!a dr,:r8:r8: 14 oracle dba I ls .l *h$me*d!a "o"al 13 dr,:r8:r8: 2 chouer dba dr,:r8:r8: 2 dai6ran dba dr,:r8:r8: 2 govindb dba dr,:r8:r8: 2 harishp dba dr,:r8:r8: 2 heuveln dba dr,:r8:r8: 2 Caschi6 dba dr,:r8:r8: 2 lipaul dba dr,:r8:r8: 2 oracle dba dr,:r8:r8: 2 raghupm dba dr,:r8:r8: 2 suhCos dba dr,:r8:r8: 2 ,i""en dba dr,:r8:r8: 2 :iaodan dba dr,:r8:r8: 2 Fheng, dba 412 #ul 24 102E1 +home+dba

412 #an 10 200> chouer 412 #ul 03 01231 dai6ran 412 #ul 24 102E1 govindb 412 &ay 23 2004 harishp 412 #un 22 0323G heuveln 412 #un 04 1024G Caschi6 412 &ay 2G 2004 lipaul 412 #ul 1G 01210 oracle 412 #un 24 14243 raghupm 412 &ar 2G 2004 suhCos 412 Apr 10 200> ,i""en 412 Dec 04 2004 :iaodan 412 Sep 13 2004 Fheng,

A ! %asic Sys"em Adminis"ra"ion

1'3

A ! ;ser &anagemen"
The applica"ion adminis"ra"orTs home direc"ories2
I ls .ld *h$me*appl dr,:r,:r,: 1E roo"

appldev

412 #ul 31 1122D +home+appl

I ls .l *h$me*appl "o"al 12 dr,:r8:r8: 2 bas"enp ds"age dr,:r8:r8: 2 6la5e, ds"age dr,:r8:r8: 2 hendri5 ds"age dr,:r8:r8: E 5ilcul" ds"age dr,:r8:r8: 2 moserm ds"age dr,:r8:r8: 2 moun"C ds"age dr,:r8:r8: 2 ra"hins ds"age dr,:r8:r8: 3 ra"hins ds"age dr,:r8:r8: 2 vanhoop ds"age dr,:r8:r8: 2 ,er6ad ds"age dr,:r8:r8: 2 Fagorob ds"age dr,:r8:r8: 2 Fagorob ds"age

412 #ul 11 1222G bas"enp 412 #ul 10 14202 6la5e, 412 #ul 2E 14222 hendri5 412 #ul 1G 112E3 5il5ul" 412 #ul 10 1421E moserm 412 #ul 10 1420G moun"C 412 #ul 10 14204 ra"hens 412 #ul 20 102E0 ra"hins 412 #ul 30 0G202 vanhoop 412 #ul 1> 01221 ,er6ad 412 #ul 31 1122D Fagorob 412 #ul 31 11224 Fagorov

A ! %asic Sys"em Adminis"ra"ion

1'4

A ! ;ser &anagemen"
$ese" your o,n pass,ord "o some"hing di66eren"7

Y id uidQ20>?Cus"inA gidQ1?s"a66A Y pass/d Changing pass,ord 6or SCus"inS Cus"inTs (ld pass,ord2 Cus"inTs <e, pass,ord2 $e8en"er Cus"inTs ne, pass,ord2 Y

<o,, log o66 o6 "he sys"em as user Cus"in by "yping in "he e:i" command, and "hen log in"o "he sys"em again as user roo"7
A ! %asic Sys"em Adminis"ra"ion 1'5

A ! ;ser &anagemen"
Le"Bs say "ha" user Cus"in calls you, "he admin, and con6esses "o you "ha" "hey have 6orgo""en "heir login pass,ord, and you have "o rese" i" no, 6or "hem7 Hou do "ha" ,i"h "he pass,d Cus"in command as you did be6ore, bu" no"ice "he di66erence be",een ,hen you se" "he pass,ord as "he user him+hersel6, and ,hen you se" "he pass,ord as "he roo" user7 <o"ice "ha" ,hen you rese" i" as "he user "hemselves you ,ill be promp"ed 6or "he old pass,ord, and "hen "he ne, one7 This is done 6or securi"y reasons, bu" ,hen you se" someone elseBs pass,ord as "he roo" user, you are no" reMuired "o provide "he curren" pass,ord7 $oo" has "he po,er "o override "his e:"ra securi"y chec5, and "his ,ill also prove use6ul ,hen rese""ing a 6orgo""en pass,ord 6or someone7

A ! %asic Sys"em Adminis"ra"ion

1'6

A ! ;ser &anagemen"
To de"ermine ,ho is curren"ly logged in"o "he sys"em use "he ,ho command
I /h$ roo" I

p"s+0

Sep 4 21224

?11271>G722071A

A ! %asic Sys"em Adminis"ra"ion

1''

A ! ;ser &anagemen"
The las" command can assis" you in de"ermining "he login his"ory o6 a user in"o "he sys"em7
I last r$$t roo" p"s+0 roo" p"s+0 R

11271>G722071 11271>G722071

Sep 04 21224 s"ill logged in Sep 04 1D210 8 11211 ?02200A

A ! %asic Sys"em Adminis"ra"ion

1'8

A ! ;ser &anagemen"
Le"Bs say you ,an"ed "o per6orm some sor" o6 sys"em main"enance, and you didnB" ,an" any users "o login during "his "ime7 Hou can do "his ,i"h a 6ile called +e"c+nologin7 Any s"ring you pu" in "ha" 6ile ,ill be displayed "o users a""emp"ing "o log in"o "he sys"em7
I ech$ B-N6 7J7-6> 07 ,IRR6<-MJ I<=Q=0M=BM6% ,N6,+ B=,+ M=-6R%B C *etc*n$l$#in I ls .l *etc*n$l$#in 8r,8r88r88 1 roo" sys"em 44 Sep 4 222E2 +e"c+nologin I cat *etc*n$l$#in T.* SHST*& S C;$$*<TLH ;<A-A LA%L*7 C.*C@ %AC@ LAT*$7 I

<o,, log ou" ,i"h e:i", and a""emp" "o login as user2 Cus"in2
A ! -ersion > Copyrigh" %& Corpora"ion, 11G2, 200D7 login2 ustin Cus"inTs 'ass,ord2 T.* SHST*& S C;$$*<TLH ;<A-A LA%L*7 C.*C@ %AC@ LAT*$7 login2

<o"e2 The echo command is discussed in more dep"h in a ;ni: programming+shell scrip"ing course7
A ! %asic Sys"em Adminis"ra"ion 1'9

A ! ;ser &anagemen"
<o"e, "he roo" user can bypass "his res"ric"ion and logon7 Also, userBs curren"ly logged on, ,hen you crea"e "his 6ile ,ill no" be a66ec"ed7 Tes" "ha" roo" can override "his7 Login again as roo" and i" ,ill succeed, regardless o6 "his +e"c+nologin 6ile being presen"2
AIX Version 6 opyright I!" orporation# $%&'# '($(. login) root root*s +ass,ord) ------------------------------------------------------------------------------- .elcome to AIX Version 6.$/ - +lease see the 01A2"1 file in 3usr3lpp3bos for information pertinent to - this release of the AIX 4perating 5ystem. ------------------------------------------------------------------------------6ast unsuccessful login) .ed 2ec $ (()7%)7' 58 '($( on 3dev3pts3$ from gvicaix($ 6ast login) 8hu 2ec ' (&)9%):7 58 '($( on 3dev3pts3( from $%'.$6&.'7(.&

A ! %asic Sys"em Adminis"ra"ion

180

A ! ;ser &anagemen"
)hen you remove "his 6ile, "hen users ,ill be able "o log in"o "he sys"em once again7
I ls .l *etc*n$l$#in 8r,8r88r88 1 roo" sys"em I rm *etc*n$l$#in I ls .l *etc*n$l$#in +e"c+nologin no" 6ound I 44 Sep 4 222E2 +e"c+nologin

<on8roo" logins are no, re8enabled once again7 'lease no"e "ha" reboo"ing "he sys"em ,ill au"oma"ically remove "his 6ile 6rom "he sys"em as ,ell7

A ! %asic Sys"em Adminis"ra"ion

181

A ! ;ser &anagemen"
Log ou", ,i"h "he e:i" command, and "hen log bac5 in"o "he sys"em as "he Cus"in user, "o veri6y "ha" non8roo" user logins are no, re8enabled7
I e)it Connec"ion closed AIX Version 6 opyright I!" orporation# $%&'# '($(. login) justin ;ustin*s +ass,ord) ------------------------------------------------------------------------------- .elcome to AIX Version 6.$/ - +lease see the 01A2"1 file in 3usr3lpp3bos for information pertinent to - this release of the AIX 4perating 5ystem. ------------------------------------------------------------------------------$ unsuccessful login attempt since last login. 6ast unsuccessful login) 8hu 2ec ' $()'$)': 58 '($( on 3dev3pts3$ from $%'.$6&.'7(.& 6ast login) 8hu 2ec ' $()$:)$6 58 '($( on 3dev3pts3$ from loopbac<

A ! %asic Sys"em Adminis"ra"ion

182

A ! ;ser &anagemen"
Logou" ,i"h, e:i" and log bac5 in"o "he sys"em again as roo"2
Y e)it Connec"ion closed AIX Version 6 opyright I!" orporation# $%&'# '($(. login) root ;ustin*s +ass,ord) ------------------------------------------------------------------------------ .elcome to AIX Version 6.$/ - +lease see the 01A2"1 file in 3usr3lpp3bos for information pertinent to - this release of the AIX 4perating 5ystem. A !- %asic Sys"em Adminis"ra"ion 183

A ! ;ser &anagemen"
The de6aul" message o6 "he day, &(TD, ,hich is displayed ,hen you log in"o "he sys"em can be changed7 "Bs changed by edi"ing "he 6ile +e"c+mo"d7
I cat *etc*m$td OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO O O O O O )elcome "o A ! -ersion >71P O O O O O O 'lease see "he $*AD&* 6ile in +usr+lpp+bos 6or in6orma"ion per"inen" "o O O "his release o6 "he A ! (pera"ing Sys"em7 O O O O O OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO I I ech$ RSelc$me t$ mH =0T sHstemU C *etc*m$td I ech$ RU CC *etc*m$td I !anner pr$ducti$n CC *etc*m$td I ech$ RU CC *etc*m$td

A ! %asic Sys"em Adminis"ra"ion

184

A ! ;ser &anagemen"
# cat /etc/motd .elcome to my AIX system ##### # # # # ##### # # # ##### # # # # ##### # # # # #### # # # # # # # # #### ##### # # # # # # # # ##### # # # # # # # # # # #### #### # # # # # # #### ##### # # # # # # # # # # # #### # # # # # # # # #### # # ## # # # # # # # # ## # #

A ! %asic Sys"em Adminis"ra"ion

185

A ! ;ser &anagemen"
Log o66 by "yping in e:i", and "hen login as roo" again7
AIX Version 6 opyright I!" orporation# $%&'# '($(. login) root root*s +ass,ord) .elcome to my AIX system ##### # # # # ##### # # ##### # # # # ##### # # # # #### # # # # # # # # #### ##### # # # # # # # # ##### # # # # # # # # # # #### #### # # # # # # #### ##### # # # # # # # # # # # #### # # # # # # # # #### # # ## # # # # # # # # ## # #

6ast unsuccessful login) =ri >ov '6 $%):&)99 58 '($( on 3dev3pts3( from $%'.$6&.''(.7: 6ast login) 5at >ov '? $?)::)'& 58 '($( on 3dev3pts3( from $%'.$6&.':(.$$? #

A ! %asic Sys"em Adminis"ra"ion

186

A ! ;ser &anagemen"
Le"Bs say you as as a user, didnB" care "o see "he message o6 "he day, &(TD, displayed "o you every "ime you logged in"o "he sys"em7 )ell you can disable i"7 Hou disable i" ,i"h a special 6ile called 7hushlogin7 Hou place "his 6ile in "he home direc"ory o6 "he user you ,ish "o disable "his 6or7 Log o66 o6 "he sys"em ,i"h e:i", and log in as user Cus"in again7

A ! %asic Sys"em Adminis"ra"ion

18'

A ! ;ser &anagemen"
)hile in "he home direc"ory o6 "ha" user, +home+Cus"in, "ouch a 6ile called 7hushlogin7
Y p/d +home+Cus"in Y ls .l %hushl$#in 7hushlogin no" 6ound Y t$uch %hushl$#in Y ls .l %hushl$#in 8r,8r88r88 1 Cus"in s"a66 Y

0 Sep 4 2224G 7hushlogin

<o,, "ha" "he 6ile is crea"ed, log ou", and "hen log bac5 in"o "he sys"em as "ha" user, Cus"in, again7

A ! %asic Sys"em Adminis"ra"ion

188

A ! ;ser &anagemen"
Type e:i", and "hen re8connec" "o "he sys"em again7 <o"e, no &(TD is displayed upon login7

A ! -ersion > Copyrigh" %& Corpora"ion, 11G2, 200D7 login2 ustin Cus"inTs 'ass,ord2 Y id uidQ202?Cus"inA gidQ1?s"a66A Y p/d +home+Cus"in Y

A ! %asic Sys"em Adminis"ra"ion

189

A ! ;ser &anagemen"
*:i" and login as roo" again7 Loo5 a" "he message displayed prior "o logging in"o "he sys"em7The /irs" line s"ar"ing ,i"h A !, and "he "hird one ending in login2 is 5no,n as "he herald message7 " is "he pre8login message displayed "o "he users ,hen "hey go "o log in"o "he sys"em, "he &(TD discussed earlier is "he pos" login message7
AIX Version 6 Copyright IBM Corporation, 1 !", "##$% login& root +ass,ord) ##### # # # # ##### # # ##### # # # # ##### # # # # #### # # # # # # # # #### ##### # # # # # # # # ##### # # # # # # # # # # #### #### # # # # # # #### ##### # # # # # # # # # # # #### # # # # # # # # #### # # ## # # # # # # # # ## # #

6ast unsuccessful login) =ri >ov '6 '')7')$% 58 '($( on 3dev3pts3( from $%'.$6&.''(.7: 6ast login) 5at >ov '? $6)$%)7? 58 '($( on 3dev3pts3$ from localhost #

A ! %asic Sys"em Adminis"ra"ion

190

A ! ;ser &anagemen"
There is a 6ile called +e"c+securi"y+login7c6g ,hich con"rols "he global login, no" user a""ribu"es o6 "he sys"em7 To change "he herald message you ,ould change "he parame"er in "his 6ile7
I cd *etc*securitH I p/d +e"c+securi"y I ls .l l$#in%c5# 8r,8r88888 1 roo" securi"y 44EG <ov 2D 1>220 login7c6g

I chsec .5 *etc*securitH*l$#in%c5# .s de5ault .a herald?BSelc$me t$ ,$mpanH =B,Vs =0T c$mputer sHstemWnAlease enter H$ur l$#in name: R I lssec .5 *etc*securitH*l$#in%c5# .s de5ault .a herald de6aul" heraldQS)elcome "o Company A%CTs A ! compu"er sys"eman'lease en"er your login name2 S I

A ! %asic Sys"em Adminis"ra"ion

191

A ! ;ser &anagemen"
Close your pu""y session, logging ou" o6 "he sys"em, and "hen log bac5 in"o "he sys"em as roo"2
.elcome to ompany A! *s AIX computer system +lease enter your login name) root root*s +ass,ord) ##### # # # # ##### # # ##### # # # # ##### # # # # #### # # # # # # # # #### ##### # # # # # # # # ##### # # # # # # # # # # #### #### # # # # # # #### ##### # # # # # # # # # # # #### # # # # # # # # #### # # ## # # # # # # # # ## # #

6ast unsuccessful login) =ri >ov '6 '')7')$% 58 '($( on 3dev3pts3( from $%'.$6&.''(.7: 6ast login) 5at >ov '? $6)$%)7? 58 '($( on 3dev3pts3$ from localhost #

A ! %asic Sys"em Adminis"ra"ion

192

A ! ;ser &anagemen"
<o, open a console+vir"ual "erminal session "o your sys"em via "he -&7 <o"ice "he login herald+pre8login message displayed 0 The old+de6aul" one7

A ! %asic Sys"em Adminis"ra"ion

193

A ! ;ser &anagemen"
)ha" did you no"ice9 The de6aul"+old herald message is s"ill being displayed ,hen you log in"o "he sys"em "his ,ay7 Also no"ice ho, i" says Console Login, as oppose "o Cus" Login as ,i"h "he o"her de6aul"+old herald message7 This "ells us "ha" "here are ",o di66eren" heralds, so ",o di66eren" se""ings, a console+vir"ual "erminal via -&, and a non8console+"elne" herald message7 To change "he console login herald message2
I cd *etc*securitH I p/d +e"c+securi"y I ls l l$#in%c5# 8r,8r88888 1 roo" securi"y 4>3D <ov 2D 1>23> login7c6g

I chsec .5 *etc*securitH*l$#in%c5# .s *de(*c$ns$le .a herald?BSelc$me t$ ,$mpanH =B,Vs =0T c$mputer sHstemWnAlease enter H$ur c$ns$le l$#in name:B I

$es"ar" your vir"ual console ,indo, 6rom "he -&7


A ! %asic Sys"em Adminis"ra"ion 194

A ! ;ser &anagemen"

A ! %asic Sys"em Adminis"ra"ion

195

A ! ;ser &anagemen"
6 you close your pu""y session and "hen open i" again, you ,ill see "ha" your o"her non8console herald message is s"ill presen"7
.elcome to ompany A! *s AIX computer system +lease enter your login name) root root*s +ass,ord) ##### # # # # ##### # # ##### # # # # ##### # # # # #### # # # # # # # # #### ##### # # # # # # # # ##### # # # # # # # # # # #### 'o console string displayed ##### # # # # # # # # # # # #### # # # # # # # # #### # # ## # # # # # # # # ## # #

#### # # # # # # ####

$ unsuccessful login attempt since last login. 6ast unsuccessful login) 5at >ov '? $6)77)77 58 '($( on 3dev3pts3' from $%'.$6&.''(.7: 6ast login) 5at >ov '? $6)96)9% 58 '($( on 3dev3pts3$ from $%'.$6&.''(.7: #

A ! %asic Sys"em Adminis"ra"ion

196

A ! ;ser &anagemen"
<o"ice bac5 in "he herald message login and pass,ord promp"s2

.elcome to ompany A! *s AIX computer system +lease enter your login name) root root(s +ass,ord)

<o"ice ho, "hey bo"h display "he userBs name7 Hou can disable "his in A !, "o "igh"en "he securi"y more o6 your sys"em7

A ! %asic Sys"em Adminis"ra"ion

19'

A ! ;ser &anagemen"
I cd *etc*securitH I p/d +e"c+securi"y I ls .l l$#in%c5# 8r,8r88888 1 roo" securi"y 444G <ov 2D 1G224 login7c6g

I chsec .5 *etc*securitH*l$#in%c5# .s de5ault .a usernameech$?5alse I

Close your pu""y session and "hen login again7 <o"ice ho, "he username is no" echoed7
.elcome to ompany A! *s AIX computer system +lease enter your login name) )ser name is not displayed *hen typed% ----*s +ass,ord) )ser name in pass*ord prompt is hidden% .elcome to my AIX system ##### # # # # ##### # # ##### # # # # ##### # # # # #### # # # # # # # # #### ##### # # # # # # # # ##### # # # # # # # # # # #### #### # # # # # # #### ##### # # # # # # # # # # # #### # # # # # # # # #### # # ## # # # # # # # # ## # #

6ast unsuccessful login) 5at >ov '? $6)77)77 58 '($( on 3dev3pts3' from $%'.$6&.''(.7: 6ast login) 5at >ov '? $&)'%)$? 58 '($( on 3dev3pts3? from $%'.$6&.''(.7:

A ! %asic Sys"em Adminis"ra"ion

198

A ! ;ser &anagemen"
Hou can change "he pass,ord promp" "o"ally as ,ell7
I cd *etc*securitH I p/d +e"c+securi"y I ls .l l$#in%c5# 8r,8r88888 1 roo" securi"y 44EG <ov 2D 1D2EE login7c6g

I chsec .5 *etc*securitH*l$#in%c5# .s de5ault .a p/dpr$mpt?BAlease enter H$ur userVs l$#in pass/$rd: R

Logou", and "hen log bac5 in"o "he sys"em again ,i"h pu""y as roo"2
.elcome to ompany A! *s AIX computer system +lease enter your login name) +lease enter your user(s login pass*ord& .elcome to my AIX system ##### # # # # ##### # # ##### # # # # ##### # # # # #### # # # # # # # # #### ##### # # # # # # # # ##### # # # # # # # # # # #### #### # # # # # # #### ##### # # # # # # # # # # # #### # # # # # # # # #### # # ## # # # # # # # # ## # #

A ! %asic Sys"em Adminis"ra"ion

199

A ! ;ser &anagemen"
To change "he de6aul" G*C(s, userBs real li6e in6orma"ion, use "he 6ollo,ing command2
I 5in#er ustin Login name2 Cus"in Direc"ory2 +home+Cus"in <o 'lan7 I pass/d .5 ustin Cus"inTs curren" gecos2 SS Change ?yesA or ?noA9 X Hes To9XJustin Richard Bleistein I 5in#er ustin Login name2 Cus"in Direc"ory2 +home+Cus"in <o 'lan7 n real li6e2 #us"in $ichard %leis"ein Shell2 +usr+bin+5sh

Shell2 +usr+bin+5sh

I #rep .i ustin *etc*pass/d Cus"in2O2202212#us"in $ichard %leis"ein2+home+Cus"in2+usr+bin+5sh I

A ! %asic Sys"em Adminis"ra"ion

200

A ! ;ser &anagemen"
As you may have no"iced in "he pas" mo"d discussion, "he 7hushlogin 6ile has a period in 6ron" o6 i"7 Tha"Bs because "his is a special 6ile7 /iles ,i"h a period in 6ron" o6 "hem are no" displayed ,i"h "he ls command unless "he 0a argumen" is used ,i"h i", or "he 6ile is re6erenced direc"ly7 This is 6or regular non8roo" users7
Y id uidQ202?Cus"inA gidQ1?s"a66A Y p/d +home+Cus"in Y ls Y ls .l "o"al 0 Y t$uch %classi5ied Y ls Y ls .l "o"al 0 Y ls .a 7 77 7classi6ied 7pro6ile 7shNhis"ory Y ls .la "o"al 1> dr,:r8:r8: 2 Cus"in s"a66 24> Sep 4 23210 7 dr,:r8:r8: 4 bin bin 24> Sep 4 2123D 77 8r,8r88r88 1 Cus"in s"a66 0 Sep 4 23210 7classi6ied 8r,:r88888 1 Cus"in s"a66 24E Sep 4 2123D 7pro6ile 8r,8888888 1 Cus"in s"a66 4G2 Sep 4 23210 7shNhis"ory Y

A ! %asic Sys"em Adminis"ra"ion

201

A ! ;ser &anagemen"
Hou may also have no"iced, "ha" "here are already ",o 6iles in your home direc"ory ,i"h periods in 6ron" o6 "hem7 These are special 6iles as ,ell7 They are pu" "here au"oma"ically by "he sys"em, ,hen "he user ,as crea"ed7 8 %pr$5ile Q This is a special 6ile 6or "he @orn shell7 This is called an ini"ialiFa"ion 6ile 6or "he shell7 Any code in "his 6ile ,ill be e:ecu"ed au"oma"ically ,hen you log in"o "he sys"em, s"ar"ing "his shell7 8 %shLhist$rH Q This 6ile ,ill 5eep a his"ory o6 all o6 your command his"ory ,hile using "his shell7 This 6ile is only valid, 6or your shell login session7

A ! %asic Sys"em Adminis"ra"ion

202

A ! ;ser &anagemen"
The 6ile +e"c+securi"y+user7 This 6ile con"ains "he de6aul" user a""ribu"es 6or ne, users, as ,ell as individual user a""ribu"es7
I ls .l *etc*securitH*user 8r,8r88888 1 roo" securi"y I R de6aul"2 admin Q 6alse login Q "rue su Q "rue daemon Q "rue rlogin Q "rue sugroups Q ALL admgroups Q ""ys Q ALL au"h1 Q SHST*& au"h2 Q <(<* "pa"h Q nosa5 umas5 Q 022 e:pires Q 0 SHST*& Q Scompa"S login"imes Q p,d,arn"ime Q 0 accoun"Nloc5ed Q 6alse loginre"ries Q 0 R7 7 10441 Sep > 00241 +e"c+securi"y+user

A ! %asic Sys"em Adminis"ra"ion

203

A ! ;ser &anagemen"
R snapp2 admin Q 6alse rlogin Q 6alse su Q 6alse SHST*& Q S<(<*S login Q "rue ""ys Q +dev+""y0 regis"ry Q 6iles dceNe:por" Q 6alse nuucp2 admin Q 6alse pconsole2 admin Q "rue login Q 6alse rcmds Q deny su Q 6alse Cus"in2 admin Q 6alse R

A ! %asic Sys"em Adminis"ra"ion

204

A ! ;ser &anagemen"
Le"Bs say you ,an"ed "o loc5 a user accoun"7 )ell you could ei"her go "hrough smi", or user "he 6ollo,ing command7
I chuser acc$untLl$c8ed?true ustin I

<o, loo5 a" "he Cus"in s"anFa in "he +e"c+securi"y+user 6ile7


R Cus"in2 admin Q 6alse accoun"Nloc5ed Q "rue R

(pen ano"her connec"ion, and a""emp" "o login as user Cus"in7


A ! -ersion 4 Copyrigh" %& Corpora"ion, 11G2, 200D7 login2 ustin Cus"inTs 'ass,ord2 Hour accoun" has been loc5edb please see "he sys"em adminis"ra"or7 login2

A ! %asic Sys"em Adminis"ra"ion

205

A ! ;ser &anagemen"
<o, log bac5 in as roo" unloc5 "he user accoun" ,i"h "he chuser command7
I chuser acc$untLl$c8ed?5alse ustin

Loo5 a" "he Cus"in s"anFa in "ha" 6ile once again7


R
Cus"in2 admin Q 6alse accoun"Nloc5ed Q 6alse R

;ser accoun" should be unloc5ed no,7

A ! %asic Sys"em Adminis"ra"ion

206

A ! ;ser &anagemen"
To dele"e a user 6rom "he sys"em use "he rmuser 0p username command7
I id ustin uidQ202?Cus"inA gidQ1?s"a66A I rmuser .p ustin I id ustin ;ser no" 6ound in +e"c+pass,d 6ile I

$e6er bac5 "o slide I 1>E, and re8crea"e "his user7


A ! %asic Sys"em Adminis"ra"ion 20'

A ! ;ser &anagemen"
To crea"e a group, use "he command m5group7
I ls#r$up d!a Group SdbaS does no" e:is"7 I m8#r$up d!a I I tail .1 *etc*#r$up dba2P22022 I ls#r$up d!a dba idQ202 adminQ6alse usersQ regis"ryQ6iles I

<o"e, A group name has a limi" o6 G alphanumeric charac"ers in ;ni:7


A ! %asic Sys"em Adminis"ra"ion 208

A ! ;ser &anagemen"
To dele"e "he group 6rom "he sys"em, use "he rmgroup command7
I ls#r$up d!a dba idQ202 adminQ6alse usersQ regis"ryQ6iles I rm#r$up d!a I ls#r$up d!a Group SdbaS does no" e:is"7 I tail .1 *etc*#r$up ipsec2P22002 I

Go bac5 "o "he previous slide I 20G, and re8crea"e "he user group7

A ! %asic Sys"em Adminis"ra"ion

209

A ! ;ser &anagemen"
'u" user Cus"in in"o "he group, ,i"h "he chuser command7
I id ustin uidQ203?Cus"inA gidQ1?s"a66A I chuser p#rp?d!a ustin I id ustin uidQ20E?Cus"inA gidQ202?dbaA groupsQ1?s"a66A I tail .1 *etc*pass/d Cus"in2O220E220222+home+Cus"in2+usr+bin+5sh I

6 you no"iced, "here are ",o group se""ings 6or a user in A !7 'rimary groups, and group se"7 )hen you crea"e a 6ile i" is o,ned by "he user ,ho crea"ed "he 6ile, and is pu" in "he primary group o6 "ha" user7 Hou could "emporarily s,i"ch "o any one o6 "he secondary groups lis"ed in "he group se" i6 you needed "o7 &ore on "his in "he securi"y sec"ion7
A ! %asic Sys"em Adminis"ra"ion 210

A ! ;ser &anagemen"
" may be necessary a" "imes "o send ,ha"Bs called a broadcas" message ou" "o all users curren"ly logged on"o "he sys"em7 Hou do "ha" by logging in as roo", and using "he ,all command7
I /all 7Hstem needs t$ c$me d$/n s$$n 5$r emer#encH maintenance %roadcas" message 6rom roo"_gvicai:1E ?p"s+1A a" 0122>214 777 Sys"em needs "o come do,n soon 6or emergency main"enance I

Log o66 "he sys"em ,i"h e:i", and login again as user Cus"in7
A ! %asic Sys"em Adminis"ra"ion 211

A ! ;ser &anagemen"
There ,ill be "imes ,hen you ,ill have "o s,i"ch be",een di66eren" users on "he sys"em7 /or ins"ance, you are curren"ly logged in as user Cus"in, and you ,an" "o s,i"ch "o being user roo", ,i"hou" comple"ely logging ou" o6 "he sys"em7 Hou can use "he su command 6or "his7 This command s"ands 6or S,i"ch ;ser7
Y id uidQ202?Cus"inA gidQ202?dbaA Y su r$$t roo"Ts 'ass,ord2 I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I

6 you "ype in "he ,hoami command, ,i"h no spaces, i" ,ill display "he user you suBd "o, curren"ly logged in as7 6 you "ype in "he ,ho am i command ,i"h spaces, i" ,ill display "he user you suBd 6rom7
I /h$ami roo" I /h$ am i Cus"in p"s+0 I

Sep D 22201

?11271>G722071A

A ! %asic Sys"em Adminis"ra"ion

212

A ! ;ser &anagemen"
<o"e, i6 you "ype in su, ,i"hou" a user name as an argumen" "he meaning o6 "he command changes 6rom S,i"ch ;ser, "o Super ;ser, and by de6aul" ,ill s,i"ch you "o roo", i6 o6 course, you 5no, "he pass,ord7 Type in e:i", "o ge" bac5 "o user Cus"in, and "his "ime "ype in su ,i"hou" a username argumen"2
I e)it Y id uidQ203?Cus"inA gidQ1?s"a66A Y su roo"Ts 'ass,ord2 I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I

Type in e:i" "o ge" bac5 "o user Cus"in2


I e)it

A ! %asic Sys"em Adminis"ra"ion

213

A ! ;ser &anagemen"
<o"ice ,hen a normal, non8roo", user suBs "o ano"her user, no" Cus" roo", "ha" user is reMuired "o supply "he "arge" userBs pass,ord "o su "o "ha" "arge" user7
Y id uidQ20>?Cus"inA gidQ202?dbaA Y su r$$t roo"Ts 'ass,ord2 I

<o, su 6rom roo" "o "he user Cus"in7 <o"ice ho, you are no" promp"ed 6or Cus"inBs pass,ord7 This is because you are roo"7
I su ustin Y id uidQ20>?Cus"inA gidQ202?dbaA Y

Close "he pu""y applica"ion, and "hen log in"o "he sys"em again, as user roo"7

A ! %asic Sys"em Adminis"ra"ion

214

A ! ;ser &anagemen"
Hou can also su "o a user ,i"h a 8, hyphen7 This means "ha" "he user should pic5 up "he en"ire environmen"2 variables, e"c, o6 "he "arge" user7 Le"Bs say ,e appended "he 6ollo,ing "o Cus"inBs 7pro6ile 6ile2
I (i O ustin*%pr$5ile R 'AT.Q+usr+bin2+e"c2+usr+sbin2+usr+ucb2Y.(&*+bin2+usr+bin+!112+sbin27 e:por" 'AT. i6 U 8s SY&A LS V I This is a" Shell s"ar"up7 n normal "hen echo SY&A L&SGS I opera"ion, "he Shell chec5s 6i I periodically7 N6J?JKI ech$ BN6MMK S6M,K>6 -K I76R JI7-0<% JKI 7IV1 S0-N -N6 . =R&I>6<-B I

A ! %asic Sys"em Adminis"ra"ion

215

A ! ;ser &anagmen"
I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I su ustin Y id uidQ203?Cus"inA gidQ1?s"a66A Y ech$ @N6J Y e)it I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I su . ustin .*LL( )*LC(&* T( ;S*$ #;ST <7 H(; S;TD ) T. T.* 0 A$G;&*<T Y id uidQ203?Cus"inA gidQ1?s"a66A Y ech$ @N6J H(; Y e)it I

A ! %asic Sys"em Adminis"ra"ion

216

A ! ;ser &anagemen"
There is an audi" log o6 su a""emp"s, 6ailures, and successes ,hich are logged in "he 6ile +var+adm+sulog7 n "his 6ile "he charac"er ] indica"es "he su ,as success6ul7 n "his 6ile "he charac"er 0 indica"es "he su ,as unsucess6ul7 Log ou" o6 "he sys"em, and "hen log bac5 in as user Cus"in7 Then 6ail a" an a""emp" "o su "o roo", and "hen succeed7
Y id uidQ202?Cus"inA gidQ202?dbaA Y su . roo"Ts 'ass,ord2 Canno" su "o Sroo"S 2 Au"hen"ica"ion is denied7 Y su . roo"Ts 'ass,ord2 I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I

A ! %asic Sys"em Adminis"ra"ion

21'

A ! ;ser &anagemen"

I cd *(ar*adm I p/d +var+adm I ls .l sul$# 8r,8888888 1 roo" sys"em E20 Sep 11 10233 sulog

I tail .2 sul$# S; 01+11 10233 8 p"s+1 Cus"in8roo" S; 01+11 10233 ] p"s+1 Cus"in8roo" I

A ! %asic Sys"em Adminis"ra"ion

218

A ! ;ser &anagemen"
The 7plan 6ile ,hich you can pu" in "he userBs home direc"ory, +home+userNname+, by de6aul", presen"s an overall obCec"ive "o "he userBs e:is"ence on "ha" sys"em7
I 5in#er ustin Login name2 Cus"in n real li6e2 #us"in $ichard %leis"ein Direc"ory2 +home+Cus"in Shell2 +usr+bin+5sh <o 'lan7 I su . ustin Y id uidQ202?Cus"inA gidQ1?dbaA Y p/d +home+Cus"in Y ech$ BAarticipatin# in the de(el$pment $5 the s$5t/areVs mem$rH structureB C %plan Y ls .l %plan 8r,8r88r88 1 Cus"in dba >G <ov 2D 1>202 7plan Y cat %plan 'ar"icipa"ing in "he developmen" o6 "he so6",areTs memory s"ruc"ure Y e)it I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I 5in#er ustin Login name2 Cus"in n real li6e2 #us"in $ichard %leis"ein Direc"ory2 +home+Cus"in Shell2 +usr+bin+5sh 'lan2 Aarticipatin# in the de(el$pment $5 the s$5t/areVs mem$rH structure

A ! %asic Sys"em Adminis"ra"ion

219

A ! ;ser &anagemen"
The +home+user+7proCec" 6ile displays "he name o6 a proCec" "ha" "he user migh" be involved in, reMuiring "hem "o be de6ined on "his sys"em2
I 5in#er ustin Login name2 Cus"in Direc"ory2 +home+Cus"in 'lan2 n real li6e2 #us"in $ichard %leis"ein Shell2 +usr+bin+5sh

'ar"icipa"ing in "he developmen" o6 "he so6",areTs memory s"ruc"ure I su . ustin Y id uidQ202?Cus"inA gidQ1?dbaA Y p/d +home+Cus"in Y ech$ B7$5t/are 1e(el$pment phase G 1B C %pr$ ect Y ls .l %pr$ ect 8r,8r88r88 1 Cus"in dba 31 <ov 2D 1>204 7proCec" Y cat %pr$ ect So6",are Developmen" phase I 1 Y e)it I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I 5in#er ustin Login name2 Cus"in n real li6e2 #us"in $ichard %leis"ein Direc"ory2 +home+Cus"in Shell2 +usr+bin+5sh 'roCec"2 7$5t/are 1e(el$pment phase G 1 'lan2 'ar"icipa"ing in "he developmen" o6 "he so6",areTs memory s"ruc"ure

A ! %asic Sys"em Adminis"ra"ion

220

A ! ;ser &anagemen"
There ,ill be "imes ,hen you ,ish "o loc5 ou" a user accoun" in A !7 Hou can do "his ,i"h smi""y7 5no, ,e did "his be6ore, "his is Cus" "o ge" you used "o smi"7 As roo"7
I smittH users

A ! %asic Sys"em Adminis"ra"ion

221

A ! ;ser &anagemen"
Selec" "he user ,hose accoun" you ,ish "o loc5 ou"2

A ! %asic Sys"em Adminis"ra"ion

222

A ! ;ser &anagemen"
Change "o "rue, ,i"h "he WTA%X 5ey2

A ! %asic Sys"em Adminis"ra"ion

223

A ! ;ser &anagemen"

X;10C
A ! %asic Sys"em Adminis"ra"ion 224

A ! ;ser &anagemen"
6 you chec5 "he +usr+securi"y+user 6ile, you ,ill see "ha" Cus"inBs accoun"Nloc5ed parame"er has changed "o "rue2
I tail .10 *etc*securitH*user umas5 Q 22 de6aul"Nroles Q SysCon6ig regis"ry Q 6iles Cus"in2 admin Q 6alse acc$untLl$c8ed ? true G usrc8 .n ustin 30018>>2 ;ser Cus"in is loc5ed

.o,ever roo" can override "his because roo" can s"ill su "o "his accoun" Cus" 6ine2
I su . ustin Y id uidQ203?Cus"inA gidQ1?dbaA Y

Log ou" and "hen a""emp" "o login as user Cus"in2


Y e)it G e)it

A ! %asic Sys"em Adminis"ra"ion

225

A ! ;ser &anagemen"
A ! -ersion > Copyrigh" %& Corpora"ion, 11G2, 20107 login2 ustin Cus"inTs 'ass,ord2 3004.301 J$ur acc$unt has !een l$c8edY please see the sHstem administrat$r% To unloc5 "he accoun", go ahead and log bac5 in"o "he sys"em as roo" again7 This "ime le"Bs change "his userBs a""ribu"e via "he command line ra"her "han ,i"h smi"7 I chuser acc$untLl$c8ed?5alse ustin I tail *etc*securitH*user umas5 Q 22 de6aul"Nroles Q SysCon6ig regis"ry Q 6iles Cus"in2 admin Q 6alse acc$untLl$c8ed ? 5alse I I usrc8 n ustin I

<o, e:i", and a""emp" "o login as user Cus"in again7 This "ime you ,ill succeed7
A ! %asic Sys"em Adminis"ra"ion 226

A ! ;ser &anagemen"
The de6aul" userBs ;ni: shell in A !, is @orn7 To change "ha" you use "he pass,d command7 To de"ermine ,hich shell your user is curren"ly se" "o, display "he value o6 "he sys"em variable YS.*LL7
Y id uidQ202?Cus"inA gidQ1?dba Y ech$ @7N6MM +usr+bin+5sh Y

To change "he login shell, log ou", and "hen log bac5 in as "he roo" user7 (nce in as roo", chec5 "he pass,ord 6ile "o see ,ha" shell user Cus"in curren"ly has se" as his de6aul"7
I #rep .i ustin *etc*pass/d Cus"in2P22032122+home+Cus"in2+usr*!in*8sh I

A ! %asic Sys"em Adminis"ra"ion

22'

A ! ;ser &anagemen"
I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I pass/d .s ustin Curren" available shells2 +bin+sh +bin+bsh +bin+csh +bin+5sh +bin+"sh +bin+5sh13 +usr+bin+sh +usr+bin+bsh +usr+bin+csh +usr+bin+5sh +usr+bin+"sh +usr+bin+5sh13 +usr+bin+r5sh +usr+bin+r5sh13 +usr+sbin+uucp+uucico +usr+sbin+sliplogin +usr+sbin+snappd Cus"inTs curren" login shell2 +usr+bin+5sh Change ?yesA or ?noA9 X Hes To9X*!in*!sh A ! %asic Sys"em Adminis"ra"ion 228

A ! ;ser &anagemen"
I #rep .i ustin *etc*pass/d Cus"in2P22032122+home+Cus"in2*usr*!in*!sh I

Log ou", and "hen log bac5 in"o "he sys"em again as user2 Cus"in7 Hou ,ill see ho, "he de6aul" shell o6 "his user has changed 6rom @orn, "o %ourne2
Y id uidQ203?Cus"inA gidQ1?s"a66A Y ech$ @7N6MM +usr+bin+bsh Y

There is also a chsh command, ,hich ,ill accomplish "he same "hing7

A ! %asic Sys"em Adminis"ra"ion

229

A ! ;ser &anagemen"
;ni: has ",o buil"8in schedulers7 These schedulers allo, you "o se"up programs "o run a" any da"e, or "ime in "he 6u"ure una""ended7 The ",o schedulers are Cron, and A"7 The Cron scheduler is "he mos" ,idely used7 The Cron scheduler is implemen"ed by ,ay o6 a cron "able7 A Cron "able is a 6ile ,hich holds "he Cob+Cron con6igura"ion da"a7 %y con6igura"ion da"a, mean "he da"e, and "ime "he schedule+Cob ,ill run una""ended on "he sys"em7 *very user ,ho is au"horiFed "o use "he cron scheduler, ,ill have "heir o,n cron "able 6ile7

A ! %asic Sys"em Adminis"ra"ion

230

A ! ;ser &anagemen"
;serBs cron"abs are 5ep" in "he 6ile +var+spool+cron+cron"abs+ The roo" user has a cron"ab se"up by de6aul"7 Hou can see ,ha"Bs scheduled "o run via "he cron scheduler, by using "he command cron"ab 0l, ,hile logged
I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I I cr$nta! l R7 I0 3 O O O +usr+sbin+s5ul5er IE4 2 O O 0 +usr+lib+spell+compress IE4 23 O O O ulimi" 4000b +usr+lib+smdemon7cleanu X +dev+null 0 11 O O O +usr+bin+errclear 8d S,( 30 0 12 O O O +usr+bin+errclear 8d . 10 0 14 O O O +usr+lib+ras+dumpchec5 X+dev+null 2X=1 I SSA ,arning 2 Dele"ing "he ne:" ",o lines may cause errors in redundan" ISSA ,arning 2 hard,are "o go unde"ec"ed7 01 4 O O O +usr+lpp+diagnos"ics+bin+runNssaNela 1X+dev+null 2X+dev+null 0 O O O O +usr+lpp+diagnos"ics+bin+runNssaNheal"hchec5 1X+dev+null 2X+dev+null I SSA ,arning 2 Dele"ing "he ne:" line may allo, enclosure hard,are errors "o go unde"ec"ed

A ! %asic Sys"em Adminis"ra"ion

231

A ! ;ser &anagemen"
The 6ollo,ing is an e:ample o6 a cron"ab en"ry 0 2 3 2 0 +home+bob+program1 There are si: 6ields in a cron"ab con6igura"ion7 They are as 6ollo,s, 6rom le6" "o righ"7 1 0 The minu"e o6 "he hour "he Cob ,ill run 0 ?0841A 2 0 The hour o6 "he day "he Cob ,ill run 0 ?0823A 3 0 The day o6 "he mon"h "he Cob ,ill run 0 ?1831A E 0 The mon"h o6 "he year "he Cob ,ill run 0 ?1812A 4 0 The day o6 "he ,ee5 "he Cob ,ill run 0 ?08>A 0 Q Sunday7 > 0 Command+program "o run7 n our e:ample a" "he "op o6 "he page a program called program1 ,hich resides in "he direc"ory +home+bob, ,ill run a" 2am, on /ebruary 3rd, on Sunday7 Hou can also use an as"eric5, O, in a speci6ic 6ield "o deno"e, run every ,ha"ever7 The pound sign, I, ,ill disable "ha" Cob+program 6rom running via cron7
A ! %asic Sys"em Adminis"ra"ion 232

A ! ;ser &anagemen"
Se""ing "he *D T($ sys"em variable "o a speci6ic edi"or ,ill "ell "he cron"ab edi"or ,hich edi"or "o use "o edi" "he cron"ab7
I ls .l *usr*!in*(i 8r8:r8:r8: 4 bin bin 302D0> Sep D 222E1 +usr+bin+vi

I e)p$rt 610-KR?*usr*!in*(i I ech$ @610-KR +usr+bin+vi I date /ri Sep 11 102E021G *DT 2001 I I cr$nta! e Z 45 10 3 3 3 *usr*!in*sleep 60 [ I ps .e5 : #rep .i sleep roo" 3D2DE> 3E01D2 0 102E1223 p"s+0 0200 grep 8i sleep I

A ! %asic Sys"em Adminis"ra"ion

233

A ! ;ser &anagemen"
Hou can vie, "he s"a"us o6 a pas" cron Cob by vie,ing "he +var+adm+cron+log 6ile7
I ps .e5 : #rep .i sleep roo" 3D2D4E 1 0 102E4200 I cd *(ar*adm*cr$n I p/d +var+adm+cron I ls .l l$# 8r,8r,8r88 1 bin bin 32041 Sep 11 11200 log

8 0200 +usr+bin+sleep >0

I tail l$# roo" 2 C&D ? +usr+lpp+diagnos"ics+bin+runNssaNheal"hchec5 1X+dev+null 2X+de v+null A 2 ' D ? 3D2GD> A 2 /ri Sep 11 10200200 2001 Cron #ob ,i"h pid2 3D2GD> Success6ul roo" 2 C&D ? +usr+lpp+diagnos"ics+bin+runNssaNenclNheal"hchec5 1X+dev+null 2X+dev+null A 2 ' D ? 3D21E0 A 2 /ri Sep 11 10230200 2001 Cron #ob ,i"h pid2 3D21E0 Success6ul r$$t : ,>1 ( *usr*!in*sleep 1000 [ ) : A01 ( 3934'0 ) : ;ri 7ep 11 10:45:00 2009 ,r$n J$! /ith pid: 3934'0 7uccess5ul

A ! %asic Sys"em Adminis"ra"ion

234

A ! ;ser &anagemen"
Hou can also use "he a" scheduler "o run programs una""ended in ;ni:+A !7 The advan"age o6 using "he a" scheduler over cron, especially 6or on8"ime Cobs, is "ha" you do no" have "o clean up "he Cob 6rom any "ab 6ile, ,hen i"Bs comple"ed7
I date /ri Sep 11 11201241 *DT 2001 I at 11:11 t$daH sleep >0 Cob roo"71242>G1G>07a a" /ri Sep 11 11211200 2001 I at .l roo"71242>G1G>07a I R I ps .e5 : #rep .i sleep roo" 3132GE 3D2G3G 0 11211200 I at .l I 8 0200 sleep >0 /ri Sep 11 11211200 2001

A ! %asic Sys"em Adminis"ra"ion

235

A ! ;ser &anagemen"
A" Cobs s"a"usB are also logged "o "he +var+adm+cron+log 6ile7
I tail *(ar*adm*cr$n*l$# roo" 2 C&D ? +usr+lpp+diagnos"ics+bin+runNssaNenclNheal"hchec5 1X+dev+null 2X+dev+null A 2 ' D ? 3D21E0 A 2 /ri Sep 11 10230200 2001 Cron #ob ,i"h pid2 3D21E0 Success6ul roo" 2 C&D ? +usr+bin+sleep 1000 = A 2 ' D ? 313ED0 A 2 /ri Sep 11 102E4200 2001 Cron #ob ,i"h pid2 313ED0 Success6ul roo" 2 C&D ? +usr+bin+errclear 8d S,( 30 A 2 ' D ? 31324G A 2 /ri Sep 11 11 200200 2001 roo" 2 C&D ? +usr+lpp+diagnos"ics+bin+runNssaNheal"hchec5 1X+dev+null 2X+de v+null A 2 ' D ? E04>1E A 2 /ri Sep 11 11200200 2001 Cron #ob ,i"h pid2 E04>1E Success6ul Cron #ob ,i"h pid2 31324G Success6ul r$$t : ,>1 ( r$$t%1252681860%a ) : A01 ( 3'2838 ) : ;ri 7ep 11 11:11:00 2009 ,r$n J$! /ith pid: 3'2838 7uccess5ul I

A ! %asic Sys"em Adminis"ra"ion

236

A ! ;ser &anagemen"
The cron, and a" schedulers also have a basic securi"y mechanism7

8 The 6ile *(ar*adm*cr$n*cr$n%denH is used "o lis" users ,ho are no" au"horiFed "o use cron7 8 The 6ile *(ar*adm*cr$n*cr$n%all$/ is used "o lis" users ,ho are au"horiFed "o use cron7 8 The 6ile *(ar*adm*cr$n*at%denH is used "o lis" users ,ho are no" au"horiFed "o use a"7 8 The 6ile *(ar*adm*cr$n*at%all$/ is used "o lis" users ,ho are au"horiFed "o use a"7

A ! %asic Sys"em Adminis"ra"ion

23'

A ! ;ser &anagemen"
;ser in6orma"ion is usually 5ep" local on "he A ! sys"em "hey are logging on"o, including "heir pass,ords7 Hou can use a 6ea"ure ,hich comes ,i"h A ! called < S, <e",or5 n6orma"ion Services, or Hello, 'ages7 This is a s"andard ,hich allo,s you "o have a cen"ral place "o loo5 up users, pass,ords, and o"her in6orma"ion7 This is a nice al"erna"ive "o managing "his in6orma"ion individually 6or each sys"em7 Sudo is an (pen Source "ool you can ins"all, ,hich ,ill allo, a regular user "o gain roo" privilege ,i"h "he regular userBs pass,ord7 A ! also has roles, $%AC, ,hich can be used "o easily "o dis"ribu"e sys"em privileges, and "as5s "o di66eren" users7

A ! %asic Sys"em Adminis"ra"ion

238

A ! Sys"em S"ar"up and Shu"do,n

A ! %asic Sys"em Adminis"ra"ion

239

A ! Sys"em S"ar"up and Shu"do,n


Shu""ing do,n an A ! sys"em has "o be done in a con"rolled, grace6ul ma""er7 /orge" abou" a companiesB change managemen" policies, you have "o ensure "he applica"ions, da"abases ,hich run on "he sys"em come do,n grace6ully, no" "o men"ion "he opera"ing sys"em i"sel67

I shutd$/n
S.;TD()< '$(G$A& Tue Apr 1D 012202E> CDT 200D %roadcas" message 6rom roo"_h1 ?""yA a" 012202E> 777 shu"do,n2 'L*AS* L(G (// <() PPP All processes ,ill be 5illed in 1 minu"e7 %roadcas" message 6rom roo"_h1 ?p"s+0A a" 012212E> 777 shu"do,n2 T.* SHST*& S %* <G S.;T D()< <() )ai" 6or T.al" comple"ed777T be6ore s"opping7 *rror repor"ing has s"opped7 Advanced Accoun"ing has s"opped777 'rocess accoun"ing has s"opped7 n6sNclean2 S"opping </S+< S Daemons 0413800E The Subsys"em or Group, n6sd, is curren"ly inopera"ive7 041380EE The biod Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7loc5d Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7s"a"d Subsys"em ,as reMues"ed "o s"op7

A ! %asic Sys"em Adminis"ra"ion

240

A ! Sys"em S"ar"up and Shu"do,n


A6"er "he sys"em shu"s do,n, res"ar" i" via "he -&7 See ins"ruc"or

A ! %asic Sys"em Adminis"ra"ion

241

A ! Sys"em S"ar"up and Shu"do,n


Hou can also "ell "he sys"em "o reboo", a6"er "he grace6ul shu"do,n7
I shutd$/n .;r S.;TD()< '$(G$A& Tue Apr 1D 01232224 CDT 200D )ai" 6or T$eboo"ing777T be6ore s"opping7 *rror repor"ing has s"opped7 Advanced Accoun"ing has s"opped777 'rocess accoun"ing has s"opped7 n6sNclean2 S"opping </S+< S Daemons 0413800E The Subsys"em or Group, n6sd, is curren"ly inopera"ive7 041380EE The biod Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7loc5d Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7s"a"d Subsys"em ,as reMues"ed "o s"op7 0413800E The Subsys"em or Group, gssd, is curren"ly inopera"ive7 0413800E The Subsys"em or Group, n6srgyd, is curren"ly inopera"ive7 0413800E The Subsys"em or Group, rpc7moun"d, is curren"ly inopera"ive7 0413800E The Subsys"em or Group, ypbind, is curren"ly inopera"ive7 Connec"ion closed7

A ! %asic Sys"em Adminis"ra"ion

242

A ! Sys"em S"ar"up and Shu"do,n


Some"imes i" maybe use6ul "o 6a5e shu"do,n "he sys"em7 /or e:ample, "o ge" users o66 o6 "he sys"em 6or applica"ion main"enance, e"c77
I shutd$/n .8 S.;TD()< '$(G$A& Tue Apr 1D 0123121> CDT 200D %roadcas" message 6rom roo"_h1 ?""yA a" 0123121> 777 shu"do,n2 'L*AS* L(G (// <() PPP All processes ,ill be 5illed in 1 minu"e7

%roadcas" message 6rom roo"_h1 ?p"s+0A a" 012E021> 777 shu"do,n2 T.* SHST*& S %* <G S.;T D()< <() shu"do,n 85 is 6inished7 The sys"em is s"ill up7 I

A ! %asic Sys"em Adminis"ra"ion

243

A ! Sys"em S"ar"up and Shu"do,n


There is a special 6ile+scrip" you can crea"e called +ec+rc7shu"do,n7 Any code+commands con"ained ,i"hin i" ,ill be au"oma"ically called, and e:ecu"ed by "he shu"do,n command7 This is use6ul 6or ,hen you need "o bring do,n applica"ions, or da"abases grace6ully, e"c77
I ls .l *etc*rc%shutd$/n ls2 0>4383E1 The 6ile +e"c+rc7shu"do,n does no" e:is"7 I (i *etc*rc%shutd$/n 77 G cat *etc*rc%shutd$/n G7Hstem shutd$/n script /ritten !H =0T sHstem admins% G-his script /ill !e aut$maticallH e)ecuted !H =0T up$n sHstem shutd$/n G(ia the shutd$/n =0T c$mmand% G G ech$ B-67-%%% -N6 7NI-1KS< ,K>>=<1 N=7 B66< 0<QK+61 K< -N07 7J7-6>%B G G G6nd $5 script G chm$d u2) *etc*rc%shutd$/n

<o"e2 The JechoK command is used in ;ni: shell scrip"ing+programming7 )e donB" cover "ha" "opic in "his course7
A ! %asic Sys"em Adminis"ra"ion 244

A ! Sys"em S"ar"up and Shu"do,n


The scrip" is e:ecu"ed, ,hen "he shu"do,n command is ran7
I shutd$/n .;r S.;TD()< '$(G$A& Tue Apr 1D 0G234244 CDT 200D -67-%%% -N6 7NI-1KS< ,K>>=<1 N=7 B66< 0<QK+61 K< -N07 7J7-6>% )ai" 6or T$eboo"ing777T be6ore s"opping7 *rror repor"ing has s"opped7 Advanced Accoun"ing has s"opped777 'rocess accoun"ing has s"opped7 n6sNclean2 S"opping </S+< S Daemons 0413800E The Subsys"em or Group, n6sd, is curren"ly inopera"ive7 041380EE The biod Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7loc5d Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7s"a"d Subsys"em ,as reMues"ed "o s"op7 0413800E The Subsys"em or Group, gssd, is curren"ly inopera"ive7 0413800E The Subsys"em or Group, n6srgyd, is curren"ly inopera"ive7 0413800E The Subsys"em or Group, rpc7moun"d, is curren"ly inopera"ive7 0413800E The Subsys"em or Group, ypbind, is curren"ly inopera"ive7 Connec"ion closed7

<o"e2 The hal" command can also shu"do,n a sys"em, and "he reboo" command can also res"ar" "he sys"em7
A ! %asic Sys"em Adminis"ra"ion 245

A ! Sys"em S"ar"up and Shu"do,n


The 6ile +e"c+ini""ab, ,hich s"ands 6or < TialiFa"ion TA%le, con"ains programs "o e:ecu"e au"oma"ically on sys"em reboo"7
I lsita! .a ini"222ini"de6aul"2 brc22sysini"2+sbin+rc7boo" 3 X+dev+console 2X=1 I 'hase 3 o6 sys"em boo" po,er6ail22po,er6ail2+e"c+rc7po,er6ail 2X=1 Z alog 8"boo" X +dev+console I 'o,er /ailure De"ec"ion load>Ebi"222,ai"2+e"c+me"hods+c6g>E X+dev+console 2X=1 I *nable >E8bi" e:ecs "unables223E4>DG12,ai"2+usr+sbin+"unres"ore 8$ X +dev+console 2X=1 I Se" "unables rc223E4>DG12,ai"2+e"c+rc 2X=1 Z alog 8"boo" X +dev+console I &ul"i8;ser chec5s 6bchec5223E4>DG12,ai"2+usr+sbin+6bchec5 2X=1 Z alog 8"boo" X +dev+console I run+e"c+6irs"boo" srcms"r223E4>DG12respa,n2+usr+sbin+srcms"r I Sys"em $esource Con"roller rc"cpip223E4>DG12,ai"2+e"c+rc7"cpip X +dev+console 2X=1 I S"ar" TC'+ ' daemons nimsh222,ai"2+usr+bin+s"ar"src 8g nimclien" 8a S8cS X+dev+console 2X=1 sniins"222,ai"2+var+adm+sni+sniprei X +dev+console 2X=1 rcn6s223E4>DG12,ai"2+e"c+rc7n6s X +dev+console 2X=1 I S"ar" </S Daemons cron223E4>DG12respa,n2+usr+sbin+cron nimclien"222once2+usr+sbin+nimclien" 8S running X +dev+console 2X=1 I in6orm nim ,eTre running cons20123E4>DG12respa,n2+usr+sbin+ge""y +dev+console shdaemon222o662+usr+sbin+shdaemon X+dev+console 2X=1 I .igh availabili"y daemon R

A ! %asic Sys"em Adminis"ra"ion

246

A ! Sys"em S"ar"up and Shu"do,n


The 6ields o6 "he ini""ab 6ile are2 den"i6ier2 $unNLevel2 Ac"ion2 Command 0denti5ier Q The s"ring "he line is 5no,n as7 RunLMe(el Q The run8level "o s"ar" "his program a" 0 De6aul" is 27 =cti$n Q The ac"ion "o per6orm ,i"h "his program+scrip"7 ,$mmand Q The program+scrip" "o s"ar" a" sys"em reboo"7

A ! %asic Sys"em Adminis"ra"ion

24'

A ! Sys"em S"ar"up and Shu"do,n


I m8ita! Bsleep:2:$nce:*usr*!in*sleep 10000 2C[1R I I lsita! sleep sleep222once2+usr+bin+sleep 10000 2X=1 I <o,, reboo" "he sys"em7 I shutd$/n .;r S.;TD()< '$(G$A& Sa" Sep 4 1D20D2EG *DT 2001 )ai" 6or T$eboo"ing777T be6ore s"opping7 *rror logging s"opped777 Advanced Accoun"ing has s"opped777 'rocess accoun"ing s"opped777 S"opping </S+< S Daemons 0413800E The Subsys"em or Group, n6sd, is curren"ly inopera"ive7 041380EE The biod Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7loc5d Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7s"a"d Subsys"em ,as reMues"ed "o s"op7 0413800E The Subsys"em or Group, gssd, is curren"ly inopera"ive7 0413800E The Subsys"em or Group, n6srgyd, is curren"ly inopera"ive7

<o"e2 The JsleepK command is used in ;ni: shell scrip"ing+programming7 )e donB" cover "ha" "opic in "his course7
A ! %asic Sys"em Adminis"ra"ion 248

A ! Sys"em S"ar"up and Shu"do,n


)hen "he sys"em boo"s bac5 up you can de"ermine ho, long "he sys"em has been up ,i"h "he up"ime command, and you can de"ermine "he las" da"e, and "ime "he sys"em has been reboo"ed ,i"h "he ,ho 0b command7
I uptime 04211'& up 1 min, 1 user, load average2 07E1, 0712, 070E I /h$ .! 7 sys"em boo" Sep 4 1D210 I

A ! %asic Sys"em Adminis"ra"ion

249

A ! Sys"em S"ar"up and Shu"do,n


Hou can also de"ermine "he las" "ime "he sys"em ,as reboo"ed ,i"h "he las" command7
I last re!$$t reboo" L ,"mp begins I last shutd$/n shu"do,n p"s+1 ,"mp begins I Sep 0E 12211 Sep 04 1D210 Sep 0E 12211

Sep 04 1D20G

A ! %asic Sys"em Adminis"ra"ion

250

A ! Sys"em S"ar"up and Shu"do,n


HouBll no"ice a6"er sys"em reboo", "ha" "he sleep program+command is running in "he bac5ground7 " ,as s"ar"ed au"oma"ically by "he +e"c+ini""ab 6ile ,hich is called by "he sys"em 0 ini" process7
I ps .e5 : #rep .i sleep : #rep .i( #rep roo" 323DE2 1 0 1D21023G 8 0200 +usr+bin+sleep 10000 I

To remove an en"ry 6rom "he ini""ab use "he rmi"ab command7


I lsita! sleep sleep222once2+usr+bin+sleep 10000 2X=1 I rmita! sleep I lsita! sleep I

<o"e, you could also use "he chi"ab command "o change "he con"en"s o6 an ini""ab en"ry7
A ! %asic Sys"em Adminis"ra"ion 251

A ! Sys"em S"ar"up and Shu"do,n


The SHS - version o6 s"ar"up and shu"do,n scrip"s are used "o s"ar"up and shu"do,n services au"oma"ically on sys"em boo" up and shu"do,n respec"ively7 The +e"c+rc7d+ direc"ory con"ains a sub8direc"ory 6or each sys"em run8level, a direc"ory 6or all "he scrip"s 6or manual e:ecu"ion, and "he ac"ual rc ;ni: shell scrip" ,hich runs "he scrip"s 6or each run8level, ,i"h "he run level as "he argumen" "o "he shell scrip"7 This scrip" is called 6rom "he +e"c+ini""ab 6ile2
Y m$re *etc*initta! R l2222,ai"2+e"c+rc7d+rc 2 l3232,ai"2+e"c+rc7d+rc 3 lE2E2,ai"2+e"c+rc7d+rc E l4242,ai"2+e"c+rc7d+rc 4 l>2>2,ai"2+e"c+rc7d+rc > lD2D2,ai"2+e"c+rc7d+rc D lG2G2,ai"2+e"c+rc7d+rc G l1212,ai"2+e"c+rc7d+rc 1

A ! %asic Sys"em Adminis"ra"ion

252

A ! Sys"em S"ar"up and Shu"do,n


I ls .l *etc*rc%d "o"al G dr,:r8:r8: 2 roo" sys"em 8r8:r88r88 1 roo" sys"em dr,:r8:r8: 2 roo" sys"em dr,:r8:r8: 2 roo" sys"em dr,:r8:r8: 2 roo" sys"em dr,:r8:r8: 2 roo" sys"em dr,:r8:r8: 2 roo" sys"em dr,:r8:r8: 2 roo" sys"em dr,:r8:r8: 2 roo" sys"em dr,:r8:r8: 2 roo" sys"em I 24> Apr 14 2010 ini"7d 1>10 Aug 22 200D rc 24> <ov 2E 2122E rc27d 24> <ov 2E 1G201 rc37d 24> Apr 14 2010 rcE7d 24> Apr 14 2010 rc47d 24> Apr 14 2010 rc>7d 24> Apr 14 2010 rcD7d 24> Apr 14 2010 rcG7d 24> Apr 14 2010 rc17d

A ! %asic Sys"em Adminis"ra"ion

253

A ! Sys"em S"ar"up and Shu"do,n


I cd *etc*rc%d*init%d I p/d *etc*rc%d*init%d I (i script1%8sh

R
case B@1B in st$p) ech$ Bscript 1 e)ecuted $n shutd$/nB C *(ar*script1%shutd$/n%$utYsleep 60YY start) ech$ Bscript 1 e)ecuted $n startupB C *(ar*script1%startup%$utYsleep 60YY 3) ech$ B0n(alid Kpti$n%%BYY esac

A ! %asic Sys"em Adminis"ra"ion

254

A ! Sys"em S"ar"up and Shu"do,n


I (i script2%8sh R case B@1B in st$p) ech$ Bscript 2 e)ecuted $n shutd$/nB C *(ar*script2%shutd$/n%$utYsleep 60YY start) ech$ Bscript 2 e)ecuted $n startupB C *(ar*script2%startup%$utYsleep 60YY 3) ech$ B0n(alid Kpti$n%%BYY esac

A ! %asic Sys"em Adminis"ra"ion

255

A ! Sys"em S"ar"up and Shu"do,n


I (i script3%8sh R case B@1B in st$p) ech$ Bscript 3 e)ecuted $n shutd$/nB C *(ar*script3%shutd$/n%$utYsleep 60YY start) ech$ Bscript 3 e)ecuted $n startupB C *(ar*script3%startup%$utYsleep 60YY 3) ech$ B0n(alid Kpti$n%%BYY esac

A ! %asic Sys"em Adminis"ra"ion

256

A ! Sys"em S"ar"up and Shu"do,n


I chm$d u2) script1%8sh I chm$d u2) script2%8sh I chm$d u2) script3%8sh I cd %% I cd rc2%d I p/d +e"c+rc7d+rc27d I ls @D1i"caTivoliCommonAgen"0 @11dbrc75sh

@,pars

S00c"Nboo"

SD1i"caTivoliCommonAgen"0 S11dbrc75sh

I ln .s *etc*rc%d*init%d*script2%8sh 71script2%8sh I ln .s *etc*rc%d*init%d*script1%8sh 72script1%8sh I ln .s *etc*rc%d*init%d*script3%8sh 73script3%8sh I ls .l "o"al 1> lr,:r,:r,: 1 roo" sys"em 4> <ov 2E 21222 @D1i"caTivoliCommonAgen"0 8X +var+op"+"ivoli+ep+run"ime+nons"op+bin+nons"opservice7sh lr,:r,:r,: 1 roo" sys"em 24 <ov 24 22221 @11dbrc75sh 8X +e"c+rc7d+ini"7d+dbrc75sh 8r8:888888 1 roo" sys"em 2E31 <ov 2E 1G201 @,pars 8r,:r8:r8: 1 roo" sys"em 1D4 <ov 2E 2122E S00c"Nboo" lr,:r,:r,: 1 roo" sys"em 2G <ov 24 2321D S1scrip"275sh 8X +e"c+rc7d+ini"7d+scrip"275sh lr,:r,:r,: 1 roo" sys"em 2G <ov 24 2321D S2scrip"175sh 8X +e"c+rc7d+ini"7d+scrip"175sh lr,:r,:r,: 1 roo" sys"em 2G <ov 24 2321D S3scrip"375sh 8X +e"c+rc7d+ini"7d+scrip"375sh lr,:r,:r,: 1 roo" sys"em 4> <ov 2E 21222 SD1i"caTivoliCommonAgen"0 8X +var+op"+"ivoli+ep+run"ime+nons"op+bin+nons"opservice7sh lr,:r,:r,: 1 roo" sys"em 24 <ov 24 22221 S11dbrc75sh 8X +e"c+rc7d+ini"7d+dbrc75sh I

A ! %asic Sys"em Adminis"ra"ion

25'

A ! Sys"em S"ar"up and Shu"do,n


I ln .s *etc*rc%d*init%d*script3%8sh +1script3%8sh I ln .s *etc*rc%d*init%d*script1%8sh +2script1%8sh I ln .s *etc*rc%d*init%d*script2%8sh +3script2%8sh I ls .l "o"al 1> lr,:r,:r,: 1 roo" sys"em 2G <ov 24 23220 @1scrip"375sh 8X +e"c+rc7d+ini"7d+scrip"375sh lr,:r,:r,: 1 roo" sys"em 2G <ov 24 23220 @2scrip"175sh 8X +e"c+rc7d+ini"7d+scrip"175sh lr,:r,:r,: 1 roo" sys"em 2G <ov 24 23220 @3scrip"275sh 8X +e"c+rc7d+ini"7d+scrip"275sh lr,:r,:r,: 1 roo" sys"em 4> <ov 2E 21222 @D1i"caTivoliCommonAgen"0 8+var+op"+"ivoli+ep+run"ime+nons"op+bin+nons"opservice7sh lr,:r,:r,: 1 roo" sys"em 24 <ov 24 22221 @11dbrc75sh 8X +e"c+rc7d+ini"7d+dbrc75sh 8r8:888888 1 roo" sys"em 2E31 <ov 2E 1G201 @,pars 8r,:r8:r8: 1 roo" sys"em 1D4 <ov 2E 2122E S00c"Nboo" lr,:r,:r,: 1 roo" sys"em 2G <ov 24 2321D S1scrip"275sh 8X +e"c+rc7d+ini"7d+scrip"275sh lr,:r,:r,: 1 roo" sys"em 2G <ov 24 2321D S2scrip"175sh 8X +e"c+rc7d+ini"7d+scrip"175sh lr,:r,:r,: 1 roo" sys"em 2G <ov 24 2321D S3scrip"375sh 8X +e"c+rc7d+ini"7d+scrip"375sh lr,:r,:r,: 1 roo" sys"em 4> <ov 2E 21222 SD1i"caTivoliCommonAgen"0 8X +var+op"+"ivoli+ep+run"ime+nons"op+bin+nons"opservice7sh lr,:r,:r,: 1 roo" sys"em 24 <ov 24 22221 S11dbrc75sh 8X +e"c+rc7d+ini"7d+dbrc75sh I

A ! %asic Sys"em Adminis"ra"ion

258

A ! Sys"em S"ar"up and Shu"do,n


I ls *(ar*3$ut I shutd$/n .;r S.;TD()< '$(G$A& &on &ay 1E 01231232 CDT 200D PAUSES FOR 3 MINUTES )ai" 6or T$eboo"ing777T be6ore s"opping7 &ay 1E 200D 01231232 +usr+es+sbin+clus"er+u"ili"ies+cls"op 2 called ,i"h 6lags 8y 8< 8s 86 8S 0413800E The Subsys"em or Group, clin6o*S, is curren"ly inopera"ive7 *rror repor"ing has s"opped7 Advanced Accoun"ing has s"opped777 'rocess accoun"ing has s"opped7 R I uptime 1123G'& up 1 mins, 1 user, load average2 17E>, 07>D, 0730 I /h$ .! 7 sys"em boo" <ov 24 23221 I

A ! %asic Sys"em Adminis"ra"ion

259

A ! Sys"em S"ar"up and Shu"do,n


)ai" 3 minu"es a6"er "he sys"em comes bac5 up 6rom reboo" 6or "he s"ar"up scrip"s "o e:ecu"e7 $ecap o6 "he scrip" e:ecu"ion seMuence2 Scrip"37shu"do,n ,as se" "o e:ecu"e 6irs" on sys"em shu"do,n7 Scrip"17shu"do,n ,as se" "o e:ecu"e second on sys"em shu"do,n7 Scrip"27shu"do,n ,as se" "o e:ecu"e "hird+las" on sys"em shu"do,n7
I ls .l *(ar*3shutd$/n3 8r,8r88r88 1 roo" sys"em 8r,8r88r88 1 roo" sys"em 8r,8r88r88 1 roo" sys"em 30 Dec 01 14221 +var+scrip"17shu"do,n7ou" ?2A 30 Dec 01 14222 +var+scrip"27shu"do,n7ou" ?3A 30 Dec 01 14220 +var+scrip"37shu"do,n7ou" ?1A

Scrip"27s"ar"up ,as se" "o e:ecu"e 6irs" on sys"em s"ar"up7 Scrip"17s"ar"up ,as se" "o e:ecu"e second on sys"em s"ar"up7 Scrip"37s"ar"up ,as se" "o e:ecu"e "hird+las" on sys"em s"ar"up7
I ls .l *(ar*3startup3 8r,8r88r88 1 roo" sys"em 8r,8r88r88 1 roo" sys"em 8r,8r88r88 1 roo" sys"em I 21 Dec 01 1422E +var+scrip"17s"ar"up7ou" ?2A 21 Dec 01 14223 +var+scrip"27s"ar"up7ou" ?1A 21 Dec 01 14224 +var+scrip"37s"ar"up7ou" ?3A

A ! %asic Sys"em Adminis"ra"ion

260

A ! Sys"em S"ar"up and Shu"do,n


$emove "he scrip"s and log 6iles "hey crea"ed2
I rm *etc*rc%d*init%d*script3 I rm *etc*rc%d*rc2%d*3script3 I rm *(ar*3$ut I ls l *etc*rc%d*init%d*scrip3 ls2 0>4383E1 The 6ile +e"c+rc7d+ini"7d+scrip"O does no" e:is"7 I ls l *etc*rc%d*rc2%d*3scrip3 ls2 0>4383E1 The 6ile +e"c+rc7d+rc27d+OscriO does no" e:is"7 G ls l *(ar*3$ut ls2 0>4383E1 The 6ile +var+Oou" does no" e:is"7

A ! %asic Sys"em Adminis"ra"ion

261

/ilesys"ems

A ! %asic Sys"em Adminis"ra"ion

262

/ilesys"em De"ails
/ilesys"ems are a mechanism "o manage 6iles, and direc"ories on an L-7 #/S 0 #ournaled /ile Sys"em7 /ilesys"ems are crea"ed on "op o6 logical volumes There are ",o "ypes o6 6ilesys"ems ,hich come ,i"h A !2 #/S, and #/S27 0 ?#/S2 ,as in"roduced in A ! version 471A7 )hen you ins"all "he A ! %(S on a >E8bi" sys"em+L'A$, #/S2 6ilesys"em are au"oma"ically crea"ed 6or "he sys"em7 /ilesys"em da"a is Cournaled 6or a #/S, and #/S2 6ilesys"em using a #/S, or #/S2 log respec"ively7 $ecommend using smi""y "o crea"e 6ilesys"ems 0 many, many argumen"s "o "he cr6s command Smi""y allo,s crea"ion 6rom a logical volume or crea"ion o6 6s and lv a" same "ime Supports compressed filesystems

A ! %asic Sys"em Adminis"ra"ion

263

/ilesys"em De"ails
Note: default creation of filesystem is to not mount at system restart n "he ne,es" version o6 A ! >71, 6ilesys"ems can be encryp"ed 6or securi"y7 A ! comes ,i"h a user space Muo"a sys"em ,hich you implemen" a" "he user, and 6ilesys"em level "o assis" in en6orcing space cons"rain"s7 There are snapsho" u"ili"ies available in A !, 6or Muic5 bac5ups o6 6ilesys"em da"a7 /ilesys"ems can be accessed by more "hen one node+server, a" a "ime on a shared dis5 sub8sys"em in a clus"ered environmen" using "he %& produc" G'/S 0 General 'arallel /ile Sys"em7

A ! %asic Sys"em Adminis"ra"ion

264

/ilesys"em De"ails
The di66erences be",een #/S?1A, and #/S2 6ilesys"ems7 &a:imum 6ile siFe 6or #/S is 88X >E gig7 &a:imum 6ile siFe 6or #/S2 is 88X 1 '% &a:imum 6ilesys"em siFe 6or #/S is 88X 1 T%7 &a:imum 6ilesys"em siFe 6or #/S2 is 88X E '% &a:imum number o6 inodes 6or #/S is 88X /i:ed, se" manually a" 6ilesys"em crea"ion7 &a:imum number o6 inodes 6or #/S2 is 88X Dynamic7 Limi"ed by dis5 space capaci"y7

A ! %asic Sys"em Adminis"ra"ion

265

/ilesys"ems
The de6aul" logical volumes, and 6ilesys"ems crea"ed on "he sys"em are as 6ollo,s7 These 6ilesys"ems are needed "o run "he sys"em7
hd1 +home hd2 +usr hd3 +"mp hd4 + 8 ?roo"A hd9(ar +var hd10$pt +op" hd11admin +admin *pr$c +proc

The 6ilesys"ems above, since "hey are ins"alled by de6aul" ,i"h "he opera"ing sys"em, are nic5 named JThe % G GK7
I d5 .# /ilesys"em G% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+hdE 117>2 1712 GE^ 434>D 11^ + +dev+hd2 13712 1714 24^ EE123 2^ +usr +dev+hd1var 073G 0721 EE^ 1GG11 2G^ +var +dev+hd3 373G 373D 1^ DG 1^ +"mp +dev+hd1 30700 37>G GG^ G14E> 10^ +home +dev+hd11admin 0712 0712 1^ 4 1^ +admin +proc 8 8 8 8 8 +proc +dev+hd10op" 2700 07DD >2^ 33134 1>^ +op"

A ! %asic Sys"em Adminis"ra"ion

266

/ilesys"ems
There are also logical volumes ,hich are crea"ed by de6aul" ,i"h "he opera"ing sys"em7 These logical volumes, are called ra, logical volumes because "here are no 6ilesys"ems on "op o6 "hem7 The sys"em uses "hem direc"ly7 hd5 0 The boo" logical volume7 )here "he boo" code resides7 hd6 0 The de6aul" sys"em dump device, and sys"em paging space7 <o"e2 )hen you ins"all a sys"em ,hich is X E Gig o6 physical memory, "he sys"em ,ill au"oma"ically crea"e "he paging space device lgNdumplv "o hold sys"em dumps7 hd8 0 The de6aul" #/S or #/S2 log logical volumes7 )here "he logical volume resides7

A ! %asic Sys"em Adminis"ra"ion

26'

/ilesys"ems
To vie, 6ilesys"ems ,hich are curren"ly moun"ed on "he sys"em "ype in "he moun" command7 This command ,ill also sho, you ,ha" "ype o6 6ilesys"em i" is, #/S, or #/S2, "he da"e and "ime i" ,as moun"ed, and "he logical volume i"Bs using "o Cournal i"Bs changes7
I m$unt node moun"ed moun"ed over v6s da"e op"ions 88888888 888888888888888 888888888888888 888888 888888888888 888888888888888 +dev+hdE + C6s2 <ov 2> 1123E r,,logQ+dev+hdG +dev+hd2 +usr C6s2 <ov 2> 1123E r,,logQ+dev+hdG +dev+hd1var +var C6s2 <ov 2> 1123E r,,logQ+dev+hdG +dev+hd3 +"mp C6s2 <ov 2> 1123E r,,logQ+dev+hdG +dev+hd1 +home C6s2 <ov 2> 11234 r,,logQ+dev+hdG +dev+hd11admin +admin C6s2 <ov 2> 11234 r,,logQ+dev+hdG +proc +proc proc6s <ov 2> 11234 r, +dev+hd10op" +op" C6s2 <ov 2> 11234 r,,logQ+dev+hdG I

A ! %asic Sys"em Adminis"ra"ion

268

A ! Logical -olume &anager

A ! %asic Sys"em Adminis"ra"ion

269

Logical -olume &anager

A ! Logical -olume &anager 0 L-& So6",are level managemen" in"er6ace ,hich provides a me"hod o6 managing dis5s in order "o "urn "hem in"o usable s"orage on A !7 n"egra"ed in A ! archi"ec"ure7 <o subseMuen" licenses, or ins"alla"ions reMuired7 Can add+dele"e+modi6y logical volumes ,hile sys"em is up and running Can add+remove mirroring ,hile up and running Suppor"s $A D 0 ] 1 ?mirroring and s"ripingA 'rovides a rich se" o6 commands "o manage

A ! %asic Sys"em Adminis"ra"ion

2'0

Logical -olume &anager


)hen a hard dis5 is ins"alled in "he sys"em, scsi dis5, or SA< lun, i" is given "he name hdis5! on "he sys"em7 *:2 hdis50, 1, 2, 3, e"c77 )hen a hard dis5 is made a member o6 a volume group, vg, i" is said "o be ini"ialiFed7 )hen ini"ialiFed i" is called a physical volume 0 '-7 Hou crea"e logical volumes+par"i"ions on "he '-s7 These logically divide "he hard dis57 (n "op o6 "hose L-s are 'hysical 'ar"i"ions ''S7 These are regions o6 "he logical volume divided in"o eMual siFe7 (n "op o6 "hose ''s, are logical par"i"ions L'S7 These si" on "op o6 "he ''s and can have one "o many rela"ionships ,i"h "he "heir ''S7 (n "op o6 "he L's, si" "he 6ilesys"ems ,here direc"ories, and 6iles ac"ually reside7 L-& in6orma"ion resides in bo"h "he sys"emBs (D&, and on "he 'i"sel67
A ! %asic Sys"em Adminis"ra"ion 2'1

Logical -olume &anager


/or "he L-& in6orma"ion ,hich resides on dis57 All o6 "he dis5s in a vg 5no, abou" o"her dis5s in "he same vg7 This is accomplished by a special area on dis5 5no,n as "he -GDA 0 -olume Group Descrip"or Area7 6 "here is one dis5 in a vg, "hen "here are ",o -GDAs on one dis57 6 "here are ",o dis5s in a vg, "hen "here is one -GDA on one dis5, and ",o on "he o"her7 6 "here are "hree, or more dis5s in a vg, "hen "here is one -GDA per dis57 The same goes 6or ano"her me"a da"a area o6 a dis5 drive in A !7 This area is called "he -GSA 0 -olume Group S"a"us Area7 This ,ill provide in6orma"ion regarding mirrored copies o6 da"a on dis57

A ! %asic Sys"em Adminis"ra"ion

2'2

Logical -olume &anager

A ! %asic Sys"em Adminis"ra"ion

2'3

Logical -olume &anager

A ! %asic Sys"em Adminis"ra"ion

2'4

Logical -olume &anager


)hen "he sys"em is ins"alled "here is only one volume group de6ined7 This volume group is called roo"vg, and con"ains all o6 "he sys"em logical volumes 0 hdO7 To lis" "he volume groups curren"ly de6ined "o "he sys"em "ype in "he lsvg command, ,hich s"ands 6or LiS" -olume Group7
I ls(# roo"vg I

A ! %asic Sys"em Adminis"ra"ion

2'5

Logical -olume &anager


To ge" more de"ails abou" a volume group, such as "o"al used space, 6ree space, e"c, use "he lsvg command ,i"h "he volume group name as "he argumen"7
G ls(# r$$t(# -(L;&* G$(;'2 roo"vg -G D*<T / *$2 00c11G600000Ec00000001231DDGea26 -G STAT*2 ac"ive '' S c*2 G megaby"e?sA -G '*$& SS (<2 read+,ri"e T(TAL ''s2 >31 ?4112 megaby"esA &A! L-s2 24> /$** ''s2 3G> ?30GG megaby"esA L-s2 1 ;S*D ''s2 243 ?202E megaby"esA ('*< L-s2 G `;($;&2 2 ?*nabledA T(TAL '-s2 1 -G D*SC$ 'T($S2 2 STAL* '-s2 0 STAL* ''s2 0 ACT -* '-s2 1 A;T( (<2 yes &A! ''s per -G2 32412 &A! ''s per '-2 1>24> &A! '-s2 2 LTG siFe ?DynamicA2 24> 5iloby"e?sA A;T( SH<C2 no .(T S'A$*2 no %% '(L CH2 reloca"able I

A ! %asic Sys"em Adminis"ra"ion

2'6

Logical -olume &anager


To lis" "he dis5s ,hich ma5e up "he volume group, "ype in "he command lsvg ,i"h "he op"ion 0p, and "he vg name7
I ls(# .p r$$t(# roo"vg2 '-N<A&* '- STAT* hdis50 ac"ive >31 I

T(TAL ''s /$** ''s /$** D ST$ %;T (< 3G> 124770477007712G7712G

A ! %asic Sys"em Adminis"ra"ion

2''

Logical -olume &anager


To ge" more de"ails abou" a physical volume "ype in lspv ,i"h "he hdis5I name as "he argumen"7
I lsp( hdis80 '.HS CAL -(L;&*2 hdis50 -(L;&* G$(;'2 roo"vg '- D*<T / *$2 00c11G601D211ded -G D*<T / *$ 00c11G600000Ec00000001231DDGea26 '- STAT*2 ac"ive STAL* 'A$T T (<S2 0 ALL(CATA%L*2 yes '' S c*2 G megaby"e?sA L(G CAL -(L;&*S2 1 T(TAL ''s2 >31 ?4112 megaby"esA -G D*SC$ 'T($S2 2 /$** ''s2 3G> ?30GG megaby"esA .(T S'A$*2 no ;S*D ''s2 243 ?202E megaby"esA &A! $*`;*ST2 24> 5iloby"es /$** D ST$ %;T (<2 124770477007712G7712G ;S*D D ST$ %;T (<2 03771237712D77007700 I

A ! %asic Sys"em Adminis"ra"ion

2'8

Logical -olume &anager


To lis" "he logical volumes ,hich curren"ly ma5e up "he volume group "ype in "he lsvg command ,i"h "he op"ion 0l7
G ls(# .l r$$t(# roo"vg2 L- <A&* TH'* hd4 boo" 3 hd> paging >E hdG C6s2log 1 hdE C6s2 3 hd2 C6s2 1>1 hd1var C6s2 2 hd3 C6s2 4 hd1 C6s2 2 hd10op" C6s2 12 I L's ''s '-s L- STAT* 3 1 closed+syncd <+A >E 1 open+syncd <+A 1 1 open+syncd <+A 3 1 open+syncd + 1>1 1 open+syncd +usr 2 1 open+syncd +var 4 1 open+syncd +"mp 2 1 open+syncd +home 12 1 open+syncd +op" &(;<T '( <T

A ! %asic Sys"em Adminis"ra"ion

2'9

Logical -olume &anager


To ge" more de"ails o6 a logical volume use "he command lslv ,i"h "he logical volume name as "he argumen"7
I lsl( hd1 L(G CAL -(L;&*2 hd1 -(L;&* G$(;'2 roo"vg L- D*<T / *$2 00c11G600000Ec00000001231DDGea267G '*$& SS (<2 e -G STAT*2 ac"ive+comple"e L- STAT*2 opened+syncd TH'*2 C6s2 )$ T* -*$ /H2 o66 &A! L's2 412 '' S c*2 G megaby"e?sA C(' *S2 1 SC.*D '(L CH2 parallel L's2 2 ''s2 2 STAL* ''s2 0 %% '(L CH2 reloca"able <T*$8'(L CH2 minimum $*L(CATA%L*2 yes <T$A8'(L CH2 cen"er ;''*$ %(;<D2 32 &(;<T '( <T2 +home LA%*L2 +home & $$($ )$ T* C(<S ST*<CH2 on+ACT -* *AC. L' C('H (< A S*'A$AT* '- 92 yes SerialiFe ( 92 <( I read+,ri"

A ! %asic Sys"em Adminis"ra"ion

280

Logical -olume &anager


To lis" ,ha" logical volumes reside on a speci6ic hard dis5, use "he command lspv 0l and use hdis5I as your argumen"7
G lsp( .l hdis80 hdis502 L- <A&* L's ''s D ST$ %;T (< &(;<T '( <T hd> >E >E 0077>E770077007700 <+A hdG 1 1 007700770177007700 <+A hdE 3 3 007700770377007700 + hd2 1>1 1>1 0077E17711277007700 +usr hd1var 2 2 007700770277007700 +var hd3 4 4 007700770477007700 +"mp hd1 2 2 007700770277007700 +home hd10op" 12 12 007710770277007700 +op" hd4 3 3 037700770077007700 <+A I

A ! %asic Sys"em Adminis"ra"ion

281

Logical -olume &anager


To lis" "he hard dis5s curren"ly ins"alled on "he sys"em ,hich are, or arenB" curren"ly a member o6 a volume group "ype in "he command lspv 6or LiS" 'hysical -olume7
I lsp( hdis50 hdis51 hdis52 I

00c11G601D211ded 00c11G6004a16abb 00c11G601DG021Gb

roo"vg <one <one

ac"ive

<o"e, <one ne:" "o "he hard dis5 means "ha" i" is no" curren"ly a member o6 a volume group7

A ! %asic Sys"em Adminis"ra"ion

282

Logical -olume &anager


A""emp" "o ge" de"ailed in6orma"ion o66 one o6 "he hard dis5s ,hich are no" a physical volume ye", meaning "hey are no" members o6 a volume group ye"7 Hou ,ill receive an error7
I lsp( hdis81 041>8320 2 'hysical volume hdis51 is no" assigned "o a volume group7 I

Hou ,ill have "o ma5e "ha" hdis5 a member o6 a vg, "urn i" in"o a physical volume, be6ore you can use i"7

A ! %asic Sys"em Adminis"ra"ion

283

Logical -olume &anager


To de"ermine "he siFe o6 a hard dis5 on "he sys"em, use "he boo"in6o command ,i"h "he 0s, 6or siFe, op"ion7
I !$$tin5$ s hdis81 102E0

I !$$tin5$ s hdis82 4120

This is lis"ed in megaby"es7 So "hese dis5s are 10 gig, and 4 gig respec"ively7

A ! %asic Sys"em Adminis"ra"ion

284

Logical -olume &anager


-olume groups con"ain hdis5s7 " conca"ena"es "he dis5s in"o one7 /or ins"ance i6 you have "hree dis5s each o6 3 gig each, and pu" "hem in one volume group, "hen youBll have one 1 gig volume group 0 ?3 O 3 Q 1A7 A dis5 is made in"o a '-, so "he sys"em can use i", ,hen i" becomes a member o6 a volume group7 There are "hree "ypes o6 vgs in A !7 17A (riginal or S"andard -olume Group 0 ?&a:imum o6 32 physical volumesA7 27A %ig -olume Group 0 ?&a:imum o6 12G physical volumesA7 37A Scalable -olume Group ?&a:imum o6 102E physical volumesA7

A ! %asic Sys"em Adminis"ra"ion

285

Logical -olume &anager


To crea"e a volume group use smi""y7 There is also a command line version available 0 m5vg7 -olume group names have a limi" o6 14 charac"ers ?alphanumericA
I smittH m8(#

A ! %asic Sys"em Adminis"ra"ion

286

Logical -olume &anager

A ! %asic Sys"em Adminis"ra"ion

28'

Logical -olume &anager


(nce "he vg is crea"ed, issue "he lsvg command again, and "his "ime youBll see "he ne,es" crea"ed vg on "he sys"em7 Also issue "he lspv command, and youBll see "ha" "his hdis5 no longer has none ne:" "o i", and youBll also see "ha" i" has a '- D number7 This is "he 'hysical -olume Den"i6ica"ion number7 "Bs a 1> charac"er s"ring ,hich is crea"ed based on "he da"e, and "ime "he vg ,as crea"ed, and "he serial number o6 "he sys"em i" ,as crea"ed on7
I ls(# roo"vg vg I lsp( hdis50 hdis51 hdis52 I 00c11G601D211ded 00c11G6004a16abb 00c11G601DG021Gb roo"vg <one vg ac"ive ac"ive

A ! %asic Sys"em Adminis"ra"ion

288

Logical -olume &anager


Le"Bs crea"e a logical volume no,7 )e do "his via smi""y7 Again, "here is a command "o do "his as ,ell7 To do "his you mus" 6irs" decide ho, big ,ill "his logical volume be, ,hich is basically saying, i6 you ,ill be using a 6ilesys"em, ho, big ,ill my 6ilesys"em be9 Hou mus" speci6y "he siFe o6 an lv in L's7 $emember L's live on "op o6 ''s, and are "he same siFe7 Le"Bs say "ha" "he vg ,as carved up ,i"h ''s o6 all E meg each7 Tha" means i6 "he dis5 is 4 gig in siFe, "he ,hole dis5 ,ill be made up o6 12>2 ''s 0 ?12>2 O E Q 40EGA7 So le"Bs say ,e ,an"ed our logical volume and+or 6ilesys"em "o be 2 gig, "hen i" ,ould "a5e 400 L's "o crea"e "ha" logical volume+6ilesys"em 0 ?2000 + E Q 400A7
I smittH m8l(

A ! %asic Sys"em Adminis"ra"ion

289

Logical -olume &anager

A ! %asic Sys"em Adminis"ra"ion

290

Logical -olume &anager

Lo"!cal 7ol3me names #a7e a l!m!t of 10 c#aracters 9alp#an3mer!c:

A ! %asic Sys"em Adminis"ra"ion

291

Logical -olume &anager


I ls(# .l (# vg2 L- <A&* mylv1 I TH'* L's ''s '-s L- STAT* C6s2 400 400 1 closed+syncd <+A &(;<T '( <T

<o,, do "he reverse ari"hme"ic opera"ion "o see ho, big "his logical volume is in meg 0 ?$emember 1,000 meg Q 1 gigA7
I !c 500 3 4 2000 4uit I

A ! %asic Sys"em Adminis"ra"ion

292

Logical -olume &anager


<o, "ha" "he logical volume is crea"ed, no, i"Bs "ime "o crea"e a 6ilesys"em on "op o6 i"7
I smittH cr5s

A ! %asic Sys"em Adminis"ra"ion

293

Logical -olume &anager

A ! %asic Sys"em Adminis"ra"ion

294

Logical -olume &anager

A ! %asic Sys"em Adminis"ra"ion

295

Logical -olume &anger


The 6ilesys"em is crea"ed, no"ice ho, a Cournal log ,as au"oma"ically crea"ed 6or i"7
I ls(# .l (# vg2 L- <A&* mylv1 loglv00

TH'* L's ''s '-s L- STAT* &(;<T '( <T C6s2 400 400 1 closed+syncd +my6s1 C6s2log 1 1 1 closed+syncd <+A -/S SiFe C6s2 E01>000 r, (p"ions no Au"o

I ls5s *mH5s1 <ame <odename &oun" '" Accoun"ing +dev+mylv1 88 +my6s1 no I

A ! %asic Sys"em Adminis"ra"ion

296

Logical -olume &anager


ssue "he d6 0g command, and "he moun" command7 <o"ice "his 6ilesys"em is no" lis"ed7 Tha"Bs because i" hasnB" been moun"ed7 /ilesys"ems have "o be moun"ed be6ore "hey can be used7 &oun"ing moun"s "he logical volume+6ilesys"em "o "he moun" poin", ,hich is a direc"ory you as "he user can crea"e sub8direc"ories, and 6iles in7
I d5 .# /ilesys"em G% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+hdE 0702 0701 >E^ 1>G2 E4^ + +dev+hd2 172> 070D 14^ 30013 >1^ +usr +dev+hd1var 0702 0700 G0^ E3G 3E^ +var +dev+hd3 070E 070E >^ 1G 1^ +"mp +dev+hd1 0702 0702 3^ D 1^ +home +dev+hd11admin 0712 0712 1^ 4 1^ +admin +proc 8 8 8 8 8 +proc +dev+hd10op" 0701 0702 GE^ 143G 30^ +op" I m$unt node moun"ed moun"ed over v6s da"e op"ions 88888888 888888888888888 888888888888888 888888 888888888888 888888888888888 +dev+hdE + C6s2 Sep 01 0022D r,,logQ+dev+hdG +dev+hd2 +usr C6s2 Sep 01 0022D r,,logQ+dev+hdG +dev+hd1var +var C6s2 Sep 01 0022G r,,logQ+dev+hdG +dev+hd3 +"mp C6s2 Sep 01 0022G r,,logQ+dev+hdG +dev+hd1 +home C6s2 Sep 01 0022G r,,logQ+dev+hdG +dev+hd11admin +admin C6s2 <ov 2> 11234 r,,logQ+dev+hdG +proc +proc proc6s Sep 01 0022G r, +dev+hd10op" +op" C6s2 Sep 01 0022G r,,logQ+dev+hdG I

A ! %asic Sys"em Adminis"ra"ion

29'

Logical -olume &anager


<o,, issue "he command2 moun" +6sNname "o moun" "he 6ilesys"em7
I m$unt *mH5s1 I d5 .# /ilesys"em G% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+hdE 0702 0701 >E^ 1>G2 E4^ + +dev+hd2 172> 070D 14^ 30013 >1^ +usr +dev+hd1var 0702 0700 G0^ E3G 3E^ +var +dev+hd3 070E 070E >^ 1G 1^ +"mp +dev+hd1 0702 0702 3^ D 1^ +home +dev+hd11admin 0712 0712 1^ 4 1^ +admin +proc 8 8 8 8 8 +proc +dev+hd10op" 0701 0702 GE^ 143G 30^ +op" +dev+mylv1 1714 1714 1^ E 1^ +my6s1

I m$unt node moun"ed moun"ed over v6s da"e op"ions 88888888 888888888888888 888888888888888 888888 888888888888 888888888888888 +dev+hdE + C6s2 Sep 01 0022D r,,logQ+dev+hdG +dev+hd2 +usr C6s2 Sep 01 0022D r,,logQ+dev+hdG +dev+hd1var +var C6s2 Sep 01 0022G r,,logQ+dev+hdG +dev+hd3 +"mp C6s2 Sep 01 0022G r,,logQ+dev+hdG +dev+hd1 +home C6s2 Sep 01 0022G r,,logQ+dev+hdG +dev+hd11admin +admin C6s2 <ov 2> 11234 r,,logQ+dev+hdG +proc +proc proc6s Sep 01 0022G r, +dev+hd10op" +op" C6s2 Sep 01 0022G r,,logQ+dev+hdG +dev+mylv1 +my6s1 C6s2 Sep 01 1E201 r,,logQ+dev+loglv00 I

A ! %asic Sys"em Adminis"ra"ion

298

Logical -olume &anager


$eboo" "he sys"em7 )eBll use "he reboo" command "his "ime7
I re!$$t $eboo"ing 7 7 7

)hen "he sys"em boo"s bac5 up, log in as roo" again7


A ! -ersion > Copyrigh" %& Corpora"ion, 11G2, 200D7 login2 r$$t R7

A ! %asic Sys"em Adminis"ra"ion

299

Logical -olume &anager


ssue a d6 8g, and moun" commands again7 <o"ice ho, "he +my6s1 6ilesys"em has no" been moun"ed au"oma"ically on sys"em reboo"7
I d5 .# /ilesys"em G% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+hdE 0702 0701 >E^ 1>G> E4^ + +dev+hd2 172> 070D 14^ 30013 >1^ +usr +dev+hd1var 0702 0700 G0^ EE0 3E^ +var +dev+hd3 070E 070E >^ 20 1^ +"mp +dev+hd1 0702 0702 3^ D 1^ +home +dev+hd11admin 0712 0712 1^ 4 1^ +admin +proc 8 8 8 8 8 +proc +dev+hd10op" 0701 0702 GE^ 143G 30^ +op" I m$unt node moun"ed moun"ed over v6s da"e op"ions 88888888 888888888888888 888888888888888 888888 888888888888 888888888888888 +dev+hdE + C6s2 Sep 01 1E20E r,,logQ+dev+hdG +dev+hd2 +usr C6s2 Sep 01 1E20E r,,logQ+dev+hdG +dev+hd1var +var C6s2 Sep 01 1E20E r,,logQ+dev+hdG +dev+hd3 +"mp C6s2 Sep 01 1E20E r,,logQ+dev+hdG +dev+hd1 +home C6s2 Sep 01 1E20E r,,logQ+dev+hdG +dev+hd11admin +admin C6s2 <ov 2> 11234 r,,logQ+dev+hdG +proc +proc proc6s Sep 01 1E20E r, +dev+hd10op" +op" C6s2 Sep 01 1E20E r,,logQ+dev+hdG I

A ! %asic Sys"em Adminis"ra"ion

300

Logical -olume &anager


To se" i" so "he 6ilesys"em ,ill moun" au"oma"ically on sys"em reboo"s, you have "o edi" a 6ile called +e"c+6ilesys"ems7
I tail *etc*5ilesHstems vol Q +op" 6ree Q 6alse +my6s12 dev v6s log m$unt op"ions accoun" I Q +dev+mylv1 Q C6s2 Q +dev+loglv00 ? 5alse Q r, Q 6alse

<o"ice ho, "here is "he value o6 6alse, ne:" "o moun"7 This means "ha" "he 6ilesys"em ,ill no" be moun"ed au"oma"ically on sys"em reboo"7 )e can also see "his via "he ls6s command7
A ! %asic Sys"em Adminis"ra"ion 301

Logical -olume &anager


I ls5s *mH5s1 <ame <odename &oun" '" Accoun"ing +dev+mylv1 88 +my6s1 no I I ch5s .a m$unt?true *mH5s1 I ls5s *mH5s1 <ame <odename &oun" '" Accoun"ing +dev+mylv1 88 +my6s1 no I tail *etc*5ilesHstems vol Q +op" 6ree Q 6alse +my6s12 dev v6s log moun" op"ions accoun" I I re!$$t $eboo"ing 7 7 7 Q +dev+mylv1 Q C6s2 Q +dev+loglv00 Q "rue Q r, Q 6alse -/S SiFe C6s2 E01>000 r, (p"ions no Au"o

-/S SiFe C6s2 E01>000 r,

(p"ions yes

Au"o

A ! %asic Sys"em Adminis"ra"ion

302

Logical -olume &anager


The ne:" "ime "he sys"em reboo"s, log in as roo" again, and youBll see "he +my6s1 6ilesys"em is no, moun"ed7
I d5 .# /ilesys"em G% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+hdE 0702 0701 >E^ 1>GE E4^ + +dev+hd2 172> 070D 14^ 30013 >1^ +usr +dev+hd1var 0702 0700 G1^ E31 3E^ +var +dev+hd3 070E 070E >^ 20 1^ +"mp +dev+hd1 0702 0702 3^ D 1^ +home +dev+hd11admin 0712 0712 1^ 4 1^ +admin +proc 8 8 8 8 8 +proc +dev+hd10op" 0701 0702 GE^ 143G 30^ +op" +dev+mylv1 1714 1714 1^ E 1^ +my6s1 I m$unt node moun"ed moun"ed over v6s da"e op"ions 88888888 888888888888888 888888888888888 888888 888888888888 888888888888888 +dev+hdE + C6s2 Sep 01 1E21D r,,logQ+dev+hdG +dev+hd2 +usr C6s2 Sep 01 1E21D r,,logQ+dev+hdG +dev+hd1var +var C6s2 Sep 01 1E21D r,,logQ+dev+hdG +dev+hd3 +"mp C6s2 Sep 01 1E21D r,,logQ+dev+hdG +dev+hd1 +home C6s2 Sep 01 1E21D r,,logQ+dev+hdG +dev+hd11admin +admin C6s2 <ov 2> 11234 r,,logQ+dev+hdG +proc +proc proc6s Sep 01 1E21D r, +dev+hd10op" +op" C6s2 Sep 01 1E21D r,,logQ+dev+hdG +dev+mylv1 +my6s1 C6s2 Sep 01 1E21D r,,logQ+dev+loglv00

A ! %asic Sys"em Adminis"ra"ion

303

Logical -olume &anager


To unmoun" a 6ilesys"em use "he umoun" command7 %e6ore you do "ha" loo5 a" "he ls o6 "he direc"ory, no"ice a los"]6ound direc"ory7 This is crea"ed by de6aul" 6or all ne, 6ilesys"ems in "heir roo" direc"ories7 This is 6or in"ernal sys"em cleanup7
I cd *mH5s1 I p/d +my6s1 I ls .l "o"al 0 dr,:r8:r8: 2 roo" sys"em 24> Sep 1 1324> los"]6ound I d5 .# % /ilesys"em G% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+mylv1 1714 1714 1^ E 1^ +my6s1 I t$uch 5ile1 5ile2 5ile3 I ls .l "o"al 0 8r,8r88r88 1 roo" sys"em 0 Sep 1 1E220 6ile1 8r,8r88r88 1 roo" sys"em 0 Sep 1 1E220 6ile2 8r,8r88r88 1 roo" sys"em 0 Sep 1 1E220 6ile3 dr,:r8:r8: 2 roo" sys"em 24> Sep 1 1324> los"]6ound I I um$unt *mH5s1 umoun"2 error unmoun"ing +dev+mylv12 Device busy I cd * I p/d + I um$unt *mH5s1 I d5 .# *mH5s1 /ilesys"em G% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+hdE 0702 0701 >E^ 1>G> E4^ +

A ! %asic Sys"em Adminis"ra"ion

304

Logical -olume &anager


I cd *mH5s1 I p/d +my6s1 I d5 .# % /ilesys"em G% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+hdE 0702 0701 >E^ 1>G> E4^ + I ls .l "o"al 0 I cd * I m$unt *mH5s1 I ls l *mH5s1 "o"al 0 8r,8r88r88 1 roo" sys"em 0 Sep 1 1E220 6ile1 8r,8r88r88 1 roo" sys"em 0 Sep 1 1E220 6ile2 8r,8r88r88 1 roo" sys"em 0 Sep 1 1E220 6ile3 dr,:r8:r8: 2 roo" sys"em 24> Sep 1 1324> los"]6ound I um$unt *mH5s1 I ls *mH5s1 I

A ! %asic Sys"em Adminis"ra"ion

305

Logical -olume &anager


To remove a 6ilesys"em use "he rm6s command7
I rm5s .r *mH5s1 rmlv2 Logical volume mylv1 is removed7 I ls5s *mH5s1 ls6s2 <o record ma"ching T+my6s1T ,as 6ound in +e"c+6ilesys"ems7 I ls .ld *mH5s1 +my6s1 no" 6ound I ls(# .l (# vg2 L- <A&* loglv00 I

TH'* C6s2log 1

L's 1

''s '-s L- STAT* 1 closed+syncd <+A

&(;<T '( <T

A ! %asic Sys"em Adminis"ra"ion

306

Logical -olume &anager


To remove a logical volume use "he rmlv command7
I rml( l$#l(00 )arning, all da"a con"ained on logical volume loglv00 ,ill be des"royed7 rmlv2 Do you ,ish "o con"inue9 y?esA n?oA9 Hes rmlv2 Logical volume loglv00 is removed7 I ls(# .l (# vg2 L- <A&* I

TH'*

L's

''s

'-s L- STAT*

&(;<T '( <T

A ! %asic Sys"em Adminis"ra"ion

30'

Logical -olume &anager


Crea"e ano"her 6ilesys"em, "his "ime allo, A ! "o crea"e "he logical volume 6or you au"oma"ically 0 ?*asier, bu" less con"rolA7
I smittH cr5s

A ! %asic Sys"em Adminis"ra"ion

308

Logical -olume &anager

A ! %asic Sys"em Adminis"ra"ion

309

Logical -olume &anager

A ! %asic Sys"em Adminis"ra"ion

310

Logical -olume &anager

A ! %asic Sys"em Adminis"ra"ion

311

Logical -olume &anager


<o"ice, ho, A ! 6igured ou" "he number o6 L's i" ,ould need au"oma"ically7 This 6ilesys"em is 2 gig as ,ell7
I m$unt *mH5s1 I d5 .# *mH5s1 /ilesys"em G% bloc5s /ree ^;sed +dev+6slv00 1714 1714 1^ E I ls(# .l (# vg2 L- <A&* loglv00 6slv00 I

used ^ used &oun"ed on 1^ +my6s1

TH'* L's ''s '-s L- STAT* &(;<T '( <T C6s2log 1 1 1 open+syncd <+A C6s2 400 400 1 open+syncd +my6s1

<o"e, ,hen you crea"e an enhanced, #/S2, 6ilesys"em and le" A ! crea"e "he lv, i" ,ill au"oma"ically selec" "he name 6slvII, as "he name o6 "he lv7 )hen you crea"e a #/S1 6ilesys"em and le" A ! crea"e "he lv, i" ,ill au"oma"ically selec" "he name lvII, as "he name o6 "he lv7
A ! %asic Sys"em Adminis"ra"ion 312

Logical -olume &anager


Le"Bs say you ,an"ed "o increase "he siFe o6 a 6ilesys"em by 1 gig7 Hou ,ould 6irs" chec5 "he volume group "o see i6 you had "ha" much space, and "hen per6orm "he opera"ion7 6 you didnB" have enough space in "he vg, "hen you ,ould add a dis5 "o "he vg7
I ls(# (# : #rep .i 5ree &A! L-s2 24>

/$** ''s2

D>1 ?30EE megaby"esA

I d5 .m *mH5s1 /ilesys"em &% bloc5s /ree ^;sed +dev+6slv00 2000700 111173D 1^ I ch5s .a si\e?250> *mH5s1 /ilesys"em siFe changed "o E1204D> I d5 .m *mH5s1 /ilesys"em &% bloc5s /ree ^;sed +dev+6slv00 2012700 201173D 1^ I

used ^ used &oun"ed on E 1^ +my6s1

used ^ used &oun"ed on E 1^ +my6s1

A ! %asic Sys"em Adminis"ra"ion

313

Logical -olume &anager


To reduce "he siFe o6 a 6ilesys"em use "he ch6s command again, bu" "his "ime ,i"h "he 0 opera"or7
I d5 .m *mH5s1 /ilesys"em &% bloc5s /ree ^;sed +dev+6slv00 2012700 201173D 1^ I ch5s .a si\e?.50> *mH5s1 /ilesys"em siFe changed "o E10E112 I d5 .m *mH5s1 /ilesys"em &% bloc5s /ree ^;sed +dev+6slv00 200E700 200373D 1^ I used ^ used &oun"ed on E 1^ +my6s1 used ^ used &oun"ed on E 1^ +my6s1

A ! %asic Sys"em Adminis"ra"ion

314

Logical -olume &anager


Le"Bs say you ,an"ed "o e:por" a vg 6rom "he sys"em7 This is done via "he 6ollo,ing7 This is a good 6ea"ure, because i" give you "he abili"y "o e:por" "he vg, physically remove "he dis5 6rom "he A ! sys"em, physically ins"all "he dis5 in"o a ne, A ! sys"em, and "hen impor" "he vg again7 (r logically move "he dis5 around ,i"h SA< Foning+mappings, e"c7
I ls(# .$ vg roo"vg I ls(# .l (# vg2 L- <A&* TH'* L's ''s '-s L- STAT* &(;<T '( <T loglv00 C6s2log 1 1 1 open+syncd <+A 6slv00 C6s2 401 401 1 open+syncd +my6s1 I d5 .# *mH5s1 /ilesys"em G% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+6slv00 171> 171> 1^ E 1^ +my6s1 I um$unt *mH5s1 I (arH$55(# (# I ls(# .$ roo"vg I ls(# roo"vg vg I e)p$rt(# (# I ls(# roo"vg

A ! %asic Sys"em Adminis"ra"ion

315

Logical -olume &anager


<o"ice, ho, "he 6ilesys"em is gone "oo, as i6 i" ,as removed7
I ls5s *mH5s1 ls6s2 <o record ma"ching T+my6s1T ,as 6ound in +e"c+6ilesys"ems7 I

To impor" "he volume group again, ei"her on "he same, or di66eren" A ! sys"em, use "he 6ollo,ing7
I imp$rt(# .H (# hdis82 vg I m$unt all moun"2 +dev+hd1 on +home2 Device busy moun"2 +proc on +proc2 Device busy moun"2 +dev+hd10op" on +op"2 Device busy I d5 .# *mH5s1 /ilesys"em G% bloc5s /ree ^;sed +dev+6slv00 171> 171> 1^ E used ^ used &oun"ed on 1^ +my6s1

A ! %asic Sys"em Adminis"ra"ion

316

Logical -olume &anager


To remove a volume group use "he reducevg command7
I um$unt *mH5s1 I reduce(# (# hdis82 041>801> ldele"epv2 Canno" dele"e physical volume ,i"h alloca"ed par"i"ions7 ;se ei"her migra"epv "o move "he par"i"ions or reducevg ,i"h "he 8d op"ion "o dele"e "he par"i"ions7 041>8GGE reducevg2 ;nable "o remove physical volume hdis527 I reduce(# .d (# hdis82 041>811E rmlv2 )arning, all da"a belonging "o logical volume loglv00 on physical volume hdis52 ,ill be des"royed7 rmlv2 Do you ,ish "o con"inue9 y?esA n?oA9 Hes rmlv2 Logical volume loglv00 is removed7 041>811E rmlv2 )arning, all da"a belonging "o logical volume 6slv00 on physical volume hdis52 ,ill be des"royed7 rmlv2 Do you ,ish "o con"inue9 y?esA n?oA9 Hes rmlv2 Logical volume 6slv00 is removed7 ldele"epv2 -olume Group dele"ed since i" con"ains no physical volumes7 I ls(# roo"vg I

A ! %asic Sys"em Adminis"ra"ion

31'

Logical -olume &anager


Le"Bs say you ,an"ed "o add a dis5 "o a volume group7 Hou do so ,i"h "he e:"endvg command7
I !$$tin5$ .s hdis81 102E0 I I ls(# .p r$$t(# roo"vg2 '-N<A&* '- STAT* hdis50 ac"ive >31 I ls(# r$$t(# : #rep .i 5ree &A! L-s2 24> I lsp( hdis50 00c11G601D211ded hdis51 00c11G6004a16abb hdis52 00c11G601DG021Gb I e)tend(# .5 r$$t(# hdis81 I lsp( hdis50 00c11G601D211ded hdis51 00c11G6004a16abb hdis52 00c11G601DG021Gb I ls(# r$$t(# : #rep .i 5ree &A! L-s2 24> I ls(# .p r$$t(# roo"vg2 '-N<A&* '- STAT* hdis50 ac"ive >31 hdis51 ac"ive 12D1 I

T(TAL ''s /$** ''s /$** D ST$ %;T (< 3G> 124770477007712G7712G /$** ''s2 3G> ?30GG megaby"esA ac"ive

roo"vg <one <one roo"vg roo"vg <one /$** ''s2

ac"ive ac"ive

1>>4 ?13320 megaby"esA

T(TAL ''s /$** ''s /$** D ST$ %;T (< 3G> 124770477007712G7712G 12D1 24>7724>772447724>7724>

A ! %asic Sys"em Adminis"ra"ion

318

Logical -olume &anager


Hou can move "he con"en"s, o6 le"Bs say, "he ,hole opera"ing sys"em 6rom one dis5 "o ano"her i6 you ,an"ed "o, ,i"h "he miga"epv command7 Hou can do "his ,hile "he sys"em is running7 <o"e, you could also do "his ,hen an applica"ion, and+or da"abase is running7 Dis5s have "o be in "he same vg, 6or migra"ion be",een "hem7
I lsp( .l hdis80 hdis502 L- <A&* L's ''s D ST$ %;T (< &(;<T '( <T hd1var 2 2 007700770277007700 +var hd3 4 4 007700770477007700 +"mp hd1 2 2 007700770277007700 +home hd10op" 12 12 007710770277007700 +op" hd4 3 3 037700770077007700 <+A hd> >E >E 0077>E770077007700 <+A hdG 1 1 007700770177007700 <+A hdE 3 3 007700770377007700 + hd11admin 2 2 007702770077007700 +admin hd2 1>1 1>1 0077E17711277007700 +usr loglv01 1 1 007701770077007700 <+A I lsp( .l hdis81 I

A ! %asic Sys"em Adminis"ra"ion

319

Logical -olume &anager


To move "he L's 6rom one dis5 "o ano"her7
I mi#ratep( hdis80 hdis81 041>81011 migra"epv2 Logical volume hd4 is labeled as a boo" logical volume7 041>812E> migra"epv2 6 hd4 is "he boo" logical volume, please run Tchpv 8c hdis 50T as roo" user "o clear "he boo" record and avoid a po"en"ial boo" o66 an old boo" image "ha" may reside on "he dis5 6rom ,hich "his logical volume is moved+removed7 migra"epv2 boo" logical volume hd4 migra"ed7 'lease remember "o run bosboo", speci6ying +dev+hdis51 as "he "arge" physical boo" device7 Also, run boo"lis" command "o modi6y boo"lis" "o include +dev+hdis517 I

A ! %asic Sys"em Adminis"ra"ion

320

Logical -olume &anager


I lsp( .l hdis80 I I lsp( .l hdis81 hdis512 L- <A&* hd1var hd3 hd1 hd10op" hd4 hd> hdG hdE hd11admin hd2 loglv01 I

D ST$ %;T (< &(;<T '( <T 2 2 007700770277007700 +var 4 4 007700770477007700 +"mp 2 2 007700770277007700 +home 12 12 007700771277007700 +op" 3 3 037700770077007700 <+A >E >E 0077>E770077007700 <+A 1 1 007700770177007700 <+A 3 3 007700770377007700 + 2 2 007702770077007700 +admin 1>1 1>1 007700771>177007700 +usr 1 1 007701770077007700 <+A

L's

''s

A ! %asic Sys"em Adminis"ra"ion

321

Logical -olume &anager


To migra"e Cus" one lv, you can use "he 0l op"ion "o "he migra"epv command7
I lsp( .l hdis80 I lsp( .l hdis81 hdis512 L- <A&* L's ''s D ST$ %;T (< &(;<T '( <T hd1var 2 2 007700770277007700 +var hd3 4 4 007700770477007700 +"mp hd1 2 2 007700770277007700 +home hd10op" 12 12 007700771277007700 +op" hd4 3 3 037700770077007700 <+A hd> >E >E 0077>E770077007700 <+A hdG 1 1 007700770177007700 <+A hdE 3 3 007700770377007700 + hd11admin 2 2 007702770077007700 +admin hd2 1>1 1>1 007700771>177007700 +usr loglv01 1 1 007701770077007700 <+A I mi#ratep( .l hd1 hdis81 hdis80 I lsp( .l hdis80 hdis502 L- <A&* L's ''s D ST$ %;T (< hd1 2 2 007700770277007700 +home I

&(;<T '( <T

A ! %asic Sys"em Adminis"ra"ion

322

Logical -olume &anager


&igra"e every"hing 6rom hdis51, bac5 "o hdis507
I mi#ratep( hdis81 hdis80 041>81011 migra"epv2 Logical volume hd4 is labeled as a boo" logical volume7 041>812E> migra"epv2 6 hd4 is "he boo" logical volume, please run Tchpv 8c hdis51d as roo" user "o clear "he boo" record and avoid a po"en"ial boo" o66 an old boo" image "ha" may reside on "he dis5 6rom ,hich "his logical volume is moved+removed7 I chp( .c hdis81 I !$s!$$t .ad hdis80 bosboo"2 %oo" image is 34DDE 412 by"e bloc5s7 I lsp( .l hdis80 hdis502 L- <A&* L's ''s D ST$ %;T (< &(;<T '( <T hd1var 2 2 007702770077007700 +var hd3 4 4 007704770077007700 +"mp hd1 2 2 007700770277007700 +home hd10op" 12 12 007712770077007700 +op" hd4 3 3 037700770077007700 <+A hd> >E >E 0077>E770077007700 <+A hdG 1 1 007700770177007700 <+A hdE 3 3 007700770377007700 + hd11admin 2 2 007702770077007700 +admin hd2 1>1 1>1 0077007712177E07700 +usr loglv01 1 1 007701770077007700 <+A I I lsp( l hdis81 I

A ! %asic Sys"em Adminis"ra"ion

323

Logical -olume &anager


6 you ,an"ed "o remove a dis5 6rom a volume group, you ,ould use "he reducevg command7
I ls(# r$$t(# : #rep .i 5ree &A! L-s2 24> I ls(# .p r$$t(# roo"vg2 '-N<A&* '- STAT* hdis50 ac"ive >31 hdis51 ac"ive 12D1 I reduce(# r$$t(# hdis81 I ls(# .p r$$t(# roo"vg2 '-N<A&* '- STAT* hdis50 ac"ive >31 I ls(# r$$t(# : #rep .i 5ree &A! L-s2 24> I /$** ''s2 1>>4 ?13320 megaby"esA

T(TAL ''s /$** ''s /$** D ST$ %;T (< 3G> 124770477007712G7712G 12D1 24>7724>772447724>7724>

T(TAL ''s /$** ''s /$** D ST$ %;T (< 3G> 124770477007712G7712G /$** ''s2 3G> ?30GG megaby"esA

A ! %asic Sys"em Adminis"ra"ion

324

Logical -olume &anager


&irroring o6 dis5s in A !, ,hich is usually recommended 6or "he roo"vg vg, is done a" a vg level7 The source, and "arge" dis5 o6 an A ! dis5 mirror opera"ion mus" be in "he same vg7 Hou can mirror a dis5, a "o"al o6 3 ,ays 0 3 copies ?1 primary, and 2 secondariesA7
I lsp( hdis50 hdis51 hdis52 00c11G601D211ded 00c11G6004a16abb 00c11G601DG021Gb roo"vg <one <one ac"ive

I e)tend(# r$$t(# hdis81 I lsp( hdis50 00c11G601D211ded hdis51 00c11G6004a16abb hdis52 00c11G601DG021Gb I ls(# .l r$$t(# roo"vg2 L- <A&* TH'* hd4 boo" 3 hd> paging >E hdG C6s2log 1 hdE C6s2 3 hd2 C6s2 1>1 hd1var C6s2 2 hd3 C6s2 4 hd1 C6s2 2 hd11admin 2 2 hd10op" C6s2 12

roo"vg roo"vg <one

ac"ive ac"ive

L's ''s '-s L- STAT* 3 1 closed+syncd <+A >E 1 open+syncd <+A 1 1 open+syncd <+A 3 1 open+syncd + 1>1 1 open+syncd +usr 2 1 open+syncd +var 4 1 open+syncd +"mp 2 1 open+syncd +home 007702770077007700 +admin 12 1 open+syncd +op"

&(;<T '( <T

A ! %asic Sys"em Adminis"ra"ion

325

Logical -olume &anager


I mirr$r(# r$$t(# hdis80 hdis81 041>81G0E chvg2 The Muorum change "a5es e66ec" immedia"ely7 041>8112> mirrorvg2 roo"vg success6ully mirrored, user should per6orm bosboo" o6 sys"em "o ini"ialiFe boo" records7 Then, user mus" modi6y boo"lis" "o include2 hdis51 hdis507 I !$s!$$t .ad *de(*hdis81 bosboo"2 %oo" image is 34DDE 412 by"e bloc5s7 I !$$tlist .m n$rmal .$ hdis50 blvQhd4 I !$$tlist .m n$rmal hdis80 hdis81 I !$$tlist .m n$rmal .$ hdis50 blvQhd4 hdis51 blvQhd4 I I !$$tin5$ .! hdis50 I

A ! %asic Sys"em Adminis"ra"ion

326

Logical -olume &anager


<o"ice "he one "o many, "o"al 3, L', "o '' rela"ionship in "he command ou"pu" belo,7
I ls(# .l r$$t(# roo"vg2 L- <A&* TH'* hd4 boo" 3 hd> paging >E hdG C6s2log 1 hdE C6s2 3 hd2 C6s2 1>1 hd1var C6s2 2 hd3 C6s2 4 hd1 C6s2 2 hd11admin 2 2 hd10op" C6s2 12 I I re!$$t $eboo"ing 7 7 7

L's ''s '-s L- STAT* > 2 closed+syncd <+A 12G 2 open+syncd <+A 2 2 open+syncd <+A > 2 open+syncd + 322 2 open+syncd +usr E 2 open+syncd +var 10 2 open+syncd +"mp E 2 open+syncd +home 007702770077007700 +admin 2E 2 open+syncd +op"

&(;<T '( <T

A ! %asic Sys"em Adminis"ra"ion

32'

Logical -olume &anager


)hen "he sys"em boo"s bac5 up, no"ice ho, i" s"ill boo"ed 6rom your ins"all+source dis5 0 hdis507 This is because even "hough you mirrored "he dis5, i"Bs s"ill "he 6irs" boo" device lis"ed in "he lis"7 <o"e, you could also boo" o66 o6 "he dis5 SA<, "ape, CDs, D-Ds, and "he ne",or57
I !$$tin5$ .! hdis50 I

<o,, change "he boo"lis", so hdis51, ,here ,e mirrored "o, ,ill be "he dis5 "he sys"em boo"s o66 o6 during ne:" reboo"7
I !$$tlist .m n$rmal .$ hdis50 blvQhd4 hdis51 blvQhd4 I !$$tlist .m n$rmal hdis81 I !$$tlist .m n$rmal .$ hdis51 blvQhd4 I

A ! %asic Sys"em Adminis"ra"ion

328

Logical -olume &anager


$eboo" "he sys"em7 (nce i"Bs done reboo"ing, issue "he boo"in6o 0b, command "o de"ermine "he las" dis5 "he dis5 boo"ed o66 o6, and i" should be hdis51 no,, "he "arge" o6 our roo"vg mirror opera"ion7
I re!$$t $eboo"ing 7 7 7 SHST*& $*%((TSR I !$$tin5$ .! hdis51 I d5 .# /ilesys"em G% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+hdE 0702 0701 41^ 1>DG E2^ + +dev+hd2 172> 070D 14^ 30013 >1^ +usr +dev+hd1var 0702 0700 G0^ E31 3E^ +var +dev+hd3 070E 070E >^ 11 1^ +"mp +dev+hd1 0702 0702 3^ D 1^ +home +dev+hd11admin 0712 0712 1^ 4 1^ +admin +proc 8 8 8 8 8 +proc +dev+hd10op" 0701 0702 GE^ 143G 30^ +op" I ls(# .l r$$t(# roo"vg2 L- <A&* TH'* L's ''s '-s L- STAT* &(;<T '( <T hd4 boo" 3 > 2 closed+syncd <+A hd> paging >E 12G 2 open+syncd <+A hdG C6s2log 1 2 2 open+syncd <+A hdE C6s2 3 > 2 open+syncd + hd2 C6s2 1>1 322 2 open+syncd +usr hd1var C6s2 2 E 2 open+syncd +var hd3 C6s2 4 10 2 open+syncd +"mp hd1 C6s2 2 E 2 open+syncd +home hd11admin 2 2 007702770077007700 +admin hd10op" C6s2 12 2E 2 open+syncd +op"

A ! %asic Sys"em Adminis"ra"ion

329

Logical -olume &anager


<o,, change "he boo"lis" bac5, and reboo" so "he sys"em boo"s o66 o6 hdis50, as normal7
I !$$tlist .m n$rmal .$ hdis51 blvQhd4 I !$$tlist .m n$rmal hdis80 hdis81 I !$$tlist .m n$rmal .$ hdis50 blvQhd4 hdis51 blvQhd4 I re!$$t $eboo"ing 7 7 7 SHST*& $*%((TSR G !$$tin5$ .! hdis50 I

A ! %asic Sys"em Adminis"ra"ion

330

Logical -olume &anager


To unmirror a volume group, use "he unmirrorvg command7
I ls(# .l r$$t(# roo"vg2 L- <A&* TH'* hd4 boo" 3 hd> paging >E hdG C6s2log 1 hdE C6s2 3 hd2 C6s2 1>1 hd1var C6s2 2 hd3 C6s2 4 hd1 C6s2 2 hd11admin C6s2 2 hd10op" C6s2 12

L's ''s '-s L- STAT* &(;<T '( <T > 2 closed+syncd <+A 12G 2 open+syncd <+A 2 2 open+syncd <+A > 2 open+syncd + 322 2 open+syncd +usr E 2 open+syncd +var 10 2 open+syncd +"mp E 2 open+syncd +home 2 1 open+syncd +admin 2E 2 open+syncd +op"

I unmirr$r(# r$$t(# 041>812E> rmlvcopy2 6 hd4 is "he boo" logical volume, please run Tchpv 8c Wdis5nameXT as roo" user "o clear "he boo" record and avoid a po"en"ial boo" o66 an old boo" image "ha" may reside on "he dis5 6rom ,hich "his logical volume is moved+removed7 041>81G0E chvg2 The Muorum change "a5es e66ec" immedia"ely7 041>811EE unmirrorvg2 roo"vg success6ully unmirrored, user should per6orm bosboo" o6 sys"em "o reini"ialiFe boo" records7 Then, user mus" modi6y boo"lis" "o Cus" include2 hdis507 I

A ! %asic Sys"em Adminis"ra"ion

331

Logical -olume &anager


I chp( .c hdis81 I !$s!$$t .ad *de(*hdis80 bosboo"2 %oo" image is 34DDE 412 by"e bloc5s7 I !$$tlist .m n$rmal .$ hdis50 blvQhd4 .dis51 I !$$tlist .m n$rmal hdis80 I !$$tlist .m n$rmal .$ hdis50 blvQhd4 I

A ! %asic Sys"em Adminis"ra"ion

332

Logical -olume &anager


<o"ice "he 1 "o 1 rela"ionship be",een "he L's and "he ''s once again7
I ls(# .l r$$t(# roo"vg2 L- <A&* TH'* hd4 boo" 3 hd> paging >E hdG C6s2log 1 hdE C6s2 3 hd2 C6s2 1>1 hd1var C6s2 2 hd3 C6s2 4 hd1 C6s2 2 hd11admin C6s2 2 hd10op" C6s2 12 I

L's ''s '-s L- STAT* &(;<T '( <T 3 1 closed+syncd <+A >E 1 open+syncd <+A 1 1 open+syncd <+A 3 1 open+syncd + 1>1 1 open+syncd +usr 2 1 open+syncd +var 4 1 open+syncd +"mp 2 1 open+syncd +home 2 1 open+syncd +admin 12 1 open+syncd +op"

A ! %asic Sys"em Adminis"ra"ion

333

A ! /ile &anagemen"

A ! %asic Sys"em Adminis"ra"ion

334

A ! /ile &anagemen"
Some"imes i" is desirable "o pac5 mul"iple 6iles in"o one 6ile, ,hich ac"s as a pac5age7 The "ar command crea"es an archived pac5age 6ile ,hich consis"s o6 mul"iple 6iles, and+or direc"ories7 These archived pac5ages are 5no,n as "ar8balls7 TA$ s"ands 6or TApe a$chive7 Crea"e a direc"ory in +"mp called Cun5, and crea"e mul"iple 6iles, a subdirec"ory and 6iles under "ha" subdirec"ory2
Y m8dir *tmp* un8 Y cd *tmp* un8 Y t$uch 5ilea 5ile! 5ilec 5iled 5ilee @ m8dir *tmp* un8*dira @ t$uch *tmp* un8*dira*5ile5 @ t$uch *tmp* un8*dira*5ile#

A ! %asic Sys"em Adminis"ra"ion

335

A ! /ile &anagemen"
Y cd *tmp* un8 Y p/d +"mp+Cun5 Y ls .l "o"al 2E dr,:r8:r8: 8r,8r88r88 8r,8r88r88 8r,8r88r88 8r,8r88r88 8r,8r88r88

2 Cus"in s"a66 1 Cus"in s"a66 1 Cus"in s"a66 1 Cus"in s"a66 1 Cus"in s"a66 1 Cus"in s"a66

24> <ov 2E 1122E dira 0 <ov 2E 11222 6ilea 0 <ov 2E 11222 6ileb 0 <ov 2E 11222 6ilec 0 <ov 2E 11222 6iled 0 <ov 2E 11222 6ilee

Y ls .l dira "o"al 0 8r,8r88r88 1 Cus"in s"a66 8r,8r88r88 1 Cus"in s"a66

0 <ov 2E 11223 6ile6 0 <ov 2E 1122E 6ileg

Y tar .c(5 *tmp*5iles%tar *tmp* un8*3 a +"mp+Cun5+dira a +"mp+Cun5+dira+6ile6 0 bloc5s7 a +"mp+Cun5+dira+6ileg 0 bloc5s7 a +"mp+Cun5+6ilea 0 bloc5s7 a +"mp+Cun5+6ileb 0 bloc5s7 a +"mp+Cun5+6ilec 0 bloc5s7 a +"mp+Cun5+6iled 0 bloc5s7 a +"mp+Cun5+6ilee 0 bloc5s7 a +"mp+Cun5+6iles7"ar 20 bloc5s7

A ! %asic Sys"em Adminis"ra"ion

336

A ! /ile &anagemen"
Y ls .l *tmp*5iles%tar 8r,8r88r88 1 Cus"in s"a66 Y 20EG0 <ov 2E 1122> +"mp+6iles7"ar

To vie, "he con"en"s o6 "he "ar8ball use "he 6ollo,ing command2


Y tar .t(5 *tmp*5iles%tar dr,:r8:r8: 202 1 0 <ov 2E 1122E201 2010 +"mp+Cun5+dira+ 8r,8r88r88 202 1 0 <ov 2E 11223244 2010 +"mp+Cun5+dira+6ile6 8r,8r88r88 202 1 0 <ov 2E 1122E201 2010 +"mp+Cun5+dira+6ileg 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilea 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ileb 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilec 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6iled 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilee 8r,8r88r88 202 1 102E0 <ov 2E 11222232 2010 +"mp+Cun5+6iles7"ar Y

Dele"e "he +"mp+Cun5 direc"ory2


Y rm .r *tmp* un8 Y ls .ld *tmp* un8 ls2 0>4383E1 The 6ile +"mp+Cun5 does no" e:is"7 Y

A ! %asic Sys"em Adminis"ra"ion

33'

A ! /ile &anagemen"
Y ls .ld *tmp*5iles%tar 8r,8r88r88 1 Cus"in s"a66 20EG0 <ov 2E 1122> +"mp+6iles7"ar Y tar .)(5 *tmp*5iles%tar : +"mp+Cun5+dira : +"mp+Cun5+dira+6ile6, 0 by"es, 0 media bloc5s7 : +"mp+Cun5+dira+6ileg, 0 by"es, 0 media bloc5s7 : +"mp+Cun5+6ilea, 0 by"es, 0 media bloc5s7 : +"mp+Cun5+6ileb, 0 by"es, 0 media bloc5s7 : +"mp+Cun5+6ilec, 0 by"es, 0 media bloc5s7 : +"mp+Cun5+6iled, 0 by"es, 0 media bloc5s7 : +"mp+Cun5+6ilee, 0 by"es, 0 media bloc5s7 : +"mp+Cun5+6iles7"ar, 102E0 by"es, 20 media bloc5s7 Y ls .ld *tmp* un8 dr,:r8:r8: 3 Cus"in s"a66 Y ls .lR *tmp* un8 "o"al 2E dr,:r8:r8: 2 Cus"in s"a66 8r,8r88r88 1 Cus"in s"a66 8r,8r88r88 1 Cus"in s"a66 8r,8r88r88 1 Cus"in s"a66 8r,8r88r88 1 Cus"in s"a66 8r,8r88r88 1 Cus"in s"a66 8r,8r88r88 1 Cus"in s"a66 +"mp+Cun5+dira2 "o"al 0 8r,8r88r88 1 Cus"in s"a66 8r,8r88r88 1 Cus"in s"a66 24> <ov 2E 1122G +"mp+Cun5 24> <ov 2E 1122E dira 0 <ov 2E 11222 6ilea 0 <ov 2E 11222 6ileb 0 <ov 2E 11222 6ilec 0 <ov 2E 11222 6iled 0 <ov 2E 11222 6ilee 102E0 <ov 2E 11222 6iles7"ar 0 <ov 2E 11223 6ile6 0 <ov 2E 1122E 6ileg

A ! %asic Sys"em Adminis"ra"ion

338

A ! /ile &anagemen"
Hou can e:"rac" only a speci6ic 6ile 6rom your archive "ar8ball2

Y ls .l *tmp* un8*5ilea 8r,8r88r88 1 Cus"in s"a66

0 <ov 2E 11222 +"mp+Cun5+6ilea

Y rm *tmp* un8*5ilea Y ls .l *tmp* un8*5ilea ls2 0>4383E1 The 6ile +"mp+Cun5+6ilea does no" e:is"7 Y tar .)(5 5iles%tar *tmp* un8*5ilea : +"mp+Cun5+6ilea, 0 by"es, 0 media bloc5s7 Y ls .l *tmp* un8*5ilea 8r,8r88r88 1 Cus"in s"a66 Y 0 <ov 2E 11222 +"mp+Cun5+6ilea

A ! %asic Sys"em Adminis"ra"ion

339

A ! /ile &anagemen"
To add "o "he con"en"s o6 a "ar8ball ,hich already e:is"s2
Y tar .t(5 *tmp*5iles%tar dr,:r8:r8: 202 1 0 <ov 2E 1122E201 2010 +"mp+Cun5+dira+ 8r,8r88r88 202 1 0 <ov 2E 11223244 2010 +"mp+Cun5+dira+6ile6 8r,8r88r88 202 1 0 <ov 2E 1122E201 2010 +"mp+Cun5+dira+6ileg 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilea 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ileb 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilec 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6iled 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilee 8r,8r88r88 202 1 102E0 <ov 2E 11222232 2010 +"mp+Cun5+6iles7"ar Y t$uch *tmp*;0M6= *tmp*;0M6B Y tar .r(5 *tmp*5iles%tar *tmp*;0M6= *tmp*;0M6B a +"mp+/ L*A 0 bloc5s7 a +"mp+/ L*% 0 bloc5s7 Y tar .t(5 *tmp*5iles%tar dr,:r8:r8: 202 1 0 <ov 2E 1122E201 2010 +"mp+Cun5+dira+ 8r,8r88r88 202 1 0 <ov 2E 11223244 2010 +"mp+Cun5+dira+6ile6 8r,8r88r88 202 1 0 <ov 2E 1122E201 2010 +"mp+Cun5+dira+6ileg 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilea 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ileb 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilec 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6iled 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilee 8r,8r88r88 202 1 102E0 <ov 2E 11222232 2010 +"mp+Cun5+6iles7"ar 8r,8r88r88 202 1 0 <ov 2E 112E1221 2010 +"mp+/ L*A 8r,8r88r88 202 1 0 <ov 2E 112E1221 2010 +"mp+/ L*% Y

A ! %asic Sys"em Adminis"ra"ion

340

A ! /ile &anagemen"
Hou can also use "he "ar command "o move 6iles, and subdirec"ories be",een sys"ems, e"c7 <o"e, "he na"ive "ar command in A ! can only cra"e "ar8ball archives ,hich are G gig in siFe7 To ge" around "his you can do,nload a 6ree version called g"ar, ,hich can crea"e "ar8ball archives ,hich are grea"er "han G gig in siFe7

A ! %asic Sys"em Adminis"ra"ion

341

A ! /ile &anagemen"
Hou can compress 6iles in ;ni: ,i"h "he compress command
Y p/d +"mp Y ls .l 5iles%tar 8r,8r88r88 1 Cus"in s"a66 20480 <ov 2E 112E1 6iles7"ar

Y c$mpress 5iles%tar Y ls .l 5iles%tar ls2 0>4383E1 The 6ile 6iles7"ar does no" e:is"7 Y ls .l 5iles%tar%] 8r,8r88r88 1 Cus"in s"a66 GG> <ov 2E 112E1 6iles7"ar7c

Y tar .)(5 5iles%tar%] "ar2 041181>1 A direc"ory chec5sum error on mediab 0 no" eMual "o >11407

<o"e, "he compress command au"oma"ically appends a 7c e:"ension "o "he end o6 "he 6ile i" compresses7
A ! %asic Sys"em Adminis"ra"ion 342

A ! /ile &anagemen"
To uncompress a 6ile you use "he, you guessed i", uncompress comand2
Y ls .l 5iles%tar%] 8r,8r88r88 1 Cus"in s"a66 Y unc$mpress 5iles%tar%] Y ls .l 5iles%tar 8r,8r88r88 1 Cus"in s"a66 886 <ov 2E 112E1 6iles7"ar7c

20480 <ov 2E 112E1 6iles7"ar

Y tar t(5 5iles%tar dr,:r8:r8: 202 1 0 <ov 2E 1122E201 2010 +"mp+Cun5+dira+ 8r,8r88r88 202 1 0 <ov 2E 11223244 2010 +"mp+Cun5+dira+6ile6 8r,8r88r88 202 1 0 <ov 2E 1122E201 2010 +"mp+Cun5+dira+6ileg 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilea 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ileb 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilec 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6iled 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilee 8r,8r88r88 202 1 102E0 <ov 2E 11222232 2010 +"mp+Cun5+6iles7"ar 8r,8r88r88 202 1 0 <ov 2E 112E1221 2010 +"mp+/ L*A 8r,8r88r88 202 1 0 <ov 2E 112E1221 2010 +"mp+/ L*% Y

<o"e "he uncompress command ,ill au"oma"ically remove "he 7c e:"ension o6 a 6ile i" uncompresses7
A ! %asic Sys"em Adminis"ra"ion 343

A ! /ile &anagemen"
There is ano"her command ,hich handles compression7 " is called gFip7

Y ls .l 5iles%tar 8r,8r88r88 1 Cus"in s"a66 Y #\ip 5iles%tar Y ls .l 5iles%tar%#\ 8r,8r88r88 1 Cus"in s"a66

20480 <ov 2E 112E1 6iles7"ar

3'9 <ov 2E 112E1 6iles7"ar7gF

Y tar .t(5 5iles%tar%#\ "ar2 041181>E There is a media read or ,ri"e bloc5 siFe error7 Y

The gFip command ,ill append "he 6ile e:"ension 7gF "o any 6iles i" compresses7 <o"e, "he gFip command achieves a be""er compression ra"io "han "he compress command7
A ! %asic Sys"em Adminis"ra"ion 344

A ! /ile &anagemen"
To uncompress any 6ile you compressed ,i"h "he gFip command, you use "he gunFip command2
Y ls .l 5iles%tar%#\ 8r,8r88r88 1 Cus"in s"a66 Y #un\ip 5iles%tar%#\ Y ls .l 5iles%tar 8r,8r88r88 1 Cus"in s"a66 3'9 <ov 2E 112E1 6iles7"ar7gF

20480 <ov 2E 112E1 6iles7"ar

Y tar .t(5 5iles%tar dr,:r8:r8: 202 1 0 <ov 2E 1122E201 2010 +"mp+Cun5+dira+ 8r,8r88r88 202 1 0 <ov 2E 11223244 2010 +"mp+Cun5+dira+6ile6 8r,8r88r88 202 1 0 <ov 2E 1122E201 2010 +"mp+Cun5+dira+6ileg 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilea 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ileb 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilec 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6iled 8r,8r88r88 202 1 0 <ov 2E 1122222E 2010 +"mp+Cun5+6ilee 8r,8r88r88 202 1 102E0 <ov 2E 11222232 2010 +"mp+Cun5+6iles7"ar 8r,8r88r88 202 1 0 <ov 2E 112E1221 2010 +"mp+/ L*A 8r,8r88r88 202 1 0 <ov 2E 112E1221 2010 +"mp+/ L*% Y

<o"ice ho, "he gunFip command removes "he 7gF 6ile e:"ension 6rom "he 6ile you uncompressed7
A ! %asic Sys"em Adminis"ra"ion 345

A ! /ile &anagemen"
The chec5sum o6 a 6ile can serve as bo"h a securi"y measure and an in"egri"y chec5 6or 6iles7 There are "hree sum commands available in A !2 sum 0 T,o numbers genera"ed7 (ne is a 1>8bi" chec5sum7 The o"her is ho, many 102E8by"e bloc5s "he 6ile occupies7 c8sum8 T,o numbers are genera"ed7 (ne is a 328bi" chec5sum, C$C 0 Cyclic $edundancy Chec57 The o"her is "he number o6 by"es "he 6ile occupies7 csum 0 md4 chec5sum7 The mos" reliable7

A ! %asic Sys"em Adminis"ra"ion

346

A ! /ile &anagemen"
Y sum *tmp*5iles%tar 44402 20 +"mp+6iles7"ar Y sum *tmp*5iles%tar 44402 20 +"mp+6iles7"ar Y

The c5sum comand2


Y c8sum *tmp*5iles%tar 3203ED2D2> 20EG0 +"mp+6iles7"ar Y c8sum *tmp*5iles%tar 3203ED2D2> 20EG0 +"mp+6iles7"ar Y

The csum command2


Y csum *tmp*5iles%tar 3b42DcED11E1bGGb41>e>44a>b2e3ED> +"mp+6iles7"ar Y csum *tmp*5iles%tar 3b42DcED11E1bGGb41>e>44a>b2e3ED> +"mp+6iles7"ar Y

A ! %asic Sys"em Adminis"ra"ion

34'

A ! /ile &anagmen"
Changing "he con"en"s o6 a 6ile in any,ay ,ill change "he chec5sum2 'revious2 44402
@ ech$ BB CC *tmp*5iles%tar @ sum *tmp*5iles%tar 2''61 21 *tmp*5iles%tar

20

'revious: 3203ED2D2> 20EG0


@ c8sum *tmp*5iles%tar 934''9'89 20481 *tmp*5iles%tar

'revious2 3b42DcED11E1bGGb41>e>44a>b2e3ED>
@ csum *tmp*5iles%tar 298332556403aeddd5e0!44a'0dc55ed *tmp*5iles%tar @

A ! %asic Sys"em Adminis"ra"ion

348

A ! /ile &anagemen"
The ;ni: 6ile command per6orms a series o6 "es"s on an obCec", and de"ermines "he "ype2 6iles, direc"ory, "e:" 6ile, e:ecu"able, e"c2
Y 5ile *tmp +"mp2 direc"ory Y 5ile *tmp*5iles%tar +"mp+6iles7"ar2 "ar archive Y 5ile *usr*!in*cat +usr+bin+ca"2 e:ecu"able ?$ SC Sys"em+>000A or obCec" module Y 5ile *tmp* un8*5ilea +"mp+Cun5+6ilea2 emp"y Y Y 5ile *etc*h$sts +e"c+hos"s2 ascii "e:" Y

A ! %asic Sys"em Adminis"ra"ion

349

A ! /ile &anagemen"
Compu"er science re6resher o6 ho, space is calcula"ed7 %y"e scale2 8 8 8 8 8 8 8 8 8 8 Bits Q 1 %y"e 19000 BHtes Q 1 @iloby"e 19000 +il$!Htes Q 1 &egaby"e 19000 >e#a!Htes Q 1 Gigaby"e 19000 &i#a!Htes Q 1 Teraby"e 19000 -era!Htes Q 1 'e"aby"e 19000 Aeta!Htes Q 1 *:aby"e 19000 6)a!Htes Q 1 ce""aby"e 19000 ]etta!Htes ? 1 Ho""aby"e

A ! %asic Sys"em Adminis"ra"ion

350

A ! /ile &anagemen"
Hou can crea"e emp"y 6iles o6 a cer"ain siFe in A !7 The command is called lm5"emp7 To crea"e a 10 meg 6ile called "es"6ile in +"mp2
I p/d +"mp I lm8temp test5ile 10m "es"6ile I ls .l test5ile 8r,8r88r88 1 roo" sys"em 10EG4D>0 <ov 21 11212 "es"6ile

To crea"e a 1 gig 6ile2


I lm8temp test5ile2 1000m "es"6ile2 I ls .l test5ile2 8r,8r88r88 1 roo" I sys"em 10EG4D>000 <ov 21 1121D "es"6ile2

A ! %asic Sys"em Adminis"ra"ion

351

A ! /ile &anagemen"
To display "he siFe o6 a 6ile or direc"ory use "he du command7

I du .m test5ile 10700 "es"6ile I du .# test5ile2 071G "es"6ile2 I du .m test5ile2 1000700 "es"6ile2 I

A ! %asic Sys"em Adminis"ra"ion

352

A ! /ile &anagemen"
To vie, "he siFe o6 an en"ire direc"ory, you can use "he du command agains" a direc"ory as ,ell as a 6ile7
I p/d +"mp I m8dir 5iles I cd 5iles I p/d +"mp+6iles I m( test5ile 5iles I m( test5ile2 5iles I ls .l 5iles "o"al 20>GEGG 8r,8r88r88 1 roo" sys"em 10EG4D>0 <ov 21 11223 "es"6ile 8r,8r88r88 1 roo" sys"em 10EG4D>000 <ov 21 11223 "es"6ile2 I I du .m 5iles 1010700 6iles I du .# 5iles 0711 6iles I rm r 5iles

A ! %asic Sys"em Adminis"ra"ion

353

A ! Sys"em 'aging Space

A ! %asic Sys"em Adminis"ra"ion

354

A ! Sys"em 'aging Space


'aging space allo,s "he sys"em "o address more memory "hen is ac"ually "here7 6 you have 20 gig o6 real memory+$A&, bu" also have 4 gig o6 paging space, you can "hin5 o6 "he sys"em as having 24 gig o6 "o"al memory7 'aging space resides on physical dis5 as a logical volume7 " is a special purpose logical volume in A ! ,hich is no" in"ended "o have a 6ilesys"em on i"7 'aging space is also 5no,n as s,ap space7

A ! %asic Sys"em Adminis"ra"ion

355

A ! Sys"em 'aging Space


.o, i" ,or5s9 )hen "he amoun" o6 6ree physical memory+$A& in "he sys"em is lo,, programs or da"a "ha" have no" been used recen"ly are moved 6rom real physical memory+$A& "o paging space on dis5 "o release "he real memory+$A& 6or o"her ac"ivi"ies7 %y de6aul" A ! %(S ins"alla"ion crea"es a paging space logical volume called hd> on drive hdis50, ,here you ins"alled "he opera"ing sys"em7 The de6aul" paging space siFe is de"ermined during %(S ins"alla"ion, by "he 6ollo,ing ini"ial siFing rules2 8 'aging space can use no less "han >E &%7 8 6 real memory+$A& is less "han 24> &%, paging space is ",o "imes real memory7 8 6 real memory+$A& is grea"er "han or eMual "o 24> &%, paging space is 412 &% 8 (n all sys"ems "oday "he paging space ,ill be 412&% by de6aul"7

A ! %asic Sys"em Adminis"ra"ion

356

A ! Sys"em 'aging Space


Hou can crea"e mul"iple paging space logical volumes on a sys"em7 'aging space is alloca"ed in a round robin 6ashion via E@% pages ,i"h mul"iple paging spaces+lvs7 To display "he curren" paging spaces and usage2
I lsps .s To"al 'aging Space 'ercen" ;sed 412&% 2^ I

To display more in6o regarding your paging space2


I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum hd> hdis50 roo"vg 412&% 2 yes yes lv 0 I

A ! %asic Sys"em Adminis"ra"ion

35'

A ! Sys"em 'aging Space


Hou can dynamically increase "he siFe o6 paging space ,i"h "he 6ollo,ing command2
I ls(# r$$t(# : #rep .i Bpp si\eB -G STAT*2 ac"ive I !c 1000 * 64 14 4uit I chps .s 15 hd6 I lsps .s To"al 'aging Space 'ercen" ;sed 1ED2&% 1^ I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum hd> hdis50 roo"vg 1ED2&% 1 yes yes lv 0 I '' S c*2 >E megaby"e?sA

A ! %asic Sys"em Adminis"ra"ion

358

A ! Sys"em 'aging Space


Hou can dynamically reduce "he siFe o6 a paging space2
I lsps .s To"al 'aging Space 'ercen" ;sed 1ED2&% 1^ I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum hd> hdis50 roo"vg 1ED2&% 1 yes yes lv 0 I chps .d 15 hd6 shrin5ps2 Temporary paging space paging00 crea"ed7 shrin5ps2 Dump device moved "o "emporary paging space7 shrin5ps2 'aging space hd> removed7 shrin5ps2 'aging space hd> recrea"ed ,i"h ne, siFe7 shrin5ps2 $esiFed and original paging space charac"eris"ics di66er, chec5 "he lslv command ou"pu"7 I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum hd> hdis50 roo"vg 412&% 2 yes yes lv 0 I lsps .s To"al 'aging Space 'ercen" ;sed 412&% 2^ I

A ! %asic Sys"em Adminis"ra"ion

359

A ! Sys"em 'aging Space


To crea"e addi"ional paging spaces use smi""y2
I smittH m8ps

A ! %asic Sys"em Adminis"ra"ion

360

A ! Sys"em 'aging Space


<or t#e sa4e of t#!s la,= please select no for start 3s!n" pa"!n" space now= and 3se t#!s pa"!n" space eac# t!me t#e system !s restarted

A ! %asic Sys"em Adminis"ra"ion

361

A ! Sys"em 'aging Space


%y de6aul" a logical volume ,i"h "he name paging00, ,ill be crea"ed 6or your paging space7 <o"e all subseMuen" paging spaces ,ill be named pagingII, II being incremen"ed by one7

A ! %asic Sys"em Adminis"ra"ion

362

A ! Sys"em 'aging Space


I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum paging00 hdis50 roo"vg 1>0&% 0 no no lv 0 hd> hdis50 roo"vg 412&% 2 yes yes lv 0 I lsps .s To"al 'aging Space 'ercen" ;sed 412&% 2^ I

<o"ice ho, "he column Ac"ive, and Au"o have "he value o6 no 6or "his ne,ly crea"ed paging space, paging007 To ac"iva"e "he paging space use "he s,apon command2
I s/ap$n *de(*pa#in#00 I lsps .s To"al 'aging Space 'ercen" ;sed 1ED2&% 1^ I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum paging00 hdis50 roo"vg 1>0&% 1 yes no lv 0 hd> hdis50 roo"vg 412&% 2 yes yes lv 0 I

A ! %asic Sys"em Adminis"ra"ion

363

A ! Sys"em 'aging Space


To disable paging space, use "he s,apo66 command2
I lsps .s To"al 'aging Space 'ercen" ;sed 1ED2&% 1^ I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum paging00 hdis50 roo"vg 1>0&% 1 yes no lv 0 hd> hdis50 roo"vg 412&% 2 yes yes lv 0 I s/ap$55 *de(*pa#in#00 I lsps .s To"al 'aging Space 'ercen" ;sed 412&% 2^ I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum paging00 hdis50 roo"vg 1>0&% 0 no no lv 0 hd> hdis50 roo"vg 412&% 2 yes yes lv 0 I

A ! %asic Sys"em Adminis"ra"ion

364

A ! Sys"em 'aging Space


$eboo" your sys"em2
I shutd$/n .;r S.;TD()< '$(G$A& Sa" Sep 4 1D20D2EG *DT 2001 )ai" 6or T$eboo"ing777T be6ore s"opping7 *rror logging s"opped777 Advanced Accoun"ing has s"opped777 'rocess accoun"ing s"opped777 S"opping </S+< S Daemons 0413800E The Subsys"em or Group, n6sd, is curren"ly inopera"ive7 041380EE The biod Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7loc5d Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7s"a"d Subsys"em ,as reMues"ed "o s"op7 0413800E The Subsys"em or Group, gssd, is curren"ly inopera"ive7 0413800E The Subsys"em or Group, n6srgyd, is curren"ly inopera"ive7 R

A ! %asic Sys"em Adminis"ra"ion

365

A ! Sys"em 'aging Space


)hen "he sys"em comes bac5 up 6rom i"s reboo", ,e ,ill see "ha" "he paging space ,e crea"ed, paging00, is no" ac"iva"ed2
I uptime 10210A& up 1 min, 1 user, load average2 070>, 0703, 0701 I /h$ .! 7 sys"em boo" <ov 2> 10201 I lsps .s To"al 'aging Space 'ercen" ;sed 412&% 2^ I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum paging00 hdis50 roo"vg 1>0&% 0 no no lv 0 hd> hdis50 roo"vg 412&% 2 yes yes lv 0 I

A ! %asic Sys"em Adminis"ra"ion

366

A ! Sys"em 'aging Space


" is no" ac"iva"ed because i" isnB" se" "o do so in "he +e"c+s,apspaces 6ile7
I ls .l *etc*s/apspaces 8r,8r88r88 1 roo" sys"em 402 <ov 2> 01241 +e"c+s,apspaces

I cat *etc*s/apspaces O +e"c+s,apspaces O O This 6ile lis"s all "he paging spaces "ha" are au"oma"ically pu" in"o O service on each sys"em res"ar" ?"he Ts,apon 8aT command e:ecu"ed 6rom O +e"c+rc s,aps on every device lis"ed hereA7 O O )A$< <G2 (nly paging space devices should be lis"ed here7 O O This 6ile is modi6ied by "he chps, m5ps and rmps commands and re6erenced O by "he lsps and s,apon commands7 hd>2 dev Q +dev+hd> au"o Q yes chec5sumNsiFe Q 0 pa#in#00: de( ? *de(*pa#in#00 aut$ ? n$ chec8sumLsi\e ? 0

A ! %asic Sys"em Adminis"ra"ion

36'

A ! Sys"em 'aging Space


To se" "his paging space "o ac"iva"e au"oma"ically on sys"em boo" up you can ei"her edi" "his 6ile manually, or you can use "he 6ollo,ing command ,hich ,ill ma5e "he appropria"e change "o "his 6ile7
I chps .aH pa#in#00 I cat *etc*s/apspaces O +e"c+s,apspaces O O This 6ile lis"s all "he paging spaces "ha" are au"oma"ically pu" in"o O service on each sys"em res"ar" ?"he Ts,apon 8aT command e:ecu"ed 6rom O +e"c+rc s,aps on every device lis"ed hereA7 O O )A$< <G2 (nly paging space devices should be lis"ed here7 O O This 6ile is modi6ied by "he chps, m5ps and rmps commands and re6erenced O by "he lsps and s,apon commands7 hd>2 dev Q +dev+hd> au"o Q yes chec5sumNsiFe Q 0 pa#in#00: de( ? *de(*pa#in#00 aut$ ? Hes chec8sumLsi\e ? 0

A ! %asic Sys"em Adminis"ra"ion

368

A ! Sys"em 'aging Space


I lsps .s To"al 'aging Space 'ercen" ;sed 412&% 2^ I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum paging00 hdis50 roo"vg 1>0&% 0 no yes lv 0 hd> hdis50 roo"vg 412&% 2 yes yes lv 0 I

Hou can manually enable all paging spaces ,i"h "he command2
I s,ap$n .a 041D80D4 s,apon2 'aging device +dev+hd> is already ac"ive7 s,apon2 'aging device +dev+paging00 ac"iva"ed7 I I lsps .s To"al 'aging Space 'ercen" ;sed 1ED2&% 1^ I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum paging00 hdis50 roo"vg 1>0&% 1 yes yes lv 0 hd> hdis50 roo"vg 412&% 2 yes yes lv 0 I

A ! %asic Sys"em Adminis"ra"ion

369

A ! Sys"em 'aging Space


$eboo" your sys"em once again2
I shutd$/n .;r S.;TD()< '$(G$A& Sa" Sep 4 1D20D2EG *DT 2001 )ai" 6or T$eboo"ing777T be6ore s"opping7 *rror logging s"opped777 Advanced Accoun"ing has s"opped777 'rocess accoun"ing s"opped777 S"opping </S+< S Daemons 0413800E The Subsys"em or Group, n6sd, is curren"ly inopera"ive7 041380EE The biod Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7loc5d Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7s"a"d Subsys"em ,as reMues"ed "o s"op7 0413800E The Subsys"em or Group, gssd, is curren"ly inopera"ive7 0413800E The Subsys"em or Group, n6srgyd, is curren"ly inopera"ive7 R

A ! %asic Sys"em Adminis"ra"ion

3'0

A ! Sys"em 'aging Space


)hen "he sys"em comes bac5 up 6rom i"Bs reboo" "his "ime, you ,ill see "ha" "he paging spaces ,ere au"oma"ically ac"iva"ed2
I uptime 1022GA& up 1 min, 1 user, load average2 07E>, 071>, 070> I /h$ .! 7 sys"em boo" <ov 2> 1022D I lsps .s To"al 'aging Space 'ercen" ;sed 1ED2&% 1^ I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum paging00 hdis50 roo"vg 1>0&% 1 yes yes lv 0 hd> hdis50 roo"vg 412&% 1 yes yes lv 0 I

A ! %asic Sys"em Adminis"ra"ion

3'1

A ! Sys"em 'aging Space


To remove a paging space, "he paging space mus" be disabled7
I lsps .s To"al 'aging Space 'ercen" ;sed 1ED2&% 1^ I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum paging00 hdis50 roo"vg 1>0&% 1 yes yes lv 0 hd> hdis50 roo"vg 412&% 1 yes yes lv 0 I s/ap$55 *de(*pa#in#00 I rmps pa#in#00 rmlv2 Logical volume paging00 is removed7 I lsps .s To"al 'aging Space 'ercen" ;sed 412&% 2^ I lsps .a 'age Space 'hysical -olume -olume Group SiFe ^;sed Ac"ive Au"o Type Ch5sum hd> hdis50 roo"vg 412&% 2 yes yes lv 0 I

A ! %asic Sys"em Adminis"ra"ion

3'2

A ! Sys"em 'aging Space


Guidelines 6or crea"ing paging spaces7 17 Do no" crea"e more "han one paging space on one hdis57 27 Crea"e all paging spaces "o be eMual siFe on "he sys"em7 37 Do no" crea"e a paging space so i" spans mul"iple hdis5s7 E7 A""emp" "o 5eep all paging spaces in roo"vg7 47 Do no" pu" paging spaces on curren"ly heavily u"iliFed hdis5s7

A ! %asic Sys"em Adminis"ra"ion

3'3

A ! Sys"em Dump /acili"y

A ! %asic Sys"em Adminis"ra"ion

3'4

A ! Sys"em Dump /acili"y


)hen "he sys"em boo"s i" copies "he en"ire 5ernel in"o memory+$A&7 )hen "he sys"em e:periences a 6a"al error in i"Bs 5ernel, some"imes re6erred "o as a 5ernel panic, "he sys"em dump 6acili"y ,ill copy "he en"ire con"en"s o6 memory+$A&, 5ernel memory pages, "o a special logical volume 5no,n as "he dump device7 %y de6aul" i6 your sys"emBs memory+$A& is less "han E gig, during %(S ins"alla"ion, "he sys"em ,ill designa"e "he same logical volume used 6or paging space as i"Bs dump device, hd>7 .o,ever, i6 "he memory+$A& is grea"er "han E gig, during %(S ins"alla"ion, "hen sys"em ,ill crea"e i"Bs o,n dedica"ed dump device, called lgNdumplv, 6or LarGe D;&' device7 )hen "here is a 6a"al problem ,hich ,ould cause A ! no" "o 6unc"ion any longer, "he en"ire con"en"s o6 "he 5ernel ,ill be dumped "o "his dump device7 A6"er "ha" "he sys"em ,ill reboo" i"sel6, and re"urn "o service7 Hou can "hen ei"her analyFe "he genera"ed sys"em dump yoursel6, or send i" "o %& "echnical suppor" 6or analysis, as some analysis reMuire in dep"h 5no,ledge o6 A ! in"ernals, as ,ell as access "o i"Bs source code7
A ! %asic Sys"em Adminis"ra"ion 3'5

A ! Sys"em Dump /acili"y


There are ",o "ypes o6 dumps7 A sys"em dump ,hich is an en"ire dump o6 "he 5ernelBs memory "o dis5, and a core dump, ,hich is Cus" a dump o6 a speci6ic programBs memory area7 <o"e, you ,ill need access "o "he programBs source code "o "roubleshoo" core dumps, usually7 Hou can genera"e your o,n via "he 6ollo,ing commands2
I ps .e5 : #rep .i sleep I ls .l c$re ls2 0>4383E1 The 6ile core does no" e:is"7 I sleep 1000 [ U1V 30G0E1> I ps .e5 : #rep .i sleep roo" 30G0E1> 44D0>4G 0 122312EG p"s+1 0200 sleep 1000 I 8ill .11 3080416 I ls .l c$re 8r,8888888 1 roo" sys"em D1GG <ov 2> 12231 core U1V ] Segmen"a"ion 6aul"?coredumpA sleep 1000 = I ls .l c$re 8r,8888888 1 roo" sys"em D1GG <ov 2> 12231 core

A ! %asic Sys"em Adminis"ra"ion

3'6

A ! Sys"em Dump /acili"y


To vie, "he curren" sys"em dump device se""ings use "he sysdumpdev command2
I sHsdumpde( .l primary +dev+hd> secondary +dev+sysdumpnull copy direc"ory +var+adm+ras 6orced copy 6lag T$;* al,ays allo, dump /ALS* dump compression (< "ype o6 dump "radi"ional I

Due "o "he 6ac" "ha" our sys"ems in "his lab are all under E gig o6 memory+$A&, ,e do no" have a dedica"ed dump device 6or "he running 5ernel "o dump "o7 n "he even" o6 a sys"em dump+panic, i" ,ill dump "o +dev+hd>, ,hich is also "he de6aul" paging space logical volume device7 <o"e2 A sys"em dump in A ! version >71, and above ,ill al,ays resul" in a compressed sys"em dump7 Hou canno" disable compression any longer7

A ! %asic Sys"em Adminis"ra"ion

3''

A ! Sys"em Dump /acili"y


Due "o "his, i6 "he sys"em ,ere "o dump i"Bs running 5ernel, due "o an error, i" ,ill dump "o hd>7 <o, "heore"ically "he sys"em has no need 6or paging space a" "his poin", because i" is in "he process o6 crashing comple"ely7 Tha" being "he case i" uses "ha" space 6or "he running sys"emBs 5ernel in memory ,hich is curren"ly 6ailing7 A6"er "he sys"em dumps "he running 5ernel "o "he paging space L-, hd>, i" ,ill reboo" i"sel67 During "he sys"em boo" 6ollo,ing a sys"em dump, "he sys"em ,ill copy "he dump con"ained in "he logical volume "o a 6ile on dis5, "o clear "he space 6or paging space7 This direc"ory is called "he copy direc"ory7 6 your copy direc"ory does no" have su66icien" space 6or "his copy, "o hold "he dump in hd>, you ,ill be as5ed, via "he console, "o copy "he dump o66 o6 "he paging space "o an e:"ernal device "o pro"ec" i"7 Hou need "o pro"ec" i" 6rom ,hen "he sys"em boo"s and paging space is ac"ive, o"her,ise ,hen paging space is ini"ialiFed, and ,ri""en "o i" ,ill over,ri"e some o6 "he dump, or all o6 i", damaging i"7 <o"e, "he sys"em only promp"s you 6or "his copy during sys"em reboo", i6 "he dump device is se" "o "he paging space device7

A ! %asic Sys"em Adminis"ra"ion

3'8

A ! Sys"em Dump /acili"y


(n sys"ems "ha" have never e:perienced a dump+sys"em crash be6ore2
I sHsdumpde( .M 0E438011 <o previous dumps recorded7 Scanning device +dev+hd> 6or e:is"ing dump7

A ! %asic Sys"em Adminis"ra"ion

3'9

A ! Sys"em Dump /acili"y


To manually s"ar" a sys"em dump e:ecu"e "he 6ollo,ing command2
I sHsdumpstart p

A6"er "he sys"em dumps "he memory "o "he dump device, "he sys"em ,ill au"oma"ically reboo" i"sel67
I uptime 1020>'& up 1 user, load average2 07>3, 0720, 070D I /h$ .! 7 sys"em boo" <ov 2> 22204 I sHsdumpde( .M 0E438031 Device name2 +dev+hd> &aCor device number2 10 &inor device number2 2 SiFe2 >D11400G by"es ;ncompressed SiFe2 >EEE2E24> by"es Da"e+Time2 /ri <ov 2> 22201243 CST 2010 Dump s"a"us2 0 Type o6 dump2 "radi"ional dump comple"ed success6ully Dump copy 6ilename2 +var+adm+ras+vmcore707%c I cd *(ar*adm*ras I ls .l (mc$re3 8r,8888888 1 roo" sys"em >D11400G <ov 2> 2220E vmcore707%c I

A ! %asic Sys"em Adminis"ra"ion

380

A ! Sys"em Dump /acili"y


@ic5 o66 ano"her sys"em dump7
I sHsdumpstart p Z I uptime 10213'& up 1 min, 2 users, load average2 07>>, 072G, 0711 I /h$ .! 7 sys"em boo" <ov 2> 22212 I sHsdumpde( .M 0E438031 Device name2 +dev+hd> &aCor device number2 10 &inor device number2 2 SiFe2 >D>1D>>E by"es ;ncompressed SiFe2 >42301E0D by"es Da"e+Time2 /ri <ov 2> 2220G202 CST 2010 Dump s"a"us2 0 Type o6 dump2 "radi"ional dump comple"ed success6ully Dump copy 6ilename2 +var+adm+ras+vmcore717%c I cd *(ar*adm*ras I ls .l (mc$re3 8r,8888888 1 roo" sys"em >D>1D>>E <ov 2> 22210 vmcore717%c I

A ! %asic Sys"em Adminis"ra"ion

381

A ! Sys"em Dump /acili"y


Go "o "he +var+adm+ras direc"ory, de6aul" copy direc"ory, and crea"e an emp"y 6ile so i" "a5es up mos" o6 "he space o6 "ha" 6ilesys"em, as a "es" "o see ,ha" ,ill happen ,hen "he sys"em reboo"s a6"er a sys"em dump and discovers "ha" "he copy direc"ory is "oo small "o copy "he dump on "he dump device "o7
I cd *(ar*adm*ras I p/d +var+adm+ras I d5 .m % /ilesys"em &% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+hd1var EEG700 11E732 D4^ 1G41 2D^ +var I lm8temp 5ile 110000000 /ile I du .m 5ile 10E711 6ile I d5 .m % /ilesys"em &% bloc5s +dev+hd1var EEG700 I sHsdumpstart p

/ree ^;sed used ^ used &oun"ed on 17E1 1G^ 1G>0 D3^ +var

A ! %asic Sys"em Adminis"ra"ion

382

A ! Sys"em Dump /acili"y


Hou ,ill see "he 6ollo,ing menu appear ,hich is giving you "he oppor"uni"y "o copy "his sys"em dump 6ile sa6ely o66 "o removable media such as "ape, so "he sys"em can s"ar" using "he paging space device, hd>, again ,hen i" 6ully boo"s, and your dump ,ill be sa6e 6or analysis7 #us" "ype 11 "o con"inue "he boo" process7

A ! %asic Sys"em Adminis"ra"ion

383

A ! Sys"em Dump /acili"y


To change "he dump copy direc"ory7 Crea"e a 6ilesys"em called +dump, or ,ha"ever, and ma5e i" 1 gig2
I smittH cr5s

A ! %asic Sys"em Adminis"ra"ion

384

A ! Sys"em Dump /acili"y

A ! %asic Sys"em Adminis"ra"ion

385

A ! Sys"em Dump /acili"y

A ! %asic Sys"em Adminis"ra"ion

386

A ! Sys"em Dump /acili"y

A ! %asic Sys"em Adminis"ra"ion

38'

A ! Sys"em Dump /acili"y

A ! %asic Sys"em Adminis"ra"ion

388

A ! Sys"em Dump /acili"y


I m$unt *dump I d5 .m *dump /ilesys"em &% bloc5s /ree ^;sed used ^ used &oun"ed on +dev+6slv02 12G700 12D7>> 1^ E 1^ +dump I ls *dump los"]6ound I sHsdumpde( .l primary +dev+hd> secondary +dev+sysdumpnull copy direc"ory +var+adm+ras 6orced copy 6lag T$;* al,ays allo, dump /ALS* dump compression (< "ype o6 dump "radi"ional I sHsdumpde( .d *dump I sHsdumpde( .l primary +dev+hd> secondary +dev+sysdumpnull copy direc"ory +dump 6orced copy 6lag /ALS* al,ays allo, dump /ALS* dump compression (< "ype o6 dump "radi"ional I

A ! %asic Sys"em Adminis"ra"ion

389

A ! Sys"em Dump /acili"y


ni"ia"e a sys"em dump again2
I sHsdumpstart p I uptime 11203'& up 1 min, 1 user, load average2 0714, 0732, 0712 I /h$ .! 7 sys"em boo" <ov 2> 23201 I sHsdumpde( .M 0E438031 Device name2 +dev+hd> &aCor device number2 10 &inor device number2 2 SiFe2 >D3>>E00 by"es ;ncompressed SiFe2 >42>E041D by"es Da"e+Time2 /ri <ov 2> 2224D2E1 CST 2010 Dump s"a"us2 0 Type o6 dump2 "radi"ional dump comple"ed success6ully Dump copy 6ilename2 +dump+vmcore707%c I ls .l *dump "o"al 1314GE 88,8888888 1 roo" sys"em 2 <ov 2> 23200 bounds 8r,8888888 1 roo" sys"em >D3>>E00 <ov 2> 23200 vmcore707%c I

A ! %asic Sys"em Adminis"ra"ion

390

A ! Sys"em Dump /acili"y


'rior "o you crea"ing a dedica"ed dump device, you need "o de"ermine ho, much space your ,ould need i6 your sys"em ,ere "o crash+dump righ" no,7 Hou should run "his command during your sys"emBs mos" heavies" ,or5load7
I sHsdumpde( .e 0E4380E1 *s"ima"ed dump siFe in by"es2 1G13D2G24 I

A ! %asic Sys"em Adminis"ra"ion

391

A ! Sys"em Dump /acili"y


To change "he primary dump device+L-, so "ha" a copy is no" necessary on "he subseMuen" reboo" 6ollo,ing "he sys"em crash2
I ls(# r$$t(# : #rep .i Bpp si\eB -G STAT*2 ac"ive I smittH m8l( '' S c*2 >E megaby"e?sA

A ! %asic Sys"em Adminis"ra"ion

392

A ! Sys"em Dump /acili"y


6ntent!onally create !t too small

A ! %asic Sys"em Adminis"ra"ion

393

A ! Sys"em Dump /acili"y

A ! %asic Sys"em Adminis"ra"ion

394

A ! Sys"em Dump /acili"y


I sHsdumpde( .l primary +dev+hd> secondary +dev+sysdumpnull copy direc"ory +dump 6orced copy 6lag /ALS* al,ays allo, dump /ALS* dump compression (< "ype o6 dump "radi"ional I sHsdumpde( .Ap *de(*dumpl( primary +dev+dumplv secondary +dev+sysdumpnull copy direc"ory +dump 6orced copy 6lag /ALS* al,ays allo, dump /ALS* dump compression (< "ype o6 dump "radi"ional I

A ! %asic Sys"em Adminis"ra"ion

395

A ! Sys"em Dump /acili"y


Crea"e ano"her L- ,hich ,ill be "he secondary dump device2
I smittH m8l(

A ! %asic Sys"em Adminis"ra"ion

396

A ! Sys"em Dump /acili"y

A ! %asic Sys"em Adminis"ra"ion

39'

A ! Sys"em Dump /acili"y

A ! %asic Sys"em Adminis"ra"ion

398

A ! Sys"em Dump /acili"y


I sHsdumpde( .l primary +dev+dumplv secondary +dev+sysdumpnull copy direc"ory +dump 6orced copy 6lag /ALS* al,ays allo, dump /ALS* dump compression (< "ype o6 dump "radi"ional I sHsdumpde( .As *de(*dumpl(2 primary +dev+dumplv secondary +dev+dumplv2 copy direc"ory +dump 6orced copy 6lag /ALS* al,ays allo, dump /ALS* dump compression (< "ype o6 dump "radi"ional I

A ! %asic Sys"em Adminis"ra"ion

399

A ! Sys"em Dump /acili"y


ni"ia"e ano"her sys"em dump2
I sHsdumpstart p

A6"er "he sys"em reboo"2


I uptime 11234'& up 1 user, load average2 07E3, 0711, 070E I /h$ .! 7 sys"em boo" <ov 2> 23234 I sHsdumpde( .M 0E438031 Device name2 +dev+dumplv2 &aCor device number2 10 &inor device number2 1> SiFe2 >D10G342 by"es ;ncompressed SiFe2 >EEED3103 by"es Da"e+Time2 /ri <ov 2> 23231222 CST 2010 Dump s"a"us2 82 R6-IR< ,K16 0<10,=-67 1I>A 16Q0,6 S=7 -KK 7>=MM% Type o6 dump2 "radi"ional dump device "oo small I

A ! %asic Sys"em Adminis"ra"ion

400

A ! Sys"em Dump /acili"y


Hou or %& suppor" e:amineBs "he dump ,i"h "he 5db, @ernel De%ugger u"ili"y7 n version o6 A ! E73 and belo, "he crash u"ili"y ,as used7 n A ! version 471 and above "he 5db u"ili"y is used7

A ! %asic Sys"em Adminis"ra"ion

401

A ! Sys"em Dump /acili"y


Typically %&+A ! "echnical suppor" ,ill have you run "he snap command "o ga"her con6igura"ion in6orma"ion, as ,ell as "he sys"em dump i"esel6 in"o one pac5age, "o send "o "hem 6or 6ur"her analysis2
I snap .a Chec5ing space reMuiremen" 6or general in6orma"ion777777777 R Chec5ing space reMuiremen" 6or "cpip in6orma"ion77777777777777777777777777777777777777777777777777777 done7 Chec5ing space reMuiremen" 6or 5ernel in6orma"ion777777777777777 done7 Chec5ing space reMuiremen" 6or prin"er in6orma"ion7777 done7 Chec5ing space reMuiremen" 6or dump in6orma"ion77777777 A""en"ion2 The dump is compressed, and ,e ,ere no" able "o veri6y i" is consis"en" ,i"h +uni:7 'rocessing con"inues7 7 done7 Chec5ing space reMuiremen" 6or sna in6orma"ion777+var+sna no" 6ound done7 Chec5ing space reMuiremen" 6or 6ilesys in6orma"ion77777777777777777777 done7 Chec5ing space reMuiremen" 6or async in6orma"ion7777777777777777 done7 Chec5ing space reMuiremen" 6or lang in6orma"ion7777777777 done7 Chec5ing space reMuiremen" 6or !S24 in6orma"ion7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777done7 Chec5ing space reMuiremen" 6or ins"all in6orma"ion777 done7 Chec5ing space reMuiremen" 6or ssa in6orma"ion7777777777 done7 Chec5ing space reMuiremen" 6or logical volume manager in6orma"ion777777777-Gs777'-s77 done7 Chec5ing space reMuiremen" 6or mul"icpu "race 6iles +var+adm+ras+"rc6ile2 <o such 6ile or direc"ory R

A ! %asic Sys"em Adminis"ra"ion

402

A ! Sys"em Dump /acili"y


I ls .ld *tmp*i!msupt dr,:888888 21 roo" sys"em I date )ed Dec 1 1E240242 CST 2010 I cd *tmp*i!msupt I p/d +"mp+ibmsup" # ls async sissas X5'7 artex script.log # dumpdata get0tas@eap <ernel tcpip ,pars client_collect filesys hacmp scraid sna dump general install ssa ,lm nfs lang testcase lvm printer other pcixscsi E01> Dec 0G 1E2ED +"mp+ibmsup"

A ! %asic Sys"em Adminis"ra"ion

403

A ! Sys"em Dump /acili"y


*very"hing "he %& "echnician reMuires "o analyFe "he sys"em dump2
# cd dump # p*d 3tmp3ibmsupt3dump # ls autoload dump.!A dump.snap errdead livedumpdead mdmprpt.out minidump_last trcdead # <db unix.A <db_6:

A ! %asic Sys"em Adminis"ra"ion

404

A ! Sys"em Dump /acili"y


The 5db is a "ool+command 6or analysing "he sys"em dumps7 " is used 6or pos"8 mor"em analysis o6 sys"em dumps, or 6or moni"oring "he running 5ernel7 The 5db command has ",o argumen"s, ,hen running on "he sys"em "ha" did no" originally genera"e "he sys"em dump you are analyFing7 17 The dump 6ile 27 The uni:, 5ernel, 6ile 6rom "he 6ailing sys"em7 They are bo"h included in "ha" snap +"mp+ibmsup"+dump direc"ory7 6 you are analyFing "he sys"em dump on "he sys"em ,here "he dump ,as genera"ed, "hen you ,ill no" need "o e:plici"ly speci6y "he uni:, 5ernel, 6ile as an argumen" ,hen invo5ing i"7 n "his e:ample, ,eBll invo5e i" ,i"h "he uni:, 5ernel, 6ile as i6 ,e ,ere %&+A ! "echnical suppor"7
A ! %asic Sys"em Adminis"ra"ion 405

A ! Sys"em Dump /acili"y


Hou ,ill have "o uncompress "he uni:, 5ernel, 6ile and "he sys"em dump 6ile be6ore analyFing i"2
I unc$mpress uni)%] I dmpunc$mpress dump%B] 88 replaced ,i"h dump I

<o, invo5e "he 5db command agains" bo"h2


I 8d! dump uni) dump mapped 6rom _ D00000000000000 "o _ D0000002106E300 STA$T *<D WnameX 0000000000001000 000000000E0D0000 s"ar"]000/DG /00000002//ED>00 /00000002//D/1C0 NNubloc5]000000 000000002//22//E 000000002//22//G environ]000000 000000002//22//G 000000002//22//C errno]000000 /1000/0A00000000 /1000/0A10000000 pvproc]000000 /1000/0A10000000 /1000/0A1G000000 pv"hread]000000 Dump analysis on C.$'NS&'N'C '()*$N'C '()*$ND machine ,i"h E available C';?sA ?>E8bi" regis"ersA 'rocessing symbol "able777 77777777777777777777777done read vscsiNscsiNp"rs (@, p"r Q 0:/1000000C014/31G ?0AX

A ! %asic Sys"em Adminis"ra"ion

406

A ! Sys"em Dump /acili"y


The 6irs" s"ep is al,ays "o issue "he s"a" command, "his ,ill give you some basic high level in6orma"ion abou" "he sys"em ,hich crashed2
?0AX stat SHST*&NC(</ G;$AT (<2 C.$'NS&'N'C '()*$N'C '()*$ND machine ,i"h E available C';?sA ?>E8bi" regis"ersA SHST*& STAT;S2 sysname777 A ! nodename77 gvicai:01 release777 1 version777 > build da"e (c" 1 2010 build "ime 1G200231 label77777 10E0AN>1L machine777 000%14GADE00 nid7777777 0%14GADE "ime o6 crash2 )ed Dec 1 132EE201 2010 age o6 sys"em2 3 day, 23 hr7, E min7, E> sec7 :malloc debug2 enabled /$$s ac"ive777 0 /$$s s"ar"ed77 0 C$AS. </($&AT (<2 C'; 81 CSA 03C3D2AG a" "ime o6 crash, error code 6or L*Ds2 00000000 ?0AX

A ! %asic Sys"em Adminis"ra"ion

40'

A ! Sys"em Dump /acili"y


The 5db u"ili"y al,ays opens on "he C'; ,hich ran "he crashing "hread7 The promp" o6 5db ,hen ,e s"ar"ed i" ,as 0, meaning any command ,e issue in "his promp", ,ill be giving us in6o abou" "he 6irs" C'; on "he sys"em ,hich crashed7
0X

To s,i"ch C';s, use "he 5db cpu I command2


0X cpu 1 1X

<o, "he 5db promp" changes because ,e are no, loo5ing a" C'; 1 0 The second C';7

A ! %asic Sys"em Adminis"ra"ion

408

A ! Sys"em Dump /acili"y


<o, move "o o"her C';s2
?1AX cpu 2 ?2AX cpu 3 ?3AX cpu 4

nvalid cpu E number <o"ice ho, moving "o C'; E errored7 )hy9 )ell le"Bs e:i" 5db and 6ind ou"7 @db is e:i"ed ,i"h "he e:i" command2
?3AX e)it I

A ! %asic Sys"em Adminis"ra"ion

409

A ! Sys"em Dump /acili"y


Lis" "he C';s ins"alled on "his sys"em7 *ach processor core has E possible hard,are "hread e:ecu"ion s"reams7 Tha" is ,hy ,e have
I lsde( .,c pr$cess$r proc0 Available 00800 'rocessor I lsattr .6l pr$c0 6reMuency 3000000000 'rocessor Speed /alse sm"Nenabled "rue 'rocessor S&T enabled /alse sm"N"hreads E 'rocessor S&T "hreads /alse s"a"e enable 'rocessor s"a"e /alse "ype 'o,er'CN'()*$D 'rocessor "ype /alse I smtctl This sys"em is S&T capable7 This sys"em suppor"s up "o E S&T "hreads per processor7 S&T is curren"ly enabled7 S&T boo" mode is no" se"7 S&T "hreads are bound "o "he same vir"ual processor7 proc0 has E S&T "hreads7 %ind processor 0 is bound ,i"h proc0 %ind processor 1 is bound ,i"h proc0 %ind processor 2 is bound ,i"h proc0 %ind processor 3 is bound ,i"h proc0

A ! %asic Sys"em Adminis"ra"ion

410

A ! Sys"em Dump /acili"y


To see ,ha" ,as running on each processor+C'; a" "he "ime o6 "he sys"em crash2
?0AX status C'; T D TSL(T ' D 'SL(T '$(CN<A&* 0 1860061 390 6000B6 96 sHsdumpstart 1 1G0031 2E *001C 1E ,ai" 2 110033 24 /001* 14 ,ai" 3 1%003D 2D 100020 1> ,ai" E8244 Disabled

A ! %asic Sys"em Adminis"ra"ion

411

A ! Sys"em Dump /acili"y


%ac5 "o 5db2 5db dump +uni: To lis" 6ilesys"ems ,hich ,ere moun"ed on "he sys"em "ha" crash, a" "he "ime o6 "he crash2
?0AX (5s G/S DATA TH'* /LAGS 1 /1000A01000C0410 02GAGDG0 /1000A01G0>>00G0 #/S2 D*-&(;<T 777 +dev+hdE moun"ed over + 2 /1000A01000C0>10 02GAGDG0 /1000A01G0>31CG0 #/S2 D*-&(;<T 777 +dev+hd2 moun"ed over +usr 3 /1000A01000C0C10 02GAGDG0 /1000A01G0>0EGG0 #/S2 D*-&(;<T 777 +dev+hd1var moun"ed over +var E /1000A01000C0E10 02GAGDG0 /1000A01G0>14CG0 #/S2 D*-&(;<T 777 +dev+hd3 moun"ed over +"mp 4 /1000A01000C0*10 02GAGDG0 /1000A01G0GA%GG0 #/S2 D*-&(;<T 777 +dev+hd1 moun"ed over +home > /1000A01000C1010 02GAGDG0 /1000A01G011%GG0 #/S2 D*-&(;<T 777 +dev+hd11admin moun"ed over +admin D /1000A01000C1110 02GAGG20 0000000000000000 '$(C/S 777 +proc moun"ed over +proc G /1000A01000C1210 02GAGDG0 /1000A01G0GC%CG0 #/S2 D*-&(;<T 777 +dev+hd10op" moun"ed over +op" 1 /1000A01000C0D10 02GAGDG0 /1000A01G1>>DCG0 #/S2 D*-&(;<T 777 +dev+6slv00 moun"ed over +6s1

A ! %asic Sys"em Adminis"ra"ion

412

A ! Sys"em Dump /acili"y


?0AX p 3 SL(T <A&* STAT* 'D '' D ADS'AC* CL IT.S pvproc]000000 0 s,apper ACT -* 0000000 0000000 0000000G01001110 0 0001 pvproc]000E00 1 ini" ACT -* 0000001 0000000 0000000G14014EG0 0 0001 pvproc]000G00 2 ,ai" ACT -* 002000E 0000000 0000000G03003110 0 0001 pvproc]000C00 3 sched ACT -* 003000> 0000000 0000000G04004110 0 0001 pvproc]001000 E lrud ACT -* 00E000G 0000000 0000000G0D00D110 0 0002 pvproc]001E00 4 vmp"acr" ACT -* 004000A 0000000 0000000G01001110 0 0001 R p(pr$c2018000 963sHsdumps =,-0Q6 06000B6 0'40014 000000081,1B,480 0 0001 pvproc]01GE00 1D %&7CS&A ACT -* 0>100C2 0E/00CC 0000000G1DD%DEG0 0 001> pvproc]011000 100 %&7D$&d ACT -* 0>E00E* 0E/00CC 0000000G0EG0EEG0 0 001E pvproc]011E00 101 ge""y ACT -* 0>400E2 0000001 0000000G11%11EG0 0 0001 pvproc]01AE00 104 "elne"d ACT -* 0>1001C 03%00A* 0000000G1*DD*EG0 0 0001 pvproc]01AC00 10D e6sN"5rN ACT -* 0>%004G 0000001 0000000G0/%0/110 0 0001 pvproc]01D000 11> 5sh ACT -* 0DE00DE 0>1001C 0000000G0>D>>EG0 0 0001

?0AX

A ! %asic Sys"em Adminis"ra"ion

413

A ! Sys"em Dump /acili"y


To display more in6o abou" a par"icular process in "he par"icular in"ernal process slo" "able7
?0AX p 96 SL(T <A&* STAT* 'D '' D ADS'AC* CL IT.S

pvproc]01G000 1>Osysdumps ACT -* 0>000%* 0DE00DE 0000000G1CD%CEG0 0 0001 <A&*7777777 sysdumps"ar" STAT*777777 s"a" 20D 7777 :s"a" 20000 /LAGS777777 6lag 200200001 L(AD *!*C*D 77777777777 6lag2 200000000 77777777777 6lag3 200000000 77777777777 a"omic 200000000 77777777777 sec6lag20001 $((T L <@S777777 child 20000000000000000 77777777777 siblings 20000000000000000 77777777777 uidin6o 200000000022A2D>G 77777777777 ganchor 2/1000/0A0001G000 Wpvproc]01G000X T.$*AD77777 "hreadlis" 2/1000/0A1001G>00 Wpv"hread]01G>00X D S'ATC.777 synch 2//////////////// AACCT777777 proCid 200000000 77777777777 sproCid 200000000 77777777777 subproC 20000000000000000 77777777777 6ile id 20000000000000000 0000000000000000 00000000 77777777777 5cid 200000000 77777777777 6lags 20000

A ! %asic Sys"em Adminis"ra"ion

414

A ! Sys"em Dump /acili"y


Clean up 6rom "he lab2
I cd * I um$unt *dump I rm5s r *dump

A ! %asic Sys"em Adminis"ra"ion

415

A ! Sys"em 'rocess &anagemen"

A ! %asic Sys"em Adminis"ra"ion

416

A ! Sys"em 'rocess &anagemen"


A program, in"ernally, can run in ",o modes2 17 ;ser mode 27 Sys"em mode ;ser mode means "ha" "he sys"em is e:ecu"ing "he source code o6 "he program, "ha" a developer+programmer ,ro"e7 Sys"em mode means "ha" "he sys"em is e:ecu"ing ,ha" is 5no,n as a sys"em call7 A sys"em call is called on behal6 o6 a user process7 A sys"em call is a pre8 de6ined J6unc"ionK7 Sys"em calls are 6unc"ions "ha" a programmer can call "o per6orm "he services o6 "he opera"ing sys"em7 An e:ample o6 a sys"em call is read?A7 )hen "he processor sees "ha" "he running program code needs "o read a 6ile on dis5, "he user program calls on "he 5ernel "o e:ecu"e "he read?A sys"em call on i"Bs behal6 because a sys"em call has "o run in "he 5ernelBs priva"e+privilege area, and user programs canno" run "here7
A ! %asic Sys"em Adminis"ra"ion 41'

A ! Sys"em 'rocess &anagemen"


A process is "he en"i"y in ;ni: ,here a program runs7 " describes "he program i"sel6, "he sys"em resources i" uses, e"c7 *ach process has a name, a name ,hich is usually "he name o6 "he program, e"c7 A process is a name given "o a program being e:ecu"ed by "he opera"ing sys"em *very process has a uniMue D ,hich ge"s assigned "o "hem ,hen you submi" "hem "o "he sys"em 6or e:ecu"ion7 This D is called "he ' D, 'rocess den"i6ier7 This D is used so you and "he sys"em can 5eep "rac5 o6 "his running process, and con"rol i"7 All process Ds, ' D numbers, are even, ,i"h "he e:cep"ion o6 "he ini" process, ' D 17 The 6irs" sys"em+5ernel process D, ' D, is number 07 " is assigned "o "he s,apper process during "he boo" process7 The 6irs" user process D, ' D, number is 17 " is assigned "o "he ini" process during "he boo" process7
A ! %asic Sys"em Adminis"ra"ion 418

A ! Sys"em 'rocess &anagemen"


The smalles" uni" o6 a process is a "hread7 *very process has a" leas" one "hread7 A process can be mul"i8"hreaded, meaning "ha" i" can run more "han one so6",are ins"ruc"ion on mul"iple processors+C';s simul"aneously7 A sys"em ,i"h mul"iple processors+C';s is 5no,n as an S&', Symme"rical &ul"i8 'rocessor, sys"em7 *very "hread adop"s many a""ribu"es 6rom i"Bs paren" process7 *very "hread is assigned a uniMue D 5no,n as "he T D, Thread den"i6ier7 There numbers are odd7 *ach process is made up o6 one or more "hreads7 A "hread is a single seMuen"ial 6lo, o6 con"rol7
A ! %asic Sys"em Adminis"ra"ion 419

The processor penal"y is an in"eger "ha" is calcula"ed 6rom "he recen" processor usage o6 a "hread The recen" processor usage increases by appro:ima"ely 1 each "ime "he "hread is in con"rol o6 "he processor a" "he end o6 a 10 ms cloc5 "ic5, up "o a ma:imum value o6 1207 (nce per second, "he recen" processor usage values 6or all "hreads are recalcula"ed7

A ! %asic Sys"em Adminis"ra"ion

420

A ! Sys"em 'rocess &anagemen"

A ! %asic Sys"em Adminis"ra"ion

421

A ! Sys"em 'rocess &anagemen"


To de"ermine ,ha" is curren"ly running on a sys"em use "he ps 0e6 command7 This command s"ands 6or 'rocess S"a"us 0 *-*< <;&%*$S
I ps .e5 ; D ' D '' D C ST &* TTH T &* C&D roo" 1 0 0 Dec 01 8 0200 +e"c+ini" roo" >44E>> E>432EE 0 Dec 01 8 0200 +usr+sbin+por"map roo" 140DE3> E>432EE 0 Dec 01 8 0200 sendmail2 accep"ing connec" roo" 1G3410> E>432EE 0 Dec 01 8 0200 +usr+sbin+nimesis 8s roo" 11>>2D2 44D0DD0 0 Dec 01 8 0241 +var+op"+"ivoli+ep+NCvm+Cre roo" 2031D>2 E>432EE 0 Dec 01 8 0200 +usr+sbin+hos"mibd roo" 21>2G20 E>432EE 0 Dec 01 8 020E +usr+sbin+syslogd roo" 222G3DG E>432EE 0 Dec 01 8 0200 +usr+sbin+"6"pd 8n roo" 22131>0 E>432EE 0 Dec 01 8 0200 +op"+6ree,are+cimom+pegasus roo" 23413G> 1 0 Dec 01 8 0200 +usr+ccs+bin+shlap>E roo" 2D42>10 E>432EE 0 Dec 01 8 0200 +usr+sbin+ai:mibd roo" 2G1G1GG E>432EE 0 Dec 01 8 0200 +usr+sbin+snmpmibd roo" 21E122> 1 0 Dec 01 8 0200 +op"+ibm+icc+cimom+bin+dirs roo" 301EG0G E>432EE 0 Dec 01 8 0200 +usr+sbin+,ri"esrv roo" 30G0312 1 0 Dec 01 8 0200 +usr+sbin+uprin"6d pconsole 31E4122 4D01G12 0 Dec 01 8 0200 +bin+5sh +pconsole+l,i+bin+ roo" 33E2E>2 E>432EE 0 Dec 01 8 0200 +usr+sbin+ine"d roo" 3E0D11E E>432EE 0 Dec 01 8 0200 +usr+sbin+snmpd roo" 3ED3>42 1 0 Dec 01 8 0200 +usr+sbin+cron roo" 3431112 1 1 Dec 01 8 0231 +usr+sbin+ge""y +dev+consol roo" 3>0ED1> E>432EE 0 Dec 01 8 0200 +usr+sbin+biod > R

A ! %asic Sys"em Adminis"ra"ion

422

A ! Sys"em 'rocess &anagemen"


Threads 0 (DD <;&%*$S
I ps elm$ -NR6=1 ;S*$ ' D '' D T D ST C' '$ SC )C.A< / TT %<D C(&&A<D roo" 1 0 8 A 0 >0 1 8 200003 8 8 +e"c+ini" 8 8 8 >4431 S 0 >0 1 8 E10E00 8 88 roo" 14D3002 1 8 A 0 >0 1 8 E1001 8 8 7+slpNsrvreg 8D 8 8 8 >1ED0>1 S 0 >0 1 8 E1GE00 8 88 roo" 1D>1>4> 1 8 A 0 >0 1 61000a1000a21Gb0 2E0001 8 8 +op"+ibm+direc"or+cimom+bin+"ier1slp 8 8 8 4E31>11 S 0 >0 1 61000a1000a21Gb0 E10E00 8 88 roo" 11>>1D2 1 8 A 0 >0 1 61000000a046101G 2E0001 8 8 +usr+ccs+bin+shlap>E 8 8 8 2>214ED S 0 >0 1 61000000a046101G E00 8 88 roo" 2031D3> 1 8 A 0 >0 1D O 2E0001 8 8 +usr+sbin+syncd >0 8 8 8 >44E1D S 0 >0 1 61000a1000a22bb0 E10E00 8 88 8 8 8 201D2E1 S 0 >0 1 61000a1000a21db0 E10E00 8 88 8 8 8 222G324 S 0 >0 1 61000a1000a20>b0 E10E00 8 88 8 8 8 244>013 S 0 >0 1 61000a001GadEDb0 E10E00 8 88 8 8 8 3ED34ED S 0 >0 1 61000a1000a2D6b0 E10E00 8 88 8 8 8 3431111 S 0 >0 1 61000a1000a20bb0 E10E00 8 88 8 8 8 3>0E>3D S 0 >0 1 61000a1000a2>bb0 E10E00 8 88 8 8 8 3G>>D43 S 0 >0 1 61000a1000a24eb0 E10E00 8 88 8 8 8 E324413 S 0 >0 1 61000a001GadEdb0 E10E00 8 88 8 8 8 E422124 S 0 >0 1 61000a1000a2D0b0 E10E00 8 88 8 8 8 E4GD>>3 S 0 >0 1 61000a1000a210b0 E10E00 8 88 8 8 8 E>43203 S 0 >0 1 61000a1000a241b0 E10E00 8 88

A ! %asic Sys"em Adminis"ra"ion

423

A ! Sys"em 'rocess &anagemen"


A process can run in "he 6oreground or "he bac5ground7 To run a process in "he 6oreground, li5e a regular command, simply Cus" run i" in "he shell by "yping i" in2
I sleep 5 I

The problem ,i"h "he 6oreground is "ha" you ,ill have "o ,ai" un"il i" comple"es be6ore you gain con"rol o6 your "erminal again7 To "hro, some"hing in "he bac5ground pu" an ampersand 8 = a" "he end o6 i"7 This ,ay you can move on "o o"her "hings, ,hile "his is running7
I sleep 5 [ U1V DE04D32 I I U1V ] Done I sleep 4 =

A ! %asic Sys"em Adminis"ra"ion

424

A ! Sys"em 'rocess &anagemen"


'rocess &anagemen"2

I sleep 1000 [ U1V 3D34D40 I $!s U1V ] $unning I $!s .l U1V ] 3D34D40 $unning sleep 1000 = sleep 1000 =

I ps .e5 : #rep .i sleep roo" 3D34D40 4G1G2>2 0 0123323G p"s+0 0200 sleep 1000 I

A ! %asic Sys"em Adminis"ra"ion

425

A ! Sys"em 'rocess &anagemen"


Hou can "a5e a Cob ,hich is curren"ly running in "he bac5ground and move i" "o "he 6oreground
I 5# 3'35'50 sleep 1000

To send your process "o "he bac5ground+s"opping i" go ahead and hi" C(<T$(L]c
^]U1V ] S"opped ?S GTST'A sleep 1000 = sleep 1000 = I $!s .l U1V ] 3D34D40 S"opped ?S GTST'A I

To re8s"ar" i" in "he bac5ground "ype in "he 6ollo,ing


I !# 3'35'50 U1V sleep 1000 = I $!s U1V ] $unning sleep 1000 = I ps .e5 : #rep .i sleep roo" 3D34D40 4G1G2>2 0 0123323G p"s+0 0200 sleep 1000 I

A ! %asic Sys"em Adminis"ra"ion

426

A ! Sys"em 'rocess &anagemen"


There are many signals you can send "o a running process7 They can be seen ,i"h "he 6ollo,ing command2
I 8ill .l 1A .;' 1EA AL$& 2DA &SG E0A bad "rap 43A bad "rap 2A <T 14A T*$& 2GA ) <C. E1A bad "rap 4EA bad "rap 3A `; T 1>A ;$G 21A ')$ E2A bad "rap 44A bad "rap EA LL 1DA ST(' 30A ;S$1 E3A bad "rap 4>A bad "rap 4A T$A' 1GA TST' 31A ;S$2 EEA bad "rap 4DA bad "rap >A A%$T 11A C(<T 32A '$(/ E4A bad "rap 4GA $*C(</ G DA *&T 20A C.LD 33A DA<G*$ E>A bad "rap 41A C';/A L GA /'* 21A TT < 3EA -TAL$& EDA bad "rap >0A G$A<T 1A @ LL 22A TT(; 34A & G$AT* EGA bad "rap >1A $*T$ACT 10A %;S 23A ( 3>A '$* E1A bad "rap >2A S(;<D 11A S*G2EA !C'; 3DA - $T 40A bad "rap >3A SA@ 12A SHS 24A !/Sc 3GA AL$&1 41A bad "rap 13A ' '* 2>A bad "rap 31A )A T <G 42A bad "rap I

A ! %asic Sys"em Adminis"ra"ion

42'

A ! Sys"em 'rocess &anagemen"


To 5ill a process 6rom running you can use signal number 1, ,hich as you ,ill recall 6rom "he previous slides ou"pu" is "he signal J@ LLK
I 8ill .9 3'35'50 I ps .e5 : #rep .i sleep U1V ] @illed sleep 1000 = I

A ! %asic Sys"em Adminis"ra"ion

428

A ! Sys"em 'rocess &anagemen"


@ic5 o66 ano"her sleep command in "he bac5ground2
I sleep 1000 [ U1V >021312 I ps .e5 : #rep .i sleep roo" >021312 221E01E 0 13241231 p"s+1 0200 sleep 1000 I

<o, loo5 a" "he second number in "he above ps 0e6 ou"pu", ,hich is "he "hird column over7 Tha" is "he '' D 0 'aren" 'rocess D7 This is "he process ,ho is a paren" o6 "he process running 0 sleep7 Sleep is "he child "o 221E01E7 <o, le"Bs see ,ha" 221E01E is9
I ps .e5 : #rep .i 2294014 : #rep .i( #rep roo" 221E01E >GG134E 1 122EG2E1 p"s+1 0200 85sh roo" EGE1DD2 221E01E 0 1E20121> p"s+1 0200 ps 8e6 roo" >021312 221E01E 0 13241231 p"s+1 0200 sleep 1000 I

" is "he @orn shell process "ha" you logging on"o "he sys"em launched7

A ! %asic Sys"em Adminis"ra"ion

429

A ! Sys"em 'rocess &anagemen"


<o, 5ill "he '' D o6 "he sleep process2
I ps .e5 : #rep .i sleep roo" >021312 221E01E 0 13241231 p"s+1 0200 sleep 1000 I 8ill .9 2294014

Tha" ,ill "ermina"e your pu""y connec"ion "o "he sys"em because "ha" is your login session+@orn shell7 Log bac5 in"o "he sys"em as roo", and you ,ill no, see "ha" sleep process has been adop"ed by i"Bs grandparen" 0 ini" ' D 17
I ps .e5 : #rep .i 6029312 roo" >021312 1 0 13241231 I

8 0200 sleep 1000

A ! %asic Sys"em Adminis"ra"ion

430

A ! Sys"em 'rocess &anagemen"


<ormally ,ha" happens is ,hen "he child+sleep is done running, i" ,ill aler" "he paren" process+5sh "ha" i" has comple"ed, and i" is "hen "he paren"Bs+5sh responsibili"y "o burry "he child properly 0 release sys"em resources, e"c7 .o,ever i6 "he paren" dies be6ore "he child, "hen "he child is 5no,n as an orphan, and "he grandparen" is "hen 6orced "o adop" i"7 Some"imes some"hing 6un5y happens and "he child canno" be 5illed by "he paren" or "he grandparen"7 )hen "his happens "he child process becomes a Fombie ,hen i"Bs done running7 <o, you canno" 5ill a Fombie process because you canno" 5ill a process "ha" is already dead7 The only ,ay "o ge" rid o6 Fombies is "o reboo" "he sys"em7 A Fombie has no nega"ive impac" on "he sys"em, i" Cus" "a5es up a process slo", in "he process "able7

A ! %asic Sys"em Adminis"ra"ion

431

A ! Sys"em 'rocess &anagemen"


)ha" combies loo5 li5e on a sys"em2
I ps .8 : #rep .i de5 2DGD20 0200 Wde6unc"X E04>00 0200 Wde6unc"X E40>10 0200 Wde6unc"X 4202DE 0200 Wde6unc"X 4>42DG 0200 Wde6unc"X >GE20> 0200 Wde6unc"X

A ! %asic Sys"em Adminis"ra"ion

432

A ! Sys"em 'rocess &anagemen"


@ic5 o66 a sleep process in "he bac5ground again2
I sleep 10000 [ U1V DE04D32 I I U1V ] Done I

sleep 4 =

<o, disconnec" 6rom "he sys"em ,i"h "he e:i" command


I e)it There are running Cobs7

<o"e ho, you received "he ,arning above "ha" Cobs are curren"ly running under your user name7 gnore "ha" and "ype in e:i" a second "ime, maybe a "hird "ime as ,ell7
I e)it I e)it

Connec"ion Closed7
A ! %asic Sys"em Adminis"ra"ion 433

A ! Sys"em 'rocess &anagemen"


Login again as roo"7
I ps .e5 : #rep .i sleep I

<o"e ho, "he process died even "hough 10000 seconds isnB" up ye"7 Hou can "ell "he sys"em no" "o 5ill "he process Cus" because you as "he user ,ho s"ar"ed i" logged ou" o6 "he sys"em2
I n$hup sleep 10000[ U1V >GG13>E I Sending nohup ou"pu" "o nohup7ou"7 I ps .e5 : #rep .i sleep roo" >GG13>E D0DG00> 0 1E223211 p"s+0 0200 sleep 10000 I Cobs U1V ] $unning nohup sleep 10000= I

A ! %asic Sys"em Adminis"ra"ion

434

A ! Sys"em 'rocess &anagemen"


Log in"o "he sys"em again, and you ,ill see "his "ime "ha" "he process is s"ill running happily, and ,as adop"ed by roo"2
I ps .e5 : #rep .i sleep roo" >GG13>E 1 0 1E223211 I 8 0200 sleep 10000

This command au"oma"ically crea"es a nohup7ou" 6ile, Cus" in case any ou"pu" is genera"ed2
I ls .l n$hup%$ut 8r,8888888 1 roo" sys"em 0 Dec 03 1E223 nohup7ou"

I date /ri Dec 3 1E224231 CST 2010 I

A ! %asic Sys"em Adminis"ra"ion

435

A ! Sys"em 'rocess &anagemen"


(nly one program+process+"hread can run on a sys"em processor a" one "ime7 There is an in"ernal mechanism 5no,n as "he scheduler, s,apper, ,hich crea"es "he illusion "ha" mul"iple processes+"hreads are running on a sys"em processor simul"aneously7 " may seem "o you "ha" "here are more programs+processes+"hreads running on a sys"em "hen "here are processors+C';S, bu" "ha" is no" "he case7 To unders"and ho, "his illusion happens ,e need "o unders"and ,ha" happens ,hen you crea"e a program+process+"hread7 The algori"hm 6or de"ermining ,hich "hread should be run ne:" is called a scheduling policy.

A ! %asic Sys"em Adminis"ra"ion

436

A ! Sys"em 'rocess &anagemen"


17A A user runs a program 8 ?i7e7 88X They run a command such as2 sleepA7 27A Tha" program becomes a process on "he sys"em, ,hich alloca"es "he reMuired sys"em resources "o run7 37A Tha" process dispa"ches a "hread, in "his e:ample i" is a single "hreaded program, ?al"hough programs can be mul"i8"hreaded as ,ell7A E7A Tha" "hread goes in"o "he sys"em global run Mueue 5no,n as $;<8$;<7 47A Tha" "hread is "hen pu" on a C';Ts run Mueue ,here i"Ts priori"y is governed by a nice value 6or ne, processes, and re8nice 6or already running processes7 >7A Tha" "hread is "hen selec"ed ,i"h o"her compe"ing processes 6or C'; "ime, "o run on "ha" C';7 D7A The "hread runs on a C'; 6or 10ms a" a "ime7 G7A A" "he end o6 "ha" 10ms "ime slice, or Muan"um o6 "ime, ,hich is called a cloc5 "ic5 "he 5ernel ,ill in"errup" "ha" user "hread running on "he C';, and per6orm some in"ernal sys"em house5eeping rou"ines, as ,ell as upda"e "he C'; usage 6or "ha" running "hread7 <o"e2 Tha" "hread ,ill be charged even 6or "he 5ernel in"errup"7 This 5ernel in"errup" is 5no,n as an e:"ernal in"errup"7 Also during "ha" 10ms in"errup" "he 5ernel ,ill chec5 "o see i6 a ne,, or e:is"ing "hreads have en"ered "ha" C';Ts run Mueue ,i"h a higher priori"y, "hen "he one curren"ly running7
A ! %asic Sys"em Adminis"ra"ion 43'

A ! Sys"em 'rocess &anagemen"


6 "here is one "hen "ha" "hread "a5es "he place o6 "he curren"ly running "hread on "ha" C';, and "he curren"ly running "hread ge"s pu" bac5 in"o "ha" C';Ts run Mueue7 6 no ne, "hread has come in ,i"h a higher priori"y, "hen "he curren"ly running "hread on "ha" C';, ,ill run 6or ano"her 10 ms7 17A A6"er 1 second, a cloc5 clic5, ?once every secondA, "his is assuming no"hing has preemp"ed "he curren"ly running "hread, and "his "hread is "a5ing more "han 1 second "o run, all o6 "he "hreads in "ha" C';Ts run MueueTs priori"ies are re8 calcula"ed, and "ha" running "hread ge"s "hro,n bac5 in"o "ha" C';Ts run8Mueue "o a""emp" and 5eep processor a66ini"y 6or re8dispa"chmen" o6 i" la"er7 Hou see a "hread can only run 6or 1 second "o"al ,hich is 5no,n as a cloc5 clic5, i6 i"Ts no" in"errup"ed be6ore i" ge"s "o "ha" 1 second7 A6"er 1 second all "hreads in "ha" C';Ts run Mueue including "ha" one are re8calcula"ed, and ano"her re8calcula"ed "hread could no, run on "he C';7 This is "o give everyone a chance "o run on "he C';7 .o, does "his ,or5 e:ac"ly ,i"h "he priori"ies9 )ell every "ime a "hread is s"ill running a" every 10ms cloc5 "ic5 ,hen "he sys"em ,a5es up a chec5, "ha" "hread is penaliFed ,i"h i"Bs priori"y incremen"ing by one because o6 "he C'; usage penal"y7 Tha"Bs ,hy a" every cloc5 clic5, ,e 5no, "here is a good chance "ha" our curren"ly running "hread ,ill ge" s,i"ch bac5 ou" "o "he run Mueue7
A ! %asic Sys"em Adminis"ra"ion 438

A ! Sys"em 'rocess &anagemen"


The procedure Cus" discussed is 5no,n as an e:"ernal in"errup", because "he running "hread did no" give up "he processor+C'; volun"arily, i" ,as an involun"ary 6or6i" o6 "he processor+C';7 *ach process+"hread is given a priori"y, i"Bs recen" C'; usage, a" "he conclusion o6 each in"errup" ,ill a66ec" "ha" priori"y7 The higher "he number a less o6 a priori"y i" has, "he lo,er "he number "he more o6 a priori"y i" has7 $un Mueues have 24> slo"s "o"al7 ;sed "o be 12G7 There are in"ernal in"errup"s as ,ell7 This is ,hen "he user "hread ma5es a sys"em call, 6or "he 5ernel "o do some"hing on i"Ts behal67 6 "he sys"em sees "ha" "his is an +( opera"ion ,hich ,ill reMuire some "ime "o comple"e, i" s"ill ,an"s "o give o"her "hreads in "he run Mueue ,ho maybe ready "o run no,, a chance "o run7 Tha" being "he case, "he user "hread in"errup"s i"sel6 by ma5ing a sys"em call 6or "he 5ernel "o run in sys"em mode7 The user "hread ,ill "hen go bac5 in"o "he Mueue as a sleeping process, S, ,ai"ing 6or "ha" +( "o comple"e, ,hile "ha" +( is running ano"her "hread can ma5e use o6 "ha" C';7 )hen "ha" +( is done "hen "ha" "hread ,ill be eligible "o re8gain con"rol o6 a C';, and run once again con"inuing i"Ts run7
A ! %asic Sys"em Adminis"ra"ion 439

A ! Sys"em 'rocess &anagemen"


)hile a "hread is running on a C';, i" ,ill be in"errup"ed al,ays by "he 5ernel, i6 "he 5ernel has "o service a h+, reMues"7 A6"er a h+, in"errup" "he 5ernel ,ill chec5 "he run8Mueue o6 "ha" C';, "o see i6 any "hread ,hich is runnable has a be""er priori"y "hen "hen one ,hich ,as Cus" in"errup"ed by "he h+, in"errup"7 (nly one C'; can ma5e a sys"em call "o a 5ernel+access "he 5ernel a" one "ime7 The one second cloc5 clic5 ,here all "hreads priori"ies are adCus"ed is re6erred "o as a maCor cloc5 cycle7

A ! %asic Sys"em Adminis"ra"ion

440

A ! Sys"em 'rocess &anagemen"

A ! %asic Sys"em Adminis"ra"ion

441

A ! Sys"em 'rocess &anagemen"


17A )hen a process is ini"ia"ed+s"ar"ed "he 6irs" resource "o be alloca"ed is a slo" in "he ;ni: process "able o6 "he sys"em7 The process in "he s"a"e above is in "he S<(<* s"a"e7 27A )hile "he process is undergoing crea"ion ?,ai"ing 6or resources?memoryA "o be alloca"edA, i" is in "he S DL s"a"e7 These ",o s"a"es "oge"her are 5no,n as "he s"a"e7 37A )hen a process is in "he A s"a"e, one or more o6 i"Ts "hreads are in "he $ s"a"e7 This means "ha" "hey are ready "o run7 8 6 a "hread is ,ai"ing 6or an even" or 6or an +( ?sys"em callA "he "hread is said "o be sleeping, or in "he S s"a"e7 8 )hen "he +( is comple"e, "he "hread is a,an5ened and placed in "he ready8"o8 run Mueue7

A ! %asic Sys"em Adminis"ra"ion

442

A ! Sys"em 'rocess &anagemen"


A process in "he 6ollo,ing ,hich has a "hread in one o6 "he 6ollo,ing s"a"es, is in an A s"a"e2 $,S, $unning, T 6 a "hread is s"opped ,i"h a S GST(' signal i" is in "he T s"a"e ,hile suspended7

A ! %asic Sys"em Adminis"ra"ion

443

A ! Sys"em 'rocess &anagemen"


To vie, 5ernel processes "ype in "he 6ollo,ing2
I ps .8 ' D TTH T &* C&D 0 8 0224 s,apper 1310D> 8 322> ,ai" 11>>1E 8 0200 sched 2>2142 8 0200 lrud 32D>10 8 0200 vmp"acr" 31322G 8 0200 psmd E4GD>> 8 0200 vmmd 42E30E 8 0200 memgrdd 4G1GE2 8 0200 lsareapr D2011G 8 0200 devs"a"d DG>E4> 8 0200 pilegc G4111E 8 0201 :mgc 11D432 8 2244 ,ai" 1G30D0 8 0200 ne"m 10EG>0G 8 0222 gil 111E1E> 8 0200 ,lmsched 11D1>GE 8 0200 arm"raceN5proc 13D>3EG 8 0200 r"cmd 14D21E> 8 0200 nEbg 1>3GE4E 8 0200 vscsiN5proc 1D031GG 8 0200 lvmbb 1D>1432 8 0200 mempNrbd 1100>22 8 0200 rgsr 201D21> 8 0200 C2pg R

A ! %asic Sys"em Adminis"ra"ion

444

A ! Sys"em 'rocess &anagemen"


There is a special 6ilesys"em 5no,n as +proc, shor" 6or process7 This is a special 6ilesys"em because i" is ,ha" is 5no,n as a pseudo 6ilesys"em7 This comes 6rom "he Linu: ,orld7 This 6ilesys"em does no" physically reside on dis57 " is in memory, and o66ers a por"al in"o "he running sys"em 5ernel7 Loo5 under "he dis5 space s"a"is"ics in "he command belo,, "hey are null, no"ed by "he 8, hyphen7 This is because "his 6ilesys"em and i"Bs con"en"s are no" really on dis57
I d5 .# *pr$c /ilesys"em G% bloc5s /ree ^;sed used ^ used &oun"ed on +proc 8 8 8 8 8 +proc I

A ! %asic Sys"em Adminis"ra"ion

445

A ! Sys"em 'rocess &anagemen"


*very curren"ly running process on "he sys"em has a direc"ory crea"ed 6or i" au"oma"ically in "he +proc 6ilesys"em named a6"er i"Bs ' D number2
# ls /proc ( $$?%6&: 96?($7& :$'&&76 &7$%%: version $ $9$(?6 9%9''& :$%::7' %$?79' $(:&6(& $9?699( 9%9'9': :'6(($: %&9(?( $$$:$:6 $::$&:& :(699&( :9'77$6 # $7(?9%: :9%(%7& $7?9((' ::76666 $69&:7: :7''$'& $?6%676 :7&?66 $&97$'( :679''& $%((6(' :?$&?%' $%66$: :?&:9': $%66$?' :&:%&%6 '(9$?96 :%$7':: '(%?'6' :%&(%(& '$6'?6' 7$$'('( '''&9&' 7$??7&& ''%:($: 7':'&%( '97%9?6 7':9(: ':':%$& 79(&67' ':%(:6& 79?:$'6 '6'$7' 7:9%66' '6'$7'( 77(7''6 '?7'666 77?(?9: '&$&$9: 7696'&: '&&96?' 7?($&6( '%:%'?& 7?6?97& 9($:?6( 7&9'?$( 9(&(9(& 7&%&:' 9$:7&?6 7&%&:'6 9'?6%( 7%69%?' 9'?6%'( 6$6(7&6 99:'7:6 6''6$': 9:(&((6 677:$& 9:?97?6 6&&$97: 979%(7' ?'(%$& 96(:6?: ?&6:76 sys

A ! %asic Sys"em Adminis"ra"ion

446

A ! Sys"em 'rocess &anagemen"


I ls .l pr$c "o"al 0 dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" dr8:r8:r8: 1 roo" R sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em 0 Dec 03 13200 0 0 Dec 03 13200 1 0 Dec 03 13200 10EG>0G 0 Dec 03 13200 111E1E> 0 Dec 03 13200 11D1>GE 0 Dec 03 13200 1310D> 0 Dec 03 13200 13D>330 0 Dec 03 13200 1EE1GEG 0 Dec 03 13200 140D31E 0 Dec 03 13200 14D3002 0 Dec 03 13200 1>3GE4E 0 Dec 03 13200 1D>1>4> 0 Dec 03 13200 1G34120 0 Dec 03 13200 1100>02 0 Dec 03 13200 11>>1E 0 Dec 03 13200 11>>1D2 0 Dec 03 13200 2031D3> 0 Dec 03 13200 201D2>2 0 Dec 03 13200 21>2D>2 0 Dec 03 13200 222G3G2 0 Dec 03 13200 221E01E 0 Dec 03 13200 23413D>

A ! %asic Sys"em Adminis"ra"ion

44'

A ! Sys"em 'rocess &anagemen"


S"ar" a sleep process2

G sleep 10000 [ U1V DE04>EG G ps .e5 : #rep .i sleep roo" DE04>EG 221E01E 0 13202232 p"s+1 0200 sleep 10000 G

A ! %asic Sys"em Adminis"ra"ion

448

A ! Sys"em 'rocess &anagemen"


I cd *pr$c I p/d +proc I ls .ld '405648 dr8:r8:r8: 1 roo" I cd '405648 I p/d +proc+DE04>EG I ls .l "o"al 1> 8r,8888888 1 roo" 8r88888888 1 roo" 88,8888888 1 roo" lr8:888888 22 roo" dr8:888888 1 roo" dr8:r8:r8: 1 roo" 8r88888888 1 roo" 8r88888888 1 roo" dr8:888888 1 roo" 8r88r88r88 1 roo" lr8:888888 22 roo" 8r88888888 1 roo" 8r88888888 1 roo" 8r88r88r88 1 roo" sys"em 0 Dec 03 13203 DE04>EG

sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em sys"em

0 Dec 03 13203 as 12G Dec 03 13203 cred 0 Dec 03 13203 c"l 0 Dec 03 1021E c,d 8X + 0 Dec 03 13203 6d 0 Dec 03 13203 l,p 0 Dec 03 13203 map 0 Dec 03 13203 mmap 0 Dec 03 13203 obCec" EEG Dec 03 13203 psin6o 0 Dec 03 1021E roo" 8X + 122GG Dec 03 13203 sigac" 1420 Dec 03 13203 s"a"us 0 Dec 03 13203 sysen"

A ! %asic Sys"em Adminis"ra"ion

449

A ! Sys"em 'rocess &anagemen"


I ls .l l/p "o"al 0 dr8:r8:r8: 1 roo" I cd l/p I p/d +proc+DE04>EG+l,p I ls 430GE41 I cd 5308459 I ls l,pc"l l,psin6o l,ps"a"us I ls .l "o"al 0 88,8888888 1 roo" 8r88r88r88 1 roo" 8r88888888 1 roo" sys"em 0 Dec 03 13203 430GE41

sys"em sys"em sys"em

0 Dec 03 1320E l,pc"l 120 Dec 03 1320E l,psin6o 1200 Dec 03 1320E l,ps"a"us

A ! %asic Sys"em Adminis"ra"ion

450

A ! Sys"em 'rocess &anagemen"


)hen you 5ill "he process, or i" ends on i"s o,n "hen i"Bs re6erences in "he +proc 6ilesys"em ,ill be removed2
I cd * I ls .ld *pr$c*'405648 dr8:r8:r8: 1 roo" sys"em

0 Dec 03 1320D +proc+DE04>EG

I ps .e5 : #rep .i sleep roo" DE04>EG 221E01E 0 13202232 p"s+1 0200 sleep 10000 I 8ill .9 '405648 I ps .e5 : #rep .i sleep U1V ] @illed sleep 10000 = I ls .ld *pr$c*'405648 ls2 0>4383E1 The 6ile +proc+DE04>EG does no" e:is"7 I

A ! %asic Sys"em Adminis"ra"ion

451

A ! Sys"em 'rocess &anagemen"


The Sys"em $esource Con"roller, S$C, is a 6acili"y in A ! ,hich con"rols "he s"ar"ing, running, and s"opping o6 cri"ical sys"em programs+daemons2
I lssrc .a Subsys"em Group 'D S"a"us pla"6ormNagen" E4GD>>> ac"ive cimsys 22131>0 ac"ive snmpd "cpip 3E0D11E ac"ive syslogd ras 21>2G20 ac"ive por"map por"map >44E>> ac"ive sendmail mail 140DE3> ac"ive ine"d "cpip 33E2E>2 ac"ive hos"mibd "cpip 2031D>2 ac"ive snmpmibd "cpip 2G1G1GG ac"ive ai:mibd "cpip 2D42>10 ac"ive nimesis nim 1G3410> ac"ive biod n6s 3>0ED1> ac"ive R7

A ! %asic Sys"em Adminis"ra"ion

452

A ! Sys"em 'rocess &anagemen"


S$C provides an easy and s"ruc"ured ,ay "o s"op a group o6 processes, subsys"ems2
I lssrc s inetd Subsys"em Group ine"d "cpip

'D 33E2E>2

S"a"us ac"ive 8 0200 +usr+sbin+ine"d

I ps .e5 : #rep .i inetd roo" 33E2E>2 E>432EE 0 Dec 01

I st$psrc .s inetd 041380EE The +usr+sbin+ine"d Subsys"em ,as reMues"ed "o s"op7 I ps .e5 : #rep .i inetd I lssrc .s inetd Subsys"em Group ine"d "cpip I

'D S"a"us inopera"ive

A ! %asic Sys"em Adminis"ra"ion

453

A ! Sys"em 'rocess &anagemen"


S$C provides an easy and s"ruc"ured ,ay "o s"ar" a group o6 processes, subsys"ems2
I ps .e5 : #rep .i inetd I lssrc .s inetd Subsys"em Group ine"d "cpip

'D S"a"us inopera"ive

I startsrc .s inetd 04138041 The ine"d Subsys"em has been s"ar"ed7 Subsys"em ' D is 222G3G>7 I ps .e5 : #rep .i inetd roo" 222G3G> E>432EE 4 0020G23D 8 0200 +usr+sbin+ine"d roo" D0DG01> >1>0E40 2 0020G2E0 p"s+0 0200 grep 8i ine"d I lssrc .s inetd Subsys"em Group ine"d "cpip I 'D 222G3G> S"a"us ac"ive

A ! %asic Sys"em Adminis"ra"ion

454

A ! Sys"em 'rocess &anagemen"


Sys"em $esources can also be organiFed in"o groups2

I lssrc .# n5s Subsys"em Group 'D S"a"us biod n6s 3>0ED1> ac"ive n6sd n6s E1G01D> ac"ive rpc7moun"d n6s 40E>E>E ac"ive rpc7s"a"d n6s 42E304E ac"ive rpc7loc5d n6s 430G4GE ac"ive n6srgyd n6s inopera"ive gssd n6s inopera"ive

A ! %asic Sys"em Adminis"ra"ion

455

A ! Sys"em 'rocess &anagemen"


'rocesses managed by S$C can be s"opped as a group2
I st$psrc .# n5s 041380EE The biod Subsys"em ,as reMues"ed "o s"op7 041380EE The n6sd Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7moun"d Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7s"a"d Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7loc5d Subsys"em ,as reMues"ed "o s"op7 I lssrc .# n5s Subsys"em Group biod n6s n6sd n6s rpc7moun"d n6s n6srgyd n6s gssd n6s rpc7loc5d n6s rpc7s"a"d n6s I 'D S"a"us inopera"ive inopera"ive inopera"ive inopera"ive inopera"ive inopera"ive inopera"ive

A ! %asic Sys"em Adminis"ra"ion

456

A ! Sys"em 'rocess &anagemen"


Hou can also s"ar"up processes as a group2
I startsrc .# n5s 04138041 The biod Subsys"em has been s"ar"ed7 Subsys"em ' D is 40E>ED>7 04138041 The n6sd Subsys"em has been s"ar"ed7 Subsys"em ' D is 42E304G7 04138041 The rpc7moun"d Subsys"em has been s"ar"ed7 Subsys"em ' D is 430G4GG7 04138041 The n6srgyd Subsys"em has been s"ar"ed7 Subsys"em ' D is E1G01G27 04138041 The gssd Subsys"em has been s"ar"ed7 Subsys"em ' D is EE4>ED27 04138041 The rpc7loc5d Subsys"em has been s"ar"ed7 Subsys"em ' D is E1G01GE7 04138041 The rpc7s"a"d Subsys"em has been s"ar"ed7 Subsys"em ' D is 3>0ED1G7 I lssrc .# n5s Subsys"em Group 'D S"a"us biod n6s 40E>ED> ac"ive n6sd n6s 42E304G ac"ive rpc7moun"d n6s 430G4GG ac"ive rpc7loc5d n6s E1G01GE ac"ive rpc7s"a"d n6s 3>0ED1G ac"ive n6srgyd n6s inopera"ive gssd n6s inopera"ive I

A ! %asic Sys"em Adminis"ra"ion

45'

A ! Sys"em 'rocess &anagemen"


Hou can res"ar" an S$C managed process ,i"h "he re6resh comand2
I lssrc .s inetd Subsys"em Group ine"d "cpip

'D 222G3G>

S"a"us ac"ive

I re5resh .s inetd l04138014 The reMues" 6or subsys"em re6resh ,as comple"ed success6ully7 I

A ! %asic Sys"em Adminis"ra"ion

458

Devices

A ! %asic Sys"em Adminis"ra"ion

459

Devices
*very"hing in A !+;ni: is a 6ile, including devices7 *very device on "he sys"em is accessed via a special device 6ile7 The special device 6iles reside in "he +dev direc"ory, ,hich is under "he roo" 0 hdE par"i"ion+lv in "he roo"vg vg7 The special device 6iles in "he +dev direc"ory maybe "he access poin"s "o "hese devices 6or "he o+s commands, bu" "he ac"ual device a""ribu"es are 5ep" in "he sys"emBs (D& 0 (bCec" Da"a &anager7 The (D& is a special proprie"ary da"abase ,hich is main"ained by "he opera"ing sys"em7 "Bs uniMue "o A !7 Some people even compare i" "o "he $egis"ry on &icroso6" )indo,s opera"ing sys"ems 0 no" Mui"eP The (D& is s"ored in ",o places on "he sys"em, +e"c+obCrepos, and +usr+lib+obCrepos7
A ! %asic Sys"em Adminis"ra"ion 460

Devices
The (D& con"ains "he 6ollo,ing in6orma"ion2 17A Device a""ribu"es 27A L-& in6orma"ion 37A So6",are inven"ory in6orma"ion E7A S& T menu con6igura"ion

The (D& is very cri"ical "o "he overall opera"ion o6 "he sys"em7 6 "he (D& 6ails, or is removed 6rom "he sys"em, "ha" could render "he ,hole sys"em unusable, and i" could crash, and no" be able "o reboo"7

A ! %asic Sys"em Adminis"ra"ion

461

Devices
Ta5e a loo5 a" "he (D& 6iles7 These 6iles are called classes7 Tha"Bs abou" as 6ar as ,eBll be diving in"o "he (D& in "his class7
I ls *etc*$! rep$s AT&N'-C DA-ars 'dA" con6igNloc5 CDiagA"" DS&(p"ions 'dA"7vc cryp"oNmodule CDiagA""7vc DS&(p"ions7vc 'dA"!"d cryp"oNmodule7vc CDiagDev DS&enu 'dA"!"d7vc errno"i6y Con6igN$ules /$;% 'dCn his"ory CuA" /$;%NS$C 'dDv his"ory7vc CuA"7vc /$;s 'dDv7vc inven"ory CuDa"a /$;sNsrc 'd'a"hA" inven"ory7vc CuDa"a7vc &enuGoal 'd'a"hA"7vc lpp R I ls *usr*li!*$! rep$s 7sna7anyne"7soc5sna76ailNins"all ! <';T7vc CC cryp"oNmodule CC7vc cryp"oNmodule7vc DS&(p"ions 6i: DS&(p"ions7vc 6i:7vc DS&enu 6i:Nloc5 /(<T his"ory /(<T7vc his"ory7vc GA inven"ory R

A ! %asic Sys"em Adminis"ra"ion

462

Devices
As ,eBve men"ioned prior *very"hing in ;ni: is a 6ile7 Special ;ni: 6ilenames 6or common devices are as 6ollo,s2 *de(*5dG 8 /or dis5e""e drive devices7 *de(*cdG 8 /or CD8$(&+D-D drive devices7 *de(*hdis8G 8 /or hard dis5 devices 0 including SA< dis5 L;<S7 *de(*entG 0 /or physical e"herne" < C adap"er7 &ac address seen 6rom here7 *de(*enG 8 /or logical e"herne" < C in"er6ace 0 ? ' ge"s con6igured on "hisA7 *de(*5csG 8 /or /ibre channel device+.%A in"er6ace7 ))< is seen 6rom here7 *de(*5scsiG 8 /or e"herne" 6ibre channel device+.%A adap"er7 SA< s,i"ch lin5 s"a"us seen 6rom here7 *de(*c$ns$le 0 /or sys"em console7 *de(*pr$cG 8 /or C';, processor7 *de(*rmtG 8 /or "ape drive devices 0 including SA< "ape drives7 *de(*mem0 0 Sys"em real+good memory+$A&7

A ! %asic Sys"em Adminis"ra"ion

463

Devices
I ls .ld *de( dr,:r,:r8: 4 roo" sys"em E01> Dec 01 00200 +dev

I ls *de( 7S$C8uni: hd11admin mem p"ypD rhd3 sysdump6ile ""ypb 'LNroo"vg hd2 null p"ypG rhdE sysdumpnull ""ypc S$C hd3 nuls p"yp1 rhd4 ""y ""ypd NNvg10 hdE nvram p"ypa rhd> ""yp0 ""ype audi" hd4 pmem p"ypb rhdG ""yp1 ""yp6 clone hd> p"c p"ypc rhd1var ""yp2 urandom console hdG p"s p"ypd rhdis50 ""yp3 vio0 echo hd1var p"yp0 p"ype roo"vg ""ypE vscsi0 error hdis50 p"yp1 p"yp6 sad ""yp4 v"y0 errorc"l iplNblv p"yp2 random s6,0 ""yp> :"i 6scsi0 ipldevice p"yp3 rhd1 slog ""ypD Fero 6scsi1 iscsi0 p"ypE rhd10op" sp: ""ypG hd1 5mem p"yp4 rhd11admin sysdump ""yp1 hd10op" log p"yp> rhd2 sysdumpc"l ""ypa

A ! %asic Sys"em Adminis"ra"ion

464

Devices
*very device has a maCor and minor number7 n"ernally ,ha" "hey do is "he maCor number re6ers "o "he device driver, and "he minor number re6ers "o "he speci6ic ins"ance o6 "he device7 All devices ,i"h "he same maCor numbers ,ill re6er "o "he same device driver7 /or ins"ance all de6aul" sys"em logical volumes+hdBs ,ill have "he same maCor number7
I ls .l *de( "o"al E0 dr,:r,:888 2 roo" sys"em E01> <ov 30 23240 7S$C8uni: cr,8r,8888 1 roo" sys"em 10, 0 <ov 2E 22240 'LNroo"vg sr,:r,:r,: 1 roo" sys"em 0 <ov 30 10231 S$C cr,8888888 1 roo" sys"em 10, 0 <ov 30 10231 NNvg10 cr88r8888T 1 roo" sys"em G, 0 <ov 2E 222ED audi" cr,8r,8r,8 1 roo" sys"em 12, 0 <ov 2E 222ED clone cr,88,88,8 1 roo" sys"em E, 0 <ov 2E 222ED console cr,8r,8r,8 1 roo" sys"em 12, 24 <ov 2E 22241 echo cr,88,88,8 1 roo" sys"em >, 0 <ov 30 14200 error cr,8888888 1 roo" sys"em >, 1 <ov 2E 222ED errorc"l cr,8r,8r,8 1 roo" sys"em 1D, 0 <ov 2E 222ED 6scsi0 cr,8r,8r,8 1 roo" sys"em 1D, 1 <ov 2E 222ED 6scsi1 br,8r,8888 1 roo" sys"em 10, G <ov 2E 222E1 hd1 br,8r,8888 1 roo" sys"em 10, 1 <ov 2E 222E1 hd10op" br,8r,8888 1 roo" sys"em 10, 10 <ov 2E 222E1 hd11admin br,8r,8888 1 roo" sys"em 10, 4 <ov 2E 222E1 hd2 br,8r,8888 1 roo" sys"em 10, D <ov 2E 222E1 hd3 R

A ! %asic Sys"em Adminis"ra"ion

465

Devices
To lis" all hard dis5s on your sys"em, "his includes SA< dis5 L;<S, "ype in "he 6ollo,ing2
I lsde( .,c dis8 hdis50 Available -ir"ual SCS Dis5 Drive I

A ! %asic Sys"em Adminis"ra"ion

466

Devices
To lis" sys"em processors "ype in "he 6ollo,ing2
I lsde( .,c pr$cess$r proc0 Available 00800 'rocessor I

A ! %asic Sys"em Adminis"ra"ion

46'

Devices
To lis" all e"herne" in"er6aces on your sys"em2
I lsde( .,c i5 en0 Available S"andard *"herne" <e",or5 n"er6ace en1 De6ined S"andard *"herne" <e",or5 n"er6ace e"0 De6ined *** G0273 *"herne" <e",or5 n"er6ace e"1 De6ined *** G0273 *"herne" <e",or5 n"er6ace lo0 Available Loopbac5 <e",or5 n"er6ace I

A ! %asic Sys"em Adminis"ra"ion

468

Devices
To lis" all physical devices on your sys"em2
I lsde( .,c adapter en"0 Available Logical .os" *"herne" 'or" ?lp8heaA en"1 Available -ir"ual +( *"herne" Adap"er ?l8lanA 6cs0 Available C48T1 -ir"ual /ibre Channel Clien" Adap"er 6cs1 Available C>8T1 -ir"ual /ibre Channel Clien" Adap"er lhea0 Available Logical .os" *"herne" Adap"er ?l8heaA vsa0 Available L'A$ -ir"ual Serial Adap"er vscsi0 Available -ir"ual SCS Clien" Adap"er I

A ! %asic Sys"em Adminis"ra"ion

469

Devices
To lis" "he memory+$A& ins"alled on your sys"em2
I lsde( .,c mem$rH L2cache0 Available L2 Cache mem0 Available &emory I

A ! %asic Sys"em Adminis"ra"ion

4'0

Devices
To lis" a""ribu"es o6 a device "ype in "he lsa""r 0*l dev, command7
I lsde( .,c dis8 hdis50 Available -ir"ual SCS Dis5 Drive hdis51 Available -ir"ual SCS Dis5 Drive hdis52 Available -ir"ual SCS Dis5 Drive I lsattr .6l hdis80 'C& 'C&+6riend+vscsi 'a"h Con"rol &odule /alse algori"hm 6ailNover Algori"hm True hchec5Ncmd "es"Nuni"Nrdy .eal"h Chec5 Command True hchec5Nin"erval 0 .eal"h Chec5 n"erval True hchec5Nmode nonac"ive .eal"h Chec5 &ode True ma:N"rans6er 0:E0000 &a:imum T$A<S/*$ SiFe True pvid 00c11G601>G2>EE00000000000000000 'hysical volume iden"i6ier /alse MueueNdep"h 3 `ueue D*'T. True reserveNpolicy noNreserve $eserve 'olicy True I

A "rue ne:" "o "he device a""ribu"e indica"es "ha" "his a""ribu"e can be changed ,i"h "he chdev 0a a""rQvalue 0l device command7 A 6alse ne:" "o "he device a""ribu"e indica"es "ha" "his a""ribu"e canno" be changed7
A ! %asic Sys"em Adminis"ra"ion 4'1

Devices
To lis" "he a""ribu"es o6 your sys"em processor+C';2
I lsattr .6l pr$c0 6reMuency 3000000000 'rocessor Speed /alse sm"Nenabled "rue 'rocessor S&T enabled /alse sm"N"hreads E 'rocessor S&T "hreads /alse s"a"e enable 'rocessor s"a"e /alse "ype 'o,er'CN'()*$D 'rocessor "ype /alse I

A ! %asic Sys"em Adminis"ra"ion

4'2

Devices
To lis" a""ribu"es o6 your e"herne" in"er6aces2
I lsde( .,c i5 en0 Available S"andard *"herne" <e",or5 n"er6ace en1 De6ined S"andard *"herne" <e",or5 n"er6ace e"0 De6ined *** G0273 *"herne" <e",or5 n"er6ace e"1 De6ined *** G0273 *"herne" <e",or5 n"er6ace lo0 Available Loopbac5 <e",or5 n"er6ace I lsa""r 8*l en0 aliasE 'vE Alias including Subne" &as5 True alias> 'v> Alias including 're6i: Leng"h True arp on Address $esolu"ion 'ro"ocol ?A$'A True au"hori"y Au"horiFed ;sers True broadcas" %roadcas" Address True m"u 1400 &a:imum ' 'ac5e" SiFe 6or This Device True ne"addr 11271>G72E07123 n"erne" Address True ne"addr> 'v> n"erne" Address True ne"mas5 2447244724470 Subne" &as5 True pre6i:len 're6i: Leng"h 6or 'v> n"erne" Address True remm"u 4D> &a:imum ' 'ac5e" SiFe 6or $*&(T* <e",or5s True r6c1323 *nable+Disable TC' $/C 1323 )indo, Scaling True securi"y none Securi"y Level True s"a"e up Curren" n"er6ace S"a"us True "cpNmssd6l" Se" TC' &a:imum Segmen" SiFe True "cpNnodelay *nable+Disable TC'N<(D*LAH (p"ion True "cpNrecvspace Se" Soc5e" %u66er Space 6or $eceiving True "cpNsendspace Se" Soc5e" %u66er Space 6or Sending True I

A ! %asic Sys"em Adminis"ra"ion

4'3

Devices
To lis" a""ribu"es o6 your e"herne" adap"ers2
I lsattr .6l ent0 al"Naddr 0:000000000000 Al"erna"e *"herne" address True 6lo,Nc"rl no $eMues" Transmi" and $eceive /lo, Con"rol True CumboN6rames no $eMues" Transmi" and $eceive #umbo /rames True largeNreceive yes *nable receive TC' segmen" aggrega"ion True largeNsend yes *nable hard,are Transmi" TC' segmen"a"ion True mediaNspeed Au"oN<ego"ia"ion $eMues"ed media speed True mul"icore yes *nable &ul"i8Core Scaling True r:Nc5sum yes *nable hard,are $eceive chec5sum True r:Nc5sumNerrd yes Discard $! pac5e"s ,i"h chec5sum errors True r:Nclsc 1G *nable $eceive in"errup" coalescing True r:NclscNusec 14 $eceive in"errup" coalescing ,indo, True r:Ncoalesce 1> $eceive pac5e" coalescing True r:NM1Nnum G112 <umber o6 $eceive Mueue 1 )`*s True r:NM2Nnum E01> <umber o6 $eceive Mueue 2 )`*s True r:NM3Nnum 20EG <umber o6 $eceive Mueue 3 )`*s True ":Nc5sum yes *nable hard,are Transmi" chec5sum True ":Nisb yes ;se Transmi" n"er6ace Speci6ic %u66ers True ":NMNnum 412 <umber o6 Transmi" )`*s True ":NMueNsF G112 So6",are "ransmi" Mueue siFe True useNal"Naddr no *nable al"erna"e *"herne" address True I A ! %asic Sys"em Adminis"ra"ion 4'4

Devices
To lis" a""ribu"es o6 your 6ibre channel adap"er+.%A2
I lsattr .6l 5cs0 in"rNpriori"y 3 n"errup" priori"y /alse lgN"ermNdma 0:G00000 Long "erm D&A True ma:N:6erNsiFe 0:100000 &a:imum Trans6er SiFe True numNcmdNelems 200 &a:imum <umber o6 C(&&A<D *lemen"s True s,N6cNclass 2 /C Class 6or /abric True I

A ! %asic Sys"em Adminis"ra"ion

4'5

Devices
To lis" a""ribu"es o6 your 6ibre channel in"er6ace2
I lsattr .6l 5scsi0 a""ach none .o, "his adap"er is C(<<*CT*D /alse dyn"r5 yes Dynamic Trac5ing o6 /C Devices True 6cNerrNrecov 6as"N6ail /C /abric *ven" *rror $*C(-*$H 'olicy True scsiNid Adap"er SCS D /alse s,N6cNclass 3 /C Class 6or /abric True I

A ! %asic Sys"em Adminis"ra"ion

4'6

Devices
To lis" "he a""ribu"es o6 your memory2
I lsattr .6l mem0 en"NmemNcap +( memory en"i"lemen" in @by"es /alse goodsiFe 102E Amoun" o6 usable physical memory in &by"es /alse memNe:pN6ac"or &emory e:pansion 6ac"or /alse siFe 102E To"al amoun" o6 physical memory in &by"es /alse varNmemN,eigh" -ariable memory capaci"y ,eigh" /alse I

A ! %asic Sys"em Adminis"ra"ion

4''

Devices
To lis" a speci6ic device a""ribu"e2
I lsattr .6l hdis80 .a A,> 'C& 'C&+6riend+vscsi 'a"h Con"rol &odule /alse I I lsattr .6l ent0 .a mediaLspeed mediaNspeed Au"oN<ego"ia"ion $eMues"ed media speed True I

A ! %asic Sys"em Adminis"ra"ion

4'8

Devices
To display "he legal, possible values 6or an a""ribu"e "ype in "he 6ollo,ing2
I lsattr .Rl ent0 .a mediaLspeed 10N/ullNDuple: 100N/ullNDuple: 1000N/ullNDuple: 10000N/ullNDuple: Au"oN<ego"ia"ion

A ! %asic Sys"em Adminis"ra"ion

4'9

Devices
To display "he 6ac"ory de6aul" se""ing o6 a device a""ribu"e2

I lsattr .1l ent0 .a mediaLspeed mediaNspeed Au"oN<ego"ia"ion $eMues"ed media speed True I

A ! %asic Sys"em Adminis"ra"ion

480

Devices
The value o6 /alse ne:" "o a device a""ribu"e indica"es "ha" "his device a""ribu"e is no" modi6iable2

I chde( .l hdis80 .a A,>?5riend &e"hod error ?+e"c+me"hods+chgdis5A2 041E801G The values speci6ied 6or "he 6ollo,ing a""ribu"es are no" valid2 'C& 'a"h Con"rol &odule I

A ! %asic Sys"em Adminis"ra"ion

481

Devices
The value o6 True ne:" "o a device a""ribu"e indica"es "ha" "his device a""ribu"e is modi6iable2
I chde( .l ent0 .a mediaLspeed?1000L;ullL1uple) &e"hod error ?+usr+lib+me"hods+chgen"A2 041E80>2 Canno" per6orm "he reMues"ed 6unc"ion because "he speci6ied device is busy7 I

)e have come across ano"her issue above7 )e can modi6y "his value, bu" no" ,hen "he device is in use7 To correc" "his use "he op"ion 0'7 )ha" is op"ion does is upda"e "he (D& da"abase+regis"ry, bu" no" "he running device driver7 " upda"es "he (D&, so "he ne:" "ime you reboo" "he sys"em, ,hich ,ill be ,hen "he "his device, hdis50, is no" in use again because "he opera"ing sys"em ,ill be do,n7

A ! %asic Sys"em Adminis"ra"ion

482

Devices
I lsattr .6l ent0 .a mediaLspeed mediaNspeed Au"oN<ego"ia"ion $eMues"ed media speed True I chde( .l ent0 .a mediaLspeed?1000L;ullL1uple) .A en"0 changed I lsattr .6l ent0 .a mediaLspeed mediaNspeed 1000N/ullNDuple: $eMues"ed media speed True I entstat .dt ent0 : #rep .i speed &edia Speed Selec"ed2 Au"onego"ia"e &edia Speed $unning2 1000 &bps + 1 Gbps, /ull Duple: *:"ernal8<e",or58S,i"ch ?*<SA 'or" Speed2 1000 &bps + 1 Gbps, /ull Duple: I

$eboo" "he sys"em 6or "he change "a5e a66ec"s2


I shutd$/n .;r S.;TD()< '$(G$A& )ed Dec 1 0123224G CST 2010 )ai" 6or T$eboo"ing777T be6ore s"opping7 *rror repor"ing has s"opped7 Advanced Accoun"ing has s"opped777 'rocess accoun"ing has s"opped7 n6sNclean2 S"opping </S+< S Daemons 0413800E The Subsys"em or Group, n6sd, is curren"ly inopera"ive7

A ! %asic Sys"em Adminis"ra"ion

483

Devices
A6"er "he sys"em comes bac5 up 6rom i"s reboo" you ,ill no"ice "ha" "his < C is no, running a" a 1000 6ull duple:, as oppose "o i"Bs de6aul" 0 au"onegocia"e2
I entstat .dt ent0 : #rep .i speed &edia Speed Selec"ed2 1000 &bps + 1 Gbps, /ull Duple: &edia Speed $unning2 1000 &bps + 1 Gbps, /ull Duple: *:"ernal8<e",or58S,i"ch ?*<SA 'or" Speed2 1000 &bps + 1 Gbps, /ull Duple: I I lsattr .6l ent0 .a mediaLspeed mediaNspeed 1000N/ullNDuple: $eMues"ed media speed True I

A ! %asic Sys"em Adminis"ra"ion

484

Devices
The lsc6g command displays ,ha" is 5no,n as vi"al produc" da"a7 n6orma"ion such as "he )orld )ide <ame o6 an .%A por" ,ill be here2
I lsc5# .(l 5cs0 6cs0 ;GE0>7D0H70>%141A8-18C48T1 -ir"ual /ibre Channel Clien" Adap"er <e",or5 Address7777777777777C040D>030AEA001C $(S Level and D777777777777 Device Speci6ic7?c0A77777777 Device Speci6ic7?c1A77777777 Device Speci6ic7?c2A77777777 Device Speci6ic7?c3A77777777 Device Speci6ic7?cEA77777777 Device Speci6ic7?c4A77777777 Device Speci6ic7?c>A77777777 Device Speci6ic7?cDA77777777 Device Speci6ic7?cGA77777777C040D>030AEA001C Device Speci6ic7?c1A77777777 .ard,are Loca"ion Code777777;GE0>7D0H70>%141A8-18C48T1 I

A ! %asic Sys"em Adminis"ra"ion

485

Devices
(r in6orma"ion such as "he &AC address o6 a < Cb
I lsc5# .(l ent0 en"0 ;DGA470017) .1DAC8'18T4 Logical .os" *"herne" 'or" ?lp8heaA %& .os" *"herne" Adap"er2 <e",or5 Address7777777777777*E1/1320G21D I

A ! %asic Sys"em Adminis"ra"ion

486

Devices
The en"s"a" command is an e"herne" < C speci6ic command7 " can "ell you in6orma"ion such as i6 "here is physical lin5 "o "his < C 6rom an e"herne" s,i"ch2
I entstat .dt ent0 : #rep .i lin8 Logical 'or" Lin5 S"a"e2 ;p 'hysical 'or" Lin5 S"a"e2 ;p I

" can also "ell you ,ha" speed your < C is se" a", and ho, 6as" i" is curren"ly running2
I entstat .dt ent0 : #rep .i speed &edia Speed Selec"ed2 Au"onego"ia"e &edia Speed $unning2 1000 &bps + 1 Gbps, /ull Duple: *:"ernal8<e",or58S,i"ch ?*<SA 'or" Speed2 1000 &bps + 1 Gbps, /ull Duple: I

A ! %asic Sys"em Adminis"ra"ion

48'

Devices
Ge""ing bac5 "o "he 6ibre channel+.%A device a""ribu"es2
I lsattr .6l 5scsi0 attach n$ne N$/ this adapter is ,K<<6,-61 ;alse dyn"r5 yes Dynamic Trac5ing o6 /C Devices True 6cNerrNrecov 6as"N6ail /C /abric *ven" *rror $*C(-*$H 'olicy True scsiNid Adap"er SCS D /alse s,N6cNclass 3 /C Class 6or /abric True I

The a""ach a""ribu"e displays "he s"a"us o6 "he .%A connec"ion "o your SA<2 n$ne ? S"a"us i6 "he adap"er is no" connec"ed "o a SA< s,i"ch ?cable is presen", bu" s,i"ch por" is no" con6igured7 s/itch ? S"a"us i6 "he adap"er is connec"ed "o a SA< s,i"ch7 al Q S"a"us i6 "he adap"er has no cable "o a s,i"ch or you are direc"ly a""ached "o a s"orage subsys"em, JalK means Arbi"rary Loop7 n "he la""er case "his S"a"us is accep"able 6or direc" a""achmen" ,hen bypassing a SA< s,i"ch7
A ! %asic Sys"em Adminis"ra"ion 488

Devices
To remove a device 6rom "he sys"em, "ype in rmdev 0dl dev7
I lsde( .,c dis8 hdis50 Available -ir"ual SCS Dis5 Drive hdis51 Available -ir"ual SCS Dis5 Drive hdis52 Available -ir"ual SCS Dis5 Drive I rmde( .dl hdis81 hdis51 dele"ed I lsde( .,c dis8 hdis50 Available -ir"ual SCS Dis5 Drive hdis52 Available -ir"ual SCS Dis5 Drive I

A ! %asic Sys"em Adminis"ra"ion

489

Devices
To add a ne, device ,hich you Cus" connec"ed "o "he sys"em, ,i"hou" reboo"ing, or "o bring a device bac5 you Cus" dele"ed, run "he c6gmgr command, ,hich s"ands 6or Con/iGura"ion &anaGe$7
I lsde( .,c dis8 hdis50 Available -ir"ual SCS Dis5 Drive hdis52 Available -ir"ual SCS Dis5 Drive I c5#m#r I lsde( .,c dis8 hdis50 Available -ir"ual SCS Dis5 Drive hdis51 Available -ir"ual SCS Dis5 Drive hdis52 Available -ir"ual SCS Dis5 Drive I

A ! %asic Sys"em Adminis"ra"ion

490

Devices
There are smi" menus 6or managing devices, and "here is a smi" 6as" pa"h "o ge" "o "he relevan" menus2
I smittH de(ices

A ! %asic Sys"em Adminis"ra"ion

491

Devices
There is also smi" menus "o change "he a""ribu"es o6 a device7 /or a dis5 6or ins"ance2
I smittH ch#ds8

A ! %asic Sys"em Adminis"ra"ion

492

Devices

A ! %asic Sys"em Adminis"ra"ion

493

Devices
/irm,are+/lash+&icrocode Q &icrocode is programming+code "ha" is inser"ed in"o programmable read8only memory, "hus becoming a permanen" par" o6 a compu"ing device7 '()*$4 0 ?There is only one 6irm,are+microcode s"reamA2 S/ means JSMuadrons /irm,areK7 '()*$> 0 ?There are di66eren" 6irm,are+microcode s"reams per di66eren" classi6ica"ions o6 sys"emsA *. is *n"erprise .igh8*nd *& is *n"erprise &id8$ange ?6ormerly n"ermedia"e8.ighA *L is *n"erprise Lo,8*nd

A ! %asic Sys"em Adminis"ra"ion

494

Devices
(n '()*$D servers "here are di66eren" 6irm,are+microcode s"reams 6or "he di66eren" classi6ica"ions o6 sys"ems, Cus" li5e in p>, ,i"h "he *R naming conven"ions7 n '()*$D "he naming conven"ion is A: The %& sys"em "ype, and model o6 each curren" pD sys"em are as 6ollo,s2 G2318*2%I 8 pD10 0 AL 6irm,are ?Lo, endA7 G2028*E%I 8 pD20 0 AL 6irm,are ?Lo, endA7 G2318*2%I 8 pD30 0 AL 6irm,are ?Lo, endA7 G2048*>%I 8 pDE0 0 AL 6irm,are ?Lo, endA7 G2338*G%I 8 pD40 0 AL 6irm,are ?Lo, endA7 111D8&&%I 8 pDD0 0 A& 6irm,are ?&idrangeA7 11D18&.%I 8 pDG0 0 A& 6irm,are ?&idrangeA7 11118/.%I 8 pD14 0 A. 6irm,are ?.igh endA7
A ! %asic Sys"em Adminis"ra"ion 495

Devices
To de"ermine "he microcode+6irm,are o6 "he sys"em "ype in "he 6ollo,ing2
I lsmc$de .c The curren" permanen" sys"em 6irm,are image is AAD10N0GG The curren" "emporary sys"em 6irm,are image is AAD10N0GG The sys"em is curren"ly boo"ed 6rom "he "emporary 6irm,are image7 I

)hen you upgrade "he microcode+6irm,are o6 a sys"em, you are upgrading "he 6le:ible service processor+/S'Bs code7 There are ",o sides "o "he service processor, "he A 0 'ermanen" side, and "he % 0 Temporary side7 )hen you apply microcode+6irm,are "o "he sys"em i" ge"s applied ini"ially "o "he Temporary side, ,hile "he curren"+old microcode+6irm,are remains on "he 'ermanen" side7 A6"er you allo, "he sys"em "o run 6or, le"Bs say a 6e, ,ee5s, ,i"h "he ne, microcode+6irm,are "hen you commi" i" by copying "he Temporary side+ne, level i" "o "he permanen" side+old level7 Hou can also reCec" "he ne,ly upgrade microcode+6irm,are i6 i" causes issues ,i"h "he sys"em, and "ha" is copying "he 'ermanen" side+old level over "he Temporary side+ne, level7
A ! %asic Sys"em Adminis"ra"ion 496

Devices
*very %& server has a 6our digi" machine "ype such as GE0>, and a model id such as D0H7 To de"ermine "his 6or your sys"em "ype in "he 6ollo,ing2
I uname .> %&,GE0>8D0H I

*very %& server has a uniMue serial number7 To de"ermine "his 6or your sys"em "ype in "he 6ollo,ing2
I prtc$n5 : #rep B7erial <um!erB &achine Serial <umber2 0>%141A I

The 6orma" o6 "he sys"em serial number is2 /ACT($HNC(D*?0>A / -*ND G TNS*$ ALN<;&%*$?%141AA

A ! %asic Sys"em Adminis"ra"ion

49'

Devices
To de"ermine ho, much memory+$A& you have ins"alled on your sys"em2
I prtc$n5 .m &emory SiFe2 102E &% I !$$tin5$ .r 10EG4D> I lsattr .6l mem0 en"NmemNcap +( memory en"i"lemen" in @by"es /alse #$$dsi\e 1024 =m$unt $5 usa!le phHsical mem$rH in >!Htes ;alse memNe:pN6ac"or &emory e:pansion 6ac"or /alse siFe 102E To"al amoun" o6 physical memory in &by"es /alse varNmemN,eigh" -ariable memory capaci"y ,eigh" /alse I

A ! %asic Sys"em Adminis"ra"ion

498

Devices
.o, "o display your processor+C';Bs cloc5 speed2
I lsattr .6l pr$c0 6reMuency 3000000000 'rocessor Speed /alse sm"Nenabled "rue 'rocessor S&T enabled /alse sm"N"hreads E 'rocessor S&T "hreads /alse s"a"e enable 'rocessor s"a"e /alse "ype 'o,er'CN'()*$D 'rocessor "ype /alse I prtc$n5 .s 'rocessor Cloc5 Speed2 3000 &.F I

A ! %asic Sys"em Adminis"ra"ion

499

Devices
The diagnos"ics program is mainly used by %& hard,are C*s7 " used "o run hard,are chec5s on "he devices on "he sys"em, upgrade microcode+6irm,are on adap"ers, e"c7
I dia#

X6 <-6RC

A ! %asic Sys"em Adminis"ra"ion

500

Devices

X6<-6RC

A ! %asic Sys"em Adminis"ra"ion

501

Devices

X;10C

A ! %asic Sys"em Adminis"ra"ion

502

Devices
There is a daemon ,hich runs on all A ! sys"ems 5no,n as "he error daemon7 " is responsible 6or logging cer"ain so6",are, and hard,are errors ,hich occur on "he sys"em7 <o"e, no" all errors are logged via "his 6acili"y7
I ps .e5 : #rep .i err roo" >44430 1 0 012E321G I 8 0200 +usr+lib+errdemon

To display "he error repor" "ype in "he 6ollo,ing command2


I errpt D*<T / *$ T &*STA&' T C $*S(;$C*N<A&* D*SC$ 'T (< A>D/E4AA 120101E310 ( $&Cdaemon The daemon is s"ar"ed7 2%/AD>/> 120101E110 T S SHS'$(C SHST*& S.;TD()< %H ;S*$ 1D%C/D** 120101E310 T ( errdemon *$$($ L(GG <G T;$<*D (< 112AC0D1 1201013110 T ( errdemon *$$($ L(GG <G T;$<*D (// A>D/E4AA 1201013>10 ( $&Cdaemon The daemon is s"ar"ed7 2%/AD>/> 1201013E10 T S SHS'$(C SHST*& S.;TD()< %H ;S*$ 1D%C/D** 1201013>10 T ( errdemon *$$($ L(GG <G T;$<*D (< 112AC0D1 1201013310 T ( errdemon *$$($ L(GG <G T;$<*D (// R

A ! %asic Sys"em Adminis"ra"ion

503

Devices
To display a more de"ailed error repor" o6 "he errors "ype in "he 6ollo,ing2
I errpt .a : m$re 888888888888888888888888888888888888888888888888888888888888888888888888888 LA%*L2 $&CDN </(N0NST D*<T / *$2 A>D/E4AA Da"e+Time2 )ed Dec 1 012E323G CST 2010 SeMuence <umber2 G4 &achine d2 000%141ADE00 <ode d2 gvicai:01 Class2 ( Type2 </( )'A$2 Global $esource <ame2 $&Cdaemon Descrip"ion The daemon is s"ar"ed7 'robable Causes The $esource &oni"oring and Con"rol daemon has been s"ar"ed7 ;ser Causes The s"ar"src 8s c"rmc command has been e:ecu"ed or "he rmcc"rl 8s command has been e:ecu"ed7 $ecommended Ac"ions Con6irm "ha" "he daemon should be s"ar"ed7

A ! %asic Sys"em Adminis"ra"ion

504

Devices
To clear "he en"ire error repor" "ype in "he 6ollo,ing2
I errclear 0 I errpt I

A ! %asic Sys"em Adminis"ra"ion

505

%& .ard,are n6orma"ion Cen"er


http://publib.boulder.ibm.com/infocenter/powers s/!"r1m#/inde$.%sp

A ! %asic Sys"em Adminis"ra"ion

506

%& .ard,are n6orma"ion Cen"er

A ! %asic Sys"em Adminis"ra"ion

50'

%& A ! n6orma"ion Cen"er


http:**pu!li!%!$ulder%i!m%c$m*in5$center*ai)*(6r1

A ! %asic Sys"em Adminis"ra"ion

508

%& A ! n6orma"ion Cen"er

A ! %asic Sys"em Adminis"ra"ion

509

A ! <e",or5ing 0 TC'+ '

A ! %asic Sys"em Adminis"ra"ion

510

A ! <e",or5ing 0 TC'+ '


TC'+ ' Q Transmission Con"rol 'ro"ocol+ n"erne" 'ro"ocol7 A ,ay "o "ranspor" da"a 6rom one sys"em "o ano"her7 Da"a is "rans6erred over "he ne",or5 in a "ranspor" mechanism 5no,n as pac5e"s7 There are version E ip addresses, and version > ip address7 -ersion 4 is more ,idely used7 .ubs are used "o brea5 up ,ha"Bs called collision domains7 $ou"ers are used "o brea5 up ,ha"Bs called broadcas" domains7 A rou"e ,ill in6orm a pac5e" ,hich < C "o use and ,hich rou"er "o go "o "o ge" "o ,here "hey have "o ge"7
A ! %asic Sys"em Adminis"ra"ion 511

A ! <e",or5ing 0 TC'+ '


*ach compu"er on a ne",or5, has a uniMue ' address ,i"h "he 6orma" III7III7III7III, 6or ' version E, ,hich is "he mos" commonly used7 This ' address can, and is o6"en aliased by a symbolic name7 So, a sys"em ,hich is re6erred "o as ai:db1, ac"ually ,ill "ransla"e "o some III7III7III7III ' address7 To display "he hos"name o6 your sys"em use ei"her "he hos"name, or uname 0n command
I h$stname gvicai:14 I I uname .n gvicai:14 I

A ! %asic Sys"em Adminis"ra"ion

512

A ! <e",or5ing 0 TC'+ '


< CS, <e",or5 n"er6ace Card, are physically ins"alled on "he sys"em, ei"her on8board, or in 'C slo"s7 They are "he physical adap"ers ,hich provide connec"ion "o a ne",or57 These are "he adap"ers "ha" "he ip address o6 "he sys"em are con6igured on7 To display "he ip addresses o6 "he < Cs con6igured your sys"em "ype in "he i6con6ig command7
I i5c$n5i# .a en02 6lagsQ1e0G0G>3,EG0W;',%$(ADCAST,<(T$A L*$S,$;<< <G,S &'L*!,&;LT CAST,G$(;'$ T,>E% T,C.*C@S;&N(//L(AD?ACT -*A,C.A <X ine" 11271>G72E0713G ne"mas5 0:66666600 broadcas" 11271>G72E07244 "cpNsendspace 2>21EE "cpNrecvspace 2>21EE r6c1323 1 lo02 6lagsQe0G0GEbW;',%$(ADCAST,L(('%AC@,$;<< <G,S &'L*!,&;LT CAST,G$(;'$T,>E% T X ine" 12D707071 ne"mas5 0:66000000 broadcas" 12D724472447244 ine"> 221+0 "cpNsendspace 1310D2 "cpNrecvspace 1310D2 r6c1323 1 I

A ! %asic Sys"em Adminis"ra"ion

513

A ! <e",or5ing 0 TC'+ '


<o"ice "here are ",o in"er6aces con6igured 6or A ! curren"ly7 *n0, ,hich has our labBs 11271>G72E07! ip address con6igured on i", and Lo0 ,hich has "he s"andard ip o6 12D707071 con6igured on i"7 Lo0 is shor" 6or loopbac57 This is no" a real < C in"er6ace adap"er7 This is an in"ernal 5ernel vir"ual < C device7 All i" does is provide a ,ay "o "roubleshoo" "he curren" sys"emBs TC'+ ' s"ac57 "Bs ip ,ill al,ays be 12D70707177 This is no" Cus" on ;ni: sys"ems7

A ! %asic Sys"em Adminis"ra"ion

514

A ! <e",or5ing 0 TC'+ '


To "es" i6 you can communica"e ,i"h ano"her sys"em on a ne",or5 use "he ping command7 A non8response could indica"e "ha" "he sys"em is do,n7 <o"e, you can also ping hos"names, i6 se"up7
I pin# 192%168%240%138 ' <G 11271>G72E0713G ?11271>G72E0713GA2 4> da"a by"es >E by"es 6rom 11271>G72E0713G2 icmpNseMQ0 ""lQ244 "imeQ0 ms >E by"es 6rom 11271>G72E0713G2 icmpNseMQ1 ""lQ244 "imeQ0 ms >E by"es 6rom 11271>G72E0713G2 icmpNseMQ2 ""lQ244 "imeQ0 ms >E by"es 6rom 11271>G72E0713G2 icmpNseMQ3 ""lQ244 "imeQ0 ms >E by"es 6rom 11271>G72E0713G2 icmpNseMQE ""lQ244 "imeQ0 ms ^, 888 11271>G72E0713G ping s"a"is"ics 888 4 pac5e"s "ransmi""ed, 4 pac5e"s received, 0^ pac5e" loss round8"rip min+avg+ma: Q 0+0+0 ms I

pressed con"rol e C, "o e:i" ou" o6 "he ping7


A ! %asic Sys"em Adminis"ra"ion 515

A ! <e",or5ing 0 TC'+ '


A""emp" "o ping some"hing ,hich doesnB" e:is" such as "he 6ollo,ing hos"name2
I pin# n$nLe)istin#Lh$stname ^, I

The above ping ou"pu" sho,s an a""emp" "o reach a hos"name ,hich is no" responding on "he ne",or57

A ! %asic Sys"em Adminis"ra"ion

516

A ! <e",or5ing 8 TC' '


<e",or5 name resolu"ion is "he process o6 "ransla"ing ip addresses in"o hos"names7 "Bs easier, and more e66icien" "o use symbolic names such as hos"names, ra"her "hen several ip addresses7 <ame resolu"ion is handled locally on "he A ! sys"em ,i"h a 6ile called +e"c+hos"s, ,hich handles local "ransla"ion, and "here is also a s"andard global "ransla"ion mechanism 5no,n as D<S 0 Domain <ame Sys"em7

A ! %asic Sys"em Adminis"ra"ion

51'

A ! <e",or5ing 0 TC'+ '


The +e"c+hos"s 6ile is "he local me"hod 6or ne",or5 name resolu"ion7
I ls .l *etc*h$sts 8r,8r,8r88 1 roo" I sys"em 1GD0 Sep 11 1122> +e"c+hos"s

I tail *etc*h$sts I indica"es "he beginning o6 a commen"b charac"ers up "o "he end o6 "he I line are no" in"erpre"ed by rou"ines ,hich search "his 6ile7 %lan5 I lines are allo,ed7 I n"erne" Address .os"name I Commen"s I 11271720071 ne"0sample I e"herne" name+address I 12G71007071 "o5en0sample I "o5en ring name+address I 10727072 :24sample I :724 name+address 12D707071 loopbac5 localhos" I loopbac5 ?lo0A name+address 11271>G72E07123 gvicai:01 I

A ! %asic Sys"em Adminis"ra"ion

518

A ! <e",or5ing 0 TC'+ '


(pen "he +e"c+hos"s 6ile ,i"h "he vi edi"or, and popula"e "his 6ile as 6ollo,s7 #us" donB" inser" an en"ry 6or your server 0 ?This e:ample is on Gvicai:01, so "ha" server is no" included in "he 6ile belo,A7 /orma" o6 +e"c+hos"s 6ile2 'NADD$*SS
I cat *etc*h$sts R 192%168%240%124 192%168%240%125 192%168%240%126 192%168%240%12' 192%168%240%135 192%168%240%136 #(icai)02 #(icai)03 #(icai)04 #(icai)05 #(icai)06 #(icai)0' sHstem2 sHstem3 sHstem4 sHstem5 sHstem6 sHstem'

.(ST<A&*

AL ASN2

A ! %asic Sys"em Adminis"ra"ion

519

A ! <e",or5ing 8 TC' '


Tes" "ha" local name resolu"ion is opera"ional7
I pin# #(icai)02 ' <G gvicai:02 ?11271>G72E07102A2 4> da"a by"es >E by"es 6rom 11271>G72E071022 icmpNseMQ0 ""lQ244 "imeQ0 ms >E by"es 6rom 11271>G72E071022 icmpNseMQ1 ""lQ244 "imeQ0 ms eC 888 gvicai:02 ping s"a"is"ics 888 2 pac5e"s "ransmi""ed, 2 pac5e"s received, 0^ pac5e" loss round8"rip min+avg+ma: Q 0+0+0 ms I pin# sHstem2 ' <G gvicai:02 ?11271>G72E07102A2 4> da"a by"es >E by"es 6rom 11271>G72E071022 icmpNseMQ0 ""lQ244 "imeQ0 ms >E by"es 6rom 11271>G72E071022 icmpNseMQ1 ""lQ244 "imeQ0 ms eC 888 gvicai:02 ping s"a"is"ics 888 2 pac5e"s "ransmi""ed, 2 pac5e"s received, 0^ pac5e" loss round8"rip min+avg+ma: Q 0+0+0 ms I

A ! %asic Sys"em Adminis"ra"ion

520

A ! <e",or5ing 8 TC' '


;se "he "elne" command "o log in"o ano"her sys"em7

S"uden" on sys"em Gvicai:01 "elne" "o Gvicai:02, and vice8versa7 S"uden" on sys"em Gvicai:03 "elne" "o Gvicai:0E, and vice8versa7 S"uden" on sys"em Gvicai:04 "elne" "o Gvicai:0>, and vice8versa7 S"uden" on sys"em Gvicai:0D "elne" "o Gvicai:0>7

A ! %asic Sys"em Adminis"ra"ion

521

A ! <e",or5ing 8 TC' '


To "elne" 6rom one sys"em "o ano"her, use "he "elne" command lis" as 6ollo,s7
I h$stname gvicai:1E I telnet #(icai)15 Trying777 Connec"ed "o gvicai:147 *scape charac"er is TeVT7 "elne" ?gvicai:14A A ! -ersion 4 Copyrigh" %& Corpora"ion, 11G2, 200D7 login2 r$$t R7 Las" login2 /ri Sep 11 1122D20D 2001 on +dev+p"s+0 6rom 11271>G72E0713D I h$stname gvicai:14 I /h$ roo" p"s+0 Sep 11 1122D I e)it Connec"ion closed7 I h$stname gvicai:1E

?gvicai:1EA

A ! %asic Sys"em Adminis"ra"ion

522

A ! <e",or5ing 0 TC'+ '


;sing "he same sys"em par"nerships de"ailed 6or "he "elne" lab, ,eBre going "o no, "rans6er a 6ile 6rom sys"em "o sys"em via "he 6"p command, ,hich s"ands 6or /ile Trans6er 'ro"ocol7 A do,nload2
I h$stname gvicai:1E I 5tp #(icai)15 Connec"ed "o gvicai:147 220 gvicai:14 /T' server ?-ersion E72 Sa" #un 1> 0D220204 CDT 200DA ready7 <ame ?gvicai:142roo"A2 r$$t 331 'ass,ord reMuired 6or roo"7 'ass,ord2 2308Las" unsuccess6ul login2 /ri Sep 11 112E4213 2001 on 6"p 6rom gvicai:1E 2308Las" login2 /ri Sep 11 112E4220 2001 on +dev+p"s+0 6rom gvicai:1E 230 ;ser roo" logged in7 6"pX #et ?remo"e86ileA *etc*h$sts ?local86ileA *tmp*h$sts 200 '($T command success6ul7 140 (pening da"a connec"ion 6or +e"c+hos"s ?1G1> by"esA7 22> Trans6er comple"e7 1141 by"es received in 070001GD seconds ?1130 @by"es+sA local2 +"mp+hos"s remo"e2 +e"c+hos"s 6"pX 4uit 221 Goodbye7 I ls .l *tmp*h$sts

8r,8r88r88 1 roo"

sys"em

1G1> Sep 11 112E4 +"mp+hos"s

A ! %asic Sys"em Adminis"ra"ion

523

A ! <e",or5ing 0 TC'+ '


;pload2
I h$stname gvicai:1E I 5tp #(icai)15 Connec"ed "o gvicai:147 220 gvicai:14 /T' server ?-ersion E72 Sa" #un 1> 0D220204 CDT 200DA ready7 <ame ?gvicai:142roo"A2 r$$t 331 'ass,ord reMuired 6or roo"7 'ass,ord2 2308Las" unsuccess6ul login2 /ri Sep 11 112E4213 2001 on 6"p 6rom gvicai:1E 2308Las" login2 /ri Sep 11 112E423D 2001 on 6"p 6rom gvicai:1E 230 ;ser roo" logged in7 6"pX put ?local86ileA *etc*pass/d ?remo"e86ileA +tmp*pass/d 200 '($T command success6ul7 140 (pening da"a connec"ion 6or +"mp+pass,d7 22> Trans6er comple"e7 4E3 by"es sen" in 070011D2 seconds ?E4274 @by"es+sA local2 +e"c+pass,d remo"e2 +"mp+pass,d 6"pX 4uit

<o,, go"o "he "arge" sys"em, and veri6y "he 6ile ,as sen" "here7
I h$stname gvicai:14 I ls .l *tmp*pass/d 8r,8r88888 1 roo" sys"em I

42G Sep 11 112EG +"mp+pass,d

A ! %asic Sys"em Adminis"ra"ion

524

A ! <e",or5ing 0 TC'+ '


Global D<S name resolu"ion is handled by ano"her server?sA in "he environmen" holding "he ip address, and hos"name "ransla"ion "able, ra"her "hen i" being main"ained locally on "he A ! sys"ems7 The +e"c+resolv7con6 6ile, ,hich doesnB" e:is" by de6aul", poin"s "o "he ip address o6 "he D<S server, so i" 5no,s ,here "o go "o resolve an ip address7
I ls .l *etc*res$l(%c$n5 +e"c+resolv7con6 no" 6ound I I nsl$$8up ///%i!m%c$m Server2 ^,I

A ! %asic Sys"em Adminis"ra"ion

525

A ! <e",or5ing 0 TC'+ '


(nce "he ip address o6 "he D<S server o6 "he environmen", is in "he +e"c+resolv7con6 6ile, you can no, "ransla"e ips, such as "hose 6rom "he in"erne", i6 se"up "o do so7
I ls .l *etc*res$l(%c$n5 8r,8r88r88 1 roo" sys"em 4D Sep 11 1124> +e"c+resolv7con6

I cat *etc*res$l(%c$n5 d$main theats#r$up%c$m nameser(er 192%168%240%150 I nsl$$8up ///%i!m%c$m Server2 a"sicdc7a"s7local Address2 11271>G72E07140 <on8au"hori"a"ive ans,er2 <ame2 ,,,7ibm7com7cs1G>7ne" Address2 1217E274G721> Aliases2 ,,,7ibm7com I

A ! %asic Sys"em Adminis"ra"ion

526

A ! <e",or5ing 0 TC'+ '


To vie, "he rou"ing "able "ype in "he 6ollo,ing2
I netstat .rn $ou"ing "ables Des"ina"ion Ga"e,ay

/lags $e6s

;se 6 *:p Groups

$ou"e Tree 6or 'ro"ocol /amily 2 ? n"erne"A2 de6aul" 11271>G72E071 ;G 0 E en0 8 8 12D+G 12D707071 ; 1E 2D1 lo0 8 8 11271>G72E070 11271>G72E07123 ;.Sb 0 0 en0 8 8 QX 11271>G72E0+2E 11271>G72E07123 ; > 10D1 en0 8 8 11271>G72E07123 12D707071 ;G.S E DG lo0 8 8 11271>G72E07244 11271>G72E07123 ;.Sb 2 G en0 8 8 $ou"e Tree 6or 'ro"ocol /amily 2E ? n"erne" v>A2 221^1 221^1 ;. 3 32 lo0 I 8 8

The rou"e ne:" "o de6aul", is "he sys"emBs de6aul" rou"e+ga"e,ay7

A ! %asic Sys"em Adminis"ra"ion

52'

A ! <e",or5ing 0 TC'+ '


Telne", and /T' are insecure programs7 They "ransmi" pass,ords in clear "e:" over "he ne",or57 Hou should use SS. and S/T', SC' respec"ively as an al"erna"ive7 Da"a is "rans6erred via SS. in a secured, encryp"ed 6ashion7 ;ni: has r8commands7 These commands also allo, communica"ion over a ne",or57 These commands are also insecure, because "hey also "rans6er "he pass,ord over "he ne",or5 in clear "e:"7 Hou can also use SS. as an al"erna"ive 6or "hese commands7 8 re:ec 8 rsh 8 rlogin

A ! %asic Sys"em Adminis"ra"ion

528

A ! Securi"y

A ! %asic Sys"em Adminis"ra"ion

529

A ! Securi"y
A ! is shipped insecure7 .o,ever, i" has all o6 "he "ools "o be very secure7 The process o6 securing a sys"em is called hardening a sys"em7 Depending upon your corpora"e T policy, securi"y can be loose on an A ! sys"em, or very "igh"7 There is a "hin line be",een a secured sys"em, and a non8produc"ive sys"em7 &os" cus"omers compromise some,here in "he middle as 6ar as securi"y is concerned7 This is o6 course as long as "here are no legal regula"ions, e"c77

A ! %asic Sys"em Adminis"ra"ion

530

A ! Securi"y
(ne o6 "he 6irs" "hings you should do "o ensure your sys"em is secure, is ensure "he roo" user is pro"ec"ed ,i"h a pass,ord7 )e already accomplished "his earlier in "he class7
I pass/d Changing pass,ord 6or Sroo"S roo"Ts <e, pass,ord2 X6<-6RC $e8en"er roo"Ts ne, pass,ord2 X6<-6RC I l$#ins .p roo" 0 sys"em

I pass/d Changing pass,ord 6or Sroo"S roo"Ts <e, pass,ord2 $e8en"er roo"Ts ne, pass,ord2 I l$#ins .p I

A ! %asic Sys"em Adminis"ra"ion

531

A ! Securi"y
ns"all ssh, and disable "elne"7 $emember, "elne" is insecure because i" "ransmi"s login pass,ords in clear "e:" over "he ne",or57 To disable "elne", you mus" disable i"Bs subserver7 Hou do "ha" ,i"h "he s"opsrc 0" subNserver command7
I lssrc .t telnet Service Command "elne" +usr+sbin+"elne"d Argumen"s "elne"d 8a S"a"us ac"ive

I st$psrc .t telnet 0413812D The "elne" subserver ,as s"opped success6ully7 I lssrc .t telnet Service Command I Argumen"s S"a"us

<o, a""emp" "o "elne" in"o your par"ner sys"em7


I telnet #(icai)15 Trying777 "elne"2 connec"2 Connec"ion re6used I

A ! %asic Sys"em Adminis"ra"ion

532

A ! Securi"y
/T' should be disabled as ,ell7
I lssrc .t 5tp Service Command 6"p +usr+sbin+6"pd Argumen"s 6"pd ac"ive S"a"us

I st$psrc .t 5tp 0413812D The 6"p subserver ,as s"opped success6ully7 I lssrc .t 5tp Service Command I Argumen"s S"a"us

<o, a""emp" "o 6"p "o your par"ner sys"em7


I 5tp l$$p!ac8 6"p2 connec"2 Connec"ion re6used 6"pX 4uit I

A ! %asic Sys"em Adminis"ra"ion

533

A ! Securi"y
*nable "elne", and 6"p once again7 The las" ",o labs ,as Cus" "o demons"ra"e ho, "o disable "hose ",o services7
I lssrc .t telnet Service Command Argumen"s S"a"us I startsrc .t telnet 0413812E The "elne" subserver has been s"ar"ed7 I lssrc .t telnet Service Command Argumen"s S"a"us "elne" +usr+sbin+"elne"d "elne"d 8a ac"ive I I lssrc .t 5tp Service Command Argumen"s I startsrc .t 5tp 0413812E The 6"p subserver has been s"ar"ed7 I lssrc .t 5tp Service Command Argumen"s 6"p +usr+sbin+6"pd 6"pd ac"ive I

S"a"us

S"a"us

A ! %asic Sys"em Adminis"ra"ion

534

A ! Securi"y
Ano"her "as5 you can do "o pro"ec" "he roo" user accoun" is "o disable "he abili"y "o log in"o "ha" user remo"ely7 I smi""y chuser

A ! %asic Sys"em Adminis"ra"ion

535

A ! Securi"y

A ! %asic Sys"em Adminis"ra"ion

536

A ! Securi"y
(pen ano"her pu""y session, and no"e ho, you canB" login as "ha" roo" user any longer remo"ely7 <o,, you ,ould be able "o login as roo" 6rom "he sys"em console7
A ! -ersion 4 Copyrigh" %& Corpora"ion, 11G2, 200D7 login2 r$$t $emo"e logins are no" allo,ed 6or "his accoun"7 login2

A ! %asic Sys"em Adminis"ra"ion

53'

A ! Securi"y
A6"er you se" "his a""ribu"e, rloginQ6alse, no"e you ,ill s"ill be able "o su "o "he roo" user, 6rom a normal user id7 This is "ypically done "o en6orce user accoun"abili"y7 Go bac5 "hrough smi", and change i" bac5 "o remo"e login "rue7

A ! %asic Sys"em Adminis"ra"ion

538

A ! Securi"y
A ! has Mui"e a 6e, securi"y op"ions you can se" 6or users you se"up on "he sys"em7 Go in"o "he smi""y chuser 6as"pa"h, and le"Bs revie, "hem "oge"her7
I smittH chuser

A ! %asic Sys"em Adminis"ra"ion

539

A ! Securi"y
All o6 "hese se""ings, are se" in "he +e"c+securi"y+user con6ig 6ile7 user securi"y ;ser D AD& < ST$AT -* ;S*$9 'rimary G$(;' Group S*T AD& < ST$AT -* G$(;'S $(L*S Ano"her user can S; T( ;S*$9 S; G$(;'S .(&* direc"ory ni"ial '$(G$A& ;ser </($&AT (< *!' $AT (< da"e ?&&DDhhmmyyA s "his user ACC(;<T L(C@*D9
A ! %asic Sys"em Adminis"ra"ion 540

A ! Securi"y
;ser can L(G <9 ;ser can L(G < $*&(T*LH?rsh,"n,rloginA9 Allo,ed L(G < T &*S <umber o6 /A L*D L(G <S be6ore user accoun" is loc5ed Login A;T.*<T CAT (< G$A&&A$ -alid TTHs Days "o )A$< ;S*$ be6ore pass,ord e:pires 'ass,ord C.*C@ &*T.(DS 'ass,ord D CT (<A$H / L*S <;&%*$ (/ 'ASS)($DS be6ore reuse )**@S be6ore pass,ord reuse )ee5s be",een pass,ord *!' $AT (< and L(C@(;T

A ! %asic Sys"em Adminis"ra"ion

541

A ! Securi"y
'ass,ord &A!7 AG* 'ass,ord & <7 AG* 'ass,ord & <7 L*<GT. 'ass,ord & <7 AL'.A charac"ers 'ass,ord & <7 (T.*$ charac"ers 'ass,ord &A!7 $*'*AT*D charac"ers 'ass,ord & <7 D //*$*<T charac"ers 'ass,ord $*G ST$H So6" / L* siFe So6" C'; "ime So6" DATA segmen" So6" STAC@ siFe So6" C($* 6ile siFe .ard / L* siFe *TCR
A ! %asic Sys"em Adminis"ra"ion 542

A ! Securi"y
/or "his sec"ion ,hich deals ,i"h ;ni: 6ile, and direc"ory permissions, go ahead and crea"e ano"her user called Cus"in2, ,hich is yourname22
I m8user ustin2 I id ustin2 uidQ2GG?Cus"in2A gidQ202?s"a66A I pass/d ustin2 Changing pass,ord 6or SCus"in2S Cus"in2Ts <e, pass,ord2 *n"er "he ne, pass,ord again2 I p/dadm .c ustin2 I

A ! %asic Sys"em Adminis"ra"ion

543

A ! Securi"y
)hen you crea"e a 6ile or direc"ory in A !, you user id o,ns "he 6ile, and your primary group o,ns i" as ,ell7 Log in as "he user you crea"ed bac5 in "he ;ser &anagemen" sec"ion, and crea"e an emp"y 6ile and direc"ory2
Y id uidQ2GD?Cus"inA gidQ202?dbaA groupsQ1?s"a66A Y p/d +home+Cus"in Y t$uch 5ile Y ls .l 5ile 8r,8r88r88 1 Cus"in dba Y m8dir dir Y ls .ld dir dr,:r8:r8: 2 Cus"in dba Y

0 <ov 04 23232 6ile

24> <ov 04 23232 dir

A ! %asic Sys"em Adminis"ra"ion

544

A ! Securi"y
%y de6aul", you can dele"e, rename+move any 6iles, or direc"ories you crea"ed+o,n7 Dele"e2
Y id uidQ2GD?Cus"inA gidQ202?dbaA groupsQ1?s"a66A Y ls .l 5ile 8r,8r88r88 1 Cus"in dba 0 <ov 04 23232 6ile

Y rm 5ile Y ls .l 5ile ls2 0>4383E1 The 6ile 6ile does no" e:is"7 Y ls .ld dir dr,:r8:r8: 2 Cus"in dba 24> <ov 04 23232 dir

Y rmdir dir Y ls .ld dir ls2 0>4383E1 The 6ile dir does no" e:is"7 Y

A ! %asic Sys"em Adminis"ra"ion

545

A ! Securi"y
$ename+move2
Y t$uch 5ile Y m8dir dir Y ls .l 5ile 8r,8r88r88 1 Cus"in dba Y ls .ld dir dr,:r8:r8: 2 Cus"in dba Y m( 5ile 5ile2 Y m( dir dir2 Y ls .l 5ile2 8r,8r88r88 1 Cus"in dba Y ls .ld dir2 dr,:r8:r8: 2 Cus"in dba Y

0 <ov 04 23244 6ile 24> <ov 04 23244 dir

0 <ov 04 23244 6ile2 24> <ov 04 23244 dir2

A ! %asic Sys"em Adminis"ra"ion

546

A ! Securi"y
'opula"e "he 6ile, 6ile ,i"h da"a2
Y ech$ Bdata in 5ileB C 5ile Y ls .l 5ile 8r,8r88r88 1 Cus"in dba Y cat 5ile da"a in 6ile Y

13 <ov 0> 0021D 6ile

%y de6aul" all users on "he sys"em have read permission "o "his 6ile7 Also, by de6aul" all users ,ho are also members o6 user Cus"inBs primary group, dba, "he group ,hich o,ns "his 6ile, have read permission "o "his 6ile, meaning i6 you are logged in"o "he sys"em ,ho is a member o6 "he same group ,ho crea"ed a speci6ic 6ile, "hen you ,ill have permission "o read "ha" 6ile, Cus" as "he o,ner does7

A ! %asic Sys"em Adminis"ra"ion

54'

A ! Securi"y
<o,, open ano"her pu""y session "o your sys"em, and login as user Cus"in2, "he user you crea"ed a" "he s"ar" o6 "his lab sec"ion7 (nce in, a""emp" "o read "he 6ile you Cus" crea"ed as user Cus"in in user Cus"inBs home direc"ory, you ,ill be able "o, bu" a""emp" "o ,ri"e "o "his 6ile as user Cus"in2 ,ho doesnB" o,n "he 6ile, you ,onB" be able "o2
Y id uidQ2GG?Cus"in2A gidQ1?s"a66A Y ls .l *h$me* ustin*5ile 8r,8r88r88 1 Cus"in dba Y cat *h$me* ustin*5ile da"a in 6ile Y ech$ Bm$re data in 5ileB CC *h$me* ustin*5ile The 6ile access permissions do no" allo, "he speci6ied ac"ion7 5sh2 +home+Cus"in+6ile2 0E038004 Canno" crea"e "he speci6ied 6ile7 Y 13 <ov 0> 0021D +home+Cus"in+6ile

A ! %asic Sys"em Adminis"ra"ion

548

A ! Securi"y
S,i"ch user, ,i"h "he ;ni: su command, "o "he roo" user o6 "he sys"em and "hen change "he o,ner o6 "he +home+Cus"in+6ile 6ile "o Cus"in27 Hou change "he user o,nership o6 a 6ile ,i"h "he cho,n comand2
Y su roo"Bs 'ass,ord2 I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I ls .l *h$me* ustin*5ile 8r,8r88r88 1 Cus"in dba 13 <ov 0> 0021D +home+Cus"in+6ile

I ch$/n ustin2 *h$me* ustin*5ile I ls .l *h$me* ustin*5ile 8r,8r88r88 1 Cus"in2 dba 13 <ov 0> 0021D +home+Cus"in+6ile I

A ! %asic Sys"em Adminis"ra"ion

549

A ! Securi"y
<o,, "ype in "he e:i" command, "o become user Cus"in2 again7 A""emp" "o ,ri"e "o "he 6ile +home+Cus"in+6ile again, and no, "ha" user Cus"in2 o,ns "his 6ile, Cus"in2 ,ill be able "o ,ri"e "o "ha" 6ile7 Since user Cus"in2 no, o,ns "his 6ile, and by de6aul" ;ni: gives ,ri"e permission "o "he o,ner o6 a 6ile, Cus"in2 ,ill no, be able "o ,ri"e "o "his 6ile7
I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I e)it Y id uidQ2GG?Cus"in2A gidQ1?s"a66A Y ls .l *h$me* ustin*5ile 8r,8r88r88 1 Cus"in2 dba Y cat *h$me* ustin*5ile da"a in 6ile Y ech$ Bm$re data in 5ileB CC *h$me* ustin*5ile Y cat *h$me* ustin*5ile da"a in 6ile more da"a in 6ile Y 13 <ov 0> 0021D +home+Cus"in+6ile

A ! %asic Sys"em Adminis"ra"ion

550

A ! Securi"y
;ni: 6ile and direc"ory permissions are handled by "en bi"s se" 6or each 6ile and direc"ory7 Hou see "his via "he ls 0l command7 Go ahead and go "o your Cus"in 'u""y session2
Y id uidQ2GD?Cus"inA gidQ202?dbaA groupsQ1?s"a66A Y t$uch 5ilea Y ech$ BdataB C 5ilea Y cat 5ilea da"a Y ls .l 5ilea 8r,8r88r88 1 Cus"in dba Y 4 <ov 0> 0E20D 6ilea

A ! %asic Sys"em Adminis"ra"ion

551

A ! Securi"y
Y ls .l 5ilea

.r/.r..r..
Y

1 Cus"in dba

4 <ov 0> 0E20D 6ilea

These "en permission bi"s are grouped "oge"her in"o "hree permission bi" se"s, ,i"h "hree permissions each2 r, ,, and :7 There is a permission bi" se" 6or "he 6ollo,ing groups o6 users2 8 ;sers ,hich o,n "he 6ile or direc"ory7 8 ;sers ,ho are members o6 "he same group ,ho o,ns "he 6ile or direc"ory7 8 ("hers+)orld7 *veryone else on "he sys"em7 <o" "he o,ner or a member o6 "he group ,ho o,ns "he 6ile or direc"ory7 8 There are also "hree basic permissions you can se" 6or each group 0 r Q $ead, , Q )ri"e, and : Q e!ecu"e7
Direc"ory9 $ead9 )ri"e9 *:ecu"e9 $ead9 )ri"e9 *:ecu"e9 $ead9 )ri"e9 *:ecu"e9

>

> &wner

>

5 Gro3p

>

&t#er

A ! %asic Sys"em Adminis"ra"ion

552

A ! Securi"y
So based on "he ls 0l ou"pu" o6 "he 6ile, 6ilea ,e deduce "he 6ollo,ing2 ;ser Cus"in, "he o,ner, has read, and ,ri"e permission on 6ilea7 *very user on "he sys"em ,ho is in "he dba group has read permission on 6ilea7 *very user on "he sys"em ,ho is no" "he o,ner or no" in "he dba group has read permission on 6ilea7 Go "o "he Cus"in2 'u""y session, and a""emp" "o read "he 6ile, 6ilea2
Y id uidQ2GG?Cus"in2A gidQ1?s"a66A Y cat *h$me* ustin*5ilea da"a Y

Go bac5 "o "he Cus"in 'u""y session, and a""emp" "o read "he 6ile, 6ilea2
Y id uidQ2GD?Cus"inA gidQ21DG?dbaA groupsQ1?s"a66A Y cat 5ilea da"a Y

A ! %asic Sys"em Adminis"ra"ion

553

A ! Securi"y
<o, le"Bs change "he 6ile permission o6 "he 6ile7 To change "he permission ,e use "he chmod command7 n our e:ample ,e are going "o "a5e read permission ,ay 6rom "he o,ner o6 "he 6ile2
Y chm$d u.r 5ilea Y ls .l 5ilea 88,8r88r88 1 Cus"in dba Y cat 5ilea ca"2 0>428040 Canno" open 6ilea7 Y

4 <ov 0> 0E20D 6ilea

/or "he chmod command you use "he 6ollo,ing parame"ers "o speci6y ,hich permission bi" se" you are se""ing, and ,hich permission bi" you are se""ing2 8 u Q (,ner o6 "he 6ile permission bi" se"7 8 g Q Group member o6 group ,hich o,ns "he 6ile permission bi" se"7 8 o Q ("hers+)orld7 <on8o,ners o6 "he 6ile, and non8group members o6 "he group o,ner o6 "he 6ile permission bi" se"7 8 Hou use "he ], plus sign "o gran", and "he minus 8, sign "o revo5e7

A ! %asic Sys"em Adminis"ra"ion

554

A ! Securi"y
Go "o your Cus"in2 ,indo, and a""emp" "o read "he 6ile7 <o"e, even "hough Cus"in2 is no" "he o,ner, "he "hird permission bi", o"her, has "he r 0 read se", "his means Cus"in2 can read "he 6ile even "hough Cus"in+o,ner canno"7
Y id uidQ2GG?Cus"in2A gidQ1?s"a66A Y ls .l *h$me* ustin*5ilea 88,8r88r88 1 Cus"in dba Y cat *h$me* ustin*5ilea da"a Y 4 <ov 0> 0E20D +home+Cus"in+6ilea

A ! %asic Sys"em Adminis"ra"ion

555

A ! Securi"y
%ac5 a" "he Cus"in user ,indo, a""emp" "o edi" "he 6ile, 6ile, by re8 direc"ing ou"pu" "o i" 6rom "he ;ni: shell2
Y id uidQ2GD?Cus"inA gidQ21DG?dbaA groupsQ1?s"a66A Y ls .l 5ilea 88,8r88r88 1 Cus"in dba Y date CC 5ilea Y cat 5ilea ca"2 0>428040 Canno" open 6ilea7 Y (i 5ilea R S6ileaS The 6ile access permissions do no" allo, "he speci6ied ac"ion7 4 <ov 0> 0E20D 6ilea

<o"e, you as "he o,ner s"ill have ,ri"e permission "o 6ilea, so you can re8direc" ou"pu" "o "ha" 6ile, ho,ever since you as "he o,ner do no" have read permission "o "ha" 6ile you canno" edi" "he 6ile ,i"h "he vi edi"or, because you need read permission "o edi" "he 6ile ,i"h an edi"or ,hich mus" read i"7
A ! %asic Sys"em Adminis"ra"ion 556

A ! Securi"y
<o, go "o "he Cus"in2 ,indo, and ca" "he 6ile, so you see "ha" even ,i"hou" read permission you ,ere able "o append "o "his 6ile as user Cus"in ,i"h "he shell re8direc"ion o6 "he da"e command ou"pu"2
Y id uidQ2GG?Cus"in2A gidQ1?s"a66A Y cat *h$me* ustin*5ilea da"a Sa" <ov > 1321420E *DT 2010 Y

As Cus"in2 a""emp" "o ,ri"e "o "his 6ile by re8direc"ing shell ou"pu" "o i"2
Y id uidQ2GG?Cus"in2A gidQ1?s"a66A Y date CC *h$me* ustin*5ilea The 6ile access permissions do no" allo, "he speci6ied ac"ion7 5sh2 +home+Cus"in+6ilea2 0E038004 Canno" crea"e "he speci6ied 6ile7 Y ls .l *h$me* ustin*5ilea 88,8r88r88 1 Cus"in dba Y 3E <ov 0> 13214 +home+Cus"in+6ilea

A ! %asic Sys"em Adminis"ra"ion

55'

A ! Securi"y
%ac5 in "he Cus"in ,indo, go ahead and give "he las" permission bi" se" o 6or o"her, ,ri"e permission "o "his 6ile7
Y id uidQ2GD?Cus"inA gidQ21DG?dbaA groupsQ1?s"a66A Y ls .l 5ilea 88,8r88r88 1 Cus"in dba Y chm$d $2/ 5ilea Y ls .l 5ilea 88,8r88r,8 1 Cus"in dba Y 3E <ov 0> 13214 6ilea 3E <ov 0> 13214 6ilea

<o, in "he Cus"in2 ,indo, you should be able "o ,ri"e+append "o "his 6ile, because Cus"in2 no, no" being "he o,ner or in "he dba group has permission "o ,ri"e "o "his 6ile7 This is also 5no,n as J,orld ,ri"ableK2
Y id uidQ2GG?Cus"in2A gidQ1?s"a66A Y date CC *h$me* ustin*5ilea Y cat *h$me* ustin*5ilea da"a Sa" <ov > 1321420E *DT 2010 Sa" <ov > 13224214 *DT 2010

A ! %asic Sys"em Adminis"ra"ion

558

A ! Securi"y
n "he Cus"in ,indo, give "he o,ner, you, read permission "o 6ilea again2
Y id uidQ2GD?Cus"inA gidQ21DG?dbaA groupsQ1?s"a66A Y ls .l 5ilea 88,8r88r,8 1 Cus"in dba Y chm$d u2r 5ilea Y ls .l 5ilea 8r,8r88r,8 1 Cus"in dba Y (i 5ilea R >3 <ov 0> 13224 6ilea

>3 <ov 0> 13224 6ilea

;se *SC]dd "hree "imes "o dele"e all "hree lines ,i"hin vi7 nser" "he 6ollo,ing comands+lines "o "he 6ile7 This is a simple shell scrip"2
GP*usr*!in*8sh ech$ RNell$U sleep 3 ech$ R-his is a simple shell script in Ini)U

A ! %asic Sys"em Adminis"ra"ion

559

A ! Securi"y
To run+e:ecu"e a ;ni: shell scrip" all you do is en"er "he name o6 "he 6ile, and "he ;ni: shell ,ill seMuen"ially e:ecu"e every command in "ha" 6ile7
Y ls .l 5ilea 8r,8r88r,8 1 Cus"in dba G2 <ov 0> 13230 6ilea

Y 5ilea 5sh2 6ilea2 0E03800> *:ecu"e permission denied7 Y

To be able "o run+e:ecu"e "his 6ile go ahead and give "he o,ner o6 "he 6ile e:ecu"e permission "o i"7
Y chm$d u2) 5ilea Y ls .l 5ilea 8r,:r88r,8 1 Cus"in dba Y 5ilea .ello (SHELL SCRIP P!"SES #$R HREE SEC$N%S&. This is a simple shell scrip" in ;ni: Y G2 <ov 0> 13230 6ilea

A ! %asic Sys"em Adminis"ra"ion

560

A ! Securi"y
Go "o "he Cus"in2 user ,indo, and a""emp" "o e:ecu"e "his shell scrip"2
Y id uidQ20E?Cus"in2A gidQ1?s"a66A Y *h$me* ustin*5ilea 5sh2 +home+Cus"in+6ilea2 0E03800> *:ecu"e permission denied7 Y Y chm$d $2) *h$me* ustin*5ilea 0EG1801E chmod2 no" all reMues"ed changes ,ere made "o +home+Cus"in+6ilea Y

<o"e, only "he o,ner o6 a 6ile, or direc"ory can change "he permission o6 a 6ile or direc"ory7 %ac5 in "he Cus"in ,indo,2
Y id uidQ203?Cus"inA gidQ20E?dbaA groupsQ1?s"a66A Y chm$d $2) 5ilea Y ls .l 5ilea 8r,:r88r,: 1 Cus"in dba GE <ov 20 1321D 6ilea Y

A ! %asic Sys"em Adminis"ra"ion

561

A ! Securi"y
Hou ,ill no, see "ha" bac5 in "he Cus"in2 ,indo,, "ha" user can no, e:ecu"e "his shell scrip"2
Y id uidQ20E?Cus"in2A gidQ1?s"a66A Y *h$me* ustin*5ilea .ello This is a simple shell scrip" in ;ni: Y

A ! %asic Sys"em Adminis"ra"ion

562

A ! Securi"y
/or Direc"ory permissions2

8 8 8

$ead permission is reMuired i6 a user ,ishes "o vie, "he con"en"s o6 a direc"ory, li5e ,i"h "he ls command7 )ri"e permission is reMuired i6 a user ,ishes "o crea"e a 6ile or sub8direc"ory in a direc"ory, or dele"e a 6ile or sub8direc"ory in a direc"ory7 *:ecu"e permission is reMuired i6 a user ,ishes "o move "o a direc"ory ,i"h "he cd command7

A ! %asic Sys"em Adminis"ra"ion

563

A ! Securi"y
Go ahead and revo5e read permission 6rom "his direc"ory2
Y ls .ld dir2 dr,:r8:r8: 2 Cus"in dba Y chm$d u.r dir2 Y ls .ld dir2 d8,:r8:r8: 2 Cus"in dba Y 24> <ov 0> 1E2E1 dir2 24> <ov 0> 1E2E1 dir2

Also "a5e e:ecu"e 6or "he o,ner a,ay2 Y chm$d u.) dir2

<o"ice no,, ho, you canno" even vie, "he con"en"s o6 "he direc"ory, le" alone cd "o i"2
Y ls dir2 ls2 dir22 The 6ile access permissions do no" allo, "he speci6ied ac"ion7 Y ls .l dir2 ls2 dir22 The 6ile access permissions do no" allo, "he speci6ied ac"ion7 "o"al 0

)i"h "he chmod command you can also speci6y mul"iple permissions 6or a permission bi" se" a" once7 So no, le"Bs give read, and e:ecu"e permission only "o "he o,ner bac5 6or "he dir2 direc"ory2
Y chm$d u2r) dir2 Y ls .ld dir2 dr,:r8:r8: 2 Cus"in dba

24> <ov 0> 1E2E1 dir2

A ! %asic Sys"em Adminis"ra"ion

564

A ! Securi"y
Go ahead and crea"e some emp"y 6iles in "he direc"ory dir22
Y p/d +home+Cus"in Y cd dir2 Y p/d +home+Cus"in+dir2 Y ls Y t$uch 5ilea 5ile! 5ilec Y ls .l "o"al 0 8r,8r88r88 1 Cus"in dba 8r,8r88r88 1 Cus"in dba 8r,8r88r88 1 Cus"in dba Y

0 <ov 0> 1E2E1 6ilea 0 <ov 0> 1E2E1 6ileb 0 <ov 0> 1E2E1 6ilec

A ! %asic Sys"em Adminis"ra"ion

565

A ! Securi"y
Go ahead and move bac5 "o your+Cus"inBs home direc"ory, and "a5e a,ay "he e:ecu"e permission "o "his direc"ory2
Y cd Y p/d +home+Cus"in Y ls .ld dir2 dr,:r8:r8: 2 Cus"in dba Y chm$d u.) dir2 Y ls .ld dir2 dr,8r8:r8: 2 Cus"in dba Y ls dir2 6ilea 6ileb 6ilec Y cd dir2 5sh2 dir22 'ermission denied7 24> <ov 0> 1E2E1 dir2

24> <ov 0> 1E2E1 dir2

)ha" can ,e conclude here9 )ell a ;ni: direc"ory needs e:ecu"e permission on i", 6or a user "o be able "o move "o i" 8 cd, "o i"7 .o,ever as long as "here is read permission "o "he direc"ory, ,e can s"ill vie, i"Bs con"en"s 0 6iles, and+or sub8direc"ories7
A ! %asic Sys"em Adminis"ra"ion 566

A ! Securi"y
Give 6ull r,: permission bac5 "o dir22
Y chm$d u2r/) dir2 Y ls .ld dir2 dr,:r8:r8: 2 Cus"in dba Y

24> <ov 0> 1E2E1 dir2

<o,, revo5e "he ,ri"e permission 6rom "his direc"ory 6or "he o,ner2
Y chm$d u./ dir2 Y ls .ld dir2 dr8:r8:r8: 2 Cus"in dba Y

24> <ov 0> 1E2E1 dir2

A ! %asic Sys"em Adminis"ra"ion

56'

A ! Securi"y
<o"ice ho, you canno" crea"e+,ri"e any"hing in "his direc"ory, because you revo5e your abili"y "o ,ri"e "o i"2
Y ls dir2 6ilea 6ileb 6ilec Y ls .l dir2 "o"al 0 8r,8r88r88 1 Cus"in dba 8r,8r88r88 1 Cus"in dba 8r,8r88r88 1 Cus"in dba Y cd dir2 Y p/d +home+Cus"in+dir2 Y t$uch 5iled "ouch2 0>4280E> Canno" crea"e 6iled7 Y Y m8dir dir2! m5dir2 0>43834D Canno" access direc"ory 77 72 The 6ile access permissions do no" allo, "he speci6ied ac"ion7 Y Y cd

0 <ov 0> 1E2E1 6ilea 0 <ov 0> 1E2E1 6ileb 0 <ov 0> 1E2E1 6ilec

A ! %asic Sys"em Adminis"ra"ion

568

A ! Securi"y
% G G(TC.A7 Le"Bs say you had a direc"ory "ha" you, user Cus"in, crea"ed called dirb7
Y id uidQ2GD?Cus"inA gidQ21DG?dbaA groupsQ1?s"a66A Y m8dir dir! Y ls .ld dir! dr,:r8:r8: 2 Cus"in dba 24> <ov 1> 1222G dirb Y

<o, you go in"o "ha" direc"ory, and crea"e a 6ile called2 6ilea, and a sub8direc"ory called dirc2
Y cd dir! Y p/d +home+Cus"in+dirb Y t$uch 5ilea Y ls .l 5ilea 8r,8r88r88 1 Cus"in dba Y m8dir dirc Y ls .ld dirc dr,:r8:r8: 2 Cus"in dba Y

0 <ov 1> 12221 6ilea

24> <ov 1> 13214 dirc

A ! %asic Sys"em Adminis"ra"ion

569

A ! Securi"y
Go "o your Cus"in2 login ,indo,, and a""emp" "o dele"e "his 6ile2
Y id uidQ2GG?Cus"in2A gidQ1?s"a66A Y cd *h$me* ustin*dir! Y ls .l 5ilea 8r,8r88r88 1 Cus"in dba

G2 <ov 0> 13230 6ilea

Y rm 5ilea rm2 $emove 6ilea9 H rm2 0>438>01 Canno" remove 6ilea7 The 6ile access permissions do no" allo, "he speci6ied ac"ion7 Y rmdir dirc rmdir2 0>438>01 Canno" remove dirc7 The 6ile access permissions do no" allo, "he speci6ied ac"ion7 Y

Hou canB", righ"9 <o, chec5 "his ou"7

A ! %asic Sys"em Adminis"ra"ion

5'0

A ! Securi"y
Go bac5 "o your Cus"in ,indo, and change "he direc"ory permission o6 dirb "o give o"hers+,orld ,ri"e permission "o "his direc"ory2
Y id uidQ2GD?Cus"inA gidQ21DG?dbaA groupsQ1?s"a66A Y cd Y ls .ld dir! dr,:r8:r8: 2 Cus"in dba Y chm$d $2/ dir! Y ls .ld dir! dr,:r8:r,: 2 Cus"in dba

24> <ov 1> 12221 dirb

24> <ov 1> 12221 dirb

A ! %asic Sys"em Adminis"ra"ion

5'1

A ! Securi"y
$e"urn "o your Cus"in2 login ,indo,, and no, a""emp" "o dele"e "he 6ilea 6ile2
Y id uidQ2GG?Cus"in2A gidQ1?s"a66A Y cd *h$me* ustin*dir! Y ls .l dr,:r8:r8: 2 Cus"in dba 24> <ov 1> 1223G dirb 8r,8r88r88 1 Cus"in dba 0 <ov 1> 12221 6ilea Y rm 5ilea rm2 $emove 6ilea9 H Y ls .l 5ilea ls2 0>4383E1 The 6ile 6ilea does no" e:is"7 Y rmdir dirc Y ls l dirc ls2 0>4383E1 The 6ile dirb does no" e:is"7

Hou are able "o do i", even "hough you, Cus"in2, do no" o,n "his 6ile, bu" Cus"in does7 Hou can because as long as "he direc"ory has ,ri"e permission on i" 6or a permission bi" se", anyone in "ha" se" can dele"e 6rom "ha" direc"ory, even i6 "hey do no" o,n "he 6ile7

A ! %asic Sys"em Adminis"ra"ion

5'2

A ! Securi"y
So ho, do you crea"e a public direc"ory ,here all users can dump "heir 6iles, and sub8direc"ories, bu" only "he o,ner o6 said 6iles, and sub8direc"ories can dele"e "hem9 This is ,here a special bi" 5no,n as "he Js"ic5y bi"K comes in"o place7 Tha" is e:ac"ly ,ha" i" is 6or, i" ma5es i" so all users can crea"e 6iles, and+or sub8direc"ories in a direc"ory, bu" only "he o,ner can dele"e "hem7 %ac5 in "he Cus"in user ,indo,2
Y id uidQ203?Cus"inA gidQ20E?dbaA groupsQ1?s"a66A Y ls .ld dir! dr,:r8:r,: 2 Cus"in dba Y chm$d $2t dir! Y ls .ld dir! dr,:r8:r," 2 Cus"in dba Y 24> <ov 20 13224 dirb

24> <ov 20 13224 dirb

A ! %asic Sys"em Adminis"ra"ion

5'3

A ! Securi"y
<o, as user Cus"in crea"e 6ilea and dirc2
Y id uidQ203?Cus"inA gidQ20E?dbaA groupsQ1?s"a66A Y cd dir! Y t$uch 5ilea Y m8dir dirc Y ls .l "o"al 0 dr,:r8:r8: 2 Cus"in dba 8r,8r88r88 1 Cus"in dba Y

24> <ov 20 1322G dirc 0 <ov 20 1322G 6ilea

A ! %asic Sys"em Adminis"ra"ion

5'4

A ! Securi"y
Go "o user Cus"in2Bs ,indo, and a""emp" "o dele"e "ha" 6ile, and direc"ory Cus" crea"ed+o,ned by user Cus"in7 Hou ,onB" be able "o, even "hough you, everyone+,orld, has permission "o ,ri"e "o "his direc"ory7 Also ,hile you are "here crea"e your o,n 6ile and direc"ory ,hich ,ill be o,ned by you, Cus"in22
Y id uidQ20E?Cus"in2A gidQ1?s"a66A Y cd *h$me* ustin*dir! Y ls .l "o"al 0 dr,:r8:r8: 2 Cus"in dba 24> <ov 20 1322G dirc 8r,8r88r88 1 Cus"in dba 0 <ov 20 1322G 6ilea Y rmdir dirc rmdir2 0>438>01 Canno" remove dirc7 (pera"ion no" permi""ed7 Y rm 5ilea rm2 $emove 6ilea9 H rm2 0>438>01 Canno" remove 6ilea7 (pera"ion no" permi""ed7 Y t$uch 5ile! Y m8dir dird Y ls .l "o"al 0 dr,:r8:r8: 2 Cus"in dba 24> <ov 20 1322G dirc dr,:r8:r8: 2 Cus"in2 s"a66 24> <ov 20 13221 dird 8r,8r88r88 1 Cus"in dba 0 <ov 20 1322G 6ilea 8r,8r88r88 1 Cus"in2 s"a66 0 <ov 20 13221 6ileb

A ! %asic Sys"em Adminis"ra"ion

5'5

A ! Securi"y
%ac5 in "he Cus"in ,indo,, a""emp" "o dele"e "he 6ile an direc"ory user Cus"in2 Cus" crea"ed2
Y id uidQ203?Cus"inA gidQ20E?dbaA groupsQ1?s"a66A Y cd Y cd dirb Y ls 8l "o"al 0 dr,:r8:r8: 2 Cus"in dba 24> <ov 20 1322G dirc dr,:r8:r8: 2 Cus"in2 s"a66 24> <ov 20 13221 dird 8r,8r88r88 1 Cus"in dba 0 <ov 20 1322G 6ilea 8r,8r88r88 1 Cus"in2 s"a66 0 <ov 20 13221 6ileb Y rm 6ileb rm2 $emove 6ileb9 y Y rmdir dird rm2dir2 A 6ile or direc"ory in "he pa"h name does no" e:is"7 rm2 0>438>03 Canno" remove direc"ory dird7 Y rmdir dird Y ls 8l "o"al 0 dr,:r8:r8: 2 Cus"in dba 24> <ov 20 1322G dirc 8r,8r88r88 1 Cus"in dba 0 <ov 20 1322G 6ilea Y

A ! %asic Sys"em Adminis"ra"ion

5'6

A ! Securi"y
Can anyone "ell me ,ha" happened and ,hy9 A<S)*$PPP To correc" "his you use a user ,ho ,ill never use "his direc"ory, or ,ho is "he proCec" manager, o6 "he proCec" ,hich is using "his common direc"ory+reposi"ory 6or mul"iple userBs 6iles, and direc"ories7 )e can see an e:ample o6 "his, by de6aul", on all already ins"alled A ! sys"em7 This is seen in a 6ilesys"em, direc"ory called +"mp7 This 6ilesys"em, direc"ory is crea"ed au"oma"ically ,hen "he opera"ing sys"em is ins"alled, and loo5 a" i"Bs permissions2
Y ls .ld *tmp dr,:r,:r," D bin Y bin E01> <ov 20 1323D +"mp

As you can see "his 6ilesys"em, direc"ory has "he s"ic5y bi" se"7

A ! %asic Sys"em Adminis"ra"ion

5''

A ! Securi"y
As user Cus"in crea"e a 6ile and direc"ory in +"mp2
Y id uidQ203?Cus"inA gidQ20E?dbaA groupsQ1?s"a66A Y cd *tmp Y p/d +"mp Y t$uch 5ilea Y m8dir dira Y ls .l 5ilea 8r,8r88r88 1 Cus"in dba Y ls .ld dira dr,:r8:r8: 2 Cus"in dba Y

0 <ov 20 13231 6ilea 24> <ov 20 13231 dira

A ! %asic Sys"em Adminis"ra"ion

5'8

A ! Securi"y
As user Cus"in2 crea"e a 6ile and direc"ory as ,ell in +"mp2
Y id uidQ20E?Cus"in2A gidQ1?s"a66A Y cd *tmp Y p/d +"mp Y t$uch 5ile! Y m8dir dir! Y ls .l 5ile! 8r,8r88r88 1 Cus"in2 s"a66 Y ls .ld dir! dr,:r8:r8: 2 Cus"in2 s"a66 Y

0 <ov 20 132E1 6ileb 24> <ov 20 132E1 dirb

)hile logged in as Cus"in2, a""emp" "o dele"e 6ilea and dira crea"ed by user Cus"in2 Y rm 5ilea rm2 $emove 6ilea9 H rm2 0>438>01 Canno" remove 6ilea7 (pera"ion no" permi""ed7 Y rmdir dira rmdir2 0>438>01 Canno" remove dira7 (pera"ion no" permi""ed7 Y

A ! %asic Sys"em Adminis"ra"ion

5'9

A ! Securi"y
<o, as user Cus"in a""emp" "o dele"e "he 6ile, and direc"ory you crea"ed as user Cus"in22
Y id uidQ203?Cus"inA gidQ20E?dbaA groupsQ1?s"a66A Y cd +"mp Y p,d +"mp Y rm 6ileb rm2 $emove 6ileb9 y rm2 0>438>01 Canno" remove 6ileb7 (pera"ion no" permi""ed7 Y rmdir dirb rmdir2 0>438>01 Canno" remove dirb7 (pera"ion no" permi""ed7 Y

A ! %asic Sys"em Adminis"ra"ion

580

A ! Securi"y
As user Cus"in2 dele"e "he 6ile, and direc"ory you, Cus"in2, crea"ed2
Y id uidQ20E?Cus"in2A gidQ1?s"a66A Y cd *tmp Y rm 5ile! Y rmdir dir! Y ls .l 5ile! ls2 0>4383E1 The 6ile 6ileb does no" e:is"7 Y ls .ld dir! ls2 0>4383E1 The 6ile dirb does no" e:is"7 Y

As user Cus"in dele"e "he 6ile and direc"ory you, Cus"in, crea"ed2
Y id uidQ203?Cus"inA gidQ20E?dbaA groupsQ1?s"a66A Y cd *tmp Y rm 5ilea Y rmdir dira Y ls .l 5ilea ls2 0>4383E1 The 6ile 6ilea does no" e:is"7 Y ls .ld dira ls2 0>4383E1 The 6ile dira does no" e:is"7 Y

A ! %asic Sys"em Adminis"ra"ion

581

A ! Securi"y
Hou can also revo5e mul"iple permissions simul"aneously 6rom a permission group se"7 %ac5 in Cus"in ,indo,2
Y p/d +home+Cus"in Y ls .ld dir2 dr8:r8:r8: 2 Cus"in dba Y chm$d u.r/) dir2 Y ls .ld dir2 d888r8:r8: 2 Cus"in dba Y 24> <ov 0> 1E2E1 dir2

24> <ov 0> 1E2E1 dir2

As you can do ,i"h mul"iple permission group se"s as ,ell simul"aneously2


Y chm$d #$.r/) dir2 Y ls .ld dir2 d888888888 2 Cus"in dba Y 24> <ov 0> 1E2E1 dir2

Above ,e simul"aneously revo5ed "he read, ,ri"e and e:ecu"e permissions 6rom "he group and o"hers+,orld permission bi" se" 6or "his direc"ory7
A ! %asic Sys"em Adminis"ra"ion 582

A ! Securi"y
To se" a 6ile permission 6or all permission se"s, use "he a op"ion "o "he chmod command2
Y chm$d a?r/ 5ilea Y ls .l 5ilea 8r,8r,8r,8 1 Cus"in s"a66 Y

G2 <ov 0> 13230 6ilea

<o, all permission se"s o,ner, group, and o"her+,orld have read ,ri"e access "o "he 6ile7 To unse" all permission se"s "o all2
Y chm$d a? 5ilea Y ls .l 5ilea 8888888888 1 Cus"in s"a66 Y

G2 <ov 0> 13230 6ilea

Y date C 5ilea The 6ile access permissions do no" allo, "he speci6ied ac"ion7 5sh2 6ilea2 0E038004 Canno" crea"e "he speci6ied 6ile7 Y cat 5ilea ca"2 0>428040 Canno" open 6ilea7 Y %*5ilea 5sh2 7+6ilea2 0E03800> *:ecu"e permission denied7

A ! %asic Sys"em Adminis"ra"ion

583

A ! Securi"y
Hou can change "he permission bi" mode o6 a 6ile using numeric represen"a"ions o6 "he permission via "he chmod command7 The chmod command has "he 6ollo,ing numerical represen"a"ion 6or 6ile permissions in ;ni:2 8 0 Q <o permission bi" se" 8 1 Q *:ecu"e permission bi" 8 2 Q )ri"e permission bi" 8 E Q $ead permission bi" *ach permission bi" se" ge"s one number, "hree "o"al 6or each permission bi" se"2 o,ner, group, and o"her+,orld7 See upcoming e:amples 6or an elabora"ion on "his s"a"emen"7

A ! %asic Sys"em Adminis"ra"ion

584

A ! Securi"y
To give "he o,ner o6 6ilea e:ecu"e?1A permission only "ype in2
Y ls .l 5ilea 8888888888 1 Cus"in s"a66 Y chm$d 100 5ilea Y ls .l 5ilea 888:888888 1 Cus"in s"a66 Y G2 <ov 0> 13230 6ilea

G2 <ov 0> 13230 6ilea

To give "he o,ner o6 6ilea ,ri"e?2A permission only "ype in2


Y chm$d 200 5ilea Y ls .l 5ilea 88,8888888 1 Cus"in s"a66 Y

G2 <ov 0> 13230 6ilea

A ! %asic Sys"em Adminis"ra"ion

585

A ! Securi"y
To give "he o,ner o6 6ilea read?EA permission only2
Y ls .l 5ilea 88,8888888 1 Cus"in s"a66 Y chm$d 400 5ilea Y ls .l 5ilea 8r88888888 1 Cus"in s"a66 Y G2 <ov 0> 13230 6ilea

G2 <ov 0> 13230 6ilea

To give "he group o6 6ilea e:ecu"e?1A permission only2


Y ls .l 5ilea 888888:888 1 Cus"in s"a66 Y chm$d 010 5ilea Y ls .l 5ilea 888888:888 1 Cus"in s"a66 Y G2 <ov 0> 13230 6ilea

G2 <ov 0> 13230 6ilea

A ! %asic Sys"em Adminis"ra"ion

586

A ! Securi"y
To give "he group o6 6ilea ,ri"e?2A permission only2
Y ls .l 5ilea 888888:888 1 Cus"in s"a66 Y chm$d 020 5ilea Y ls .l 5ilea 88888,8888 1 Cus"in s"a66 Y G2 <ov 0> 13230 6ilea

G2 <ov 0> 13230 6ilea

To give "he group o6 6ilea read?EA permission only2


Y ls .l 5ilea 88888,8888 1 Cus"in s"a66 Y chm$d 040 5ilea Y ls .l 5ilea 8888r88888 1 Cus"in s"a66 Y G2 <ov 0> 13230 6ilea

G2 <ov 0> 13230 6ilea

A ! %asic Sys"em Adminis"ra"ion

58'

A ! Securi"y
To give o"hers+,orld e:ecu"e?1A permission only on 6ilea
Y ls .l 5ilea 8888r88888 1 Cus"in s"a66 Y chm$d 001 5ilea Y ls .l 5ilea 888888888: 1 Cus"in s"a66 Y G2 <ov 0> 13230 6ilea

G2 <ov 0> 13230 6ilea

To give o"hers+,orld ,ri"e?2A permission only on 6ilea


Y ls .l 5ilea 888888888: 1 Cus"in s"a66 Y chm$d 002 5ilea Y ls .l 5ilea 88888888,8 1 Cus"in s"a66 Y G2 <ov 0> 13230 6ilea

G2 <ov 0> 13230 6ilea

A ! %asic Sys"em Adminis"ra"ion

588

A ! Securi"y
To give ,orld+o"hers read?EA permission only on 6ilea
Y ls .l 5ilea 88888888,8 1 Cus"in s"a66 Y chm$d 004 5ilea Y ls .l 5ilea 8888888r88 1 Cus"in s"a66 Y G2 <ov 0> 13230 6ilea

G2 <ov 0> 13230 6ilea

A ! %asic Sys"em Adminis"ra"ion

589

A ! Securi"y
<o"e, ,ha" happened you los" "he o,nership o6 "he previous permission bi" every"ime ,e did "his, so "o re"ain our previous permission bi" se""ing ,e Cus" include "ha" in "he number represen"a"ion7 *:ample, 6irs" clear ou" all permission 6or 6ilea, ,hich ,ould be cleared using 0, since 0 means no permissions, and ,e do "ha" 6or all "hree permission bi" se"s2
Y ls .l 5ilea 8888888r88 1 Cus"in s"a66 Y chm$d 000 5ilea Y ls .l 5ilea 8888888888 1 Cus"in s"a66 Y G2 <ov 0> 13230 6ilea

G2 <ov 0> 13230 6ilea

<o, in "his e:ample ,e ,an" "he o,ner o6 6ilea "o have read?EA permission, "he group "o have e:ecu"e?1A permission, and o"hers+,orld "o have ,ri"e?2A permission2
Y chm$d 412 5ilea Y ls .l 5ilea 8r8888:8,8 1 Cus"in s"a66 Y

G2 <ov 0> 13230 6ilea

A ! %asic Sys"em Adminis"ra"ion

590

A ! Securi"y
Le"s say you ,an"ed each permission group se" "o have mul"iple permission, 6or ins"ance, you ,an"ed "he o,ner o6 "he 6ile "o have read?EA, ,ri"e?2A, and e:ecu"e?1A permission2
Y chm$d 400 5ilea Y chm$d 200 5ilea Y chm$d 100 5ilea Y ls .l 5ilea 888:888888 1 Cus"in s"a66 Y chm$d 42100 5ilea Y ls .l 5ilea 888:88S888 1 Cus"in s"a66 Y

G2 <ov 0> 13230 6ilea

G2 <ov 0> 13230 6ilea

.o, do you se" mul"iple permission bi"s "o a permission se" ,i"h "he chmod command using numbers9

=<JK<6FFF
A ! %asic Sys"em Adminis"ra"ion 591

A ! Securi"y
Hou sum all o6 "he desired permission bi" numerical values up and "hen Cus" apply "ha" number "o "he command7 So remember, in our 6irs" e:ample, ,e ,an" "he o,ner o6 "he 6ile "o have read?EA, ,ri"e?2A, and e:ecu"e?1A permission7

(,ner 0 4 2 2 2 1 ? ' Group 0 0 2 0 2 0 ? 0 ("her+,orld 0 0 2 0 2 0 ? 0


Direc"ory9 $ead9 )ri"e9 *:ecu"e9 $ead9 )ri"e9 *:ecu"e9 $ead9 )ri"e9 *:ecu"e9

&wner
A ! %asic Sys"em Adminis"ra"ion

Gro3p
592

&t#er

A ! Securi"y
Y ls .l 5ilea 8888888888 1 Cus"in s"a66 Y chm$d '00 5ilea Y ls .l 5ilea 8r,:888888 1 Cus"in s"a66 G2 <ov 0> 13230 6ilea

G2 <ov 0> 13230 6ilea

To give "he group read and e:ecu"e permission only, E ] 1 Q 42


Y chm$d '50 5ilea Y ls .l 5ilea 8r,:r8:888 1 Cus"in s"a66 Y

G2 <ov 0> 13230 6ilea

A ! %asic Sys"em Adminis"ra"ion

593

A ! Securi"y
To give "he o"hers+,orld, read, and ,ri"e permission only, E ] 2 Q >2
Y chm$d '56 5ilea Y ls .l 5ilea 8r,:r8:r,8 1 Cus"in s"a66 Y

G2 <ov 0> 13230 6ilea

A ! %asic Sys"em Adminis"ra"ion

594

A ! Securi"y
To unders"and ho, "hose numbers2 1 6or e:ecu"e, 2 6or ,ri"e, and E 6or read, are assigned, ,e mus" "hin5 binary 0 ?1Bs and 0BsA7 To illus"ra"e and e:ample le" us say "ha" you ,an"ed a 6ile "o have "he 6ollo,ing permission se"2 8r,: r8: r,8 Tha" is o,ner2 read, ,ri"e, e:ecu"e7 Group2 read, e:ecu"e, and ("hers+,orld2 read, and ,ri"e7

A ! %asic Sys"em Adminis"ra"ion

595

A ! Securi"y
To de"ermine ,hich number represen"s ,hich permission you use a binary char"7 Hou pu" a 1 under each permission bi" se", and a 0 under each 0 ?hypenA, ,hich means no permission bi" se" here7 $emember our desired permission se" 6or a 6ile2 8r,: r8: r,8

Direc"ory9

$ead9

)ri"e9

*:ecu"e9

$ead9

)ri"e9

*:ecu"e9

$ead9

)ri"e9

*:ecu"e9

&wner

Gro3p

&t#er

A ! %asic Sys"em Adminis"ra"ion

596

A ! Securi"y
Hou are Cus" "urning on and o66 bi"s, and summing up "he binary values o6 "hose on and o66 bi" posi"ions2 (,ner2 .r/) 4 1 2 1 1 1

Decimal represen"a"ion o6 "he binary bi" coun" above is2 4 2 2 2 1 ? '% Group2 r.) 4 1 2 0 1 1

Decimal represen"a"ion o6 "he binary bi" coun" above is2 4 2 1 ? 5%


A ! %asic Sys"em Adminis"ra"ion 59'

A ! Securi"y
(,ner2 .r/.

4 1

2 1

1 0

Decimal represen"a"ion o6 "he binary bi" coun" above is2 4 2 2 ? 6%

`.E.D.
Y chm$d 000 5ilea Y ls .l 5ilea 8888888888 1 Cus"in s"a66 Y chm$d '56 5ilea Y ls .l 5ilea G2 <ov 0> 13230 6ilea

.r/)r.)r/.
Y

1 Cus"in s"a66

G2 <ov 0> 13230 6ilea

A ! %asic Sys"em Adminis"ra"ion

598

A ! Securi"y
Hou can change "he group o,nership o6 a 6ile, or direc"ory ,i"h "he ;ni: chgrp command7
Y ls .l 5ilea 8r,:r88r,8 1 Cus"in dba Y G2 <ov 0> 13230 6ilea

<o"ice ho, "he second permission bi" se" does no" have an :, so "ha" means anyone in "he same group canno" run "his shell scrip", so le"Bs give "he group permission bi" e:ecu"e permission2
Y chm$d #2) 5ilea Y ls .l 5ilea 8r,:r8:r,8 1 Cus"in dba Y G2 <ov 0> 13230 6ilea

A ! %asic Sys"em Adminis"ra"ion

599

A ! Securi"y
<o, go "o "he Cus"in2 user ,indo, and a""emp" "o run "he shell scrip"7
Y id uidQ2GG?Cus"in2A gidQ1?s"a66A Y *h$me* ustin*5ilea 5sh2 +home+Cus"in+6ilea2 0E03800> *:ecu"e permission denied7 Y

This 6ailed because ,e gave "he group e:ecu"e permission, and user Cus"in2 is no" in "he dba group, ,hich is "he o,ner group o6 "he +home+Cus"in+6ilea shell scrip"7 To correc" "his ,e can ei"her pu" user Cus"in2 in"o "he dba group, change "he ,orld+o"her e:ecu"e permission, or change "he shell scrip"Bs group o,nership "o s"a66, so Cus"in2 can e:ecu"e i"7 )e do "his by becoming "he roo" user, and "hen using "he ;ni: chgrp command2
Y su . roo"Ts 'ass,ord2 I id uidQ0?roo"A gidQ0?sys"emA groupsQ2?binA,3?sysA,D?securi"yA,G?cronA,10?audi"A,11?lpA I ls .l *h$me* ustin*5ilea 8r,:r8:r,8 1 Cus"in dba I ch#rp sta55 *h$me* ustin*5ilea I ls .l *h$me* ustin*5ilea 8r,:r8:r,8 1 Cus"in s"a66 G2 <ov 0> 13230 +home+Cus"in+6ilea G2 <ov 0> 13230 +home+Cus"in+6ilea

A ! %asic Sys"em Adminis"ra"ion

600

A ! Securi"y
Type in e:i", "o ge" bac5 "o user Cus"in2, and "hen a""emp" "o e:ecu"e "ha" shell scrip" again7 <o, "he e:ecu"ion a""emp" ,ill succeed7
I e)it Y id uidQ2GG?Cus"in2A gidQ1?s"a66A Y ls .l *h$me* ustin*5ilea 8r,:r8:r,8 1 Cus"in s"a66 Y *h$me* ustin*5ilea .ello SHELL SCRIP P!"SES #$R HREE SEC$N%S This is a simple shell scrip" in ;ni: Y G2 <ov 0> 13230 +home+Cus"in+6ilea

A ! %asic Sys"em Adminis"ra"ion

601

A ! Securi"y
The umas5 de"ermines ,ha" "he de6aul" permissions o6 a 6ile and+or direc"ory ,ill be in ;ni:7 )hen you crea"e a 6ile, i"Bs de6aul" permission is r, 6or "he o,ner, r only 6or "he group, and r only 6or everyone else+,orld7 $e"urn "o user Cus"in2
Y id uidQ203?Cus"inA gidQ20E?dbaA groupsQ1?s"a66A Y cd Y p/d +home+Cus"in Y t$uch 5iled Y ls .l 5iled 8r,8r88r88 1 Cus"in dba Y

0 <ov 20 13243 6iled

A ! %asic Sys"em Adminis"ra"ion

602

A ! Securi"y
)hen you crea"e a direc"ory, i"Bs de6aul" permission is r,: 6or "he o,ner, r: only 6or "he group, and r: only 6or everyone else+,orld7
Y m8dir dird Y ls .ld dird dr,:r8:r8: 2 Cus"in dba Y

24> <ov 20 13244 dird

Chec5 "he curren" umas5 value7 The 6ollo,ing umas5 value is "he de6aul" 6or all users2
Y umas8 022 Y

A ! %asic Sys"em Adminis"ra"ion

603

A ! Securi"y
Change "he umas5 so all subseMuen" 6iles, and direc"ories crea"ed in "his userBs shell ,ill by de6aul" have read permission only 6or "he user permission group, ,ri"e permission only 6or "he group permission group, and read, ,ri"e only 6or "he o"her+,orld permission group2
Y umas8 u?r9#?/9$?r/ Y umas8 0341 Y umas8 .7 uQr,gQ,,oQr, Y t$uch 5ilee Y ls .l 5ilee 8r888,8r,8 1 Cus"in dba Y m8dir dire Y ls .ld dire dr888,8r,8 2 Cus"in dba Y

0 <ov 20 1E222 6ilee

24> <ov 20 1E222 dire

A ! %asic Sys"em Adminis"ra"ion

604

A ! Securi"y
Y id uidQ203?Cus"inA gidQ20E?dbaA groupsQ1?s"a66A Y umas8 0341

Go "o "he user Cus"in2Bs ,indo, and chec5 "he umas57 <o"ice ho, i" is "he de6aul" ;ni: umas5 value, 0227 Tha" is because "he umas5 se""ing is per user shell session2
Y id uidQ20E?Cus"in2A gidQ1?s"a66A Y umas8 022 Y t$uch 5ilee Y ls .l 5ilee 8r,8r88r88 1 Cus"in2 s"a66 Y m8dir dire Y ls .ld dire dr,:r8:r8: 2 Cus"in2 s"a66 Y

0 <ov 20 1E22G 6ilee

24> <ov 20 1E22G dire

A ! %asic Sys"em Adminis"ra"ion

605

A ! Securi"y
$emain in "he user Cus"in2Bs ,indo,7 Le"Bs discuss "he umas5 number2
Y umas8 022 Y

The umas5 command ,or5s ,i"h numbers Cus" as "he chmod command does, as ,e have seen earlier, bu" "he di66erence is "he umas5 command ac"ually sub"rac"s "he numbers 6rom D 0 *very permission se" ?r,:A7 De6aul" umas52 K/ner: '(r/)) 0 ? r/) 4(r)?$n9 /(2)?$n9 )(1)?$n ) 5$r direct$ries $nlH% &r$up: '(r/)) 2 ? 5 4(r)?$n9 /(2)?$559 )(1)?$n ) 5$r direct$ries $nlH% Kther: '(r/)) 2 ? 5 4(r)?$n9 /(2)?$559 )(1)?$n ) 5$r direct$ries $nlH%
A ! %asic Sys"em Adminis"ra"ion 606

A ! Securi"y
Go bac5 "o "he Cus"in userBs ,indo,
Y id uidQ203?Cus"inA gidQ20E?dbaA groupsQ1?s"a66A Y umas8 0341 Y

K/ner: '(r/)) 3 ? 4(r) 4(r)?$n9 /(2)?$559 )(1)?$55 ) 5$r direct$ries $nlH% &r$up: '(r/)) 5 ? 2(/) 4(r)?$559 /(2)?$n9 )(1)?$55 ) 5$r direct$ries $nlH% Kther: '(r/)) 1 ? 6 4(r)?$n9 /(2)?$n9 )(1)?$55 ) 5$r direct$ries $nlH%

A ! %asic Sys"em Adminis"ra"ion

60'

A ! Securi"y
Y umas8 0341 Y ls 8l 6ilee 8r.../.r/. 1 Cus"in dba Y ls .ld dire dr.../.r/. 2 Cus"in dba Y
Direc"ory9 $ead9

0 <ov 20 1E222 6ilee 24> <ov 20 1E222 dire


)ri"e9 *:ecu"e9 $ead9 )ri"e9 *:ecu"e9 $ead9 )ri"e9 *:ecu"e9

&wner

Gro3p

&t#er

,hec8 H$ur su!tracti$n /ith additi$n: IQE]0]0QE]3QD &Q0]2]0Q2]4QD KQE]2]0Q>]1QD


A ! %asic Sys"em Adminis"ra"ion 608

A ! Securi"y
(ne more e:ample, se" "he umas5 "o 442 0 D84 Q 2?,A, D84 Q 2?,A, D82 Q 4?r:A2
Y umas8 552 Y umas8 0442 Y umas8 .7 uQ,,gQ,,oQr: Y t$uch 5ile5 Y ls .l 5ile5 88,88,8r88 1 Cus"in dba Y m8dir dir5 Y ls .ld dir5 d8,88,8r8: 2 Cus"in dba Y

0 <ov 20 14220 6ile6

24> <ov 20 14220 dir6

The e:ecu"e permission is never se" 6or a 6ile by de6aul", and i" is se" 6or a direc"ory7
A ! %asic Sys"em Adminis"ra"ion 609

A ! So6",are &anagemen"

A ! %asic Sys"em Adminis"ra"ion

610

So6",are &anagemen"
A ! delivers opera"ing sys"em 6i:es, and ne, 6ea"ures and hard,are suppor" in so6",are pac5ages 5no,n as pa"ches7 An A ! Technology Level, 6ormally 5no,n as &ain"enance Levels, provide suppor" 6or ne, 6ea"ures and hard,are7 They are released ",ice a year, and are suppor"ed 6or ",o years by %&7 Technology Levels are cumula"ive, and also con"ain pas" Service pac5s7 An A ! Service 'ac5 provides 6i:es "o A ! opera"ing sys"em problems7 " is used "o address problems be",een Technology Levels7 Service pac5s are cumula"ive7 A'A$s 0 Au"horiFed 'rogram Analysis $epor"7 s a repor" o6 an opera"ing sys"em problem ei"her discovered by cus"omers in "he 6ield, or by %& developmen" "hemselves7 A'A$s are ,rapped up in Service pac5s, ,hich are ,rapped up in Technology Levels, ,hich are ul"ima"ely ,rapped in up ne,er A ! versions, and levels7 'T/s Q 'rogram Temporary /i:es are ,ha" you do,nload be",een service pac5s "o 6i: 5no,n problems ,i"h "he opera"ing sys"em ,hich may a66ec" a large number o6 cus"omers 0 i7e7 problem is ,i"h base code o6 A !7 e8/i:es, are usually developed by %& 6or a par"icular cus"omer7 They usually donB" address common problems7 6 "hey do, "hey are usually emergency 6i:es ,hich canB" ,ai" 6or service pac5s, li5e securi"y advisories, e"c77 The A ! ins"6i: command is used "o ins"all A'A$s, 6i:es, in A !7 The A ! ins"allp command is used "o ins"all %&, and %& suppor"ed so6",are 6orma", L'', in A !7

A ! %asic Sys"em Adminis"ra"ion

611

So6",are &anagemen"
These A ! opera"ing sys"em 6i:es can be ob"ained 6rom "he %& A ! /i: Cen"ral ,eb si"e, and you can use ei"her /T', or a #ava apple" "o do,nload "hem7

A ! %asic Sys"em Adminis"ra"ion

612

So6",are &anagemen"
So6",are ,hich is dis"ribu"ed in L'' 6orma" 0 Licensed 'rogram 'roduc", are ins"alled ,i"h "he ins"allp command, or smi""y ins"allp 6as" pa"h7 Go"o a direc"ory ,here have s"aged some so6",are, 6or "his class7 "Bs in a s"andard loca"ion 6or s"aging so6",are on A ! sys"ems a" +usr+sys+ins"7images
I cd *usr*sHs*inst%ima#es I smittH installp

A ! %asic Sys"em Adminis"ra"ion

613

So6",are &anagemen"
Type in a 7 , do", here7 This ,ill represen" "he curren" direc"ory you ,ere in ,hen you s"ar"ed smi""y7 Typically "he so6",are ,ould be on removable so6",are such as a cd7 n "ha" case you ,ould "ype in cd07

A ! %asic Sys"em Adminis"ra"ion

614

So6",are &anagemen"
'ress W/EX over "he S(/T)A$* "o ins"all 6ield, "o genera"e a pic5 lis" o6 so6",are, L''s, on "he ins"alla"ion media, "his case "he direc"ory available "o be ins"alled7 &ove do,n "o a so6",are pac5age ,e ,an" "o ins"all7 This one is called "ivoli7"sm7devices7ai:47r"e7 The ] sign ne:" "o "he 6ilese" indica"es i" is no" ins"alled, a _ sign ne:" "o "he 6ilese" ,ould indica"e "ha" i" is ins"alled7 'ress W/DX ,hen you have "he 6ilese" highligh"ed you ,an" "o ins"all7

A ! %asic Sys"em Adminis"ra"ion

615

So6",are &anagemen"
Hou should selec" a 'revie, 6irs"7 This ,onB" ac"ually ins"all "he so6",are7 This ,ill go "hrough a non8in"rusive "es" run "o "es" i6 "here are any problems, such as missing pre8reMs, e"c77

A ! %asic Sys"em Adminis"ra"ion

616

So6",are &anagemen"
DonB" 6orge" "he accep" "he license agreemen"7

A ! %asic Sys"em Adminis"ra"ion

61'

So6",are &anagemen"
(nce "he previe, goes "hrough o5, "hen press W/3X "o move bac5 "o "he previous smi" menu7

A ! %asic Sys"em Adminis"ra"ion

618

So6",are &anagemen"
<o,, change "he previe, "o no, and hi" en"er again "o ins"all "he so6",are 6or real "his "ime7

A ! %asic Sys"em Adminis"ra"ion

619

So6",are &anagemen"
)hen i"Bs done ins"alling hi" W/10X "o e:i" smi""y, and "hen le"Bs veri6y "he so6",are is no, ins"alled on "he sys"em ,i"h an lslpp command7

A ! %asic Sys"em Adminis"ra"ion

620

So6",are &anagemen"
I installp ., ins"allp2 <o 6ilese"s ,ere 6ound in "he So6",are -i"al 'roduc" Da"abase "ha" could be cleaned up7 I lppch8 .( I lslpp .l ti($li%tsm%de(ices%ai)5%rte /ilese" Level S"a"e Descrip"ion 8888888888888888888888888888888888888888888888888888888888888888888888888888 'a"h2 +usr+lib+obCrepos "ivoli7"sm7devices7ai:47r"e 4737070 C(&& TT*D %& Tivoli S"orage &anager Device Suppor" run"ime 'a"h2 +e"c+obCrepos "ivoli7"sm7devices7ai:47r"e 4737070 C(&& TT*D %& Tivoli S"orage &anager Device Suppor" run"ime I

A ! %asic Sys"em Adminis"ra"ion

621

So6",are &anagemen"
6 you ,an"ed "o learn "he da"e, and "ime a 6ilese" ,as ins"alled, use "he 0h op"ion "o "he lslpp command7
I date Sa" Sep 12 1>232222 CDT 2001 I lslpp .h ti($li%tsm%de(ices%ai)5%rte /ilese" Level Ac"ion S"a"us Da"e Time 8888888888888888888888888888888888888888888888888888888888888888888888888888 'a"h2 +usr+lib+obCrepos "ivoli7"sm7devices7ai:47r"e 4737070 C(&& T C(&'L*T* 01+12+01 1>22124G 'a"h2 +e"c+obCrepos "ivoli7"sm7devices7ai:47r"e 4737070 C(&& T I

C(&'L*T*

01+12+01

1>221241

A ! %asic Sys"em Adminis"ra"ion

622

So6",are &anagemen"
All 6ilese"s have levels re6erred "o as -7$7&7LR -ersion $elease &odi6ica"ion Level7 6 ,e ,an"ed "o upgrade "ha" "ivoli7"sm7devices7ai:47r"e level 6rom 4737070, ,hich is i"Bs base "o 473737277 )e could ins"all ,i"h an A''LH op"ion7 )ha" "his op"ion ,ill do is i" ,ill ins"all "he ne, level, 4737372, bu" save a copy o6 "he old level 47370707 This ,ill give "he users, some "ime "o "es" and veri6y "ha" "he upgrade did no" brea5 any"hing7 (nce "hey con6irm "hem you can C(&& T "he upgrade7 <o"e, i6 "here ,as a problem ,i"h "he upgrade and you have "o go bac5 "o "he base, "hen you ,ould per6orm a $*#*CT o6 "he 4737372 level, "o rever" bac5 "o "he 4737070 base level7 <o"e, once a level is C(&& TT*D i" canno" be $*#*CT*D7

A ! %asic Sys"em Adminis"ra"ion

623

So6",are &anagemen"
To deins"all so6",are 6rom "he sys"em7 Go bac5 in"o smi""y ,i"h "he ins"all 6as"pa"h li5e so7
I smittH install

A ! %asic Sys"em Adminis"ra"ion

624

So6",are &anagemen"

A ! %asic Sys"em Adminis"ra"ion

625

So6",are &anagemen"
.i" W/EX "o genera"e a pic5 lis" o6 6ilese"s ,hich are curren"ly ins"alled on "he sys"em, ,hich you could selec" "o de8ins"all7

A ! %asic Sys"em Adminis"ra"ion

626

So6",are &anagemen"
;se "he + 5ey "o bring up a search bo:7 Type in "ivoli7"sm7devices as our search s"ring7

A ! %asic Sys"em Adminis"ra"ion

62'

So6",are &anagemen"
'ress W/DX "o selec" i" 6or de8ins"alla"ion7

A ! %asic Sys"em Adminis"ra"ion

628

So6",are &anagemen"
Hou could also do a previe, only 6or "he deins"all Cus" as you could 6or "he ins"all7 Change "ha" "o no 6or "his lab7 Also selec" $*&(-* dependen" so6",are ,as ,ell7

A ! %asic Sys"em Adminis"ra"ion

629

So6",are &anagemen"
'ress W*<T*$X "o deins"all "he so6",are7

A ! %asic Sys"em Adminis"ra"ion

630

So6",are &anagemen"
<o,, an lslpp command ,ill veri6y "ha" "he 6ilese" has been deins"alled7

I installp ., ins"allp2 <o 6ilese"s ,ere 6ound in "he So6",are -i"al 'roduc" Da"abase "ha" could be cleaned up7 I lppch8 .( I lslpp .l ti($li%tsm%de(ices%ai)5%rte lslpp2 /ilese" "ivoli7"sm7devices7ai:47r"e no" ins"alled7 I

A ! %asic Sys"em Adminis"ra"ion

631

A ! Sys"em 'er6ormance Tuning

A ! %asic Sys"em Adminis"ra"ion

632

A ! Sys"em 'er6ormance Tuning


%y A ! %(S ins"alla"ion de6aul" A ! is "uned 6or a mi:ed ,or5load7 There are si: maCor subsys"ems in A ! ,hen i" comes "o per6ormance2 17 Dis5 +( 27 &emory 0 -ir"ual memory 37 $AS 0 $eliabili"y, Availabili"y, Serviceabili"y7 E7 <e",or5ing 47 </S >7 'rocessor+C';

A ! %asic Sys"em Adminis"ra"ion

633

A ! Sys"em 'er6ormance Tuning


There are a number o6 commands and moni"oring "ools available in A ! 6or per6ormance moni"oring and "uning7 8 vms"a" Q 'er6ormance coun"er command presen"ing an overall vie, o6 sys"em per6ormance 6rom a C'; and memory perspec"ive7 %asic s"a"is"ics2
I (mstat 1 3 Sys"em con6igura"ion2 lcpuQ2 memQ102E&% en"Q0710 5"hr memory page 6aul"s cpu 88888 88888888888 888888888888888888888888 888888888888 88888888888888888888888 r b avm 6re re pi po 6r sr cy in sy cs us sy id ,a pc 3 0 1>GE>0 E1D11 0 0 0 0 0 0 2 303 E00 2 4 1E 0 3 0 1>GE>0 E1D11 0 0 0 0 0 0 1 1>> 3G2 0 3 1> 0 3 0 1>GE>0 E1D11 0 0 0 0 0 0 2 1D1 3G> 1 3 1D 0 I

ec 0701 171 0701 >7> 0701 >71

A ! %asic Sys"em Adminis"ra"ion

634

A ! Sys"em 'er6ormance Tuning


The Sar, Sys"em Ac"ivi"y $epor", is a "ool ,hich concen"ra"es on C';+processor s"a"is"ics2
I sar 1 3 A ! gvicai:nim01 1 > 000212D2DD00 12+03+10

Sys"em con6igura"ion2 lcpuQ2 en"Q0710 modeQ;ncapped 102E>22> 102E>22D 102E>22G 102E>221 Average I ^usr 1 1 2 1 ^sys ^,io ^idle physc ^en"c 4 0 1E 0701 17> 3 0 1> 0701 >7E E 0 1E 0701 G7D E 0 14 0701 G72

A ! %asic Sys"em Adminis"ra"ion

635

A ! Sys"em 'er6ormance Tuning


/or ne",or5ing2
I netstat 1 inpu" ?en0A ou"pu" inpu" ?To"alA ou"pu" pac5e"s errs pac5e"s errs colls pac5e"s errs pac5e"s errs colls 33G2 0 1>34 0 0 EDG2 0 3034 0 0 2 0 1 0 0 2 0 1 0 0 1 0 1 0 0 1 0 1 0 0 2 0 2 0 0 2 0 2 0 0 ^,I

Con"rol]C "o s"op "he coun"er7

A ! %asic Sys"em Adminis"ra"ion

636

A ! Sys"em 'er6ormance Tuning


&emory usage s"a"is"ics2
I s(m$n memory pg space pin in use siFe inuse 6ree 2>21EE 220G32 1310D2 1324 ,or5 pers 44231 0 1>G>>> 0 pin vir"ual mmode E1312 >4G22 1>G>>> Ded

cln" o"her 0 10411 421>>

'ageSiFe 'oolSiFe inuse pgsp pin vir"ual s E @% 8 1E31GE 1324 22>3G 11G1G m >E @% 8 EG03 0 2>11 EG03 I

A ! %asic Sys"em Adminis"ra"ion

63'

A ! Sys"em 'er6ormance Tuning


There is a program called Topas, ,hich is a good overall per6ormance "ool2
I t$pas

A ! %asic Sys"em Adminis"ra"ion

638

A ! Sys"em 'er6ormance Tuning


The <&(< "ool is also a per6ormance "ool ,hich comes ,i"h A !7
I nm$n

A ! %asic Sys"em Adminis"ra"ion

639

A ! Sys"em 'er6ormance Tuning


F

A ! %asic Sys"em Adminis"ra"ion

640

A ! Sys"em 'er6ormance Tuning


Type p 6or real"ime L'A$ C'; s"a"s2

A ! %asic Sys"em Adminis"ra"ion

641

A ! Sys"em 'er6ormance Tuning


To vie, s"andard per6ormance "uning parame"ers 6or "he sys"emBs memory subsys"em2
I (m$ .a ameNcpusNperNpool Q n+a ameNma:6reeNmem Q n+a ameNminNucpoolNsiFe Q n+a ameNmin6reeNmem Q n+a amsNloanNpolicy Q n+a enhancedNa66ini"yNa66inN"ime Q 1 enhancedNa66ini"yNvmpoolNlimi" Q 10 6orceNrelaliasNli"e Q 0 5ernelNheapNpsiFe Q >443> lgpgNregions Q 0 lgpgNsiFe Q 0 lo,NpsNhandling Q 1 ma:6ree Q 10GG ma:perm Q 21E120 ma:pin Q 211GE3 ma:pin^ Q G0 memoryN6rames Q 2>21EE memplaceNda"a Q 2 memplaceNmappedN6ile Q 2 memplaceNshmNanonymous Q 2 memplaceNshmNnamed Q 2 memplaceNs"ac5 Q 2 memplaceN"e:" Q 2 memplaceNunmappedN6ile Q

A ! %asic Sys"em Adminis"ra"ion

642

A ! Sys"em 'er6ormance Tuning


To vie, s"andard per6ormance "uning parame"ers 6or "he sys"emBs dis5 0 +( subsys"em2
I i$$ .a aioNac"ive Q 0 aioNma:reMs Q >443> aioNma:servers Q 30 aioNminservers Q 3 aioNserverNinac"ivi"y Q 300 C2Na"ime;pda"eSymlin5 Q 0 C2Ndynamic%u66er'realloca"ion Q 1> C2NinodeCacheSiFe Q E00 C2Nma:'age$eadAhead Q 12G C2Nma:$andom)ri"e Q 0 C2Nme"ada"aCacheSiFe Q E00 C2Nmin'age$eadAhead Q 2 C2Nn'ages'er)ri"e%ehindClus"er Q 32 C2Nn$andomClus"er Q 0 C2Nsync'ageCoun" Q 0 C2Nsync'ageLimi" Q 1> lvmNbu6cn" Q 1 ma:pgahead Q G ma:rand,r" Q 0 numclus" Q 1 num6sbu6s Q 11> pdNnpages Q >443> posi:NaioNac"ive Q 0 R

A ! %asic Sys"em Adminis"ra"ion

643

A ! Sys"em 'er6ormance Tuning


To vie, s"andard per6ormance "uning parame"ers 6or "he sys"emBs C';+processor subsys"em2
I sched$ .a a66ini"yNlim Q D bigN"ic5NsiFe Q 1 dedNcpuNdona"eN"hresh Q G0 6i:edNpriNglobal Q 0 6orceNgrM Q 0 ma:spin Q 1>3GE pace6or5 Q 10 procNdis5Ns"a"s Q 1 schedND Q 1> schedN$ Q 1> "bNbalanceNS0 Q 2 "bNbalanceNS1 Q 2 "bN"hreshold Q 100 "imeslice Q 1 vpmN6oldNpolicy Q 1 vpmN:vcpus Q 0 I

A ! %asic Sys"em Adminis"ra"ion

644

A ! Sys"em 'er6ormance Tuning


To vie, s"andard per6ormance "uning parame"ers 6or "he sys"emBs ne",or5ing subsys"em2
I n$ .a arpMsiFe Q 12 arp"N5illc Q 20 arp"abNbsiF Q D arp"abNnb Q 1E1 bcas"ping Q 0 cleanNpar"ialNconns Q 0 delayac5 Q 0 delayac5por"s Q [\ dgdNpac5e"sNlos" Q 3 dgdNpingN"ime Q 4 dgdNre"ryN"ime Q 4 direc"edNbroadcas" Q 0 6as""imo Q 200 icmp>NerrmsgNra"e Q 10 icmpaddressmas5 Q 0 ie4NoldNmul"icas"Nmapping Q 0 i6siFe Q 24> igmpv2Ndeliver Q 0 ip>Nde6""l Q >E ip>Nprune Q 1 ip>6or,arding Q 0 ip>srcrou"e6or,ard Q 1 R

A ! %asic Sys"em Adminis"ra"ion

645

A ! Sys"em 'er6ormance Tuning


To vie, s"andard per6ormance "uning parame"ers 6or "he sys"emBs </S, <e",or5 /ile Sys"em subsys"em2
I n5s$ .a clien"Ndelega"ion Q 1 n6sNma:NreadNsiFe Q >443> n6sNma:N,ri"eNsiFe Q >443> n6sNr6c1323 Q 1 n6sNsecuren6sNau"h"imeou" Q 0 n6sNserverNbaseNpriori"y Q 0 n6sNserverNclread Q 1 n6sNuseNreservedNpor"s Q 0 n6sNv3NserverNreaddirplus Q 1 n6sNvEN6ailNoverN"imeou" Q 0 por"chec5 Q 0 serverNdelega"ion Q 1 u"6GNvalida"ion Q 1 I

A ! %asic Sys"em Adminis"ra"ion

646

A ! Sys"em 'er6ormance Tuning


To vie, s"andard per6ormance "uning parame"ers 6or "he sys"emBs $AS, $eliabili"y Availabili"y and Service2

I ras$ .a bios"a" Q 0 5ernNheapNnoe:ec Q 0 5ernelNnoe:ec Q 1 mbu6NheapNnoe:ec Q 0 m"rcNcommonbu6siFe Q 4ED m"rcNenabled Q 1 m"rcNrarebu6siFe Q 2D "pro6NcycNmul" Q 1 "pro6Nev"Nmul" Q 1 "pro6Nev"Nsys"em Q 1 "pro6Nins"N"hreshold Q 1000 I

A ! %asic Sys"em Adminis"ra"ion

64'

A ! Sys"em 'er6ormance Tuning


Change "he -&( parame"er ma:6ree2
I (m$ .$ ma)5ree ma:6ree Q 10GG I (m$ .$ ma)5ree?2000 Se""ing ma:6ree "o 2000 I (m$ .$ ma)5ree ma:6ree Q 2000 I <o, reboo" "he sys"em2 I shutd$/n .;r S.;TD()< '$(G$A& Sa" Sep 4 1D20D2EG *DT 2001 )ai" 6or T$eboo"ing777T be6ore s"opping7 *rror logging s"opped777 Advanced Accoun"ing has s"opped777 'rocess accoun"ing s"opped777 S"opping </S+< S Daemons 0413800E The Subsys"em or Group, n6sd, is curren"ly inopera"ive7 041380EE The biod Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7loc5d Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7s"a"d Subsys"em ,as reMues"ed "o s"op7 0413800E The Subsys"em or Group, gssd, is curren"ly inopera"ive7 0413800E The Subsys"em or Group, n6srgyd, is curren"ly inopera"ive7 R

A ! %asic Sys"em Adminis"ra"ion

648

A ! Sys"em 'er6ormance Tuning


)hen "he sys"em comes bac5 up a6"er reboo" chec5 "ha" parame"er2
I uptime 1020DA& up 1 min, 1 user, load average2 172E, 0721, 0710 I (m$ .$ ma)5ree ma:6ree Q 10GG I

<o"ice ho, i" rever"ed bac5 "o i"Bs de6aul" value 10GG, ra"her "han 5eep "he modi6ied value o6 2000 persis"en"7 Change i" again2
I (m$ .$ ma)5ree?2000 Se""ing ma:6ree "o 2000 I vmo 8L ma:6ree <A&* C;$ D*/ %((T & < &A! ;< T D*'*<D*<C *S 88888888888888888888888888888888888888888888888888888888888888888888888888888888 ma:6ree 2000 10GG 10GG 1> 201D14 E@% pages min6ree memoryN6rames 88888888888888888888888888888888888888888888888888888888888888888888888888888888 I TH'* D

Loo5 a" "he %((T value, ,e much change "ha" "o 20007
A ! %asic Sys"em Adminis"ra"ion 649

A ! Sys"em 'er6ormance Tuning


To change "his parame"er so i" is persis"en" across all subseMuen" sys"em reboo"s, you use "he 8p op"ion ,hen se""ing i"2
I (m$ .p$ ma)5ree?2000 Se""ing ma:6ree "o 2000 in ne:"boo" 6ile Se""ing ma:6ree "o 2000 I (m$ .M ma)5ree <A&* C;$ D*/ %((T & < &A! ;< T D*'*<D*<C *S 88888888888888888888888888888888888888888888888888888888888888888888888888888888 ma:6ree 2000 10GG 2000 1> 201D14 E@% pages min6ree memoryN6rames 88888888888888888888888888888888888888888888888888888888888888888888888888888888 I

TH'* D

As you can see i" says i" appended "his value "o "he ne:"boo" 6ile7 The 6ile i" is re6erring "o is a 6ile in "he direc"ory +e"c+"unables7 There are "hree con6igura"ion 6iles in "ha" direc"ory ,hich allo, you "o se" "hese per6ormance parame"ers "o non8de6aul" values upon all subseMuen" sys"em reboo"s7

A ! %asic Sys"em Adminis"ra"ion

650

A ! Sys"em 'er6ormance Tuning


'er6ormance parame"ers con6igura"ion 6iles2
I cd *etc*tuna!les I p/d +e"c+"unables I ls .l "o"al 4> 8r,8r,8r88 1 roo" sys"em 8r,8r88r88 1 roo" sys"em 8r,8r88r88 1 roo" sys"em I

1G140 Dec 03 1020> las"boo" E33 Dec 03 1020> las"boo"7log E3D Dec 03 10210 ne:"boo"

I tail ne)t!$$t I C('H$ G.T n"erna"ional %usiness &achines Corp7 2002 I All $igh"s $eserved I I ;S Governmen" ;sers $es"ric"ed $igh"s 8 ;se, duplica"ion or I disclosure res"ric"ed by GSA AD' Schedule Con"rac" ,i"h %& Corp7 I I %&N'$(L(GN*<DNTAG (m$: ma)5ree ? B2000B

A ! %asic Sys"em Adminis"ra"ion

651

A ! Sys"em 'er6ormance Tuning


$eboo" "he sys"em again2
I shutd$/n .;r S.;TD()< '$(G$A& Sa" Sep 4 1D20D2EG *DT 2001 )ai" 6or T$eboo"ing777T be6ore s"opping7 *rror logging s"opped777 Advanced Accoun"ing has s"opped777 'rocess accoun"ing s"opped777 S"opping </S+< S Daemons 0413800E The Subsys"em or Group, n6sd, is curren"ly inopera"ive7 041380EE The biod Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7loc5d Subsys"em ,as reMues"ed "o s"op7 041380EE The rpc7s"a"d Subsys"em ,as reMues"ed "o s"op7 0413800E The Subsys"em or Group, gssd, is curren"ly inopera"ive7 0413800E The Subsys"em or Group, n6srgyd, is curren"ly inopera"ive7 R

A ! %asic Sys"em Adminis"ra"ion

652

A ! Sys"em 'er6ormance Tuning


A6"er "he sys"em comes bac5 up 6rom i"Bs reboo" you ,ill see "he per6ormance parame"er has remained2
I uptime 1021>A& up 1 min, 1 user, load average2 17ED, 0734, 0712 I (m$ .$ ma)5ree ma:6ree Q 2000 I cd *etc*tuna!les I p/d +e"c+"unables I ls .l "o"al 4> 8r,8r,8r88 1 roo" 8r,8r88r88 1 roo" 8r,8r88r88 1 roo" I

sys"em sys"em sys"em

1G111 Dec 03 10214 las"boo" E4D Dec 03 10214 las"boo"7log E3D Dec 03 10210 ne:"boo"

8 The las"boo" 6ile provides a bac5up o6 ho, your "uning per6ormance parame"ers loo5ed prior "o your change7 8 The las"boo"7log 6ile provides a log o6 ,ha" ,as changed 6rom a per6ormance "uning parame"er perspec"ive during las" sys"em reboo"7
A ! %asic Sys"em Adminis"ra"ion 653

A ! Sys"em 'er6ormance Tuning


There are o"her per6ormance parame"ers 5no,n as res"ric"ed "unables, "hey should only be "uned under "he ins"ruc"ion o6 %& A ! "echnical suppor"7
I (m$ .a; ameNcpusNperNpool Q n+a ameNma:6reeNmem Q n+a ameNminNucpoolNsiFe Q n+a ameNmin6reeNmem Q n+a amsNloanNpolicy Q n+a enhancedNa66ini"yNa66inN"ime Q 1 enhancedNa66ini"yNvmpoolNlimi" Q 10 6orceNrelaliasNli"e Q 0 5ernelNheapNpsiFe Q >443> lgpgNregions Q 0 lgpgNsiFe Q 0 R7 GGRestricted tuna!les ameNsysNmemvie, Q n+a cpuNscaleNmemp Q G da"aNs"aggerNin"erval Q 1>1 de6ps Q 1 enhancedNa66ini"yNa""achNlimi" Q 100 enhancedNa66ini"yNbalance Q 100 enhancedNa66ini"yNpriva"e Q E0 enhancedNmemoryNa66ini"y Q 0 esidNalloca"or Q 0 R

A ! %asic Sys"em Adminis"ra"ion

654

A ! Sys"em 'er6ormance Tuning


I i$$ .a; aioNac"ive Q 0 aioNma:reMs Q >443> aioNma:servers Q 30 aioNminservers Q 3 aioNserverNinac"ivi"y Q 300 C2Na"ime;pda"eSymlin5 Q 0 C2Ndynamic%u66er'realloca"ion Q 1> C2NinodeCacheSiFe Q E00 C2Nma:'age$eadAhead Q 12G C2Nma:$andom)ri"e Q 0 R GGRestricted tuna!les aioN6as"pa"h Q 1 aioN6s6as"pa"h Q 1 aioN5procprio Q 31 aioNmul"i"idsusp Q 1 aioNsampleNra"e Q 4 aioNsamplesNperNcycle Q > C2Nma:;sable&a:Trans6er Q 412 C2Nn%u66er'er'agerDevice Q 412 R

A ! %asic Sys"em Adminis"ra"ion

655

A ! Sys"em 'er6ormance Tuning


I sched$ .a; a66ini"yNlim Q D bigN"ic5NsiFe Q 1 dedNcpuNdona"eN"hresh Q G0 6i:edNpriNglobal Q 0 6orceNgrM Q 0 ma:spin Q 1>3GE pace6or5 Q 10 procNdis5Ns"a"s Q 1 schedND Q 1> schedN$ Q 1> "bNbalanceNS0 Q 2 "bNbalanceNS1 Q 2 "bN"hreshold Q 100 "imeslice Q 1 vpmN6oldNpolicy Q 1 vpmN:vcpus Q 0 IIRestricted tuna!les ^usDel"a Q 100 allo,&C&migra"e Q 0 cl5N"ransi"ion Q 12 6as"Nloc5s Q n+a ho"loc5sNenable Q 0 idleNmigra"ionNbarrier Q E in"rNs"ealing Q 0 R

A ! %asic Sys"em Adminis"ra"ion

656

A ! Sys"em 'er6ormance Tuning


I n$ .a; arpMsiFe Q 12 arp"N5illc Q 20 arp"abNbsiF Q D arp"abNnb Q 1E1 bcas"ping Q 0 cleanNpar"ialNconns Q 0 delayac5 Q 0 delayac5por"s Q [\ dgdNpac5e"sNlos" Q 3 dgdNpingN"ime Q 4 dgdNre"ryN"ime Q 4 R GGRestricted tuna!les e:"endedne"s"a"s Q 0 ine"Ns"ac5NsiFe Q 1> ne"NmallocNpolice Q 1>3GE ne"mNa66ini"y Q 0 psein"rs"ac5 Q 2E4D> useNisno Q 1 R

A ! %asic Sys"em Adminis"ra"ion

65'

A ! Sys"em 'er6ormance Tuning


I ras$ .a; bios"a" Q 0 5ernNheapNnoe:ec Q 0 5ernelNnoe:ec Q 1 mbu6NheapNnoe:ec Q 0 m"rcNcommonbu6siFe Q 4ED m"rcNenabled Q 1 m"rcNrarebu6siFe Q 2D "pro6NcycNmul" Q 1 "pro6Nev"Nmul" Q 1 "pro6Nev"Nsys"em Q 1 "pro6Nins"N"hreshold Q 1000 GGRestricted tuna!les recoveryNac"ion Q 1 recoveryNaverageN"hreshold Q 4 recoveryNdebugger Q 0 recoveryN6rame,or5 Q 0 I

A ! %asic Sys"em Adminis"ra"ion

658

A ! Sys"em 'er6ormance Tuning


I n5s$ .a; clien"Ndelega"ion Q 1 n6sNma:NreadNsiFe Q >443> n6sNma:N,ri"eNsiFe Q >443> n6sNr6c1323 Q 1 n6sNsecuren6sNau"h"imeou" Q 0 n6sNserverNbaseNpriori"y Q 0 n6sNserverNclread Q 1 n6sNuseNreservedNpor"s Q 0 n6sNv3NserverNreaddirplus Q 1 n6sNvEN6ailNoverN"imeou" Q 0 por"chec5 Q 0 serverNdelega"ion Q 1 u"6GNvalida"ion Q 1 II$es"ric"ed "unables loc5dNdebugNlevel Q 0 n6sNallo,NallNsignals Q 0 n6sNau"oNrbrN"rigger Q 0 n6sNdynamicNre"rans Q 1 n6sNga"herN"hreshold Q E01> n6sNiopaceNpages Q 0 n6sNma:N"hreads Q 3G11 n6sNrepea"Nmessages Q 0

A ! %asic Sys"em Adminis"ra"ion

659

A ! Sys"em 'er6ormance Tuning


Hou can modi6y sys"em per6ormance "uning parame"ers via "he Smi" in"er6ace as ,ell as command line7
I smittH tunin#

A ! %asic Sys"em Adminis"ra"ion

660

A ! Sys"em 'er6ormance Tuning

A ! %asic Sys"em Adminis"ra"ion

661

A ! Sys"em 'er6ormance Tuning

&'10(
A ! %asic Sys"em Adminis"ra"ion 662

A ! Sys"em 'er6ormance Tuning


To ge" "o "he smi" in"er6ace o6 "he res"ric"ed "unable parame"ers2
I smittH tunin#1e(

A ! %asic Sys"em Adminis"ra"ion

663

A ! Sys"em 'er6ormance Tuning

A ! %asic Sys"em Adminis"ra"ion

664

A ! Sys"em 'er6ormance Tuning

A ! %asic Sys"em Adminis"ra"ion

665

A ! Sys"em %ac5up and $ecovery

A ! %asic Sys"em Adminis"ra"ion

666

%ac5up o6 Sys"em 8 m5sysb


m5sysb, &a@e SHS"em %ac5up 0 ;"ili"y provided by A ! "o bac5up and res"ore "he opera"ing sys"em %ased on bac5up+res"ore u"ili"y )ri"es "o "ape or ,ri"able cdrom 'rovides a boo"able sys"em image Does no" bac5up o"her, non8roo"vg, volume groups
Savevg and res"vg mus" be run on o"her non8roo"vg volume groups

.as "he abili"y "o per6orm incremen"al level bac5ups7 .as "he abili"y "o per6orm advanced "ape ,ri"ing me"hods7 .as "he abili"y "o bac5up and res"ore ra, logical volumes7

A ! %asic Sys"em Adminis"ra"ion

66'

Sysbac5 0 al"erna"e me"hod


Sysbac5 is a separa"e purchased produc" 'rovides all 6unc"ionali"y o6 m5sysb plus
Can bac5up al"erna"e volume groups ?<on8roo"vg volume groupsA7 Can bac5up "o a remo"e "ape drive Can modi6y and redirec" res"ore "o al"erna"e dis5s or loca"ions 'rovides a "empla"e o6 volume groups so "ha" da"a can be res"ored 6rom ano"her source ? TS& A 'rovides a user in"er6ace "o res"ore individual 6iles 6rom a bac5up

A ! %asic Sys"em Adminis"ra"ion

668

Tivoli S"orage &anager


*n"erprise %ac5up So6",are 0 Server+Clien" ne",or5 so6",are archi"ec"ure7 &i:ed pla"6orm+he"erogenous environmen"s7 *:ecu"es incremen"al 6orever bac5ups 0 ?<o more 6ull bac5upsA7 Trea"s all 6iles as da"a, doesnB" unders"and ho, "o recrea"e 6ilesys"ems, volume groupsR

A ! %asic Sys"em Adminis"ra"ion

669

%& '()*$ Sys"em L'A$s

A ! %asic Sys"em Adminis"ra"ion

6'0

%& Sys"em L'A$s


L'A$ 0 Logical 'ar"i"ion /irs" in"roduced on %&Bs main6rame sys"em pla"6orm years ago 0 &-S7 .ard,are vir"ualiFa"ion *ach L'A$ is i"s o,n copy+image o6 an opera"ing sys"em7 %& '()*$ sys"ems suppor" L'A$s, and each can suppor" "he 6ollo,ing opera"ing sys"ems on "he same physical %& '()*$ sys"em2 8 %& A ! 471 and above7 8 %& i 0 ?'reviously 5no,n as (S+E00A 8 Linu: 0 ?$edha", and <ovell Suse dis"ribu"ionsA 8 $esources such as 'C adap"ers, C';s and memory are alloca"ed on a per L'A$ basis7
A ! %asic Sys"em Adminis"ra"ion 6'1

%& Sys"em L'A$s


*ach L'A$ is independen" o6 one ano"her in Cus" abou" every ,ay7 L'A$s can be reboo"ed, deac"iva"ed, and ac"iva"ed independen"ly o6 one ano"her7 *ach L'A$ can have i"Bs o,n da"e and "ime7 An opera"ing sys"em error, or sys"em crash occurring on one L'A$ ,ill no" a66ec" o"her L'A$s on "he same sys"em7 *very L'A$ on "he sys"em ,ill have "he same serial number, because i" is "he same physical sys"em7 *very L'A$Bs hdis5 '- D, 'hysical -olume Den"i6ier, in A ! ,ill have similar Ds, due "o "he 6ac" "ha" "hey all share "he same physical sys"em 0 serial number7

A ! %asic Sys"em Adminis"ra"ion

6'2

A ! Sys"em L'A$S
There is a special 6irm,are componen" o6 '()*$ sys"ems, all models, 5no,n as "he 'o,er .ypervisor 0 '.H'7 The 'o,er .ypervisor con"rols vir"ualiFa"ion on a '()*$ sys"em7 " is al,ays ac"iva"ed and handles "he separa"ion o6 "he di66eren" L'A$s, as 6ar as resource assignmen"s, e"c7 " also ensures "ha" one L'A$Bs opera"ing sys"em does no" in"er6ere ,i"h "he opera"ing sys"em o6 ano"her L'A$, e"c7 )hen a sys"em 6irs" ships 6rom %&, by de6aul", i"Bs a s"andalone sys"em7 The 'o,er .ypervisor is ac"ive and "here is only one L'A$ ,hich is named a6"er "he serial number o6 "he sys"em i"sel6, and "ha" L'A$ o,ns every resource on "he sys"em, i7e7 memory, C';s, and +( slo"s7 This is 5no,n as a 6ull sys"em par"i"ion7 Hou can alloca"e processors+C';s as a dedica"ed processor, or a shared processor7 <o"e, you need a" leas" "he 'o,er-& e:press edi"ion "o "a5e advan"age o6 microprocessors7 O
A ! %asic Sys"em Adminis"ra"ion 6'3

%& Sys"em L'A$s

A ! %asic Sys"em Adminis"ra"ion

6'4

.&C 0 .ard,are &anagemen" Console


.&C 0 .ard,are &anagemen" Console An appliance rac5 moun"ed, or des5"op :Series 'C, running a loc5ed do,n version o6 "he Linu: opera"ing sys"em, and a proprie"ary #ava based applica"ion 5no,n as "he .ard,are &anagemen" Console7 These are pre8loaded by %& 6ac"ory de6aul"7 '()*$ Sys"ems reMuire an .&C in order "o crea"e, and manage L'A$s7 O )hen a '()*$ sys"em does no" have an .&C a""ached "o i", "ha" sys"em is 5no,n as a s"andalone sys"em7 )hen a '()*$ sys"em has an .&C a""ached "o i", "ha" sys"em is 5no,n as a managed sys"em7

O There are e:cep"ions "o "his s"a"emen"7 'lease re6er "o "he -& 0 n"egra"ed -ir"ualiFa"ion &anager sec"ion 6or de"ails7

A ! %asic Sys"em Adminis"ra"ion

6'5

.&C 0 .ard,are &anagemen" Console


The .&C connec"s "o "he managed sys"em via /le:ible Service 'rocessors 0 ?/S'A7 These are special processors ,hich have a loc5ed do,n, and s"ripped version o6 "he Linu: opera"ing sys"em running on "hem7 The service processor is al,ays running, and is "he con"rol poin" "o "he 6irm,are+mircrocode o6 "he managed sys"em i"sel67 The .&C connec"s "o "he managed sys"em via an in"egra"ed+on8board por" labeled 0 .&C17 Hou can connec" ",o .&Cs "o one managed sys"em 6or redundancy, by connec"ing "he second .&C "o "he second in"egra"ed+on8board por" labeled 0 .&C27 The .&C has an h""ps, secure, user ,eb in"er6ace7 The .&C can connec" "o "he managed sys"em via a priva"e, or public ne",or5 connec"ion7
A ! %asic Sys"em Adminis"ra"ion 6'6

.&C 0 .ard,are &anagemen" Console


Hou can have a ma:imum o6 24E L'A$s on one managed sys"em 0 D147 An .&C can manage a mi:"ure o6 '()*$D managed sys"ems 0 D10Bs, D40Bs, a DD07 The mi:"ure o6 di66eren" '()*$I managed sys"ems on one .&C is dependen" on "he .&C so6",are version you are running7 An .&C can manage a ma:imum o6 EG managed sys"ems7 An .&C can only have a ma:imum o6 32 D14 managed sys"ems7 The la"es" version o6 "he .&C is D7D7! as o62 December 20107 Hou upgrade "he managed sys"emBs 6irm,are+microcode via "he .&C7

A ! %asic Sys"em Adminis"ra"ion

6''

.&C "o managed sys"em connec"ions


17 .&C priva"e ne",or5 connec"ion "o managed sys"em

A ! %asic Sys"em Adminis"ra"ion

6'8

.&C "o managed sys"em connec"ions


27 .&C public ne",or5 connec"ion "o managed sys"em

A ! %asic Sys"em Adminis"ra"ion

6'9

.&C "o managed sys"em connec"ions


37 $edundan" .&C priva"e ne",or5 connec"ion "o managed sys"em

A ! %asic Sys"em Adminis"ra"ion

680

.&C "o managed sys"em connec"ions


E7 $edundan" .&C public ne",or5 connec"ion "o managed sys"em

A ! %asic Sys"em Adminis"ra"ion

681

.&C "o managed sys"em connec"ions

A ! %asic Sys"em Adminis"ra"ion

682

.&C 0 .ard,are &anagemen" Console


There are curren"ly ",o .&C models ,hich are shipped ,i"h %& '()*$ sys"ems, ,hen ordered7 A des5side, and rac5 moun"able sys"em2

8 D0E28C0> des5 side .&C 8 D0E28C$E rac5 moun"able .&C

A ! %asic Sys"em Adminis"ra"ion

683

.&C 0 .ard,are &anagemen" Console


There are o"her models ,i"h varying resources in "hem7 <o"e "he C$ models are "he rac5 models, and "he C0 models are "he des5 side models D0E28C$E D0E28C$4 D0E28C$> D0E28C0> D0E28C0D D0E28C0G

A ! %asic Sys"em Adminis"ra"ion

684

.&C 0 .ard,are &anagemen" Console


8 D0E28C0> des5 side .&C model2

A ! %asic Sys"em Adminis"ra"ion

685

.&C 0 .ard,are &anagemen" Console


8 D0E28C$E rac5 moun"able .&C model2

A ! %asic Sys"em Adminis"ra"ion

686

.&C 0 .ard,are &anagemen" Console


To access "he .&C ,eb in"er6ace7 Access "he 6ollo,ing ;$L 6rom your ,eb bro,ser2 https:**0AL=11R677LKRLR67KMQ61LNK7-<=>6LK;LN>, The %& 6ac"ory de6aul" login creden"ials o6 "he .&C are as 6ollo,s2 Login2 hscr$$t 'ass,ord2 a!c1234 There is very, very limi"ed roo" access "o "he Linu: opera"ing sys"em on "he .&C7 %& "echnical suppor" ,ill have "o assis" you in gaining JrealK Linu: roo" access, i6 needed7

A ! %asic Sys"em Adminis"ra"ion

68'

.&C 0 .ard,are &anagemen" Console

A ! %asic Sys"em Adminis"ra"ion

688

%& 'o,er Sys"em L'A$s


&anaged sys"em vie,

A ! %asic Sys"em Adminis"ra"ion

689

%& 'o,er Sys"em L'A$s


L'A$ vie,

A ! %asic Sys"em Adminis"ra"ion

690

%& '()*$ 'o,er+-& -ir"ualiFa"ion ?A'- 0 Advanced 'o,er -ir"ualiFa"ionA

A ! %asic Sys"em Adminis"ra"ion

691

%& 'o,er-&
%& 'o,er-& 0 Licensed so6",are+6irm,are 6ea"ure ,hich enables %& vir"ualiFa"ion "echnology on %& '()*$ sys"ems7 %& 'o,er-& ,as 6ormerly 5no,n as A'- 0 Advanced 'o,er -ir"ualiFa"ion7 %& 'o,er-& is available in "hree edi"ions2
8 8 8 %& 'o,er-& *:press *di"ion %& 'o,er-& S"andard *di"ion %& 'o,er-& *n"erprise *di"ion

*ach edi"ion o66ers speci6ic limi"a"ions, or addi"ional 6ea"ures, as rela"ive "o one ano"her7

A ! %asic Sys"em Adminis"ra"ion

692

%& 'o,er-&
&icroprocessors, a757a7 shared processors, allo, you "o carve up "he processor+C'; i"sel6 in"o "ime slices, and assign "hose "ime slices "o L'A$s, ,he"her "han ,hole dedica"ed processors+C';s7 *ven "hough you are only carving up a 6rac"ion o6 "he processor+C'; 6or an L'A$7 The L'A$ sees i" as a ,hole processor7 Hou can carve up a processor+C'; in granuler uni"s o6 1+10"h o6 "he processor+C'; 0 so one millisecond 0 ?1+10"h ou" o6 one "ime sice 10 millisecondsA7 A6"er you s"ais6y a" leas" "he minimum 1+10"h processor+C'; reMuiremen" 6or an L'A$, you can "hen go even more granular in processor+C'; slicing, and carve i" up in 1+100"h uni"s7 Hou can have a mi:"ure o6 dedica"ed, and shared processors+C'; L'A$s on one managed sys"em7

A ! %asic Sys"em Adminis"ra"ion

693

License is reMuired 6or 'o,er-&

A ! %asic Sys"em Adminis"ra"ion

694

-& 8 n"egra"ed -ir"ualiFa"ion &anager


-& 0 n"egra"ed -ir"ualiFa"ion &anager Al"erna"ive "o "he .&C, .ard,are &anagemen" Console, appliance 6or lo,8end sys"ems, ,hich s"ill ,an" "o u"iliFe L'A$s, and o"her vir"ualiFa"ion capabili"ies7 Lo,er end sys"ems mus" purchase a" leas" "he 'o,er-& *:press *di"ion "o u"iliFe "he -&7 The -& is only suppor"ed on '()*$ sys"ems 0 D10 "hru D407 The -& is no" suppor"ed on '()*$ sys"ems 0 DD0, DG0, and D147 They mus" have an .&C 6or L'A$s7 The -& is suppor"ed on 'S!!! blade servers7 The -& uses an in"er6ace similar "o "he .&C7

A ! %asic Sys"em Adminis"ra"ion

695

-& 0 n"egra"ed -ir"ualiFa"ion &anager

A ! %asic Sys"em Adminis"ra"ion

696

ns"ruc"or 'resen"a"ion on lap"op

A ! %asic Sys"em Adminis"ra"ion

69'

%& '()*$.A 0 A ! Sys"em Clus"ering ?.AC&'A 0 )hi"eboard discussion

A ! %asic Sys"em Adminis"ra"ion

698

GL-& 0 Geographic Logical -olume &anager 8 )hi"eboard discussion

A ! %asic Sys"em Adminis"ra"ion

699

G'/S 0 General 'arallel /ile Sys"em 8 )hi"eboard discussion

A ! %asic Sys"em Adminis"ra"ion

'00

A ! Advanced Topics
A ! $%AC, $ole %ased Access Con"rol, sys"em securi"y7 )or5load 'ar"i"ions 0 )'A$s 'o,er.A 0 /ormerly 5no,n as .AC&'7 A ! sys"em clus"ering7 *ncryp"ed /ilesys"ems7 )eb+G; version o6 "he opera"ing sys"em ins"alla"ion, and S& T in"er6ace7 Trus"ed A !7 S"andard, and *n"erprise *di"ion o6 A !7 A ! )L& 0 )or5 Load &anager A ! securi"y audi"ing A ! resource accoun"ing A ! Linu: a66ini"y7 'er6ormance "ools7 ;ni: shell scrip"ing 0 programming7 A ! %asic Sys"em Adminis"ra"ion '01

)here "o Ge" &ore n6orma"ion


%& *duca"ion2
18G008 %&8T*AC.

%& $edboo5s2 http:**///%red!$$8s%i!m%c$m %& Sys"em ' )ebsi"es2


h""p2++,,,7ibm7com+sys"ems+p
http:**pu!li!%!$ulder%i!m%c$m*in5$center*pseries*(5r3*inde)% sp

A ! %asic Sys"em Adminis"ra"ion

'02

Das könnte Ihnen auch gefallen