Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling debug #4

Closed
KlugFR opened this issue Aug 29, 2020 · 1 comment
Closed

Enabling debug #4

KlugFR opened this issue Aug 29, 2020 · 1 comment

Comments

@KlugFR
Copy link

KlugFR commented Aug 29, 2020

IMHO, if debug is enabled, the script should not go into background (line 125).
Also, with current code, the last debug display (lines 199 to 202) won't work, because script goes in backgound.

Suggested solution is to add a test line 125.
Before : if [ ! "$1" == "--bg" ]; then
After : if [ ! "$1" == "--bg" ] && [ $DEBUG == 0 ]; then

With debug enabled, CLI result before:

STARTTIME: 1598712674, ENDTIME: 1598717672, STATE: 6, JOBID: {ff36576d-82e8-4ce9-bfb3-6a851d325f80}
DETAILS: <ProgressDetails total_size="171793088000" total_used_size="123613915136" processed_data_size_bytes="125104893952" read_data_size_bytes="124324413440" transferred_data_size_bytes="60974703532" processing_speed="27753283" source_read_load="87" source_processing_load="19" network_load="0" target_write_load="12" network_throttling_enabled="false" repository_throttling_enabled="false" />
TARGET: 192.168.XXX.YYY:/mnt/Backup/server.domain.tld, FST: nfs, LOGIN: , DOMAIN:

After:

STARTTIME: 1598712674, ENDTIME: 1598717672, STATE: 6, JOBID: {ff36576d-82e8-4ce9-bfb3-6a851d325f80}
DETAILS: <ProgressDetails total_size="171793088000" total_used_size="123613915136" processed_data_size_bytes="125104893952" read_data_size_bytes="124324413440" transferred_data_size_bytes="60974703532" processing_speed="27753283" source_read_load="87" source_processing_load="19" network_load="0" target_write_load="12" network_throttling_enabled="false" repository_throttling_enabled="false" />
TARGET: 192.168.XXX.YYY:/mnt/Backup/server.domain.tld, FST: nfs, LOGIN: , DOMAIN:
PROCESSED: 116.5 GB, READ: 115.7 GB, TRANSFERRED: 60974703532
SPEED: 26.4, SOURCELOAD: 87, NETLOAD: 0, TARGETLOAD: 12
DURATION: 01:23:18, START: Saturday, 29 August 2020 16:51:14, END: Saturday, 29.08.2020 18:14:32, STIME: 16:51:14, ETIME: 18:14:32
ERRLOG:
HN: server.domain.tld
STAT: Success
BGCOLOR: #00B050
START: Saturday, 29 August 2020 16:51:14
SUCCESS: 1
ERROR: 0
WARNING: 0
STIME: 16:51:14
ETIME: 18:14:32
READ: 115.7 GB
TRANSFERRED: 56.7 GB
DURATION: 01:23:18
PROCESSED: 116.5 GB
BOTTLENECK: Source
ERRLOG:
SPEED: 26.4
TARGET: 192.168.XXX.YYY:/mnt/Backup/server.domain.tld
FST: nfs
LOGIN:
DOMAIN:
sed: -e expression #30, char 19: unknown option to `s'

The last line (that ends up with a blank email except the headers) is explained in #3

@grufocom
Copy link
Owner

good idea - changed that with latest version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants