NAME | SYNOPSIS | DESCRIPTION | OPTIONS | PERMISSIONS | DIAGNOSTICS | FILES | ATTRIBUTES | SEE ALSO | NOTES
srmuser attaches to the lnode of the given user, then execs the shell named in the SHELL environment variable, or /bin/sh if the environment variable is not defined or is null. If present, the command argument with its optional following args are passed as a single argument to the shell preceded by a -c argument (see sh(1)). This effectively causes the command's CPU, memory, and process usages to be accrued to and limited by the specified lnode, and all flag permission checks to be evaluated under that lnode.
If the Solaris Resource Manager software is not enabled, then the lnode attachment is silently omitted, and the shell is forked anyway unless the -e option is given. If the Solaris Resource Manager software is enabled, but the lnode attachment fails, then an error message is written and the shell is not forked, unless the -f flag is given.
The username argument is interpreted as a login name, unless the name is not found in the password map; in this case, if it is numeric, then it is interpreted as a UID.
The main purpose of srmuser is to allow processing that would be CPU intensive if run on the root lnode to be run on some other lnode. The shell and command will accrue their usages to the attached lnode and be scheduled according to its share. However, the shell and command retain the process credentials of their invoker, so this continues to affect their ability to create files or to exceed the limits of the attached lnode.
The command-line options are:
Fail if Solaris Resource Manager is not enabled. This flag is overridden by -f.
Force srmuser to fork a shell even if it cannot attach to the specified lnode. The shell remains attached to the original lnode.
Preserve lnode attachment even in a case where the invoked command performs a setuid operation. This behavior is also inherited by the children of the original process.
Silent; don't write any error messages.
The mutually exclusive options -l and -u determine the interpretation of the username argument:
Interpret username argument as a login name only.
Interpret username argument as a numeric UID only. This option also allows use of UIDs that are not listed in the password map.
srmuser permits attachment to the specified lnode in any of these cases:
It is currently attached to the root lnode.
It is already attached to the specified lnode.
Its real UID is the same as the UID of the specified lnode.
It is currently attached to an lnode with a set uselimadm flag.
It is currently attached to an lnode with a set admin flag (a sub-administrator), and the specified lnode is a member of the attached lnode's scheduling group.
The return values and causes are:
Success.
Incorrect usage; illegal option or missing arguments.
Unknown user; cannot find login name or UID in password map.
Permission check failed.
Cannot attach to lnode; Solaris Resource Manager not enabled.
Unable to fork shell; out of memory or processes, or exec failed.
The return values 1 through 5 can be ambiguous. If the srmuser command itself fails, it will return a value between 1 and 5. If it succeeds, the return value of the last command run in the invoked shell is the code returned. If srmuser calls a binary, the return value will be that of the binary. If srmuser calls a script with a number of commands, the return value will be the result of the last command executed. Thus, if the return value of the invoked shell is 1 through 5, it will be unclear whether it is the srmuser command or the shell that failed.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Architecture | SPARC |
Availability | SUNWsrmb |
sh(1), liminfo(1SRM), 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 | PERMISSIONS | DIAGNOSTICS | FILES | ATTRIBUTES | SEE ALSO | NOTES