Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
Signed-off-by: fahed dorgaa <[email protected]>
  • Loading branch information
fahedouch committed Nov 15, 2021
1 parent 08ca862 commit 84c44d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/nerdctl/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ func statsAction(cmd *cobra.Command, args []string) error {

for _, c := range containers {
cStatus := formatter.ContainerStatus(ctx, c)
if !strings.HasPrefix(cStatus, "Up") {
continue
if !all {
if !strings.HasPrefix(cStatus, "Up") {
continue
}
}
s := statsutil.NewStats(c.ID())
if cStats.add(s) {
Expand Down

0 comments on commit 84c44d2

Please sign in to comment.