Go to main content

Administering Resource Management in Oracle® Solaris 11.3

Exit Print View

Updated: March 2018
 
 

How to Use Command Files With poolcfg

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 poolcmds.txt.
    $ 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. Become root or assume an equivalent role.
  3. Execute the command:
    # /usr/sbin/poolcfg -f poolcmds.txt