unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



class_admin(8)						       class_admin(8)



NAME

  class_admin -	Administer daemons and databases for class scheduling.

SYNOPSIS

  /usr/sbin/class_admin	[subcommand[, subcommand]...]

DESCRIPTION

  Class	scheduling allows you to organize users	and groups into	classes	and
  specify the maximum percentage of CPU	usage permitted	each class. The
  class_admin utility is used to set up	and maintain class databases and to
  start	and stop the class scheduler.  These operations	are performed through
  utility subcommands, which are listed	and described in the "Subcommands"
  section. Read	the information	in class_scheduling(4) if you are unfamiliar
  with class scheduling. That reference	page includes conceptual information,
  guidelines, and restrictions that are	not repeated here and apply to both
  the class_admin utility and the class	scheduling APIs.

  All class_admin subcommands execute in the context of	a soft partition
  (processor set). The class_admin utility maintains different class schedul-
  ing databases	for different partitions, and you must enable class schedul-
  ing on each partition	for which you maintain a class scheduling database.
  If user-defined partitions do	not exist, the default partition is the	only
  partition on the system and contains all system CPUs.	This partition exists
  even after user-defined partitions have been created;	in which case, it
  contains all CPUs that have not been allocated to a user-defined partition.
  When you enter the class_admin command without a setp	pset_num subcommand,
  the default partition	is your	context. You can enter a setp subcommand at
  the utility prompt to	change partition context.

  The class_admin command can be run interactively or non-interactively.

  Non-interactive mode allows class_admin to be	run from within	a script,
  which	makes it easy to enable	class scheduling at system startup through
  use of an init script. (See init(8).)	To run class_admin non-interactively,
  specify one or more subcommands as arguments on the utility command line.

  Interactive mode is useful after system startup. To run class_admin
  interactively, you can invoke	class_admin without specifying any arguments,
  and then enter all subcommands at the	utility	prompt.	 The exception is
  that you should include the setp pset_num subcommand at invocation time if
  you do not plan to enable class scheduling for the system default parti-
  tion.









  Database Configuration Parameters


  If a class scheduling	database does not exist	for the	partition to which
  context is set, the class_admin utility automatically	creates	a class
  database when	it starts up. When running the utility interactively, you
  supply configuration parameters for the database by answering	three ques-
  tions.  For non-interactive operation, the utility automatically applies to
  the database the default answers to these questions. You can reset confi-
  guration parameters at a later time by using the utility's configure sub-
  command.

  The following	questions prompt for database configuration parameters:

   1.  Shall processes that have not been explicitly assigned to a defined
       class be	assigned to a "default"	class? Enter (yes/no) [no]:

       To be class scheduled, a	process	must be	assigned to a class. If	you
       answer yes to this question, a special class called the "default"
       class will be created, and any process that does	not belong to the
       classes you define will be assigned to this class. If you answer	no to
       this question, then only	those processes	that belong to classes
       defined by you are class	scheduled. Processes owned by root (UID	0)
       are not subject to class	scheduling.

   2.  Enforce class scheduling	when the CPU is	otherwise idle?	(yes/no)
       [yes]:

       If you answer no	to this	question, the scheduler	can allow a class to
       exceed its CPU percentage when the partition has	idle CPUs. Otherwise,
       a class is held to its allotted percentage even if the CPUs in the
       partition have no other work.

   3.  How often do you	want the system	to reset class usage? Enter number of
       seconds (1):

       If there	are interactive	jobs subject to	class scheduling, use a	small
       number (no more than several seconds) to	ensure a quick response	time.
       If only batch jobs are class scheduled, you can enter larger values
       because system response time is not an issue.

  If you included the enable subcommand	on the class_admin command line, your
  settings take	effect immediately.

  Subcommands


  add Add one or more identifiers for a	group, user, process, process group,
      or session to an existing	scheduling class. If the specified identifier
      is a member of another class, you	will be	asked whether you want to
      move the member.

      Syntax:

      add class_name type  id [id]...

      The type argument	can be one of the following:

      gid     To add one or more group identifiers to the class. In this
	      case, the	specified numbers reside in the	/etc/group file.
	      These identifiers	will persist in	the class scheduling database
	      across reboots.

      uid     To add one or more user identifiers to the class.	In this	case,
	      the specified numbers reside in the /etc/passwd file. These
	      identifiers will persist in the class scheduling database
	      across reboots.

      pid     To add one or more process identifiers to	the class. In this
	      case, the	specified numbers, as shown in the PID column of the
	      ps command display, persist in the class scheduling database
	      only as long as those processes are running.

      pgrp    To add one or more process group identifiers to the class. In
	      this case, the specified numbers,	as shown in the	PGID column
	      of the ps	command	display, persist in the	class scheduling
	      database only as long as any processes in	those process groups
	      are running.

      session To add one or more session identifiers to	the class. In this
	      case, the	specified numbers, as shown in the SESS	column of the
	      ps command display, persist in the class scheduling database
	      only as long as any processes in those sessions are running.

  cancel
      Remove recent changes to the currently loaded database and go back to
      the version last saved to	disk.

      Syntax:

      cancel

  change
      Change the CPU percentage	allotted to a scheduling class.	You cannot
      specify a	CPU percentage that would cause	the total of percentages for
      all classes in the database to exceed 100%.

      Syntax:

      change class_name	cpu_percentage

  create
      Create a new scheduling class. The specified name	must be	unique and
      cannot exceed 20 characters.  Because a newly created class will be
      empty, you must use the add subcommand to	populate the class with
      members or add process members indirectly	through	the runclass command
      after class scheduling is	enabled. You cannot specify a CPU percentage
      that would cause the total of percentages	for all	classes	in the data-
      base to exceed 100%.

      Syntax:

      create class_name	cpu_percentage

  configure
      Set up the basic class scheduling	parameters. You	will be	asked the
      three questions discussed	in the "Database Configuration Parameters"
      section.

      Syntax:

      configure

  delete
      Remove one or more member	identifiers from an existing scheduling
      class.

      Syntax:

      delete class_name	type  id [id]...

      See the entry for	the add	subcommand for a list of supported type
      values.

  destroy
      Destroy an existing scheduling class.  If	the class is not empty,	you
      will be asked for	permission to destroy it anyway.

      Syntax:

      destroy class_name

  disable
      Turn off class scheduling	for the	partition to which context is set.
      Note that	the kernel will	terminate the instance of the scheduler	dae-
      mon for that partition.

      Syntax:

      disable

  enable
      Turn on class scheduling for the partition to which context is set.
      This starts a daemon that	periodically examines CPU usage	by different
      classes and makes	adjustments in CPU access according to the class lim-
      its.

      Syntax:

      enable

  exit
      Return to	the command shell.  If there are any unsaved changes to	the
      current class scheduling database	during your session, you will be
      asked whether you	want to	save them. (Same as for	quit.)

      Syntax:

      exit

  help
      Display online help.  If you specify a particular	subcommand, the	util-
      ity displays the syntax for only that subcommand.	 Otherwise, the	util-
      ity displays a list of all subcommands and their arguments.

      Syntax:

      help [subcommand]

  listp
      List all partitons and the status	of class scheduling for	each.

      Syntax:

      listp

  load
      Load the specified class database	from disk into memory.

      Syntax:

      load database_path

      The database_path	is the path to the class database. By default, class
      databases	reside in the /etc/class directory and have file names in the
      format part.partition.

      If you made changes to the database that is currently loaded into
      memory and neither cancelled nor saved these changes to disk, the	util-
      ity tells	you that load operation	will destroy unsaved changes and asks
      if you still want	to proceed with	the load operation.

  quit
      Return to	the command shell.  If there are any unsaved changes to	the
      database that is currently loaded	into memory, you will be asked
      whether you want to save them. (Same as for exit.)

      Syntax:

      quit

  rename
      Change the name of an scheduling class.

      Syntax:

      rename old_class_name new_class_name

  save
      Write permanent database changes to a file on disk and continue.

      Syntax:

      save [database_path]

      The database_path	argument is the	pathname for the class database	that
      you are currently	setting	up or changing.	If you omit this argument,
      changes are saved	to the disk file of the	class database currently
      loaded into memory. If you invoked class_admin to	set up a new data-
      base, use	the show command to see	the default name and directory for
      the associated file. If you decide to change the default name or loca-
      tion, remember that the pathname cannot exceed 80	characters.

  setp
      Set partition context.

      Syntax:

      setp [pset_id]

      If you do	not specify pset_id, the system	default	partition (processor
      set 0) is	assumed. See also listp.

  show
      Show the CPU percentage and members for a	scheduling class. If you do
      not specify a class name,	the utility shows this information for all
      classes in the currently loaded database.

      Syntax:

      show [class_name]

  stats
      List the target and actual CPU utilization for a scheduling class. If
      you do not specify a class name, the utility shows CPU utilization for
      all classes in the current database.

      Syntax:

      stats [class_name]




FILES

  /etc/class/part.*
      Default pathname for a class database, where * represents	the parti-
      tion.

  /usr/sbin/class_daemon
      The class	scheduler daemon.

SEE ALSO

  Commands: ps(1), runclass(1)

  Files: class_scheduling(4), processor_sets(4)

  Functions: class_add(3), class_change(3), class_change_name(3),
  class_close(3), class_configure(3), class_create(3),
  class_database_file_exists(3), class_database_modified(3),
  class_database_name(3), class_delete(3), class_destroy(3),
  class_disable(3), class_get_class_members(3),	class_get_classes(3),
  class_get_config_stats(3), class_load_database(3), class_open(3),
  class_restore_database(3), class_save_database(3)