Exemplo n.º 1
0
    def __init__(self, name):

        parser = CrashCommandParser(prog=name)

        parser.add_argument('config', nargs='?')

        parser.format_usage = lambda: "sys [config]\n"
        CrashCommand.__init__(self, name, parser)
Exemplo n.º 2
0
    def __init__(self, name):

        parser = CrashCommandParser(prog=name)

        parser.add_argument('config', nargs='?')

        parser.format_usage = lambda: "sys [config]\n"
        CrashCommand.__init__(self, name, parser)
Exemplo n.º 3
0
    def __init__(self, name):

        parser = CrashCommandParser(prog=name)

        parser.add_argument('pid', type=int, nargs=1)

        parser.format_usage = lambda: "thread <pid>\n"
        CrashCommand.__init__(self, name, parser)
Exemplo n.º 4
0
    def __init__(self, name):
        parser = CrashCommandParser(prog=name)

        parser.add_argument('-t', action='store_true', default=False)
        parser.add_argument('-d', action='store_true', default=False)
        parser.add_argument('-m', action='store_true', default=False)

        parser.format_usage = lambda: 'log [-tdm]\n'
        CrashCommand.__init__(self, name, parser)
Exemplo n.º 5
0
    def __init__(self, name):
        parser = CrashCommandParser(prog=name)

        parser.add_argument('-t', action='store_true', default=False)
        parser.add_argument('-d', action='store_true', default=False)
        parser.add_argument('-m', action='store_true', default=False)

        parser.format_usage = lambda: 'log [-tdm]\n'
        CrashCommand.__init__(self, name, parser)
Exemplo n.º 6
0
    def __init__(self, name):
        self.charp = gdb.lookup_type('char').pointer()
        parser = CrashCommandParser(prog=name)

        parser.add_argument('-t', action='store_true', default=False)
        parser.add_argument('-d', action='store_true', default=False)
        parser.add_argument('-m', action='store_true', default=False)

        parser.format_usage = lambda: 'log [-tdm]\n'
        CrashCommand.__init__(self, name, parser)
Exemplo n.º 7
0
    def __init__(self):
        parser = CrashCommandParser(prog="ps")

        group = parser.add_mutually_exclusive_group()
        group.add_argument('-k', action='store_true', default=False)
        group.add_argument('-u', action='store_true', default=False)
        group.add_argument('-G', action='store_true', default=False)

        group = parser.add_mutually_exclusive_group()
        group.add_argument('-s', action='store_true', default=False)
        group.add_argument('-n', action='store_true', default=False)

        group = parser.add_mutually_exclusive_group()
        group.add_argument('-p', action='store_true', default=False)
        group.add_argument('-c', action='store_true', default=False)
        group.add_argument('-t', action='store_true', default=False)
        group.add_argument('-l', action='store_true', default=False)
        group.add_argument('-a', action='store_true', default=False)
        group.add_argument('-g', action='store_true', default=False)
        group.add_argument('-r', action='store_true', default=False)

        parser.add_argument('args', nargs=argparse.REMAINDER)

        parser.format_usage = lambda: \
        "ps [-k|-u|-G][-s][-p|-c|-t|-l|-a|-g|-r] [pid | taskp | command] ...\n"

        CrashCommand.__init__(self, "ps", parser)

        self.header_template = "    PID    PPID  CPU {1:^{0}}  ST  %MEM     " \
                               "VSZ    RSS  COMM"

        #   PID    PPID  CPU       TASK        ST  %MEM     VSZ    RSS  COMM
        #      1      0   3  ffff88033aa780c8 RU   0.0      0      0  [systemd]
        #> 17080  16749   6  ffff8801db5ae040  RU   0.0    8168   1032  less
        #   PID    PPID  CPU       TASK        ST  %MEM     VSZ    RSS  COMM
        #>     0      0   0  ffffffff81c13460  RU   0.0       0      0  [swapper/0]
        # 17077  16749   0  ffff8800b956b848 RU   0.0      0      0  [less]
        self.line_template = "{0} {1:>5}   {2:>5}  {3:>3}  {4:{5}x} {6:3}  {7:.1f}"
        self.line_template += " {8:7d} {9:6d}  {10:.{11}}{12}{13:.{14}}"

        self.num_line_template = "{0} {1:>5}   {2:>5}  {3:>3}  {4:{5}d}  {6:3}  {7:.1f}"
        self.num_line_template += " {8:7d} {9:6d}  {10:.{11}}{12}{13:.{14}}"
Exemplo n.º 8
0
    def __init__(self):
        parser = CrashCommandParser(prog="ps")

        group = parser.add_mutually_exclusive_group()
        group.add_argument('-k', action='store_true', default=False)
        group.add_argument('-u', action='store_true', default=False)
        group.add_argument('-G', action='store_true', default=False)

        group = parser.add_mutually_exclusive_group()
        group.add_argument('-s', action='store_true', default=False)
        group.add_argument('-n', action='store_true', default=False)

        group = parser.add_mutually_exclusive_group()
        group.add_argument('-p', action='store_true', default=False)
        group.add_argument('-c', action='store_true', default=False)
        group.add_argument('-t', action='store_true', default=False)
        group.add_argument('-l', action='store_true', default=False)
        group.add_argument('-a', action='store_true', default=False)
        group.add_argument('-g', action='store_true', default=False)
        group.add_argument('-r', action='store_true', default=False)

        parser.add_argument('args', nargs=argparse.REMAINDER)

        parser.format_usage = lambda: \
        "ps [-k|-u|-G][-s][-p|-c|-t|-l|-a|-g|-r] [pid | taskp | command] ...\n"

        CrashCommand.__init__(self, "ps", parser)

        self.header_template = "    PID    PPID  CPU {1:^{0}}  ST  %MEM     " \
                               "VSZ    RSS  COMM"

#   PID    PPID  CPU       TASK        ST  %MEM     VSZ    RSS  COMM
#      1      0   3  ffff88033aa780c8 RU   0.0      0      0  [systemd]
#> 17080  16749   6  ffff8801db5ae040  RU   0.0    8168   1032  less
#   PID    PPID  CPU       TASK        ST  %MEM     VSZ    RSS  COMM
#>     0      0   0  ffffffff81c13460  RU   0.0       0      0  [swapper/0]
# 17077  16749   0  ffff8800b956b848 RU   0.0      0      0  [less]
        self.line_template = "{0} {1:>5}   {2:>5}  {3:>3}  {4:{5}x} {6:3}  {7:.1f}"
        self.line_template += " {8:7d} {9:6d}  {10:.{11}}{12}{13:.{14}}"

        self.num_line_template = "{0} {1:>5}   {2:>5}  {3:>3}  {4:{5}d}  {6:3}  {7:.1f}"
        self.num_line_template += " {8:7d} {9:6d}  {10:.{11}}{12}{13:.{14}}"
Exemplo n.º 9
0
 def __init__(self):
     CrashCommand.__init__(self, "lsbtrfs", None)
Exemplo n.º 10
0
 def __init__(self):
     CrashCommand.__init__(self, "lsbtrfs", None)