Hello.
when I run $ ./monitor_metrics.sh -p ip:port -u perforce -nosdp command first time.
there's
[p4log][curr timestamp: 1594364793][curr linecount: 78346601]
sed: -e expression #1, char 11: invalid usage of line address 0
there's sed warning message.
I found https://unix.stackexchange.com/questions/107301/how-to-use-variables-in-sed link.
p4log_lc_last=1 is may be right.
One more thing,
last line of monitor_metrics.sh can change 755 to 644
chmod 644 $metrics_root/*.prom
Hello.
when I run
$ ./monitor_metrics.sh -p ip:port -u perforce -nosdpcommand first time.there's
[p4log][curr timestamp: 1594364793][curr linecount: 78346601]
sed: -e expression #1, char 11: invalid usage of line address 0
there's sed warning message.
I found https://unix.stackexchange.com/questions/107301/how-to-use-variables-in-sed link.
p4log_lc_last=1 is may be right.
One more thing,
last line of monitor_metrics.sh can change 755 to 644
chmod 644 $metrics_root/*.prom