squeak!
Syllabus Homepage
Course Overview
Course resources
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
Day 8
Common errors
Internet Glossary
About Your Instructor
Credits: This site powered by the vi text editor, apache webserver, perl scripting, and Debian linux.
squeak!

solaris8 - Day 5

Goals

In this session you will:
  • control diskspace usage
  • control cpu usage

POST

  1. login to your box as an unprivileged user
  2. su to root; make a /backup and /scripts directory if each does not exist.
  3. write a short shell script that does a complete backup of your user directory (/temphome or whatever) using whichever archive you like. View the contents of the full backup. The backup file will end up in /backup and the script will live in /scripts.
  4. write a short shell script that does an incremental backup of any files that have changed since the complete backup ran. View the contents of the incremental backup. You may have to touch some files to get something to work with.

  5. how can you get a list of packages installed on your box?
  6. install the screen utility (a terminal multiplexer) from either sunfreeware.com or from the Solaris GPL Freeware companion disc. [this step is untested - do your best!]

Managing diskspace resources

Where is your diskspace going?

  • df -k
  • du in many forms
  • runaway logs; truncating and rotating
  • core files
  • .gz and other archives
  • shunt files over to new partition

quotas,solaris style

  1. add rq option to vfstab
  2. touch quotas in top of partition
  3. add chmod 600 quotas
  4. reboot
  5. edquota user option to vfstab

quotas, linux style

[populate]

controlling CPU resources

become aware of system load

The best way to get a feel for system load is to see that metric every time you log in. How would you do this? Keep your thumb on the system load at all times.

learn how to gauge CPU metrics

putting your foot down

  • runaways - find with top or ps; use ps to find lowest PID (parent) and start to kill or kill -9 from there. Leverage /etc/init.d scripts.
  • nice, renice 0 -> +19, default 0
  • priocntl for realtime apps: system, realtime, timesharing, and interactive classes, -20 -> 20, default 0
  • limit users with shell wrapper like lshells.

prevent the problem: inform the users

Inform the users with your /etc/motd that there is a problem. Give them docs.

prevent the problem: lower priority

nice

prevent the problem: timeshift

  • at [-lr]
  • batch cat /etc/cron.d/queuedefs
  • cron: cron.allow, cron.deny
  • look at the queuedefs file
  • nohup


    http://www.mousetrap.net/syllabus/solaris8/day5.html
    $Id: day5.orb,v 1.2 2002/10/29 21:58:14 mouse Exp $

  • © 1994-2002 jason carr.
    distributed under the terms of the GNU Free Documentation License.

    jason carr

    Reminders

    • Classroom temperature can be wildly variable. Dress lightly and bring layers.
    • your username is based on the class title and the last two digits of your workstation's hostname.
    • remember to take your work with you.