===== Usage ===== **NOTICE:** Even though Timmy uses nice and ionice to limit impact on the cloud, you should still expect 1 core utilization both locally (where Timmy is launched) and on each node where commands are executed or logs collected. Additionally, if logs are collected, local disk (log destination directory) may get utilized significantly. **WARNING** If modifying the ``outdir`` config parameter, please first read the related warning on `configuration ` page. The easiest way to launch Timmy would be running the ``timmy.py`` script / ``timmy`` command: * Timmy will perform all actions defined in the ``default.yaml`` rq-file. The file is located in ``timmy_data/rq`` folder in Python installation directory. Specifically: * run diagnostic scripts on all nodes, including Fuel server * collect configuration files for all nodes * Timmy will **NOT** collect log files when executed this way. Basically, ``timmy.py`` is a simple wrapper that launches ``cli.py``. * Current page does not reference all available CLI options. Full :doc:`reference ` for command line interface. * You may also want to create a custom :doc:`configuration ` for Timmy, depending on your use case. Basic parameters: * ``--only-logs`` only collect logs (skip files, filelists, commands and scripts) * ``-l``, ``--logs`` also collect logs (logs are not collected by default due to their size) * ``-e``, ``--env`` filter by environment ID * ``-R``, ``--role`` filter by role * ``-c``, ``--config`` use custom configuration file to overwrite defaults. See ``timmy_data/config/example.yaml`` as an example * ``-j``, ``--nodes-json`` use json file instead of polling Fuel (to generate json file use ``fuel node --json``) - speeds up initialization * ``-o``, ``--dest-file`` the name/path for output archive, default is ``general.tar.gz`` and put into ``/tmp/timmy/archives``. A folder will be created if it does not exist. It's not recommended to use ``/var/log`` as destination because subsequent runs with log collection may cause Timmy to collect it's own previously created files or even update them while reading from them. The general idea is that a destination directory should contain enough space to hold all collected data and should not be in collection paths. * ``-v``, ``--verbose`` verbose(INFO) logging. Use ``-vv`` to enable DEBUG logging. ========== Shell Mode ========== **Shell Mode** is activated whenever any of the following parameters are used via CLI: ``-C``, ``-S``, ``-P``, ``-G``. A mode of execution which makes the following changes: * rqfile (``timmy_data/rq/default.yaml`` by default) is skipped * Fuel node is skipped. If for some reason you need to run specific scripts/actions via Timmy on Fuel and on other nodes at the same time, create an rqfile instead (see :doc:`configuration ` for details, see ``timmy_data/rq/neutron.yaml`` as an example), coupled with ``--rqfile`` option or a custom config file to override default rqfile. * outputs of commands (specified with ``-C`` options) and scripts (specified with ``-S``) are printed on screen * any actions (cmds, scripts, files, filelists, put, **except** logs) and Parameter Based configuration defined in config are ignored. The following parameters ("actions") are available via CLI: * ``-C `` - Bash command (string) to execute on nodes. Using multiple ``-C`` statements will produce the same result as using one with several commands separated by ``;`` (traditional Shell syntax), but for each ``-C`` statement a new SSH connection is established. * ``-S