1PERSIST-TOOL(1) The persist-tool tool manual p PERSIST-TOOL(1)
2
3
4
6 persist-tool - Display the content of the persist file
7
9 persist-tool [command] [options]
10
12 NOTE: The persist-tool application is distributed with the syslog-ng
13 system logging application, and is usually part of the syslog-ng
14 package. The latest version of the syslog-ng application is available
15 at the official syslog-ng website[1].
16
17 This manual page is only an abstract, for the complete documentation of
18 syslog-ng, see the The syslog-ng Administrator Guide[2].
19
20 The persist-tool application is a utility that can be used to dump the
21 content of the persist file, and manipulate its content.
22
23 Warning
24 Persist-tool is a special tool for syslog-ng experts. Do use the
25 tool unless you know exactly what you are doing. Misconfiguring it
26 will result in irrecoverable damage to the persist file, without
27 any warning.
28
29 Note
30 Limitations:
31
32 • The persist-state functions can be used only with syslog-ng PE
33 5 LTS style persist file (SLP4). Older persist files are not
34 supported.
35
36 • Wildcard characters are not supported in file/directory names.
37
39 dump [options] [persist_file]
40
41 Use the dump command to print the current content of the persist file
42 in JSON format to the console.
43
44 The dump command has the following options:
45
46 --help or -?
47 Display a brief help message.
48
49 Example:
50
51 persist-tool dump /usr/local/var/syslog-ng.persist
52
53 The output looks like:
54
55 run_id = { "value": "00 00 00 00 0C 00 00 00 " }
56 host_id = { "value": "00 00 00 00 5F 49 2F 01 " }
57
59 add [options] [input_file]
60
61 Use the add command to add or modify a specified state-entry in the
62 persist file. The state-entry should be in the same format as the dump
63 command displays it. If the given state-entry already exists, it will
64 be updated. Otherwise, a new value will be added. If the given persist
65 state is invalid, it will be skipped.
66
67 To use the add command: use persist-tool dump to print the content of
68 the current persist file, and redirect it to a file. Edit the content
69 of this file. Use persist-tool add with this file to modify the
70 persist.
71
72 The add command has the following options:
73
74 --help or -?
75 Display a brief help message.
76
77 --output-dir=<directory> or -o
78 Required parameter. The directory where the persist file is located
79 at. The name of the persist file stored in this directory must be
80 syslog-ng.persist.
81
82 Example:
83
84 /usr/local/bin/persist-tool add dump_persist -o .
85
86 The valid output looks like:
87
88 log_reader_curpos(Application) OK
89 affile_sd_curpos(/var/aaa.txt) OK
90
91 The invalid output looks like:
92
93 log_reader_curpos(Application) OK
94 wrong
95 FAILED (error: Invalid entry syntax)
96 affile_sd_curpos(/var/aaa.txt) OK
97
99 /usr/local/bin/persist-tool
100
102 syslog-ng.conf(5)
103
104 syslog-ng(8)
105
106 Note
107 For the detailed documentation of see The 3.30 Administrator
108 Guide[3]
109
110 If you experience any problems or need help with syslog-ng, visit
111 the syslog-ng mailing list[4].
112
113 For news and notifications about of syslog-ng, visit the syslog-ng
114 blogs[5].
115
117 This manual page was written by the Balabit Documentation Team
118 <documentation@balabit.com>.
119
122 1. official syslog-ng website
123 https://www.balabit.com/log-management
124
125 2. The syslog-ng Administrator Guide
126 https://www.balabit.com/support/documentation/
127
128 3. The 3.30 Administrator Guide
129 https://www.balabit.com/documents/syslog-ng-ose-latest-guides/en/syslog-ng-ose-guide-admin/html/index.html
130
131 4. syslog-ng mailing list
132 https://lists.balabit.hu/mailman/listinfo/syslog-ng
133
134 5. syslog-ng blogs
135 https://syslog-ng.org/blogs/
136
137
138
1393.30 11/18/2020 PERSIST-TOOL(1)