Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- { "_id" : ObjectId("579fc863d246f4640173d0b4"),
- "flow" : [ 178488283, NumberLong("4294967295"), NumberLong("4294967295"),
- 11, 0, 2, 264,
- 1470073539, 1470073539, 48471, 5678, 0, 17, 0, 0, 0, 0, 0 ],
- "sequence" : 64754, "sensor" : "192.168.236.1" }
- ...
- db.collector.aggregate(
- [{ $group: { _id: 'rx' , bytes : { $sum : 'flow.6' }, count : { $sum :1 }}}] )
- { "_id" : "rx", "bytes" : 0, "count" : 151291 }
- > db.collector.aggregate( [ {$unwind: "$flow" },
- { $group: { _id: 'rx' , bytes : { $sum : 6 }, count : { $sum :1 }}}] )
- { "_id" : "rx", "bytes" : 17328276, "count" : 2888046 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement