Bug 1666358 - `crictl stats` doesn't show anything
Summary: `crictl stats` doesn't show anything
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.1.0
Assignee: Lokesh Mandvekar
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-15 15:53 UTC by Clayton Coleman
Modified: 2023-09-18 00:15 UTC (History)
9 users (show)

Fixed In Version: runc-1.0.0-58.dev.rhaos4.0.git2abd837.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-04 10:41:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0758 0 None None None 2019-06-04 10:42:01 UTC

Internal Links: 1782112

Description Clayton Coleman 2019-01-15 15:53:45 UTC
Description of problem:

SSH'd to a node.  Ran `crictl stats`. Expected to see a list of container stats for the running containers. Got an empty list.  Passed `--pod ID`. Got nothing.

Version-Release number of selected component (if applicable):

pivot://registry.svc.ci.openshift.org/rhcos/maipo@sha256:93a56b9cf9e234c281ec1ac3fed9450347a4d0b6ac2848489fdc8f25c69ad401
              CustomOrigin: Provisioned from oscontainer
                   Version: 47.265 (2019-01-14T23:51:43Z)



Additional info:

Comment 1 Lokesh Mandvekar 2019-01-19 13:41:41 UTC
(In reply to Clayton Coleman from comment #0)
> Description of problem:
> 
> SSH'd to a node.  Ran `crictl stats`. Expected to see a list of container
> stats for the running containers. Got an empty list.  Passed `--pod ID`. Got
> nothing.
> 
> Version-Release number of selected component (if applicable):
> 
> pivot://registry.svc.ci.openshift.org/rhcos/maipo@sha256:
> 93a56b9cf9e234c281ec1ac3fed9450347a4d0b6ac2848489fdc8f25c69ad401
>               CustomOrigin: Provisioned from oscontainer
>                    Version: 47.265 (2019-01-14T23:51:43Z)
> 
> 
> 
> Additional info:

Did this happen even as root?

Comment 2 Lokesh Mandvekar 2019-01-21 18:08:49 UTC
filed https://github.com/kubernetes-sigs/cri-tools/pull/427

Comment 6 weiwei jiang 2019-01-28 02:53:06 UTC
Checked on 
# rpm -qa|grep -i cri-
cri-tools-1.12.0-3.rhaos4.0.git5a01d85.el7.x86_64
cri-o-1.12.4-5.rhaos4.0.git8ecb249.el7.x86_64

And I think clayton means that the stats response is empty.

# crictl -D --runtime-endpoint unix:///var/run/crio/crio.sock stats --all
DEBU[0000] ListContainerStatsRequest: &ListContainerStatsRequest{Filter:&ContainerStatsFilter{Id:,PodSandboxId:,LabelSelector:map[string]string{},},} 
DEBU[0000] ListContainerResponse: &ListContainerStatsResponse{Stats:[],} 
DEBU[0001] ListContainerStatsRequest: &ListContainerStatsRequest{Filter:&ContainerStatsFilter{Id:,PodSandboxId:,LabelSelector:map[string]string{},},} 
DEBU[0001] ListContainerResponse: &ListContainerStatsResponse{Stats:[],} 
CONTAINER           CPU %               MEM                 DISK                INODES

Comment 10 weiwei jiang 2019-02-14 05:40:29 UTC
Checked with 
cri-o-1.12.5-6.rhaos4.0.git80d1487.el7.x86_64
runc-1.0.0-60.dev.rhaos4.0.git2abd837.el7.x86_64

and the issue is fixed.

[root@ip-10-0-21-219 core]# crictl stats
CONTAINER           CPU %               MEM                 DISK                INODES
00dc9515d9f4e       0.34                12.93MB             185B                10
14f30058c85ff       0.02                44.4MB              90B                 5
1a8411c60483d       0.00                344.1kB             104B                6
1d1d0d595036d       1.25                39.25MB             2.5kB               7
1d714d9b8de5e       0.00                36.45MB             198B                12
2df07fbb8cda6       0.05                30.61MB             79B                 5
37561f34a3ee7       0.14                26.58MB             121B                7
378e670627229       0.28                20.34MB             13.99kB             13
425f85cddca9a       0.20                25.49MB             6.879kB             11
4512dec349788       0.24                53.62MB             357B                19
4775f2a6894d8       0.17                13.47MB             97B                 5
58789d4088d13       0.21                35.55MB             55.5kB              8
5b499d005c1b2       0.00                340kB               367B                4
5eea01eebe324       0.93                42.06MB             134B                7
65c84088ec6fd       0.13                29.65MB             13.43kB             6
6bd0d6eb8c8a7       0.23                11.57MB             44B                 3
6e07d199a9afe       0.00                13.31MB             21.84kB             43
768aae51a3cf2       0.57                8.753MB             127B                6
7b81040456e05       0.13                28.69MB             6B                  1
9532cad88f1a7       13.62               1.121GB             1.146kB             14
95f036e76e2d9       5.97                306.5MB             198B                12
9afe9bc19c045       0.18                17.69MB             14.24kB             8
9fd196b1aedb4       0.65                29.99MB             13.41kB             8
a8fa72f486833       0.48                53.28MB             21.13kB             12
aca81fce86990       4.70                176.2MB             667B                14
b2a385b04aa02       1.74                7.123MB             156B                9
bee3eba3f4c43       0.85                21.03MB             34.34kB             14
c044ea9804006       0.13                11.4MB              84B                 4
d1ae29877f3a8       0.00                26.13MB             806.9kB             14
d4b599a2a1d32       0.00                21.16MB             130B                8
d9411ff52ed31       0.32                21.42MB             14.06kB             13
e5a0e93b1e267       0.11                20.43MB             153B                9
e8b4620f31cc3       0.00                6.517MB             114B                7
ed87e7e9fe321       1.04                40.34MB             4.9kB               7
f05b41147be0d       0.00                33.44MB             4.121kB             11
fc4383429123b       0.42                12.88MB             31.44kB             8

Comment 13 errata-xmlrpc 2019-06-04 10:41:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0758

Comment 14 Artyom 2019-10-31 12:46:08 UTC
Hi guys, I still have the same problem:

#  crictl ps
CONTAINER ID        IMAGE                                                                                                                               CREATED             STATE               NAME                        ATTEMPT             POD ID
c3338a1c25ca7       registry:5000/kubevirt/cirros-container-disk-demo@sha256:2712635e35435ef670e600824a2b2292388da1a4caeb751b10b455ee94b34771           42 minutes ago      Running             volumecontainerdisk         0                   c1b97bda1994e
0b384800a1d44       697016b68e0e71825c9b38a6f74bb8d708b9ac55c2826d53c1bc8f8f23b3caab                                                                    42 minutes ago      Running             compute                     0                   c1b97bda1994e
145f4f1b1cb42       ab217ea07945a6dfe636f1294f735ea487c430d49e9609bcf6b582b6ee9c3a39                                                                    43 minutes ago      Running             cdi-uploadproxy             0                   b06e4d6629b95
4d30309239ffd       docker.io/kubevirt/cdi-controller@sha256:0586803c14d0c5d2d3ef7a07f8f986621bf08fdf8259b97c2f26b1363209923c                           44 minutes ago      Running             cdi-controller              0                   bd692782cc061
....


# crictl -D --runtime-endpoint unix:///var/run/crio/crio.sock stats --all
DEBU[0000] ListContainerStatsRequest: &ListContainerStatsRequest{Filter:&ContainerStatsFilter{Id:,PodSandboxId:,LabelSelector:map[string]string{},},} 
DEBU[0000] ListContainerResponse: &ListContainerStatsResponse{Stats:[],} 
DEBU[0001] ListContainerStatsRequest: &ListContainerStatsRequest{Filter:&ContainerStatsFilter{Id:,PodSandboxId:,LabelSelector:map[string]string{},},} 
DEBU[0001] ListContainerResponse: &ListContainerStatsResponse{Stats:[],} 
CONTAINER           CPU %               MEM                 DISK                INODES



My versions:
# rpm -qa | grep cri-o
cri-o-1.13.11-0.7.dev.rhaos4.1.git9cb8f2f.el8.x86_64

# rpm -qa | grep runc
runc-1.0.0-61.rc8.rhaos4.1.git3cbe540.el8.x86_64

Comment 18 Red Hat Bugzilla 2023-09-18 00:15:16 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.