LP #1021903: pt-diskstats usage in non-interactive scripts
General
Escalation
General
Escalation
Description
**Reported in Launchpad by justinb last update 09-07-2012 16:23:50
I'm trying to run pt-diskstats as a collectd plugin because I like the information provided by this tool instead of iostat. The problem is when pt-diskstats is started up without being attached to the terminal, the parent (non data gathering) process uses %100 cpu. Strace output shows the following repeating very often.
Attached is a full strace output of the following command: PTDEBUG=1 strace -ttt -s 1024 -o diskstats.strace -f nohup perl /usr/bin/pt-diskstats --iterations 2
And a Devel::NYTProf html and original output of the following:
[root@pt ~]# uname -a Linux pt 2.6.32-220.23.1.el6.x86_64 #1 SMP Mon Jun 18 18:58:52 BST 2012 x86_64 x86_64 x86_64 GNU/Linux [root@pt ~]# cat /etc/redhat-release CentOS release 6.2 (Final)
Replicated on Debian Squeeze
I know the intent of this script is to run in an interactive way however the data is too good not to trend in someway, which is done non-interactively.
However, http://sprunge.us/KNXc?pl can be added to pt-diskstats I guess, to prevent non-interactive use at all. (since the script is primarily interactive).
**Reported in Launchpad by justinb last update 09-07-2012 16:23:50
I'm trying to run pt-diskstats as a collectd plugin because I like the information provided by this tool instead of iostat. The problem is when pt-diskstats is started up without being attached to the terminal, the parent (non data gathering) process uses %100 cpu. Strace output shows the following repeating very often.
select(8, [0], NULL, NULL, {1, 364751}) = 1 (in [0], left {1, 364744})
read(0, 0x133e400, 4096) = -1 EBADF (Bad file descriptor)
read(3, 0x1340860, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(3, 0x1340860, 4096) = -1 EAGAIN (Resource temporarily unavailable)
select(8, [0], NULL, NULL, {1, 364372}) = 1 (in [0], left {1, 364365})
read(0, 0x133e400, 4096) = -1 EBADF (Bad file descriptor)
read(3, 0x1340860, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(3, 0x1340860, 4096) = -1 EAGAIN (Resource temporarily unavailable)
Attached is a full strace output of the following command:
PTDEBUG=1 strace -ttt -s 1024 -o diskstats.strace -f nohup perl /usr/bin/pt-diskstats --iterations 2
And a Devel::NYTProf html and original output of the following:
perl -d:NYTProf /usr/bin/pt-diskstats --iterations 2
nohup perl -d:NYTProf /usr/bin/pt-diskstats --iterations 2
My System:
[root@pt ~]# uname -a
Linux pt 2.6.32-220.23.1.el6.x86_64 #1 SMP Mon Jun 18 18:58:52 BST 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@pt ~]# cat /etc/redhat-release
CentOS release 6.2 (Final)
Replicated on Debian Squeeze
I know the intent of this script is to run in an interactive way however the data is too good not to trend in someway, which is done non-interactively.