File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -669,22 +669,18 @@ None
669
669
The Docker API parallel to the `docker stats` command.
670
670
This will stream statistics for a specific container.
671
671
672
- `aggregate` , if 0 will return an iterable stream object of messages.
673
- If aggregate is above 0 , an iterable stream object of a list of messages in the size of `aggregate` will be returned.
674
-
675
672
** Params** :
676
673
677
674
* container (str ): The container to start
678
675
* aggregate (int ): The number of messages to aggregate before returning a stream object .
679
676
680
677
```python
681
678
>> > from docker import Client
682
- >> > aggregate = 10
683
679
>> > cli = Client(base_url = ' tcp://127.0.0.1:2375' )
684
- >> > stats_obj = cli.stats(' elasticsearch' , aggregate = aggregate )
680
+ >> > stats_obj = cli.stats(' elasticsearch' )
685
681
>> > for stat in stats:
686
682
>> > print (stat)
687
- [ ' {"read":"2015-02-11T21:47:30.49388286+02:00","network":{"rx_bytes":666052,"rx_packets":4409 ...
683
+ {" read" :" 2015-02-11T21:47:30.49388286+02:00" ," network" :{" rx_bytes" :666052 ," rx_packets" :4409 ...
688
684
...
689
685
...
690
686
...
You can’t perform that action at this time.
0 commit comments