Go to main content

Administering Resource Management in Oracle® Solaris 11.4

Exit Print View

Updated: February 2021
 
 

How to Use Command Files With the poolcfg Command

The poolcfg command with the –f option can take input from a text file that contains poolcfg subcommand arguments to the –c option. This method is appropriate when you want a set of operations to be performed. When processing multiple commands, the configuration is only updated if all of the commands succeed. For large or complex configurations, this technique can be more useful than per-subcommand invocations.

Note that in command files, the # character acts as a comment mark for the rest of the line.

  1. Create the input file.
    $ cat > poolcmds.txt
    create system tester
    create pset pset_batch (uint pset.min = 2; uint pset.max = 10)
    create pool pool_batch
    associate pool pool_batch (pset pset_batch)
  2. Assume the root role.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.4.

  3. Execute the command.
    $ /usr/sbin/poolcfg -f poolcmds.txt