strtune Command

Purpose

This command has several related functions:
  • Get or set the streams tunable parameters.
  • Define the objects to trace using the component trace.
  • List the tunable values of the stream modules.
  • List the tunable values of the active queues.

Syntax

strtune {-n name | -q addr} -o tunable_name[=value] -o tunable_name[=value] ...

strtune [-n name | -q addr [-a]] -o trclevel[=value]

strtune [-M ]

strtune [-Q ]

strtune [-f tunefile ]

Description

There are no restrictions on the use of this command when it is used to display or list values, but when using this command to modify tunable values or to define objects to trace, you must have root authority.

Flags

Item Description
-n name Defines a stream module name or a device name.
-q addr Defines an active queue address.

If the command sets tunables, it modifies the queue pair, or the only queue, depending on the synchronization level of the queue. If the synchronization level is not SQLVL_QUEUE, the synchronization level is also propagated to all queue pairs.

-o tunable_name Defines the name of the tunable parameter. Possible values are:
  • hiwat , which defines the high water mark for the flow control on a queue.
  • lowat , which defines the low water mark for the flow control on a queue.
  • minpsz , which defines the minimum packet size.
  • maxpsz , which defines the maximum packet size. A value of -1 indicates an infinite packet size.

The strtune command can initialize several tunables by listing the -o option several times.

value If no new value is given, the command displays the value of the tunable. Only a user with root authority can modify a tunable parameter value.
-n name Defines a stream module name. If the -n or -q flag is not present in the command, the command will display or modify the global variable containing the pse global trace level (pse_trclevel).
-q addr Defines an active queue address. If the -n or -q flag is not present in the command, the command will display or modify the global variable containing the pse global trace level (pse_trclevel).

If the command sets the trace level, it modifies the queue pair, or the only queue, depending on the synchronization level of the queue. If the synchronization level is not SQLVL_QUEUE, the synchronization level is also propagated to all queue pairs.

-o trclevel Displays or modifies the trace level. The -o flag cannot be listed more than once.
value If no new value is given, the command displays the value of the tunable. Only a user with root authority can modify a tunable parameter value.
-a Use this flag to force the strtune command to propagate the new value to all queues in the stream (from stream head to driver). If the synchronization level is not SQLVL_QUEUE, the synchronization level is also propagated to all queue pairs.
-M Displays the name, idname, and associated tunable parameter (minpsz, maxpsz, lowat, hiwat, trclevel) values for each module.
-Q Displays the name, idname, and associated tunable parameter (minpsz, maxpsz, lowat, hiwat, trclevel) values for each active queue.
-f tunefile The tunefile variable holds the filepath to the file that contains the tunable parameter settings. Each line of the tunefile file is managed as one command; if there are any modification commands in the tunefile, the user must have root authority for those modifications to be implemented.

Exit Status

Item Description
0 Successful completion.
>0 An error occurred.

Examples

  1. To display the hiwat tunable value of ldterm module:
    strtune -n ldterm -o hiwat
  2. With root authority, to set the value of hiwat for the ldterm module to 8192:
    strtune -n ldterm -o hiwat=8192
  3. To run the following lines:
    -n udp6 -o lowat=256
    -n dlpi -o hiwat=4096 -o lowat=128 -o minpsz=128
    that are listed in the /tmp/ff file:
    strtune -f /tmp/ff
    This will result in the following commands being run:
    strtune -n udp6 -o lowat=256
    strtune -n dlpi -o hiwat=4096 -o lowat=128 -o minpsz=128 

File

Item Description
src/bos/usr/sbin/strtune/strtune.c Contains the strtune command.