SYNOPSIS
ccnr [-h]
DESCRIPTION
A Repository supports the network by preserving content and responding to Interests requesting content that it holds. These services are available to CCN components, including CCN-enabled customer applications. A Repository can exist in any node, and is recommended if applications in that node need to preserve data. See CCNx Repository Protocols for more information about the Repository.
The ccnr command starts the Repository using the directory specified by the CCNR_DIRECTORY environment variable. At startup, the Repository retrieves and applies the configuration options described below.
The directory named by CCNR_DIRECTORY must exist already. To start ccnr as a daemon, redirect stderr to a file and execute
bin/ccnr &
ccnr shuts down gracefully if it receives SIGINT or SIGTERM, or if the ccnd to which it is connected is shut down.
Do not run two Repositories on the same backing store directory at the same time.
The Repository uses $CCNR_DIRECTORY/repoFile1 for persistent storage of CCN Content Objects. A disk-resident index facilitates rapid start-up and limits the memory footprint. If an index does not exist, it is built during startup.
A policy file specifies the namespaces for which the Repository accepts and holds content. The name of the policy file is the concatenation of the global prefix and "data/policy.xml". Unless an alternative policy has been explicitly written/published under the policy information name, the the policy defaults to /, which means that writes will be accepted for any name and reads serviced for any name for which there is content.
The Repository is configured from information in the text file, $CCNR_DIRECTORY/config. The file is only read at startup time.
Any or all variables in the file may also be expressed as environment variables that are examined at startup time. If the same variable is defined in both the configuration file and an environment variable, the value in the configuration file takes precedence.
- CCNR_BTREE_MAX_FANOUT=<Max fanout>
-
where <Max fanout> is the maximum number of entries in index B-tree interior nodes. The maximum value for <Max fanout> is 1999.
- CCNR_BTREE_MAX_LEAF_ENTRIES=<Max leaf entries>
-
where <Max leaf entries> is the maximum number of entries in index B-tree leaf nodes. The maximum value for <Max leaf entries> is 1999.
- CCNR_BTREE_MAX_NODE_BYTES=<Max index size>
-
where <Max index size> is the maximum size of index B-tree nodes, in bytes. The maximum value for <Max index size> is 2097152.
- CCNR_BTREE_NODE_POOL=<Max index nodes cached>
-
where <Max index nodes cached> is the maximum number of index B-tree nodes cached in memory. The maximum value for <Max index nodes cached> is 512.
- CCNR_CONTENT_CACHE=< Max objects cached>
-
where < Max objects cached> is the maximum number of Content Objects cached in memory. The maximum value for < Max objects cached> is 4201.
- CCNR_DEBUG=<debug logging level>
-
where <debug logging level> is one of the following. If the option is not specified, the default is WARNING.
-
NONE - no messages
-
SEVERE - severe, probably fatal, errors
-
ERROR - errors
-
WARNING - warnings
-
INFO - informational messages
-
FINE, FINER, FINEST - debugging/tracing
-
- CCNR_DIRECTORY=<directory>
-
where <directory> is the directory where the Repository storage is located, which defaults to the current directory. CCNR_DIRECTORY is ignored in the configuration file.
- CCNR_GLOBAL_PREFIX=<URI>
-
where <URI> is the CCNx URI representing the prefix where data/policy.xml is stored, and is meaningful only if no policy file exists at startup. <URI> is expected by convention to be globally unique and meaningful, rather than only locally unique and contextually meaningful. If not specified, the URI defaults to ccnx:/parc.com/csl/ccn/Repos.
- CCNR_LISTEN_ON=<IP address list>
-
where <IP address list> is a list of IP addresses to listen on for status. IP addresses may be in either IPv4 format (e.g., 127.0.0.1) or IPv6 format (e.g., fe80::226:bbff:fe1c:5530). Addresses may be separated by spaces, commas, or semi-colons. If not specified, the default is a wild card.
- CCNR_MIN_SEND_BUFSIZE=<Min buffer size>
-
where <Min buffer size> is the minimum size in bytes of the output socket buffer (SO_SNDBUF) for the socket used to communicate with ccnd. The maximum value for <Min buffer size> is 16384. If the system provides more than this by default, the system’s value is used.
- CCNR_PROTO=<type>
-
where <type> is the type of connection, which must be tcp or unix. If <type> is tcp, Repo will connect to ccnd via TCP; if <type> is unix, Repo will connect via Unix IPC. If not specified, the default is unix.
- CCNR_STATUS_PORT=<port>
-
where <port> is the port to use for a status server. If this option is not specified, no status is served.
- CCNR_START_WRITE_SCOPE_LIMIT=<Scope limit>
-
where <Scope limit> is in the range 0..3 (default 3). Process start-write(-checked) interests with a scope not exceeding the given value. 0 is effectively read-only. 3 indicates unlimited.
- CCNS_DEBUG=<Sync debug logging level>
-
where <Sync debug logging level> has the same values as for CCNR_DEBUG above. If not specified, the default is WARNING.
- CCNS_ENABLE=<do sync>
-
where <do sync> specifies whether to disable (0) or enable (1) Sync processing. If not specified, the default is enabled.
- CCNS_FAUX_ERROR=<simulate random loss>
-
where <simulate random loss> specifies whether and how much random packet loss to simulate. If <simulate random loss> is 0, no loss is simulated; if in the range 1-99, the number is the percentage of packets to drop at random. If not specified, the default is 0 (no loss).
- CCNS_HEARTBEAT_MICROS=<heartbeat>
-
where <heartbeat> is the number of microseconds between Sync heartbeats, and must be an integer in the range 100000-10000000. If not specified, the default is 200000.
- CCNS_MAX_COMPARES_BUSY=<max compares>
-
where <max compares> is the maximum number of Sync roots that can be in compare state simultaneously, and must be an integer in the range 1-100. If not specified, the default is 4.
- CCNS_MAX_FETCH_BUSY=<max fetches>
-
where <max fetches> is the maximum number of simultaneous node or content fetches per Sync root, and must be an integer in the range 1-100. If not specified, the default is 6.
- CCNS_NODE_FETCH_LIFETIME=<nf lifetime>
-
where <nf lifetime> is the maximum amount of time in seconds to wait for a response to a NodeFetch request, and must be an integer in the range 1-30. If not specified, the default is 4.
- CCNS_NOTE_ERR=<exceptional errors flag>
-
where <exceptional errors flag> specifies whether exceptional Sync error reporting is disabled (0) or enabled (1). If not specified, the default is 0 (disabled).
- CCNS_REPO_STORE=<store state flag>
-
where <store state flag> specifies whether storing of Sync state to the Repository is disabled (0) or enabled. If not specified, the default is 1 (enabled).
- CCNS_ROOT_ADVISE_FRESH=<freshness>
-
where <freshness> is the amount of time a response to a Sync RoodAdvise will stay "fresh" (valid) in a ccnd cache in seconds, and must be an integer in the range 1-30. If not specified, the default is 4.
- CCNS_ROOT_ADVISE_LIFETIME=<ra lifetime>
-
where <ra lifetime> is the maximum amount of time in seconds to wait for a response to a RootAdvise request, and must be an integer in the range 1-30. If not specified, the default is 20.
- CCNS_STABLE_ENABLED=<store stable flag>
-
where <store stable flag> specifies whether storing of Sync stable points to the Repository is disabled (0) or enabled (1). If not specified, the default is 1 (enabled).
OPTIONS
- -h
-
Print a usage message.
EXIT STATUS
- 0
-
Success
- 1
-
Failure (syntax or usage error; startup error; failed to connect to ccnd)
AUTHOR
Michael Plass <plass@parc.com> Nick Briggs <briggs@parc.com>