Skip to content

Commit

Permalink
Merge pull request fluent#15 from nokute78/update_mem
Browse files Browse the repository at this point in the history
in_mem:update example and add information about swap
  • Loading branch information
edsiper authored Mar 3, 2017
2 parents 79c050f + 1526dd4 commit 34679f3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions input/mem.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# Memory Usage

The __mem__ input plugin, gathers the information about the memory usage of the running system every certain interval of time and reports the total amount of memory and the amount of free available.
The __mem__ input plugin, gathers the information about the memory and swap usage of the running system every certain interval of time and reports the total amount of memory and the amount of free available.

## Getting Started

In order to get memory usage from your system, you can run the plugin from the command line or through the configuration file:
In order to get memory and swap usage from your system, you can run the plugin from the command line or through the configuration file:

### Command Line

```bash
$ bin/fluent-bit -i mem -t memory -o stdout -m '*'
Fluent-Bit v0.8.0
$ fluent-bit -i mem -t memory -o stdout -m '*'
Fluent-Bit v0.11.0
Copyright (C) Treasure Data

[0] memory: [1463544745, {"total"=>8081140, "free"=>2548704}]
[1] memory: [1463544746, {"total"=>8081140, "free"=>2560020}]
[2] memory: [1463544747, {"total"=>8081140, "free"=>2559616}]
[3] memory: [1463544748, {"total"=>8081140, "free"=>2559568}]
[2017/03/03 21:12:35] [ info] [engine] started
[0] memory: [1488543156, {"Mem.total"=>1016044, "Mem.used"=>841388, "Mem.free"=>174656, "Swap.total"=>2064380, "Swap.used"=>139888, "Swap.free"=>1924492}]
[1] memory: [1488543157, {"Mem.total"=>1016044, "Mem.used"=>841420, "Mem.free"=>174624, "Swap.total"=>2064380, "Swap.used"=>139888, "Swap.free"=>1924492}]
[2] memory: [1488543158, {"Mem.total"=>1016044, "Mem.used"=>841420, "Mem.free"=>174624, "Swap.total"=>2064380, "Swap.used"=>139888, "Swap.free"=>1924492}]
[3] memory: [1488543159, {"Mem.total"=>1016044, "Mem.used"=>841420, "Mem.free"=>174624, "Swap.total"=>2064380, "Swap.used"=>139888, "Swap.free"=>1924492}]
```

### Configuration File
Expand Down

0 comments on commit 34679f3

Please sign in to comment.