Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-7625

cbcollect_info drops Cpus(s) info from top output

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1, 2.0
    • Fix Version/s: 2.1.0
    • Component/s: tools
    • Security Level: Public
    • Labels:
      None
    • Environment:
      top -b -n1 | egrep 'moxi|memcached|vbucketmigrator|CPU|load|Mem:|Swap:|Cpu(s)'

      Description

      The cbcollect_info tool has a command like this:

      top -b -n1 | egrep 'moxi|memcached|vbucketmigrator|CPU|load|Mem:|Swap:|Cpu(s)'

      The egrep misses the Cpu(s) line because the parens aren't properly escaped. It should be:

      top -b -n1 | egrep 'moxi|memcached|vbucketmigrator|CPU|load|Mem:|Swap:|Cpu(s)'

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        maria Maria McDuff (Inactive) added a comment -

        Bin: can you take a look at this? is this something you can fix in the 2.0.2 timeframe? thanks.

        Show
        maria Maria McDuff (Inactive) added a comment - Bin: can you take a look at this? is this something you can fix in the 2.0.2 timeframe? thanks.
        Hide
        alkondratenko Aleksey Kondratenko (Inactive) added a comment -

        Fixed already

        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - Fixed already
        Hide
        maria Maria McDuff (Inactive) added a comment -

        pls verify/close if passes.

        Show
        maria Maria McDuff (Inactive) added a comment - pls verify/close if passes.
        Hide
        Chisheng Chisheng Hong (Inactive) added a comment -

        Verified with Linux 2.0.2-760
        'top -b -n1 | egrep 'moxi|memcached|vbucketmigrator|CPU|load|Mem:|Swap:|Cpu(s)' is not used in cbcollect_info anymore.
        Existing "top" command (linux task) is:
        LinuxTask("Process list snapshot", "export TERM=''; top -Hb -n1 || top -H n1"),
        LinuxTask("Process list ", "ps -AwwL -o user,pid,lwp,ppid,nlwp,pcpu,maj_flt,min_flt,pri,nice,vsize,rss,tty,stat,wchan:12,start,bsdtime,command"),

        "[root@slv-0702 bin]# ./cbcollect_info test.zip" is working fine.

        We can see Cpu(s) in couchbase.log now.
        Chishengs-MacBook-Pro:cbcollect_info_ns_1@127.0.0.1_20130410-005208 chisheng$ egrep "Cpu(s)" *
        couchbase.log:Cpu(s): 0.6%us, 0.2%sy, 0.0%ni, 99.1%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
        Chishengs-MacBook-Pro:cbcollect_info_ns_1@127.0.0.1_20130410-005208 chisheng$ grep "Cpu(s)" *
        couchbase.log:Cpu(s): 0.6%us, 0.2%sy, 0.0%ni, 99.1%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st

        Show
        Chisheng Chisheng Hong (Inactive) added a comment - Verified with Linux 2.0.2-760 'top -b -n1 | egrep 'moxi|memcached|vbucketmigrator|CPU|load|Mem:|Swap:|Cpu(s)' is not used in cbcollect_info anymore. Existing "top" command (linux task) is: LinuxTask("Process list snapshot", "export TERM=''; top -Hb -n1 || top -H n1"), LinuxTask("Process list ", "ps -AwwL -o user,pid,lwp,ppid,nlwp,pcpu,maj_flt,min_flt,pri,nice,vsize,rss,tty,stat,wchan:12,start,bsdtime,command"), " [root@slv-0702 bin] # ./cbcollect_info test.zip" is working fine. We can see Cpu(s) in couchbase.log now. Chishengs-MacBook-Pro:cbcollect_info_ns_1@127.0.0.1_20130410-005208 chisheng$ egrep "Cpu(s)" * couchbase.log:Cpu(s): 0.6%us, 0.2%sy, 0.0%ni, 99.1%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st Chishengs-MacBook-Pro:cbcollect_info_ns_1@127.0.0.1_20130410-005208 chisheng$ grep "Cpu(s)" * couchbase.log:Cpu(s): 0.6%us, 0.2%sy, 0.0%ni, 99.1%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st

          People

          • Assignee:
            Chisheng Chisheng Hong (Inactive)
            Reporter:
            TimSmith Tim Smith (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes