In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you the "Heka the same file scrolling rolling read FilePollingInput example analysis", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "Heka the same file scrolling read rolling read FilePollingInput sample analysis" this article.
For a file, periodically read content, no buffer read, typical application
1, memory usage read
[hekad]
Maxprocs = 2
[MemStats]
Type = "FilePollingInput"
Ticker_interval = 1
File_path = "/ proc/meminfo"
Decoder = "MemStatsDecoder"
[MemStatsDecoder]
Type = "SandboxDecoder"
Filename = "lua_decoders/linux_memstats.lua"
[RstEncoder]
[LogOutput]
Message_matcher = "TRUE"
Encoder = "RstEncoder"
The results are as follows
: Timestamp: 2016-07-22 10:29:48 + 0000 UTC
: Type: stats.memstats
: Hostname: master
: Pid: 0
Uuid: 977fd381-43d8-424a-a410-8d230b85ab46
: Logger: MemStats
: Payload:
: EnvVersion:
: Severity: 7
: Fields:
| | name: "Hugepagesize" type:double value:2048 representation: "kB" |
| | name: "Buffers" type:double value:183108 representation: "kB" |
| | name: "Active" type:double value:696196 representation: "kB" |
| | name: "Bounce" type:double value:0 representation: "kB" |
| | name: "SUnreclaim" type:double value:31416 representation: "kB" |
| | name: "HugePages_Total" type:double value:0 |
| | name: "Active (anon)" type:double value:454064 representation: "kB"
| | name: "Mlocked" type:double value:0 representation: "kB" |
| | name: "AnonPages" type:double value:981512 representation: "kB" |
| | name: "Active (file)" type:double value:242132 representation: "kB"
| | name: "Committed_AS" type:double value:3.152928e+06 representation: "kB" |
| | name: "VmallocUsed" type:double value:149148 representation: "kB" |
| | name: "SwapFree" type:double value:2.009828e+06 representation: "kB" |
| | name: "Inactive (file)" type:double value:313540 representation: "kB"
| | name: "CommitLimit" type:double value:2.988856e+06 representation: "kB" |
| | name: "Slab" type:double value:164308 representation: "kB" |
| | name: "PageTables" type:double value:16888 representation: "kB" |
| | name: "HugePages_Free" type:double value:0 |
| | name: "SwapTotal" type:double value:2.031608e+06 representation: "kB" |
| | name: "NFS_Unstable" type:double value:0 representation: "kB" |
| | name: "VmallocChunk" type:double value:3.4359583224e+10 representation: "kB" |
| | name: "HugePages_Surp" type:double value:0 |
| | name: "DirectMap1G" type:double value:0 representation: "kB" |
| | name: "DirectMap2M" type:double value:2.091008e+06 representation: "kB" |
| | name: "DirectMap4k" type:double value:6144 representation: "kB" |
| | name: "HugePages_Rsvd" type:double value:0 |
| | name: "Shmem" type:double value:1164 representation: "kB" |
| | name: "SReclaimable" type:double value:132892 representation: "kB" |
| | name: "Mapped" type:double value:57724 representation: "kB" |
| | name: "HardwareCorrupted" type:double value:0 representation: "kB" |
| | name: "FilePath" type:string value: "/ proc/meminfo" |
| | name: "MemFree" type:double value:159100 representation: "kB" |
| | name: "Writeback" type:double value:0 representation: "kB" |
| | name: "SwapCached" type:double value:3240 representation: "kB" |
| | name: "WritebackTmp" type:double value:0 representation: "kB" |
| | name: "Dirty" type:double value:164 representation: "kB" |
| | name: "VmallocTotal" type:double value:3.4359738367e+10 representation: "kB" |
| | name: "Inactive" type:double value:844780 representation: "kB" |
| | name: "AnonHugePages" type:double value:706560 representation: "kB" |
| | name: "Unevictable" type:double value:0 representation: "kB" |
| | name: "Inactive (anon)" type:double value:531240 representation: "kB"
| | name: "KernelStack" type:double value:3128 representation: "kB" |
| | name: "Cached" type:double value:373728 representation: "kB" |
| | name: "MemTotal" type:double value:1.914496e+06 representation: "kB" |
The value in fileds changes with each read.
Application 2, system load reading
[LoadAvg] type = "FilePollingInput" ticker_interval = 1file_path = "/ proc/loadavg" decoder = "LoadAvgDecoder" [LoadAvgDecoder] type = "SandboxDecoder" filename = "lua_decoders/linux_loadavg.lua"
Application 3, disk condition reading
[DiskStats] type = "FilePollingInput" ticker_interval = 1file_path = "/ sys/block/sda1/stat" decoder = "DiskStatsDecoder" [DiskStatsDecoder] type = "SandboxDecoder" filename = "lua_decoders/linux_diskstats.lua"
Application 4, cpu case read
[ProcStats] type = "FilePollingInput" ticker_interval = 1file_path = "/ proc/stat" decoder = "ProcStatDecoder" [ProcStatDecoder] type = "SandboxDecoder" filename = "lua_decoders/linux_procstat.lua"
Application 5, device condition reading
[Netdev] type = "FilePollingInput" ticker_interval = 1file_path = "/ proc/net/dev" decoder = "NetdevDecoder" [NetdevDecoder] type = "SandboxDecoder" filename = "lua_decoders/linux_netdev.lua"
Application 6, network situation reading
[NetNetstat] type = "FilePollingInput" ticker_interval = 1file_path = "/ proc/net/netstat" decoder = "NetstatDecoder" [NetSnmp] type = "FilePollingInput" ticker_interval = 1file_path = "/ proc/net/snmp" decoder = "NetstatDecoder" [NetstatDecoder] type = "SandboxDecoder" filename = "lua_decoders/linux_netstat.lua" above are all the contents of the article "sample analysis of Heka scrolling reading rolling read FilePollingInput from the same file". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.