Activity log for bug #1071979

Date Who What changed Old value New value Message
2012-10-27 04:03:11 Jervin R bug added bug
2012-10-27 04:03:44 Jervin R description [root@util01 percona]# pt-stalk --version pt-stalk 2.1.5 [root@util01 percona]# mount | grep stor xx.xxx.xxx.xx:/ on /mnt/stor01 type nfs4 (rw,soft,intr,rsize=32768,wsize=32768,proto=tcp,addr=95.211.156.80,clientaddr=xx.xxx.xxx.xx) [root@util01 percona]# pt-stalk --collect --no-stalk --dest=/mnt/stor01/revin 2012_10_26_23_39_03 Starting /opt/percona/toolkit/bin/pt-stalk --function=status --variable=Threads_running --threshold=25 --match= --cycles=0 --interval=0 --iterations=1 --run-time=30 --sleep=0 --dest=/mnt/stor01/revin --prefix= --notify-by-email= --log=/var/log/pt-stalk.log --pid=/var/run/pt-stalk.pid 2012_10_26_23_39_03 Not stalking; collect triggered immediately 2012_10_26_23_39_03 Collect triggered /opt/percona/toolkit/bin/pt-stalk: line 559: 100 - : syntax error: operand expected (error token is "- ") This is because the current perl based pattern matching will not match the results on the *-disk-space file based on the leading hostname. On pt-stalk: 556 local used_bytes=$(perl -ane 'm!^/! && print $F[2] * 1024' "$file") 557 local free_bytes=$(perl -ane 'm!^/! && print $F[3] * 1024' "$file") 558 local pct_used=$(perl -ane 'm!^/! && print ($F[4] =~ m/(\d+)/)' "$file") 559 local pct_free=$((100 - $pct_used)) Sample disk-space: [root@util01 percona]# cat /mnt/stor01/revin/2012_10_26_23_27_25-disk-space Filesystem 1024-blocks Used Available Capacity Mounted on xx.xxx.xxx.xxx:/ 1918433376 1052659424 768323200 58% /mnt/stor01 Maybe something like this could work since the contents of disk-space is deterministic, though Im not sure if this will work in all cases. 555,558c555,557 < < local used_bytes=$(perl -ane 'm!^/! && print $F[2] * 1024' "$file") < local free_bytes=$(perl -ane 'm!^/! && print $F[3] * 1024' "$file") < local pct_used=$(perl -ane 'm!^/! && print ($F[4] =~ m/(\d+)/)' "$file") --- > local used_bytes=$(cat "$file"|tail -n1|awk '{print $2}') > local free_bytes=$(cat "$file"|tail -n1|awk '{print $3}') > local pct_used=$(cat "$file"|tail -n1|awk '{print $4}') [root@util01 percona]# pt-stalk --version pt-stalk 2.1.5 [root@util01 percona]# mount | grep stor xx.xxx.xxx.xx:/ on /mnt/stor01 type nfs4 (rw,soft,intr,rsize=32768,wsize=32768,proto=tcp,addr=xx.xxx.xxx.xx,clientaddr=xx.xxx.xxx.xx) [root@util01 percona]# pt-stalk --collect --no-stalk --dest=/mnt/stor01/revin 2012_10_26_23_39_03 Starting /opt/percona/toolkit/bin/pt-stalk --function=status --variable=Threads_running --threshold=25 --match= --cycles=0 --interval=0 --iterations=1 --run-time=30 --sleep=0 --dest=/mnt/stor01/revin --prefix= --notify-by-email= --log=/var/log/pt-stalk.log --pid=/var/run/pt-stalk.pid 2012_10_26_23_39_03 Not stalking; collect triggered immediately 2012_10_26_23_39_03 Collect triggered /opt/percona/toolkit/bin/pt-stalk: line 559: 100 - : syntax error: operand expected (error token is "- ") This is because the current perl based pattern matching will not match the results on the *-disk-space file based on the leading hostname. On pt-stalk:     556 local used_bytes=$(perl -ane 'm!^/! && print $F[2] * 1024' "$file")     557 local free_bytes=$(perl -ane 'm!^/! && print $F[3] * 1024' "$file")     558 local pct_used=$(perl -ane 'm!^/! && print ($F[4] =~ m/(\d+)/)' "$file")     559 local pct_free=$((100 - $pct_used)) Sample disk-space: [root@util01 percona]# cat /mnt/stor01/revin/2012_10_26_23_27_25-disk-space Filesystem 1024-blocks Used Available Capacity Mounted on xx.xxx.xxx.xxx:/ 1918433376 1052659424 768323200 58% /mnt/stor01 Maybe something like this could work since the contents of disk-space is deterministic, though Im not sure if this will work in all cases. 555,558c555,557 < < local used_bytes=$(perl -ane 'm!^/! && print $F[2] * 1024' "$file") < local free_bytes=$(perl -ane 'm!^/! && print $F[3] * 1024' "$file") < local pct_used=$(perl -ane 'm!^/! && print ($F[4] =~ m/(\d+)/)' "$file") --- > local used_bytes=$(cat "$file"|tail -n1|awk '{print $2}') > local free_bytes=$(cat "$file"|tail -n1|awk '{print $3}') > local pct_used=$(cat "$file"|tail -n1|awk '{print $4}')
2012-11-01 19:42:30 Daniel Nichter tags crash nfs pt-stalk
2012-11-01 19:42:35 Daniel Nichter percona-toolkit: status New Triaged
2013-03-26 11:58:56 Olivier Doucet bug added subscriber Olivier Doucet
2013-10-31 17:41:36 Daniel Nichter summary pt-stak bails out when checking disk space free for NFS based destination pt-stak error parsing df with NFS
2013-10-31 17:49:55 Daniel Nichter percona-toolkit: milestone 2.2.6
2013-10-31 17:49:57 Daniel Nichter percona-toolkit: assignee Daniel Nichter (daniel-nichter)
2013-10-31 17:50:02 Daniel Nichter percona-toolkit: importance Undecided High
2013-10-31 17:50:05 Daniel Nichter percona-toolkit: status Triaged In Progress
2013-10-31 17:50:13 Daniel Nichter tags crash nfs pt-stalk crash nfs percona-36390 pt-stalk
2013-10-31 18:21:02 Daniel Nichter branch linked lp:~percona-toolkit-dev/percona-toolkit/fix-pt-stalk-nfs-bug-1071979
2013-12-11 04:51:27 Daniel Nichter percona-toolkit: status In Progress Fix Committed
2013-12-20 03:54:24 Daniel Nichter percona-toolkit: status Fix Committed Fix Released