From 415a4d5aa209958f7cac233a7574ec5f7ac21d76 Mon Sep 17 00:00:00 2001 From: exquo <62397152+exquo@users.noreply.github.com> Date: Mon, 15 Mar 2021 12:47:14 +0000 Subject: [PATCH] Created FAQ (markdown) --- FAQ.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 FAQ.md diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 0000000..bc8387c --- /dev/null +++ b/FAQ.md @@ -0,0 +1,42 @@ + +### Performance + +#### JVM startup +Every invocation of `signal-cli ...` starts a Java Virtual Machine instance. This can take anywhere from a second to many time over that, depending on the system. + +To avoid it, signal-cli can be started as a daemon, with subsequent commands sent to it through DBus. See [using `dbus-send`](https://github.com/AsamK/signal-cli/wiki/DBus-service#user-content-send-using-dbus-send). + +There is a also an experimental native library build using GraalVM that avoids JVM startup. See [GraalVM section in README](https://github.com/AsamK/signal-cli/blob/master/README.md#user-content-building-a-native-binary-with-graalvm-experimental) + + +#### System entropy + +Some signal-cli's operations require that enough system entropy / randomness is available. + +Available entropy can be monitored with + + watch cat /proc/sys/kernel/random/entropy_avail + +If it is hitting zero during `signal-cli ...` execution, signal-cli will block until enough entropy is available. + +System entropy is more likely to get depleted on headless servers. There are programs that allow to increase the amount of available entropy, e.g. [`haveged`](http://issihosts.com/haveged/). + + +#### See also +[#351](https://github.com/AsamK/signal-cli/issues/351#issuecomment-694871183) with links to past discussions. + + +### Error parsing arguments + + $ signal-cli receive --output=json + signal-cli: error: unrecognized arguments: '--output=json' + +The `--output=...` option needs to be in front of the `receive` subcommand: + + $ signal-cli --output=json receive + +This is [Argparse4j](https://argparse4j.github.io/)'s behavior. + + +### DBus errors when starting daemon +See [Troubleshooting DBus](https://github.com/AsamK/signal-cli/wiki/DBus-service#user-content-troubleshooting).