370 likes | 531 Views
Back To The Basics . UNIX SYSTEM ADMINISTRATION IBM HP Chris Richards Kris Robertson Systems Engineer Systems Engineer. UNIX SYSTEM ADMINISTRATION. System Performance File System Layout Twists on Popular Commands. System Performance . IBM AIX Resource Allocation Memory Disk
E N D
Back To The Basics UNIX SYSTEM ADMINISTRATION IBM HP Chris Richards Kris Robertson Systems EngineerSystems Engineer
UNIX SYSTEM ADMINISTRATION • System Performance • File System Layout • Twists on Popular Commands
System Performance • IBM AIX • Resource Allocation • Memory • Disk • Processor
System Performance • IBM AIX - Resource Allocation • Memory • lsattr –El sys0 –a realmem –F value 1572864 (divide by 1024) = 1536 MB • lsps –a Page Space Phys Vol Vol Group Size %Used Active Auto Type paging01 hdisk5 rootvg 768MB 43 yes yes lv paging00 hdisk0 rootvg 768MB 43 yes yes lv hd6 hdisk0 rootvg 1264MB 26 yes yes lv
System Performance • IBM AIX - Resource Allocation • Disk • lsdev -Ccdisk hdisk0 Available 10-60-00-8,0 16 Bit SCSI Disk Drive hdisk1 Available 10-60-00-9,0 16 Bit SCSI Disk Drive hdisk2 Available 10-60-00-10,0 16 Bit SCSI Disk Drive hdisk3 Available 10-60-00-11,0 16 Bit SCSI Disk Drive hdisk4 Available 10-60-00-12,0 16 Bit SCSI Disk Drive hdisk5 Available 10-70-00-8,0 16 Bit LVD SCSI Disk Drive hdisk6 Available 10-70-00-10,0 16 Bit LVD SCSI Disk Drive hdisk7 Available 10-70-00-12,0 16 Bit LVD SCSI Disk Drive
System Performance • IBM AIX - Resource Allocation • Disk • lspv • hdisk0 00606423e3ac1c20 rootvg • hdisk1 00606423e32c8095 datavg • hdisk2 00606423c068a36f datavg • hdisk3 00606423e32db123 datavg • hdisk4 00606423e32db5a3 datavg • hdisk5 00606423593ea185 rootvg • hdisk6 0060642310c6084c datavg • hdisk7 006064230b830f92 datavg
System Performance • IBM AIX - Resource Allocation • Processor • lsdev –Ccprocessor proc0 Available 00-00 Processor proc1 Available 00-01 Processor proc2 Available 00-02 Processor proc3 Available 00-03 Processor
System Performance • IBM AIX - Resource Allocation • df –k Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 65536 17104 74% 4497 14% / /dev/hd2 1073152 120388 89% 33572 13% /usr /dev/hd9var 172032 32256 82% 4092 10% /var /dev/hd3 32768 27484 17% 190 3% /tmp /dev/hd1 827392 73284 92% 33422 17% /home /dev/rd 2064384 945176 55% 24610 5% /rd /dev/db 9732096 858276 92% 1521 1% /db
System Performance • IBM AIX • Monitor Usage: • Vmstat command • Memory and CPU usage • Iostat command • Input/output disk usage
System Performance • IBM AIX - Monitor Usage • vmstat [interval [count]] # vmstat 2 3 kthr memory page faults cpu ----- --------------- -------------------------- --------------- --------------- r b avm fre re pi po fr sr cy in sy cs us sy id wa 0 0 393459 126 0 0 0 15 42 0 181 420 149 6 4 89 1 1 1 393782 172 0 2 49 214 313 0 774 4046 833 5 8 86 2 0 1 393814 224 0 2 11 62 97 0 756 2481 811 9 4 85 2
System Performance • IBM AIX - Monitor Usage • iostat [interval [count]] # iostat 2 3 ty: tin tout avg-cpu: % user % sys % idle % iowait 631.7 6724.1 3.6 5.2 88.9 2.2 Disks: % tm_act Kbps tps Kb_read Kb_wrtn hdisk2 6.5 46.4 9.0 0 93 hdisk3 16.5 201.2 32.0 88 315 hdisk4 5.5 46.4 9.0 0 93 hdisk0 30.5 171.3 30.5 32 311 hdisk1 1.5 6.0 1.5 0 12 cd0 0.0 0.0 0.0 0 0
System Performance • HP-UX • Resource Allocation: • Memory • dmesg • swapinfo • Disk • ioscan –fnC disk • SAM • Processor • ioscan –fnC processor
System Performance • HP-UX • Memory: • dmesg Memory Information: physical page size = 4096 bytes, logical page size = 4096 bytes physical: 524288 Kbytes, lockable: 364376 Kbytes, available: 422964 Kbytes • If dmesg fails, page through /var/adm/syslog/syslog.log
System Performance • HP-UX • Memory: • swapinfo -mt Mb Mb Mb PCT START/ Mb TYPEAVAILUSEDFREEUSEDLIMITRESERVEPRINAME dev 1024 90 934 9% 0 - 1 swaplv dev 1000 0 1000 0% 0 - 2 swaplv2 reserve - 713 -713 memory 358 219 139 61% total 2382 1022 1360 43% - 0 -
System Performance • HP-UX • Disk • ioscan –fnC disk Class I H/W Path Driver S/W State H/W Type Description ====================================================== disk 0 0/0/1/1.0.0 sdisk CLAIMED DEVICE SEAGATE ST318404LC /dev/dsk/c1t0d0 /dev/rdsk/c1t0d0 disk 3 0/0/2/0.2.0 sdisk CLAIMED DEVICE SEAGATE ST118202LC /dev/dsk/c2t2d0 /dev/rdsk/c2t2d0 disk 4 0/0/2/1.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 32x /dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
System Performance • HP-UX • Disk • SAM / Disks & Filesystems / Disk Devices Hardware Number Volume Total Pathof PathsUseGroupMbytesDescription 0/0/1/1.0.0 1 Unused -- 17366 SEAGATE ST318404LC 0/0/2/0.2.0 1 LVM vg00 17366 SEAGATE ST118202LC 0/0/2/0.3.0 1 LVM vg01 17366 IBM DMVS18D 0/0/2/1.2.0 1 CDFS -- 139 HP DVD-ROM 32x
System Performance • HP-UX • Processor • ioscan –fnC processor Class I H/W Path Driver S/W State H/W Type Description ====================================================== processor 0 160 processor CLAIMED PROCESSOR Processor processor 1 166 processor CLAIMED PROCESSOR Processor
System Performance • HP-UX Command Line • bdf • vgdisplay • lvdisplay
System Performance • HP-UX Command Line • bdf Filesystem kbytesusedavail%usedMounted on /dev/vg00/lvol3 143360 81356 58187 58% / /dev/vg00/lvol1 83733 36922 38437 49% /stand /dev/vg00/lvol7 1024000 492313 498544 50% /var /dev/vg00/lvol6 1024000 689075 314051 69% /usr /dev/vg01/test 10240000 3801802 6237802 38% /test /dev/vg01/rd 4096000 1687084 2258385 43% /rd /dev/vg01/db 3072000 731001 2198515 25% /db
System Performance • HP-UX Command Line • vgdisplay [-v] vg01 ... PE Size (Mbytes) 4 Total PE 17360 Alloc PE 15000 Free PE 2360 … • use -v option to see disk and logical volume details for volume group
System Performance • HP-UX Command Line • lvdisplay [-v] /dev/vg01/db LV Size (Mbytes) 3000 Current LE 750 Allocated PE 750 Stripes 0 Stripe Size (Kbytes) 0 • Use –v option to see details regarding disk layout of logical volume
System Performance • HP-UX • Monitor Usage: • vmstat command • Memory and CPU usage • iostat command • Input/output disk usage • sar -v command • Kernel parameters
System Performance • HP-UX • vmstat [interval [count]] # vmstat 3 2 procs memory page faults cpu r b w avm free re at pi po fr de sr in sy cs us sy id 0 0 0 138582 4968 2 0 0 0 0 0 0 453 335 115 1 0 99 0 0 0 138582 4917 0 0 1 0 0 0 0 446 369 133 1 1 98
System Performance • HP-UX • vmstat [interval [count]] # vmstat 3 2 procs memory page faults cpu ------------ ---------------- --------------------------------- ---------------- ----------- r b w avm free re at pi po fr de sr in sy cs us sy id 0 0 0 138582 4968 2 0 0 0 0 0 0 453 335 115 1 0 99 0 0 0 138582 4917 0 0 1 0 0 0 0 446 369 133 1 1 98
System Performance • HP-UX • iostat [interval [count]] # iostat 3 2 device bps sps msps c1t2d0 481 62.0 1.0 c5t0d0 568 71.8 1.0 c5t1d0 650 79.9 1.0 c5t2d0 622 76.5 1.0 c5t8d0 401 48.0 1.0
System Performance • HP-UX • sar -v [interval [count]] # sar -v 3 2 14:08:17 text-sz ov proc-sz ov inod-sz ov file-sz ov 14:08:20 N/A N/A 118/2000 0 1064/9000 0 14065/18000 0 14:08:23 N/A N/A 118/2000 0 1064/9000 0 14063/18000 0 • file-sz correlates to nfile kernel parameter and is a hard limit
System Performance • IBM AIX/HP-UX • Sizing your system: • Memory • ((5 * #chui) + (10 * #gui) + Dbbuffers + (17 * #app)) * 1.25%os • Dbbuffers = greater of 100MB or existing -B • Processor • 75 users per processor • Disks • 35 to 40 users per spindle
File System Layout • SX.e Application • /rd filesystem • /db filesystem
File System Layout • SX.e Application • /rd filesystem ./bin ./marc ./src ./dlc ./cust ./tmp ./exec ./install
File System Layout • SX.e DataBase • /db filesystem • Databases • Sort space
Twists On Popular Commands • Basic Unix Commands (AIX/HP-UX) • Who command • Whence, which, type command • List Command • ls, ls –lt, ls –ld, ls -la
Twists On Popular Commands • Basic Unix Commands (AIX/HP-UX) • Who command • -b . system boot Aug 27 05:55 • -u kbaker pts/438 Sep 04 08:15 0:07 244818 (kbaker.nxtrend.c) aluciani pts/439 Sep 04 08:15 . 300126 (adenison.nxtrend) crichard pts/303 Sep 04 11:59 . 80342 (crichard.nxtrend) crichard pts/395 Sep 04 11:59 2:51 272704 • whoami • who am I
Twists On Popular Commands • Basic Unix Commands (AIX/HP-UX) • Whence, Which, Type Command • First, what is your path: echo $PATH /usr/bin:/bin:/etc:/usr/vsifax3/bin:/home/crichard/bin:/rd/bin:/usr/bin/custom:/usr/bin/adm:/etc:/usr/sbin/usr/ucb:/home/crichard/bin:/usr/bin/X11:/sbin:. • type sxe sxe is /rd/bin/sxe • which sxe /rd/bin/sxe
Twists On Popular Commands • Basic Unix Commands (AIX/HP-UX) • list command # ls -lt -rw-r--r-- 1 crichard staff 2199 Aug 28 11:43 smit.log -rwxr-xr-x 1 crichard staff 340 Aug 22 11:06 nxtedit drwxr-xr-x 2 crichard staff 512 Aug 21 10:18 testlink -r--r--r-- 1 crichard staff 8693 Aug 18 07:33 backup.full -r--r--r-- 1 crichard staff 8462 Aug 18 07:33 backup.data -rwxr--r-- 1 crichard staff 117 Aug 14 08:31 ping.xml -rwxrwxrwx 1 crichard staff 201 Jul 26 10:57 smoo
Twists On Popular Commands • Basic Unix Commands (AIX/HP-UX) • list command • ls –ld drwxrwxrwx 12 crichard staff 2560 Aug 22 11:06 . • ls –ld testlink drwxr-xr-x 2 crichard staff 512 Aug 21 10:18 testlink • ls –la drwxrwxrwx 12 crichard staff 2560 Aug 22 11:06 . drwxr-xr-x 562 root bin 1264 Aug 19 13:59 .. -rw-r--r-- 1 crichard staff 5 Apr 26 15:18 .UAP -rw-r--r-- 1 crichard system 710 Mar 17 09:20 .facet -rw-r--r-- 1 crichard system 601 Mar 21 11:36 .profile
Back To The Basics This has been a presentation of the Kris and Chris show. Thanks for watching and stay tuned for more exciting programming. QUESTIONS ? ? ?
Back To The Basics UNIX SYSTEM ADMINISTRATION IBM HP Chris Richards Kris Robertson Systems Engineer Systems Engineer