16.05.2015 Views

Working with the Unix OS

Working with the Unix OS

Working with the Unix OS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Unix</strong> Administration<br />

/tmp, /var/tmp, /usr/tmp # scratch pads fill up fast<br />

/usr/spool/console, /usr/adm/messages, ...<br />

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />

UBUNTU: /usr/spool/ does not exist<br />

/usr/adm/ is /var/log/messages<br />

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />

O<strong>the</strong>r tasks:<br />

# cleanup<br />

(<br />

find / -type f \( -name core -o -name a.out \<br />

-o name dead.letter \) -atime +1 -exec rm -f {} \;<br />

find /usr/spool/console -type f -mtime +7 -exec rm -f {} \;<br />

find /usr/preserve -type f -mtime +15 -exec rm -f {} \;<br />

find /usr/mail -type -f -atime +28 -exec rm -f {} \;<br />

) > /dev/console 2>&1<br />

! Performance Watch<br />

- buffer cache hit ratios<br />

- buffer cache write-behind ratio<br />

- kernel time versus user time<br />

- page wait<br />

- page rate<br />

- fullness of process table<br />

- fullness of file table<br />

- fullness of inode table<br />

- fullness of clists<br />

! User Administration<br />

- making user directories<br />

- creating password and group entries<br />

- getting disk space<br />

- taking care of all login functions<br />

- handling group permissions<br />

- changing ownerships and permissions<br />

- moving users and user files<br />

- updating YP data base source file<br />

User password administration on multiple machines <strong>with</strong>out YP requires <strong>the</strong> creation of a user-ID data base.<br />

User-ID from 0 to 100 are reserved for non-humans, User-ID from 101 to 999 are system staff<br />

! Identity Files – not enough info in passwd, group<br />

- log name<br />

- user ID number<br />

- real name<br />

- group<br />

- group ID number<br />

- phone number<br />

- location<br />

- department number<br />

- misc<br />

File Systems<br />

Disks are split into partitions<br />

A partition is <strong>the</strong>n mounted as a subtree of <strong>the</strong> <strong>Unix</strong> directory structure<br />

Example Configuration<br />

Drive 0 Drive 1<br />

/ root partition / 2n d root partition<br />

/tmp temporary files /usr system libraries<br />

swap space<br />

/home user directories<br />

- root partitions are small and near <strong>the</strong> outer edge of <strong>the</strong> drive to reduce risk of failure<br />

- 2nd root partition to fix things if drive 0 fails (Harder <strong>with</strong>out swap space)<br />

- Essentials are kept on one drive (drive 0)<br />

- /tmp can fill up and not interfere <strong>with</strong> /<br />

- /tmp on different drive to user files to reduce disk head seeking when creating temporary files from user files<br />

188

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!