System Administration Guide: Resource Management and Network Services

How to Use Command Files With poolcfg

poolcfg -f can take input from a text file that contains poolcfg subcommand arguments to the -c option. This technique is appropriate when you want a set of operations to be performed atomically. 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.

  1. Create the input file.


    $ cat > poolcmds.txt
    create system tester
    create pset batch (int pset.man = 2; int pset.max = 10)
    create pool batch
    associate pool batch (pset batch)
    
  2. Become superuser.

  3. Type the following:


    # /usr/sbin/poolcfg -f poolcmds.txt