From fc6fbb41882b5f1edb0ccba6070dbe2c4f65dad7 Mon Sep 17 00:00:00 2001
From: Jerry Zhao <zhaoxinyu@huawei.com>
Date: Wed, 13 Aug 2014 14:48:35 -0700
Subject: [PATCH] Timeout dstat command in 2h

Stop dstat command in 2h, by which, tempest would have already
finished, so dstat log would not fill up the /var space if leave
a cluster running for long.

Change-Id: I72b54f60832107ceec09d5689865ae5c0dd6261a
---
 chef/cookbooks/rsyslog/recipes/client.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chef/cookbooks/rsyslog/recipes/client.rb b/chef/cookbooks/rsyslog/recipes/client.rb
index c3a77b7..655e4e2 100644
--- a/chef/cookbooks/rsyslog/recipes/client.rb
+++ b/chef/cookbooks/rsyslog/recipes/client.rb
@@ -25,7 +25,7 @@ package "dstat" do
 end
 
 execute "dstat" do
-  command "dstat -tcmndp --top-cpu >>/var/log/dstat.log &"
+  command "timeout 7200s dstat -tcmndp --top-cpu >>/var/log/dstat.log &"
   action :run
 end