The nischttl command changes the time-to-live value of objects or entries in the namespace.
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:
- Number of seconds. A number with no letter is interpreted as a number of seconds. Thus, 1234 for TTL would be interpreted as 1234 seconds. A number followed by the letter s is also interpreted as a number of seconds. Thus, 987s for TTL would be interpreted as 987 seconds. When seconds are specified in combination with days, hours, or minutes, you must use the letter s to identify the seconds value.
- Number of minutes. A number followed by the letter m is interpreted as a number of minutes. Thus, 90m for TTL would be interpreted as 90 minutes.
- Number of hours. A number followed by the letter h is interpreted as a number of hours. Thus, 9h for TTL would be interpreted as 9 hours.
- Number of days. A number followed by the letter d is interpreted as a number of days. Thus, 7d for TTL would be interpreted as 7 days.
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.
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
- 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.
- 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.
Item | Description |
---|---|
-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. |
Changing the Time-to-Live of an Object
nischttl -L time-to-live object-name
Item | Description |
---|---|
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. |
Changing the Time-to-Live of a Table Entry
nischttl [-ALP] time-to-live [column=value,...],
table-name
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'
Note C shell users should use quotes to prevent the shell from interpreting the square bracket ([) as a metacharacter.