[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4

nischttl Command

Purpose

The nischttl command changes the time-to-live value of objects or entries in the namespace.

Syntax

To Change the Time-to-Live Value of Objects

nischttl [-A] [-L] [-P] [time-to-live] [object-name]

To Change the Time-to-Live Value of Entries

nischttl [ time-to-live ] [ column=value,... ] [ table-name ] [-A] [-L] [-P]

Note: Where time-to-live is expressed as:

Note: These values may be used in combination. For example, a TTL value of 4d3h2m1s would specify a time to live of four days, three hours, two minutes, and one second.

Description

This time-to-live value is used by the cache manager to determine when to expire a cache entry. You can specify the time-to-live in total number of seconds or in a combination of days, hours, minutes, and seconds. The time-to-live values you assign objects or entries should depend on the stability of the object. If an object is prone to frequent change, give it a low time-to-live value. If it is steady, give it a high one. A high time-to-live is a week; a low one is less than a minute. Password entries should have time-to-live values of about 12 hours to accommodate one password change per day. Entries in tables that don't change much, such as those in the RPC table, can have values of several weeks.

Notes
  1. To change the time-to-live of an object, you must have modify rights to that object. To change the time-to-live of a table entry, you must have modify rights to the table, entry, or columns you wish to modify.
  2. To display the current time-to-live value of an object or table entry, use the nisdefaults -t command, described in Administering NIS+ Access Rights.

Flags

-A Apply the change to all the entries that match the column=value specifications that you supply.
-L Follow links and apply the change to the linked object or entry rather than the link itself.
-P Follow the path until there is one entry that satisfies the condition.

Examples

Changing the Time-to-Live of an Object

  1. To change the time-to-live of an object, type the nischttl command with the time-to-live value and the object-name. You can add the -L command to extend the change to linked objects.

    nischttl -L time-to-live object-name
  2. You can specify the time-to-live in seconds by typing the number of seconds. Or, you can specify a combination of days, hours, minutes, and seconds by using the suffixes s, m, h, and d to indicate the number of seconds, minutes, days, and hours. For example:
    TTL of 86400 seconds client% nischttl 86400 sales.wiz.com.
    TTL of 24 hours client% nischttl 24h sales.wiz.com.
    TTL of 2 days, 1 hour, 1 minute, and 1 second client% nischttl 2d1h1m1s sales.wiz.com.
  3. The first two commands change the time-to-live of the sales.wiz.com. directory to 86,400 seconds, or 24 hours. The third command changes the time-to-live of all the entries in a hosts table to 2 days, 1 hour, 1 minute, and 1 second.

Changing the Time-to-Live of a Table Entry

  1. To change the time-to-live of entries, use the indexed entry format. You can use any of the options, -A, -L, or -P.

    nischttl [-ALP] time-to-live [column=value,...],
    table-name
  2. These examples are similar to those above, but they change the value of table entries instead of objects:

    client% nischttl 86400 '[uid=99],passwd.org_dir.wiz.com.'
    client% nischttl 24h `[uid=99],passwd.org_dir.wiz.com.'
    client% nischttl 2d1h1m1s `[name=fred],hosts.org_dir.wiz.com'

    NoteC shell users should use quotes to prevent the shell from interpreting the square bracket ([) as a metacharacter.

Related Information

The defaults command.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]