NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERATION MODES | PARAMETERS | EXAMPLES | FILES | ATTRIBUTES | SEE ALSO | NOTES
The srmadm command displays or sets operation modes and system-wide tunable parameters of Solaris Resource Manager.
Invoked without options, srmadm reports whether Solaris Resource Manager is installed on the system.
Displays the state of the specified operation mode of Solaris Resource Manager. srmadm displays yes on the standard output and returns 0 if the specified mode is enabled, otherwise it displays no and returns 1.
The following operating modes are recognized:
Solaris Resource Manager currently has a limits database open.
Solaris Resource Manager SHR scheduler is currently enabled.
Solaris Resource Manager virtual memory and process limiting functions are currently enabled.
The hierarchical group balancing feature of the Solaris Resource Manager SHR scheduler is currently enabled.
The priority ceiling feature of the Solaris Resource Manager SHR scheduler is currently enabled.
When used with the -d option, the default value of the mode will be displayed.
When used with the -i option, the initial value of the mode will be displayed. The initial value is the one preset on reboot before Solaris Resource Manager is brought online.
Outputs a formatted report of the current operational state of Solaris Resource Manager and its main configuration parameters.
When used with the -d option, the default values of the modes and parameters will be displayed.
When used with the -i option, the default initial values of the modes and parameters will be displayed. The initial values are those preset on reboot before Solaris Resource Manager is brought online.
Enables or disables the specified operation mode(s) or assigns a value to the specified Solaris Resource Manager parameter.
When used with the -d option and without modes or parameters, all parameters and modes will be set to their default values.
When used with the -d option and with modes or parameters, all parameters and modes will be set to the default values except for the specified modes or parameters which will be set to the specified values.
When enabling the fileopen mode by setting it to "y," an optional filename for the limits database can be provided to Solaris Resource Manager using the -f option. If no filename is provided, the default limits database will be used. The default file name is /var/srm/srmDB. An empty database can be created by using the touch command.
Using the set option on a parameter or mode and without any value will set the specified parameter or mode to the default value.
The setting of both modes and parameters can be combined in a single invocation of the command.
Note that the invoker must be the superuser to change values.
When using with the show option and no mode argument, you may also use the -v or -V option to specify a verbosity level to be used for outputting the current settings of Solaris Resource Manager.
The highest level of verbosity is 3. If a level higher than 1 is supplied, then additional statistics and settings of the Solaris Resource Manager system are output. Invoking srmadm with no -v is equivalent to supplying a -v or -V 1. When used with the show option and no mode argument is supplied, -v is equivalent to -V 1.
When using with the set option, the -v or -V options cause the operational state on completion of the command to be displayed (at the requested level of verbosity), provided the command is successful.
The default database is /var/srm/srmDB and it can be overridden with the -f option.
Note that closing the Solaris Resource Manager limits database file in mid-operation should be regarded as an emergency action. It has several undesirable consequences: all processes will continue running on the surrogate root lnode, which may give them more privilege than normal; the SHR scheduler is disabled; Solaris Resource Manager limit enforcement ceases.
When disabled (fileopen=n), the Solaris Resource Manager currently has no limits database open, and its cache contains only the surrogate root lnode to which all processes are attached.
When enabled (share=y), the SHR scheduler is used and CPU scheduling takes place according to Solaris Resource Manager's dynamic usage and decay algorithm. This mode cannot be set unless the fileopen mode is enabled. When disabled, the SHR scheduler's usage calculations are frozen, and processes are scheduled round-robin with fixed equal priorities.
When enabled (limits=y), Solaris Resource Manager enforces the virtual memory and process limits. This mode cannot be set unless the fileopen mode is enabled. When disabled, Solaris Resource Manager will keep usage attributes up to date, but will not enforce limits.
When enabled (adjgroups=y), the SHR scheduler's global group effective share adjustment is used. The enabled state is recommended in most circumstances.
Every run interval, the normalized usages of all limits entries are recalculated. If the adjgroups scheduling mode is enabled, then extra processing of normalized usages is performed as follows. The scheduler makes a pass over the scheduling tree, comparing each group's recently received effective share with its entitlement. Groups that have received less than their group entitlement are biased to receive a greater effective share in the next run interval. This has the effect of ensuring that groups receive their entitlement of CPU service whenever possible, regardless of the actions of their members.
When enabled (limshare=y), the SHR scheduler applies its priority ceiling feature to limit all users' effective shares to prevent extremely low-usage users from briefly acquiring almost 100 percent of CPU. The enabled state is recommended.
The rate of CPU service for a user is roughly inversely proportional to the user's usage. If users have not been active for a very long time, then their usage decays to near-zero. When such a user logs in (or the lnode becomes active in any way), then for the duration of the next run interval, the user's processes could have such high priority that they monopolize the CPU.
Enabling the limshare scheduling flag causes the scheduler to estimate the effective share that an lnode will receive before the next run interval. If the result exceeds the user's assigned entitlement by a given factor (see maxushare), then the user's normalized usage is readjusted to prevent this.
Causes srmadm to nominate the Solaris Resource Manager idle lnode with the UID of the given user as the argument. The default user name is srmidle with UID 41.
All Solaris Resource Manager idle CPU costs are charged to this lnode. The srmidle lnode must have zero shares to ensure that the processes attached to it are run only when no other processes can be run.
Causes srmadm to nominate the Solaris Resource Manager lost lnode as that belonging to the user with the given UID or login name. It is not allowable for the lost lnode to be set to root's lnode, and using a login name of root as the value for this parameter is an error. Using a UID of 0 as the value for this parameter results in Solaris Resource Manager having no lost lnode. The default user name is srmlost with UID 42.
Using the default value substitution feature with this parameter when the user srmlost does not exist results in Solaris Resource Manager having no lost lnode.
The lost lnode is used by the setuid(2) system call. Under Solaris Resource Manager, setuid has the additional function of attaching the calling process to a new lnode. If this fails, or there is no lost lnode, then the process remains attached to its original lnode.
The run interval for the SHR scheduler. This is the time interval that elapses between recalculations of the normalized usages of all active users. The normalized usage affects the priorities of a user's processes, so larger values of delta effectively reduce the short-term responsiveness of the scheduler.
The upper bound for CPU usages used in the priority calculation. Users with usages larger than this will use this value for their priority calculation. This prevents users with high CPU usages from skewing the priorities of other users.
The decay rate for users' usages, expressed as a half-life in seconds. The optional suffix character h may be used to specify the value in hours.
The decay rate for the priorities of processes with normal and maximum nice values respectively, expressed as half-lives. The rates for other nice values are interpolated between these two and extrapolated down to minimum nice. The second value must be greater than the first.
If the limshare scheduling mode is enabled, this limits the maximum effective share an individual user can have to float times their allocated share. It must not be less than 1.0, and the default is 2.0.
To check whether Solaris Resource Manager is installed:
srmadm
To check if a limits database is opened:
srmadm show fileopen
To display the default setting for fileopen:
srmadm show -d fileopen
To enable Solaris Resource Manager, which requires opening a limits database, enabling the SHR scheduler, and enforcing the source limits:
srmadm set -f /var/srm/myDB share=y:limits=y:fileopen=y
A number of srmadm commands, including this one, are performed by the Solaris Resource Manager /etc/rc2.d/S10srm script during the transition to system init level 2.
To display the current flag settings and charges:
srmadm show
To display the default flag settings and charges:
srmadm show -d
To set all parameters and modes to the default values:
srmadm set -d
To set the usage decay rate to have a half-life of 5 minutes:
srmadm set usagedecay=300
To set all parameters and modes to the default values except the usage decay rate, which is set to 5 minutes:
srmadm set -d usagedecay=300
To set the scheduler run rate and usage decay rate to their default values:
srmadm set delta:usagedecay
To show all the default settings:
srmadm show -d -V 3
The Solaris Resource Manager init script.
Link to the Solaris Resource Manager init script used at entry to system init level 1.
Link to the Solaris Resource Manager init script used at entry to system init level 2.
The Solaris Resource Manager limits database.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Architecture | SPARC |
Availability | SUNWsrmb |
touch(1), setuid(2), limadm(1MSRM), srm(5SRM)
Solaris Resource Manager 1.3 System Administration Guide
This man page is applicable to SunOS 5.6, SunOS 5.7, and SunOS 5.8.
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERATION MODES | PARAMETERS | EXAMPLES | FILES | ATTRIBUTES | SEE ALSO | NOTES