]> Cypherpunks.ru repositories - nncp.git/blob - doc/spool.texi
Add various documentation indices
[nncp.git] / doc / spool.texi
1 @node Spool
2 @cindex spool directory
3 @unnumbered Spool directory
4
5 Spool directory holds @ref{Encrypted, encrypted packets} received from
6 remote nodes and queued for sending to them. It has the following
7 example structure with just single outbound (@code{tx}) packet
8 @code{LYT64MWSNDK34CVYOO7TA6ZCJ3NWI2OUDBBMX2A4QWF34FIRY4DQ} to the node
9 @code{2WHBV3TPZHDOZGUJEH563ZEK7M33J4UESRFO4PDKWD5KZNPROABQ}:
10
11 @example
12 spool/2WHBV3TPZHDOZGUJEH563ZEK7M33J4UESRFO4PDKWD5KZNPROABQ/toss.lock
13 spool/2WHBV3TPZHDOZGUJEH563ZEK7M33J4UESRFO4PDKWD5KZNPROABQ/rx.lock
14 spool/2WHBV3TPZHDOZGUJEH563ZEK7M33J4UESRFO4PDKWD5KZNPROABQ/rx/
15 spool/2WHBV3TPZHDOZGUJEH563ZEK7M33J4UESRFO4PDKWD5KZNPROABQ/tx.lock
16 spool/2WHBV3TPZHDOZGUJEH563ZEK7M33J4UESRFO4PDKWD5KZNPROABQ/tx/LYT64MWSNDK34CVYOO7TA6ZCJ3NWI2OUDBBMX2A4QWF34FIRY4DQ
17 spool/tmp
18 @end example
19
20 @table @file
21
22 @cindex tmp directory
23 @item tmp
24 directory contains various temporary files that under normal
25 circumstances are renamed to necessary files inside other directories.
26 All directories in @file{spool} @strong{have to} be on the same
27 filesystem for working renaming.
28
29 @item 2WHBV3TPZHDOZGUJEH563ZEK7M33J4UESRFO4PDKWD5KZNPROABQ
30 is an example Base32-encoded neighbour identifier.
31
32 @cindex rx directory
33 @cindex tx directory
34 @item rx, tx
35 directories are for incoming and outgoing encrypted packets. @file{rx}
36 contains currently unfinished, non-checked, unprocessed, etc packets.
37
38 @cindex lock files
39 @item toss.lock, rx.lock, tx.lock
40 Lock files. Only single process can work with @file{rx}/@file{tx}
41 directories at once.
42
43 @item LYT64MWSNDK34CVYOO7TA6ZCJ3NWI2OUDBBMX2A4QWF34FIRY4DQ
44 is an example @ref{Encrypted, encrypted packet}. Its filename is Base32
45 encoded @ref{MTH} hash of the whole contents. It can be integrity checked
46 anytime.
47
48 @cindex part files
49 @item LYT64MWSNDK34CVYOO7TA6ZCJ3NWI2OUDBBMX2A4QWF34FIRY4DQ.part
50 is an example @strong{partly} received file. It can appear only when
51 online transfer is used. Its filename is sent by remote side and until
52 file is fully downloaded -- it plays no role.
53
54 @cindex nock files
55 @item LYT64MWSNDK34CVYOO7TA6ZCJ3NWI2OUDBBMX2A4QWF34FIRY4DQ.nock
56 non-checksummed (NoCK) @strong{fully} received file. Its checksum is
57 verified against its filename either by @ref{nncp-check}, or by working
58 online daemons. If it is correct, then its extension is trimmed.
59
60 @cindex seen files
61 @item seen/LYT64MWSNDK34CVYOO7TA6ZCJ3NWI2OUDBBMX2A4QWF34FIRY4DQ
62 @ref{nncp-toss} utility can be invoked with @option{-seen} option,
63 leading to creation of @file{seen/} files, telling that the file with
64 specified hash has already been processed before. It could be useful
65 when there are use-cases where multiple ways of packets transfer
66 available and there is possibility of duplicates reception. You have to
67 manually remove them, when you do not need them (probably because they
68 are expired).
69
70 @cindex hdr files
71 @anchor{HdrFile}
72 @item hdr/LYT64MWSNDK34CVYOO7TA6ZCJ3NWI2OUDBBMX2A4QWF34FIRY4DQ
73 If no @ref{CfgNoHdr, nohdr} option is enabled in configuration file,
74 then @file{hdr/} files are automatically created for every ordinary
75 (fully received and checksummed) packet. It literally contains just the
76 header of the corresponding packet. It will be automatically created
77 even during simple @ref{nncp-stat} call. On filesystems with big
78 blocksize (ZFS for example) it can greatly help listing the packets in
79 directories, because it prevents unnecessary read-amplification. On
80 other filesystems probably it won't help at all, or even harm
81 performance.
82
83 There is a hack: you can create more dense @file{hdr/} allocation by
84 removing all @file{hdr/} files and then running @command{nncp-stat},
85 that will recreate them. In many cases many @file{hdr/} files will be
86 allocated more or less linearly on the disk, decreasing listing time
87 even more.
88
89 @end table