the seven layer OSI model
mnemonic - layers (1 - 7)
------------------------
programmers - physical
do - data link
not - network
throw - transport
sausage - session
pizza - presentation
away - application
----------------------------------------------
=================================
GENERAL UNIX HOUSEKEEPING TIPS
=================================
To minimize problems on your UNIX system
it is recommended to log out once a day. This cleans up
temporary files and closes out processes.
IN an office environment it is a good idea ito make sure that your
screen saver locks the screen.
So, once a day log out, BUT, before you do:
close all applications, then type:
rm /tmp/*
rm /var/tmp/*
then exit out.
Also, if you have an application that gets locked up, telnet
into your workstation from your PC or another workstation, then do the
following:
type:
ps -ef | grep (your user login)
there will be a listing displayed of all processes you are running.
the order of the display for HP's is usually:
UID PID PPID C STIME TTY TIME and COMMAND
the order of the display for SUN's is usually:
UID PID PPID C STIME TTY TIME and CMD
The first column is who owns the process, (user ID)
second column is the PROCESS ID - this is the one you will "kill"
third column is the parent process ID, don't mess with momma... ;)
don't worry about C, STIME, TTY or TIME (do a "man ps" if you must know)
the COMMAND or CMD column is the english version (sort of) of what you're running,
look for ptc or pro or netscape or whatever it is that wedged itself...
then take that PID number and type:
kill -9 (PID)
or kill -9 (PID) (PID) (PID) (PID) ...
or just take all the PID numbers and kill 'em all, go postal even... you'll
probably blow yourself off of both logins, which saves you some steps, then go
back to your workstation and login again and life should be good. If it's not,
you know who to call... ;) Unix will not allow a normal user to kill anything
on the system other than what that user owns. You will not hurt the system doing
this.
Please avoid powering the systems off, that is not a good thing. It can be a very,
very bad thing in fact... ;) killing processes, ok, powering off, not ok.
:)
an alternate command to find the PID and name is to type:
ps -ef | grep (your user login) | awk '{ print $2 " "$9}'
yeah, right you say... but it IS simple stuff... really it is... ;)
It's also possible for you to do a command like that and to kill off the processes
you just listed... but that's a bit more involved, and I didn't want to
frighten anyone... ;)
There are some great books on UNIX and Linux. The UNIX for Dummies book is,
well, at least to me, enjoyable reading. The books by Mark Sobell on the UNIX
operating system are superb. I used that text in teaching a 30 hour class on
the UNIX operating system at Boeing. It's probably the best all around general
book on UNIX.
I have some basic info on my personal webserver and add to it all the time:
http://wagoneers.com/UNIX
john
=====================================================================
john meister sr CAD sys admin, Clearview Consulting
=====================================================================
# repeat a command 100 times
x=100
while [ $x -gt 0 ]
do
command
x=$(($x-1))
done
------------------------------------------------
tar cvf - * | compress > file.tar.Z
tar zcvf file.tar.gz *
find / -type d -name user -print
find /depot -depth -print | cpio -pdh depot/
NFS:
======
share -F nfs -0 rw -d "home directories" /home01
share -F nfs -0 root=engapps:engtmp /mounts/eng_apps01
USED TO MOVE DATA:
----------------------
cd /raid/0xx
ln -s /net/sparc-sys/spare spare
cd spare
cd directory
find "userhome" -depth -print | cpio -pd /raid/0xx/
/etc/exports
/raid/0xx -anon=65534, root=engserver:workstation2
bits/second:
-------------------------------
10baseT (10 meg) 10,000,000
100baseT(100 meg) 100,000,000
1000baseT(1 gig) 1,000,000,000
T1 (1.544 Mb) 1,544,000
T2 (4 T1's) 6,312,000
T3 (28 T1's) 44,736,000
DS 0 (64 k) 64,000
DS 1 (1.544 Mb) 1,544,000 (1.5 Meg)
DS 2 (4 DS 1's) 6,312,000 (6.3 Meg)
DS 3 (28 DS 1's) 44,736,000 (45 Meg)
Wednesday March 15, 2000
--------------------------------------------------------
Subject: orasrv03 setup and Oracle install process
======================================================
note: this configuration was developed with an inexperienced
Oracle DBA, see below for better filesystem configuration.
The installation of Oracle requires spreading it across multiple spindles to
assist I/O performance, and to protect the log files by having them on separate disks.
(if you're using a SANS these requirements are met that way)
SWAP SETUP:
============
Swap is now mirrored on the two lower internal 4.3gig drives,
I used 256M extent size.
FILESYSTEMS CREATED:
====================
ORACLE ONLY SYSTEMS ON THE JAMAICA:
------------------------------------
created: vgorabase, vgoracle_1, vgoracle_2, and vgoracle_3
created: lvorabase, lvoracle_1, lvoracle_2, and lvoracle_3
(used physical volumes, names: pvora...)
Mount points: /orabase, /oracle_1, /oracle_2, oracle_3
I mirrored these groups across a second set of disks.
lvextend -m 1 /dev/vgorabase /dev/dsk/c0t6d0
lvextend -m 1 /dev/vgoracle_1 /dev/dsk/c0t2d0
lvextend -m 1 /dev/vgoracle_2 /dev/dsk/c0t3d0
lvextend -m 1 /dev/vgoracle_3 /dev/dsk/c0t4d0
Oracle 7.4.3 Install on orasrv03
==================================
PREP FOR PFS_FSTAB:
--------------------
create /etc/pfs_fstab
vi /etc/pfs_fstab
entry: /dev/dsk/c1t2d0 /SD_CDROM pfs-rrip xlat=unix 0
MOUNT CDROM:
--------------------
nohup /usr/sbin/pfs_mountd &
nohup /usr/sbin/pfsd &
/usr/sbin/pfs_mount /SD_CDROM
INSTALL ORACLE:
------------------
cd /SD_CDROM/orainst
./orainst
ORACLE VALUES:
---------------
Oracle BASE: /orabase ???
Oracle HOME: ??? tbd
Oracle SID: WU2000
ORACLE accounts:
------------------
(unix) oracle / 0rac1e
oracle: system / manager
oracle: sys / orasys
oracle: mdsys / mdsys
oracle: ctxsys / ctxsys
UNMOUNT CDROM AFTER INSTALL:
------------------------------
/usr/sbin/pfs_umount /SD_CDROM
SERVER CONFIGURATION:
=======================
orasrv03 has the following filesystem configuration:
>--> more disk-info
Total Mirror Mount
Logical Volume Volume Group Use Mbytes Copies Directory
lvol1 vg00 HFS 60 1 /stand
lvol2 vg00 Swap/Dump 512 1
lvol3 vg00 VxFS 512 1 /
lvol4 vg00 VxFS 1472 1 /opt
lvol5 vg00 VxFS 512 1 /tmp
lvol6 vg00 VxFS 512 1 /usr
lvol7 vg00 VxFS 512 1 /var
lvorabase vgorabase HFS 4092 1 /orabase
lvoracle_1 vgoracle_1 HFS 4092 1 /oracle_1
lvoracle_2 vgoracle_2 HFS 4092 1 /oracle_2
lvoracle_3 vgoracle_3 HFS 4092 0 /oracle_3
lvswap vgswap Swap 3840 1
-----------------------------------------------------
>--> more vg-info
Mbytes Physical Logical
Name Available Volumes Volumes
vg00 0 of 8184 2 7
vgswap 0 of 7680 2 1
vgorabase 0 of 8184 2 1
vgoracle_1 0 of 8184 2 1
vgoracle_2 0 of 8184 2 1
vgoracle_3 0 of 8184 2 1
-----------------------------------------------------
>--> more lv-info
Total Mirror Mount
Logical Volume Volume Group Use Mbytes Copies Directory
lvol1 vg00 HFS 60 1 /stand
lvol2 vg00 Swap/Dump 512 1
lvol3 vg00 VxFS 512 1 /
lvol4 vg00 VxFS 1472 1 /opt
lvol5 vg00 VxFS 512 1 /tmp
lvol6 vg00 VxFS 512 1 /usr
lvol7 vg00 VxFS 512 1 /var
lvorabase vgorabase HFS 4092 1 /orabase
lvoracle_1 vgoracle_1 HFS 4092 1 /oracle_1
lvoracle_2 vgoracle_2 HFS 4092 1 /oracle_2
lvoracle_3 vgoracle_3 HFS 4092 1 /oracle_3
lvswap vgswap Swap 3840 1
-----------------------------------------------------
The directories at the root file system look like this:
---------------------------------------------------------
drwxr-xr-x 3 oracle dba 44 Mar 15 19:58 orabase
drwxr-xr-x 3 oracle dba 44 Mar 15 20:02 oracle_1
drwxr-xr-x 3 oracle dba 44 Mar 15 20:27 oracle_2
drwxr-xr-x 3 oracle dba 44 Mar 15 20:41 oracle_3
INTERNAL DRIVES:
==================
vg00 - operating system, WorkManager - mirrored across two 4.3 gig drives internal
vgswap - striped across two 4.3 gig drives internal
JAMAICA DRIVE SETUP (all drives dedicated to Oracle):
========================================================
vgorabase - /orabase - basic oracle system - mirrored across two 4.3 JAMAICA drives
vgoracle_1 - /oracle_1 - oracle temp and data - mirrored across two 4.3 JAMAICA drives
vgoracle_2 - /oracle_2 - oracle rollback and index - mirrored across 2-4.3 JAMAICA drives
vgoracle_3 - /oracle_3 - oracle system, tools and users stuff - "
============================================================================
john meister sr CAD sys admin
http://www.wagoneers.com/ john@wagoneers.com
http://www.wagoneers.com/UNIX/Courses.html
=====================================================================
Oracle Setup - Basics
John Meister - Dec 12, 2003
Oracle Install notes
--------------------
Oracle 8i - 2 gig
Oracle 9i - 3 gig
--------------------
Server Memory
Min Base memory - 328M -
Recommended - 512M
4mb + 4mb swap for each user
Min Swap 1 gig
------------------------------------
------------------------------------
oratab
tnsnames.ora
listener.ora
------------------------------------
------------------------------------
DATABASE LAYOUT:
-------
SYSTEM - data dictionary - growth is
proportional to metadata, i/o moderate
-------
TOOLS - store standard objects - functions,
procedures & queries - growth, i/o moderate
-------
USERS - Oracle User info - if only one user
accessed infrequently - doesn't get filled
------
TEMP - scratch pad - heavily used I/O HIGH
------
RBS - Roll Back Segment - allows "undo"
expands w/metadata - i/o moderate, heavier
then system.
------
SID_DATA - metadata for instance. BUSIEST
most growth, most important, I/O heavy
ISOLATE (prod_data)
------
SID_iLOG - logs required tables and indexes,
may be specific to application
------
Redo Logs - Oracle buffers all incoming
transactions SIX logs - 2 sets of 3
usually mirrored - I/O is moderate for
each log
------
Control files - three copies - minimal I/O,
need to be separate from database.
------------------------------------
------------------------------------
GUIDLINES:
---------
-Separate the Redo log mirrors
-Place control File on a separate drive
-Keep the DATA tablespace separated from the others
-Separate the TEMP tablespace from RBS and SYSTEM
-Separate the RBS tablespace from the others
-Separate the Redo Logs from the tablespaces
------------------------------------
Oracle DBA handbook - 22 disks! for optimal
performance. 17,13ok-7 disk compromise
reality - 5 disks (separate file systems)
------------------------------------
/ - nothing on root
/do
/d1
/d2
/d3
/d4
System/Tools/Users - d1 - lowest priority
RBS - d1
TEMP anywhere but d2 - d0 or d1
DATA - d2
_Log - d0
RL G1 - d0
RL G2 - d2
CF1 - d1
CF2 - d2
CF3 - d3
------------------------------------
4 disk scenario:
Tablespace - size - drv#/Ctrl# - dir
system-tools-users - 300/5/1M - 3/1 - /d1/prod
RBS - 50M 3/1 - /d2/prod
TEMP - 50M 2/2 - /d3/prod
PROD_DATA 200M 4/2 - /d4/prod
PROD_ILOG - 50M - 2/2 - /d1/prod
Redo Logs 1-3 member 1 20M 1/1 /d1/prod
Redo Logs 1-3 member 2 20M 2/2 /d2/prod
Control Files 1 2/2 /d1/prod
Control Files 2 3/1 /d2/prod
Control Files 3 4/2 /d3/prod
------------------------------------
Solaris: /var/opt/oracle
HP-UX: /etc
------------------------------------
for Oracle user, edit profile:
ORACLE_HOME=/d1/oracleXXXX (ver)
PATH $ORACLE_HOME/bin: ... export PATH
------------------------------------
ORACLE_HOME
ORACLE_SID
------------------------------------
SOLARIS:
/etc/system:
1) set shmsys:shminfo_shmamax=4294967295
2) set shmsys:shminfo_shmmin=1
3) set shmsys:shminfo_shmni=100
4) set shmsys:shminfo_shmseg=10
5) set semsys:seminfo_semmni=100
6) set semsys:seminfo_semmsl=100
7) set semsys:seminfo_semmns=200
8) set semsys:seminfo_semopm=100
9) set semsys:seminfo_semvmx=32767
/reconfigure - (new kernel - reboot)
------------------------------------
HP-UX:
SAM (/etc/stand/system):
Apply Tuned parameter set:
General OLTP/Database Server System
then:
maxdsiz to 1G
maxssiz to 250MB
maxtsiz to 1G
max_thread_proc to 256
process new kernel
------------------------------------
login as Oracle to install, NOT root!
cd /d1/oracle817/bin
./runInstaller
------------------------------------
JDK - Java Development Kit
(oracle 8.1.7.4 minimum)
mkdir /opt/java1.2
------------------------------------
SID - System Identifier
------------------------------------
login as oracle,
establish the environment - ORACLE_SID (prod)
To Run Server Manager: svrmgrl
SVRMGR> connect internal
SVRMGR> startup
SVRMGR> shutdown
SVRMGR> exit
------------------------------------
ps -ef | grep ora_
------------------------------------
/etc/init.d/oracle.daemon - SUN
/etc/rc3.d/S99oracle.daemon
/etc/rc3.d/K99oracle.daemon
/sbin/init.d/oracle.daemon - HP-UX
/sbin/rc3.d/S909oracle.daemon
/sbin/rc3.d/K909oracle.daemon
/etc/oracle.daemon - AIX
====================================
ORACLE DATABASE
-------------------
Physical Structure
-------------------
Data files
Control file
Redo log files
Archived redo log files
Parameter file
Password file
Logical Structure
-------------------
Database - The first component in the storage hierarchy is the database,
which is logically divided into tablespaces.
Tablespaces - The tablespace is used to group related logical
structures. For example, tablespaces commonly group all objects of
an application to simplify certain administrative operations.
Segments - A tablespace may contain one or more segments. A
segment is the space used by one logical structure, such as a
table or an index.
Extents - An extent is a contiguous set of blocks used to store a
specific type of information. Extents are added when a segment
requires more space.
Blocks - An Oracle block is the smallest unit of input/output.
When data needs to be retrieved from the disk, the Oracle server
requests one or more Oracle blocks. Its size should be a multiple
of the operating system block size.
----------------------------------------------------------------
Oracle 8i Installation -- SUN OS
System Requirements
Memory 256 mb RAM (minimum)
Swap Space 3 times the Physical Memory
(unless the system exceeds 1 GB of Physical Memory,
then 2 times the amount is sufficient
/tmp 400 mb
OS Packages SUNWarc
SUNWbtool
SUNWhea
SUNWlibm
SUNWlibms
SUNWsprot
SUNWtoo
Minimum kernel parameters:
SHMMAX 4294967295
SHMMIN 1
SHMMNI 100
SHMSEG 10
SEMMNI 100
SEMMSL 200
SEMMNS 1000
SEMOPM 100
SEMVMX 32767
Create unix accounts:
Login Default Password Group Home Directory Shell
oracle oracledba dba /apps/oracle ksh
Oracle and precise users need permission to execute cron and ftp.
Create directory: /var/opt/oracle
Oracle needs write permissions to this directory
Create filesystem mount points owned by oracle/dba
File name Size
/apps/oracle 8 GB
/d01 DBA will provide
/d02 DBA will provide
/d03 DBA will provide
/d04 DBA will provide
/d05 DBA will provide
etc
Enable large file sizes
During installation run root.sh
or provide vroot password to dba
After Oracle Installation
Setup DB start and stop
copy /apps/oracle/dbora to /etc/init.d
Create soft link to /etc/rc3.d: ln -s /etc/init.d/dbora /etc/rc3.d/S99dbstart
Create soft link to /etc/rc2.d: ln -s /etc/init.d/dbora /etc/rc2.d/K01dbshut
Create unix accounts for Oracle DBA.s
Enable sudo to oracle
INFO ON ORACLE UNIX SHELL SCRIPTS:
http://www.orafaq.net/scripts/unix/otfcheck.txt
favorite string for setting up a page:
%s$.*$
 &
|
$g
UNIX/Linux PRETEST
================================================================
1) UNIX was created by:
a) Ken Thompson & Dennis Ritchie at AT&T
b) Kernighan & Ritchie at AT&T
c) Al Gore & Bill Gates
d) Mickey Mouse & Pluto
2) The key leaders of the "open source movement" are:
a) Richard Stallman (GNU) & Linus Torvalds (Linux)
b) the SCO group
c) Bill Gates & Al Gore
d) Microsoft and Adobe
3) When installing Linux or UNIX one should:
a) consider the distribution of the filesystems
b) secure a license code word from Microsoft
c) get permission from Bill Gates and SCO
d) learn how to program in the C language
4) The terms "stdin" and "stdout" generally refer to:
a) the keyboard and the display
b) memory allocation and the printer
c) punched cards and a wireless network
d) the EULA and other legalese
5) Identify the four file types found in Linux and UNIX:
a) plain, block, character and directory
b) block, manilla, folder, and security
c) device, personal, financial, and spreadsheets
d) powerpoint, excel, word and visio
6) Identify the five essential commands:
a) man, ls, cd, pwd, more
b) help, dir, cd, del, type
c) woman, sl, ds, dpw, erom
d) del, copy, type, dir, ren
7) The command used to configure network interface parameters is:
a) ifconfig
b) ipconfig
c) deltree
d) rm -rf
8) The most common editor found almost every UNIX or Linux system is:
a) vi
b) emacs
c) notepad
d) Microsoft Word
9) Unix and Linux may be summarized as consisting of two things:
a) processes and files
b) desktop and applications
c) CDE and Open Office
d) keyboard and monitor
10) The greatest security risk on a UNIX or Linux system is:
a) user passwords
b) email, especially Outlook
c) web browser, especially Internet Explorer
d) Microsoft applications
copyright 2004 John Meister http://wagoneers.com
UNIX/Linux PRETEST
================================================================
1) UNIX was created by:
a) Ken Thompson & Dennis Ritchie at AT&T
b) Kernighan & Ritchie at AT&T
c) Al Gore & Bill Gates
d) Mickey Mouse & Pluto
2) The key leaders of the "open source movement" are:
a) Richard Stallman (GNU) & Linus Torvalds (Linux)
b) the SCO group
c) Bill Gates & Al Gore
d) Microsoft and Adobe
3) When installing Linux or UNIX one should:
a) consider the distribution of the filesystems
b) secure a license code word from Microsoft
c) get permission from Bill Gates and SCO
d) learn how to program in the C language
4) The terms "stdin" and "stdout" generally refer to:
a) the keyboard and the display
b) memory allocation and the printer
c) punched cards and a wireless network
d) the EULA and other legalese
5) Identify the four file types found in Linux and UNIX:
a) plain, block, character and directory
b) block, manilla, folder, and security
c) device, personal, financial, and spreadsheets
d) powerpoint, excel, word and visio
6) Identify the five essential commands:
a) man, ls, cd, pwd, more
b) help, dir, cd, del, type
c) woman, sl, ds, dpw, erom
d) del, copy, type, dir, ren
7) The command used to configure network interface parameters is:
a) ifconfig
b) ipconfig
c) deltree
d) rm -rf
8) The most common editor found almost every UNIX or Linux system is:
a) vi
b) emacs
c) notepad
d) Microsoft Word
9) Unix and Linux may be summarized as consisting of two things:
a) processes and files
b) desktop and applications
c) CDE and Open Office
d) keyboard and monitor
10) The greatest security risk on a UNIX or Linux system is:
a) user passwords
b) email, especially Outlook
c) web browser, especially Internet Explorer
d) Microsoft applications
copyright 2004 John Meister http://wagoneers.com
fwiw, in unix there is a tool called "script" that will record
all your commands and screen displays in the shell. You can clean
up all the special characters by running it through "col -b".
so, you'd do something like this:
script July17-2003.log
after you get all done you type
"ctrl D" or "exit" to end it.
THEN:
cat July17-2003.log | col -b > July17_2003.log ; rm July17-2003.log
(this cleans up the log file and removes the one that will contain
jibberish and ugly stuff that normal folk don't care to see. ;)
In addition, if you set up your profile to create a special
place for your history you will preserve significant and useful
information.
Add the following to your .profile in your UNIX accounts,
and "mkdir History" in your home directory:
THIS WORKS ON HP-UX:
HISTFILE=History/`/bin/date '+%y%b%d'.history`
HISTSIZE=2048; export HISTSIZE
EDITOR=/usr/bin/vi; export EDITOR
THIS WORKS ON LINUX:
HISTFILE=$HOME/F/History/`/bin/date '+%y%b%d'.history`
HISTSIZE=2048
export HISTFILE HISTSIZE
(be sure to export the variables HISTFILE, HISTSIZE and EDITOR)
http://bengross.com/smallunix.html
copied id_rsa.pub-host to client (in /root/.ssh/PUB)
on client:
/usr/bin/ssh-keygen -b 2048 -t rsa
/usr/bin/cp id_rsa.pub id_rsa.pub-client
cat id_rsa.pub-host >> authorized_keys
cat id_rsa.pub-client >> authorized_keys
scp id_rsa.pub-client host:/root/.ssh/
on host:
cat id_rsa.pub-client >> authorized_keys
test:
ssh client w
works... :) (from host)
http://www.asnp.org/storage_topics
http://www.asnp.org/members/educationalpapers
http://www.enterprisestorageforum.com/technology/features/article.php/3289841
http://www.computerworld.com/hardwaretopics/storage/report/
http://www.winnetmag.com/WindowsStorage/Article/ArticleID/4874/WindowsStorage_4874.html
http://www.asnp.org/members/educationalpapers/contributed102803a.pdf
http://www.asnp.org/members/educationalpapers/contributed102803f.pdf
http://www.asnp.org/members/educationalpapers/contributed102803b.pdf
Approximate used prices of System hardware - January 2004
---------------------------------------------------------------
EMC 8730
8 terabytes of storage
(made up of 224 -- 36 gig drives)
16 gb's of cache
7 fiber adapters
Approximate used price - $70,000
Price includes Installation and CORE Software!!
---------------------------------------------------------------
E3300 Metastor
quantity (3) Controller's and (90)x 73gb 10K Rpm Disk drives. 6.5 Tb
Each Controller has 256MB of cache and dual power supplies for redundancy.
Approximate used price - $23,000
------------------------------------------------------------------------------------
HP Unix Servers
L2000 Server 4x 440Mhz CPU'S, 4GB Memory, A5191A
4x 36.4gb Disk Drives: around $6,200
N4000 Server with 4x 550Mhz CPU's, 4GB Memory, A3639B
4x 36.4gb Disk Drives: around $14,500
------------------------------------------------------------------------------------
SGI Servers
SGI 2100 Deskside w/ CD Rom & IRIX 6.5 OS
8x 350 mhz R12k 4mb Processors
4x 2gb Memory Kits
2x 18 gb Ultra SCSI Disk Drives
1x PCI 1 Port 1000 BaseT Gigabit Ethernet Adapter
2x PCI Single Channel Fiber Channel Adaptor
about $4,600 Ea.
-------------------------------------------------------------------------------------
Sun Servers
Sun Fire V240 with (2) 1Ghz CPU's, 4GB Memory, (4) 36.4GB Disk Drives, Dual
Power Supplies: $7,500
Sun Fire V440 with (4) 1Ghz CPU's, 8GB Memory, (4) 36GB Disk Drives, Dual
Power Supplies, XVR-100 Graphics: $14,875
Sun Fire V480 with (4) 900MHz CPU's, 8GB memory, (2) 36.4GB FC-AL 10K RPM
disk drives, DVD ROM, Dual power supplies: $30,745
Sun Fire 280R, (2) 1.2GHz CPU's, 2GB memory, (2) 73GB FC-AL 10K RPM disk
drives, DVD ROM, Dual power supplies: $14,075
Sun Fire 280R, (2) 900MHz CPU's, 2GB memory, (2) 36GB FC-AL 10K RPM disk
drives, DVD ROM, Dual power supplies: $9,185
E420R with (4) 450MHz CPU's, 2GB memory, (2) 18.2GB disk drives, 2nd Power
Supply, 32X CD ROM: $4,595
E220R with (2) 450MHz CPU's, 2GB memory, (2) 18.2GB disk drives, 32X CD ROM:
$2,650
E450 with (4) 400MHz CPU's, 2GB memory, (2) 18.2GB disk drives, 32X CD ROM,
floppy, (2) power supplies: $4,345
E4500 with (8) 400MHz CPU's, 8GB memory, Sbus I/O Board, X5164A 36GB disk
board, 32X CD ROM: $6,435
E6500 with (8) 400MHz CPU's, 8GB memory, Sbus I/O Board, X5164A 36GB disk
board, 32X CD ROM: $7,500
Desktop Systems
SunBlade 1000, (2) 900MHz CPU's, 2GB memory, (2) 36.4GB FC-AL 10K RPM disk
drives, DVD ROM, PGX-64 Graphics, keyboard & mouse kit: $7,970
CPU's
X1195A 450MHz CPU with 4MB cache: $450
X2580A Enterprise 400MHz CPU with 8MB cache: $275
X6990A SunBlade 750MHz CPU with 8MB cache: $1,350
X7009A SunBlade 900MHz CPU with 8MB cache: $2,200
Memory Kits
X7005A 512MB memory kit (2x256MB): $500
X7023A Enterprise 1GB memory kit (8x128MB): $300
Disk Drives
X5237A 18.2GB 10K RPM disk drive with mounting bracket: $150 X5242A
36.4GB 10K RPM disk drive with mounting bracket: $450 X6724A 36.4GB 10K
RPM FC-AL disk drive with mounting bracket: $360 X6742A 73.4GB 10K RPM
FC-AL disk drive with mounting bracket: $700
Additional Option Specials
X1034A Quad FastEthernet PCI: $350
X1141A Gigabit Ethernet PCI: $450
X6799A Single Fiber Channel Host Adapter PCI: $1,250
--------------------------------------------------
UNIX - lunch and learn (written in vi. ;)
--------------------------------------------------
5 basic commands:
man
ls (ls -al and ls -AL)
cd
pwd
more
--------------------------------------------------
UNIX consists of two things: files and processes
--------------------------------------------------
------------------------------------------------
http://www.wagoneers.com/UNIX/FIND/find-usage.html
------------------------------------------------
find . -atime +1 -type f - exec mv {} TMP \; # mv files older then 1 day to dir TMP
find . -atime +30 -exec ls \; | wc -l
find /raid -type d -name "local_custom" -exec cp /raid/apps/site_custom_dirs {} \;
find . -exec grep the {} \; > thelist
# to find files ending in .igs that are older then 700 days and move them into a dir called oldiges
find /cadusr/bottle/iges/*.igs -atime +700 -exec mv {} /oldiges \;
------------------------------------------------
COMMAND LINE PERL WITH FIND:
------------------------------------------------
http://www.wagoneers.com/UNIX/Perl/find-grep-perl-trick.html
------------------------------------------------
find ./ -type f -name '*.htm*' -exec perl -pi -e 's/Galations/Galatians/g' {} \;
------------------------------------------------
http://www.wagoneers.com/UNIX/GREP/grep-in-action.html
------------------------------------------------
ls -al *0* | grep -v total | grep -v lrwxr | grep -v lost | grep -v '\.' | more
------------------------------------------------
------------------------------------------------
http://www.wagoneers.com/UNIX/SED/sed.html
------------------------------------------------
:%s/.*/# &/g - inserts a # at the beginning of every line
:15,$s/.*/# &/g - inserts a # at the beginning of line 15, until the end of the file
--> more .profile
(see also http://www.wagoneers.com/UNIX/profile.html)
# user defined path
PATH=/bin:/usr/local/bin:/usr/bin:.:/home/john/S:/usr/bin/perl:usr/bin/X11
#####################
# simple PS1 prompt
# PS1="`hostname`.`whoami`>"
#####################
# custom PS1 prompt
export PS1="
------------------------------------------------
$(/usr/bin/whoami)@$(/bin/hostname) [\$PWD]
------------------------------------------------
--> "
#####################
PS2='you need to finish inputting...> '
#####################
# aliases (recommend using "-i" for destructive commands) (-f overrides)
alias cp='cp -i'
alias ll="ls -l"
alias mv="mv -i"
alias rm="rm -i"
alias bdf="df -P"
EDITOR=/usr/bin/vi
# optional history file by process id from shell
# HISTFILE=$HOME/F/History/$$sh_history
HISTFILE=$HOME/F/History/`/bin/date '+%y%b%d'.history`
HISTSIZE=2048
export PATH PS2 PS1 TERM EDITOR ENV SHELL START HISTFILE HISTFILE
umask 022
resize
-----------------------------------------------------
-----------------------------------------------------
http://www.wagoneers.com/UNIX/profile.html
HP-UX profile PS1 prompt:
--------------------------
export WHMI=$(/usr/bin/whoami)
export WHST=$(/usr/bin/hostname)
export PS1="$(print '\001\015\001\0033]2; $WHMI ---> \"$WHST\" ---> $PWD \007
-----------------------------------------------------
$WHMI@$WHST [$PWD]
>-->\001 ')"
-----------------------------------------------------
-----------------------------------------------------
SET DISPLAY (for X windows/CDE):
who am i -R | tr -d [\(-\)] | awk '{print $NF}' | grep -v :0 | \
awk '{print "export DISPLAY="$1 ":0"}' > /tmp/setdisplay
cat "/tmp/setdisplay"
. /tmp/setdisplay
env | grep DISPLAY`
-----------------------------------------------------
-----------------------------------------------------
--> crontab -l
# MIN HOUR DAY MONTH DAYOFWEEK COMMAND
# at 11:59 p.m. every day run logtrim
59 23 * * * /unix_srv/home/john/S/logtrim
# at 10:59 p.m. every day run spamclean (removes at sign)
59 22 * * * /unix_srv/home/john/S/spamclean
SEE ALSO:
http://www.wagoneers.com/UNIX/crontab-linux-man.txt
------------------------------------------------
john@unix_srv [/home/john]
------------------------------------------------
--> more /home/john/S/logtrim
#!/bin/sh
# trims log file daily, run via crontab nightly
#
cd /home/john/logs/
pwd
/bin/ls -al *log*
echo " ------- "
/bin/ls -al unix_srv-access_log
echo " "
if [ ! -f `date +'%y%b%d'-log.txt` ]
then
/bin/echo " trimming log file"
echo " ------- "
/bin/cp unix_srv-access_log `date +'%y%b%d'-log.txt`
/bin/cat /dev/null > unix_srv-access_log
else echo " existing log file - did not overwrite"
echo " ------- "
fi
echo " ------- "
/bin/ls -al unix_srv-access_log
echo " ------- "
date
df .
------------------------------------------------
------------------------------------------------
:wq
Problem: Users in one group need access to files in another.
UNIX allows users to change permissions on their own files.
cd (to the directory where your files are)
ll (view the files and see what the permissions are:
if they are -rw-r--r-- then only YOU can write to them,
if they are -rw-rw-r-- then anyone in your GROUP can write to them,
if they are -rw-rw-rw- then ANYONE with access to the system can write to them.)
To change permissions so ANYONE can write to them,
chmod 666 (filename or filenames, wildcards are ok)
To change permissions back so only your group can write to them:
chmod 664 (...)
=========================
THERE IS A DEFAULT SETTING FOR NEW FILE CREATION in UNIX called umask.
type "umask" at the command line, if it comes up "022" then files you create
will have "-rw-r--r--" permissions. To open your files up completely,
change
your umask to 000.
=========================
fwiw, the file permission code is as follows:
421421421
rwxrwxrwx
r=read
w=write
x=executable (do NOT make regular files executable)
the first set of three (rwx) is the owner, second set group and last set
other.
I will be presenting this information in an upcoming UNIX class, some of
this material may be found at:
http://www.wagoneers.com/UNIX/Courses.html
There are other tools that have varying success, such as login groups, admin groups
and so on. Each version of UNIX has some specialized tool to deal with multiple group
membership. The best solution is to use the man pages, e.g. "man group"
john
=====================================================================
john meister sr CAD sys admin, Clearview Consulting
( http://www.wagoneers.com/ john@wagoneers.com )
=====================================================================
=====================================================================
john meister sr CAD sys admin, Clearview Consulting
http://www.wagoneers.com/ john@wagoneers.com
http://www.wagoneers.com/UNIX/Courses.html
=====================================================================
Subject: magazines for UNIX professionals
(links not provided in case they break... not going to maintain this page...)
http://sw.expert.com Server/Workstation Expert (was SunExpert) - should be free
http://www.unixreview.com - UNIX Review - should be free
http://www.performance-computing.com - Performance Computing - should be free
http://www.hpworld.com HP World - (interex publication) - should be free
http://informationweek.com/subscribe/web - Information Week - should be free
http://www.cwsubscribe.com - ComputerWorld - should be free
http://www.samag.com/sub - SysAdmin - $39.00 per year... get the free mags first
http://www.webtechniques.com - WebTechniques - solutions for internet and web developers
http://www.db2mag.com - DB2 magazine (IBM) - might be free if you're working w/ databases
http://www.ntsystems.com - Windows NT Systems - they should pay you to read about this junk
=====================================================================
From wmksmith@bigsky.net Tue May 16 09:20:54 2000
From: Kim Smith
[The following text is in the "Windows-1252" character set]
[Your display is set for the "iso-8859-1" character set]
[Some characters may be displayed incorrectly]
YOU HAVE JUST RECEIVED THE UNIX VIRUS!
There has never been a documented case of a virus on UNIX;
therefore, this virus is forced to operate on the honor system:
If you are running a variant of UNIX or Linux:
1. Please forward this message to everyone you know, and
2. Please delete a bunch of your files at random.
Thank you for your participation.
learned of a new program on slashdot... rather than attempt to
download a potential virus or web blocked file (virus protection),
I chose to bring it into my network via wget and examine it first...
------------------------------------------------
--> wget http://www.eecs.wsu.edu/paint.net/files/PaintDotNet_2_0.msi
--09:55:28-- http://www.eecs.wsu.edu/paint.net/files/PaintDotNet_2_0.msi
=> `PaintDotNet_2_0.msi'
Resolving www.eecs.wsu.edu... done.
Connecting to www.eecs.wsu.edu[199.237.72.126]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8,087,552 [text/plain]
100%[============================================================================>] 8,087,552 358.80K/s ETA 00:00
09:55:51 (358.80 KB/s) - `PaintDotNet_2_0.msi' saved [8087552/8087552]
Not showing the file examine for that one, but downloaded a recent virus
for the clueless microsoft outlook user in a corporate environment:
------------------------------------------------
--> wget http://hometown.aol.co.uk/NatalECT/SwFlshCorreios.exx # the exe was changed to exx to protect the clueless
--09:02:57-- http://hometown.aol.co.uk/NatalECT/SwFlshCorreios.exx
=> `SwFlshCorreios.exx'
Resolving hometown.aol.co.uk... done.
Connecting to hometown.aol.co.uk[205.188.226.152]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]
[ <=> ] 36,864 74.69K/s
09:02:58 (74.69 KB/s) - `SwFlshCorreios.exx' saved [36864]
------------------------------------------------
--> ll
-rw-r--r-- 1 john jeep 36864 Dec 23 09:02 SwFlshCorreios.exx
------------------------------------------------
--> file SwFlshCorreios.exx
SwFlshCorreios.exx: MS-DOS executable (EXE), OS/2 or MS Windows
------------------------------------------------
--> strings SwFlshCorreios.exx | more
!This program cannot be run in DOS mode.
RichA
.text
.data
.rsrc
.data
[|ntM
Pt?
)Ec
H0eX8aL
< SNIP >
[^YX
kernel32.dll
VirtualAlloc
VirtualFree
ExitProcess
user32.dll
MessageBoxA
LOADER ERROR
Can't load library
Can't load function
Decompress error
KERNEL32.dll
GetProcAddress
GetModuleHandleA
LoadLibraryA
------------------------------------------------
#!/bin/sh
#
# wrapper script, copies files befofe editing
#
cp "$@" "$@.`date +%y%b%d`"
vi "$@"