Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Setting the Log Level Permanently To make a permanent change, omit the -t parameter:

    Code Block
    ./log_level_script.sh -d 192.168.1.100 -p admin:password -i 15

    This sets the log level to 15 permanently until you manually change it.

  • Setting the Log Level Temporarily Specify a duration (in seconds) with the -t parameter to revert automatically after a defined period:

    Code Block
    ./log_level_script.sh -d 192.168.1.100 -p admin:password -i 15 -t 600

    In this example, the log level is set to 15 and reverts to the original level after 600 seconds (10 5 minutes).

  • Monitoring Log File Size

    • The script identifies the log file (castor.log) in either /var/log/caringo/ or /var/log/datacore/.

    • Initial file size is shown before setting the new log level.

    • Final file size and size difference are displayed after the temporary duration ends, indicating logs generated during this period.

  • Output Details

    • The script displays Swarm IP, log file location, initial and final log file sizes, and the cluster name.

    • For temporary log levels, a countdown timer displays time remaining before reverting.

    • Once completed, it provides the approximate amount of logs generated, duration, and confirms reversion to the original log level.

...