"Fossies" - the Fresh Open Source Software Archive

Member "sysdig-0.26.1/userspace/sysdig/chisels/v_containers_errors.lua" (24 May 2019, 4866 Bytes) of package /linux/misc/sysdig-0.26.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lua source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 --[[
    2 Copyright (C) 2013-2018 Draios Inc dba Sysdig.
    3 
    4 This file is part of sysdig.
    5 
    6 Licensed under the Apache License, Version 2.0 (the "License");
    7 you may not use this file except in compliance with the License.
    8 You may obtain a copy of the License at
    9 
   10     http://www.apache.org/licenses/LICENSE-2.0
   11 
   12 Unless required by applicable law or agreed to in writing, software
   13 distributed under the License is distributed on an "AS IS" BASIS,
   14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   15 See the License for the specific language governing permissions and
   16 limitations under the License.
   17 
   18 --]]
   19 
   20 view_info = 
   21 {
   22     id = "containers_errors",
   23     name = "Containers Errors",
   24     description = "This view shows system error counters for each container running on the machine. Errors are grouped into 4 categories: file I/O, network I/O, memory allocation and 'other'.",
   25     tips = {
   26         "If you click 'enter' on a selection in this chart, you will be able to see the specific errors that the container is generating.",
   27         "Digging into a container by clicking on F6 will let you explore the system calls for that specific container and see the full details about what's causing the errors."
   28     },
   29     tags = {"Default"},
   30     view_type = "table",
   31     applies_to = {"", "container.id", "fd.name", "fd.containername", "fd.sport", "fd.sproto", "evt.type", "fd.directory", "fd.containerdirectory", "fd.containerdirectory", "k8s.pod.id", "k8s.rc.id", "k8s.rs.id", "k8s.svc.id", "k8s.ns.id", "marathon.app.id", "marathon.group.name", "mesos.task.id", "mesos.framework.name"},
   32     drilldown_target = "errors",
   33     filter = "container.name != host",
   34     use_defaults = true,
   35     columns = 
   36     {
   37         {
   38             name = "NA",
   39             field = "proc.pid",
   40             is_key = true
   41         },
   42         {
   43             name = "ID",
   44             field = "container.id",
   45             is_groupby_key = true
   46         },
   47         {
   48             name = "FILE",
   49             field = "evt.count.error.file",
   50             description = "Number of file I/O errors generated in the container during the sample interval. On trace files, this is the total for the whole file.",
   51             colsize = 8,
   52             aggregation = "SUM",
   53             groupby_aggregation = "SUM"
   54         },
   55         {
   56             name = "NET",
   57             field = "evt.count.error.net",
   58             description = "Number of network I/O errors generated in the container during the sample interval. On trace files, this is the total for the whole file.",
   59             colsize = 8,
   60             aggregation = "SUM",
   61             groupby_aggregation = "SUM"
   62         },
   63         {
   64             name = "MEMORY",
   65             field = "evt.count.error.memory",
   66             description = "Number of memory allocation/release related errors generated in the container during the sample interval. On trace files, this is the total for the whole file.",
   67             colsize = 8,
   68             aggregation = "SUM",
   69             groupby_aggregation = "SUM"
   70         },
   71         {
   72             name = "OTHER",
   73             field = "evt.count.error.other",
   74             description = "Number of errors generated in the container that don't fall in any of the previous categories. E.g. signal or event related errors. On trace files, this is the total for the whole file.",
   75             colsize = 8,
   76             aggregation = "SUM",
   77             groupby_aggregation = "SUM"
   78         },
   79         {
   80             name = "ENGINE",
   81             field = "container.type",
   82             description = "Container type.",
   83             colsize = 8
   84         },
   85         {
   86             name = "ID",
   87             field = "container.id",
   88             description = "Container ID. The format of this column depends on the containerization technology. For example, Docker ID are 12 characters hexadecimal digit strings.",
   89             colsize = 13
   90         },
   91         {
   92             name = "CONTAINER",
   93             field = "container.name",
   94             description = "Name of the container. What this field contains depends on the containerization technology. For example, for docker this is the content of the 'NAMES' column in 'docker ps'",
   95             colsize = 0
   96         }
   97     },
   98     actions = 
   99     {
  100         {
  101             hotkey = "a",
  102             command = "docker attach %container.id",
  103             description = "docker attach"
  104         },
  105         {
  106             hotkey = "b",
  107             command = "docker exec -i -t %container.id /bin/bash",
  108             description = "bash shell",
  109             wait_finish = false
  110         },
  111         {
  112             hotkey = "f",
  113             command = "docker logs -f %container.id",
  114             description = "follow logs"
  115         },
  116         {
  117             hotkey = "h",
  118             command = "docker history %container.image",
  119             description = "image history"
  120         },
  121         {
  122             hotkey = "i",
  123             command = "docker inspect %container.id",
  124             description = "docker inspect"
  125         },
  126         {
  127             hotkey = "k",
  128             command = "docker kill %container.id",
  129             description = "docker kill",
  130             ask_confirmation = true
  131         },
  132         {
  133             hotkey = "l",
  134             command = "docker logs %container.id",
  135             description = "docker logs"
  136         },
  137         {
  138             hotkey = "s",
  139             command = "docker stats %container.id",
  140             description = "docker stop"
  141         },
  142         {
  143             hotkey = "z",
  144             command = "docker pause %container.id",
  145             description = "docker pause"
  146         },
  147         {
  148             hotkey = "u",
  149             command = "docker unpause %container.id",
  150             description = "docker unpause"
  151         },
  152         {
  153             hotkey = "w",
  154             command = "docker wait %container.id",
  155             description = "docker wait"
  156         },
  157     },
  158 }