1.\" $NetBSD: iprop-log.8,v 1.8 2023/06/19 21:41:44 christos Exp $ 2.\" 3.\" Id 4.\" 5.\" Copyright (c) 2005 - 2007 Kungliga Tekniska Högskolan 6.\" (Royal Institute of Technology, Stockholm, Sweden). 7.\" All rights reserved. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 13.\" 1. Redistributions of source code must retain the above copyright 14.\" notice, this list of conditions and the following disclaimer. 15.\" 16.\" 2. Redistributions in binary form must reproduce the above copyright 17.\" notice, this list of conditions and the following disclaimer in the 18.\" documentation and/or other materials provided with the distribution. 19.\" 20.\" 3. Neither the name of the Institute nor the names of its contributors 21.\" may be used to endorse or promote products derived from this software 22.\" without specific prior written permission. 23.\" 24.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 25.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 28.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34.\" SUCH DAMAGE. 35.\" 36.\" Id 37.\" 38.Dd February 18, 2007 39.Dt IPROP-LOG 8 40.Os 41.Sh NAME 42.Nm iprop-log 43.Nd examine and maintain the iprop log file 44.Sh SYNOPSIS 45.Nm 46.Op Fl Fl version 47.Op Fl h | Fl Fl help 48.Ar command 49.Pp 50.Nm iprop-log truncate 51.Oo Fl c Ar file \*(Ba Xo 52.Fl Fl config-file= Ns Ar file 53.Xc 54.Oc 55.Oo Fl r Ar string \*(Ba Xo 56.Fl Fl realm= Ns Ar string 57.Xc 58.Oc 59.Oo Fl K Ar integer \*(Ba Xo 60.Fl Fl keep-entries= Ns Ar integer 61.Xc 62.Oc 63.Oo Fl B Ar integer \*(Ba Xo 64.Fl Fl max-bytes= Ns Ar integer 65.Xc 66.Oc 67.Oo Fl R \*(Ba Xo 68.Fl Fl reset 69.Xc 70.Oc 71.Op Fl h | Fl Fl help 72.Op Ar log-file 73.Pp 74.Nm iprop-log dump 75.Oo Fl c Ar file \*(Ba Xo 76.Fl Fl config-file= Ns Ar file 77.Xc 78.Oc 79.Oo Fl r Ar string \*(Ba Xo 80.Fl Fl realm= Ns Ar string 81.Xc 82.Oc 83.Oo Fl n \*(Ba Xo 84.Fl Fl no-lock 85.Xc 86.Oc 87.Oo Fl R \*(Ba Xo 88.Fl Fl reverse 89.Xc 90.Oc 91.Op Fl h | Fl Fl help 92.Op Ar log-file 93.Pp 94.Nm iprop-log replay 95.Op Fl Fl start-version= Ns Ar version-number 96.Op Fl Fl end-version= Ns Ar version-number 97.Oo Fl c Ar file \*(Ba Xo 98.Fl Fl config-file= Ns Ar file 99.Xc 100.Oc 101.Oo Fl r Ar string \*(Ba Xo 102.Fl Fl realm= Ns Ar string 103.Xc 104.Oc 105.Op Fl h | Fl Fl help 106.Op Ar log-file 107.Pp 108.Nm iprop-log last-version 109.Oo Fl c Ar file \*(Ba Xo 110.Fl Fl config-file= Ns Ar file 111.Xc 112.Oc 113.Oo Fl r Ar string \*(Ba Xo 114.Fl Fl realm= Ns Ar string 115.Xc 116.Oc 117.Oo Fl n \*(Ba Xo 118.Fl Fl no-lock 119.Xc 120.Oc 121.Op Fl h | Fl Fl help 122.Op Ar log-files 123.Pp 124.Nm iprop-log signal 125.Oo Fl c Ar file \*(Ba Xo 126.Fl Fl config-file= Ns Ar file 127.Xc 128.Oc 129.Oo Fl r Ar string \*(Ba Xo 130.Fl Fl realm= Ns Ar string 131.Xc 132.Oc 133.Op Fl h | Fl Fl help 134.Pp 135.Sh DESCRIPTION 136Supported options: 137.Bl -tag -width Ds 138.It Fl Fl version 139.It Fl h , Fl Fl help 140.El 141.Pp 142command can be one of the following: 143.Bl -tag -width truncate 144.It truncate 145.Bl -tag -width Ds 146.It Fl c Ar file , Fl Fl config-file= Ns Ar file 147configuration file 148.It Fl r Ar string , Fl Fl realm= Ns Ar string 149realm 150.It Xo 151.Fl K Ar integer , 152.Fl Fl keep-entries= Ns Ar integer 153.Xc 154.It Xo 155.Fl B Ar integer , 156.Fl Fl max-bytes= Ns Ar integer 157.Xc 158.It Xo 159.Fl R , 160.Fl Fl reset 161.Xc 162.El 163.Pp 164If 165.Fl Fl reset 166is given, then the given, configured, or default log file will be 167truncated and will start at version 1. This forces full propagations to 168all slave KDCs. 169.Pp 170Otherwise the log will be truncated but some entries will be preserved, 171as specified by the 172.Fl Fl keep-entries 173and/or 174.Fl Fl max-bytes 175options. The largest number of 176.Fl Fl keep-entries 177entries that are available and fit in the given 178.Fl Fl max-bytes 179option will be used. The 180.Fl Fl keep-entries option defaults to 100, and the 181.Fl Fl max-bytes 182option defaults to the 183.Ar log-max-size 184parameter in the configuration. 185.Pp 186.It dump 187.Bl -tag -width Ds 188.It Fl c Ar file , Fl Fl config-file= Ns Ar file 189configuration file 190.It Xo 191.Fl r Ar string , 192.Fl Fl realm= Ns Ar string 193.Xc 194realm 195.It Xo 196.Fl n Ar string , 197.Fl Fl no-lock 198.Xc 199.It Xo 200.Fl R Ar string , 201.Fl Fl reverse 202.Xc 203.El 204.Pp 205Print out all entries in the given, configured, or default log file to 206standard output. If the 207.Fl n 208option is used then don't lock the iprop log file. If the 209.Fl R 210option is used, then print the entries in reverse order 211(this can be useful when the log is very large). 212.It replay 213.Bl -tag -width Ds 214.It Fl Fl start-version= Ns Ar version-number 215start replay with this version 216.It Xo 217.Fl Fl end-version= Ns Ar version-number 218.Xc 219end replay with this version 220.It Fl c Ar file , Fl Fl config-file= Ns Ar file 221configuration file 222.It Fl r Ar string , Fl Fl realm= Ns Ar string 223realm 224.El 225.Pp 226Replay the changes from specified entries (or all if none is specified) 227in the given, configured, or default transaction log file to the 228database. 229.It last-version 230.Bl -tag -width Ds 231.It Fl c Ar file , Fl Fl config-file= Ns Ar file 232configuration file 233.It Fl r Ar string , Fl Fl realm= Ns Ar string 234realm 235.It Xo 236.Fl n Ar string , 237.Fl Fl no-lock 238.Xc 239.El 240.Pp 241prints the version of the last record in each of the given log files, or 242the configured, or the default log file if none is given. 243.It signal 244.Bl -tag -width Ds 245.It Fl c Ar file , Fl Fl config-file= Ns Ar file 246configuration file 247.It Fl r Ar string , Fl Fl realm= Ns Ar string 248realm 249.El 250.Pp 251Signals the ipropd-master daemon to send updates to slaves. Normally 252kadmin does this every time it writes to the database, so this should 253rarely be needed. 254.El 255.Sh SEE ALSO 256.Xr iprop 8 257