{"action":"created","issue":{"url":"https://api.github.com/repos/netdata/netdata/issues/4635","repository_url":"https://api.github.com/repos/netdata/netdata","labels_url":"https://api.github.com/repos/netdata/netdata/issues/4635/labels{/name}","comments_url":"https://api.github.com/repos/netdata/netdata/issues/4635/comments","events_url":"https://api.github.com/repos/netdata/netdata/issues/4635/events","html_url":"https://github.com/netdata/netdata/pull/4635","id":380116637,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMzkwODM1","number":4635,"title":"Move cpuidle python module to proc plugin","user":{"login":"vlvkobal","id":22008543,"node_id":"MDQ6VXNlcjIyMDA4NTQz","avatar_url":"https://avatars2.githubusercontent.com/u/22008543?v=4","gravatar_id":"","url":"https://api.github.com/users/vlvkobal","html_url":"https://github.com/vlvkobal","followers_url":"https://api.github.com/users/vlvkobal/followers","following_url":"https://api.github.com/users/vlvkobal/following{/other_user}","gists_url":"https://api.github.com/users/vlvkobal/gists{/gist_id}","starred_url":"https://api.github.com/users/vlvkobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlvkobal/subscriptions","organizations_url":"https://api.github.com/users/vlvkobal/orgs","repos_url":"https://api.github.com/users/vlvkobal/repos","events_url":"https://api.github.com/users/vlvkobal/events{/privacy}","received_events_url":"https://api.github.com/users/vlvkobal/received_events","type":"User","site_admin":false},"labels":[{"id":1131633615,"node_id":"MDU6TGFiZWwxMTMxNjMzNjE1","url":"https://api.github.com/repos/netdata/netdata/labels/area/collectors","name":"area/collectors","color":"0f34c6","default":false},{"id":1065921486,"node_id":"MDU6TGFiZWwxMDY1OTIxNDg2","url":"https://api.github.com/repos/netdata/netdata/labels/area/external/python","name":"area/external/python","color":"0f34c6","default":false},{"id":1131647020,"node_id":"MDU6TGFiZWwxMTMxNjQ3MDIw","url":"https://api.github.com/repos/netdata/netdata/labels/priority/medium","name":"priority/medium","color":"33c66e","default":false}],"state":"open","locked":false,"assignee":{"login":"vlvkobal","id":22008543,"node_id":"MDQ6VXNlcjIyMDA4NTQz","avatar_url":"https://avatars2.githubusercontent.com/u/22008543?v=4","gravatar_id":"","url":"https://api.github.com/users/vlvkobal","html_url":"https://github.com/vlvkobal","followers_url":"https://api.github.com/users/vlvkobal/followers","following_url":"https://api.github.com/users/vlvkobal/following{/other_user}","gists_url":"https://api.github.com/users/vlvkobal/gists{/gist_id}","starred_url":"https://api.github.com/users/vlvkobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlvkobal/subscriptions","organizations_url":"https://api.github.com/users/vlvkobal/orgs","repos_url":"https://api.github.com/users/vlvkobal/repos","events_url":"https://api.github.com/users/vlvkobal/events{/privacy}","received_events_url":"https://api.github.com/users/vlvkobal/received_events","type":"User","site_admin":false},"assignees":[{"login":"vlvkobal","id":22008543,"node_id":"MDQ6VXNlcjIyMDA4NTQz","avatar_url":"https://avatars2.githubusercontent.com/u/22008543?v=4","gravatar_id":"","url":"https://api.github.com/users/vlvkobal","html_url":"https://github.com/vlvkobal","followers_url":"https://api.github.com/users/vlvkobal/followers","following_url":"https://api.github.com/users/vlvkobal/following{/other_user}","gists_url":"https://api.github.com/users/vlvkobal/gists{/gist_id}","starred_url":"https://api.github.com/users/vlvkobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlvkobal/subscriptions","organizations_url":"https://api.github.com/users/vlvkobal/orgs","repos_url":"https://api.github.com/users/vlvkobal/repos","events_url":"https://api.github.com/users/vlvkobal/events{/privacy}","received_events_url":"https://api.github.com/users/vlvkobal/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/netdata/netdata/milestones/9","html_url":"https://github.com/netdata/netdata/milestone/9","labels_url":"https://api.github.com/repos/netdata/netdata/milestones/9/labels","id":3829373,"node_id":"MDk6TWlsZXN0b25lMzgyOTM3Mw==","number":9,"title":"v1.12-rc0","description":"","creator":{"login":"paulfantom","id":3531758,"node_id":"MDQ6VXNlcjM1MzE3NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/3531758?v=4","gravatar_id":"","url":"https://api.github.com/users/paulfantom","html_url":"https://github.com/paulfantom","followers_url":"https://api.github.com/users/paulfantom/followers","following_url":"https://api.github.com/users/paulfantom/following{/other_user}","gists_url":"https://api.github.com/users/paulfantom/gists{/gist_id}","starred_url":"https://api.github.com/users/paulfantom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulfantom/subscriptions","organizations_url":"https://api.github.com/users/paulfantom/orgs","repos_url":"https://api.github.com/users/paulfantom/repos","events_url":"https://api.github.com/users/paulfantom/events{/privacy}","received_events_url":"https://api.github.com/users/paulfantom/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":26,"state":"open","created_at":"2018-11-18T14:01:29Z","updated_at":"2018-11-28T10:10:39Z","due_on":"2018-12-05T08:00:00Z","closed_at":null},"comments":9,"created_at":"2018-11-13T08:47:32Z","updated_at":"2018-11-28T10:44:45Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/netdata/netdata/pulls/4635","html_url":"https://github.com/netdata/netdata/pull/4635","diff_url":"https://github.com/netdata/netdata/pull/4635.diff","patch_url":"https://github.com/netdata/netdata/pull/4635.patch"},"body":"##### Summary\r\n`cpuidle` python module reads data from files:\r\n`/proc/schedstat`\r\n`/sys/devices/system/cpu/cpu*/cpuidle/state*/name`\r\n`/sys/devices/system/cpu/cpu*/cpuidle/state*/time`\r\nSince we already have a C plugin that parses files in `/proc` and `/sys`, it is natural to move python code with similar functionality into it.\r\n\r\nPartly implements #4541\r\n\r\n##### Component Name\r\n`cpuidle` python module\r\n`proc` plugin"},"comment":{"url":"https://api.github.com/repos/netdata/netdata/issues/comments/442402634","html_url":"https://github.com/netdata/netdata/pull/4635#issuecomment-442402634","issue_url":"https://api.github.com/repos/netdata/netdata/issues/4635","id":442402634,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjQwMjYzNA==","user":{"login":"ktsaou","id":2662304,"node_id":"MDQ6VXNlcjI2NjIzMDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2662304?v=4","gravatar_id":"","url":"https://api.github.com/users/ktsaou","html_url":"https://github.com/ktsaou","followers_url":"https://api.github.com/users/ktsaou/followers","following_url":"https://api.github.com/users/ktsaou/following{/other_user}","gists_url":"https://api.github.com/users/ktsaou/gists{/gist_id}","starred_url":"https://api.github.com/users/ktsaou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktsaou/subscriptions","organizations_url":"https://api.github.com/users/ktsaou/orgs","repos_url":"https://api.github.com/users/ktsaou/repos","events_url":"https://api.github.com/users/ktsaou/events{/privacy}","received_events_url":"https://api.github.com/users/ktsaou/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T10:44:45Z","updated_at":"2018-11-28T10:44:45Z","author_association":"MEMBER","body":"@vlvkobal \tthis is nice!\r\n\r\nThe only problem I see is this:\r\n\r\n```sh\r\n# ls -l /proc/$(pidof netdata)/fd/\r\ntotal 0\r\nl-wx------ 1 netdata netdata 64 Nov 28 12:30 0 -> /dev/null\r\nl-wx------ 1 netdata netdata 64 Nov 28 12:30 1 -> /var/log/netdata/debug.log\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 10 -> /sys/devices/system/cpu/cpu6/cpuidle/state0/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 100 -> /sys/devices/system/cpu/cpu5/cpuidle/state0/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 101 -> /sys/devices/system/cpu/cpu5/cpuidle/state0/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 102 -> /sys/devices/system/cpu/cpu5/cpuidle/state1/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 103 -> /sys/devices/system/cpu/cpu5/cpuidle/state1/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 104 -> /sys/devices/system/cpu/cpu5/cpuidle/state2/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 105 -> /sys/devices/system/cpu/cpu5/cpuidle/state2/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 106 -> /sys/devices/system/cpu/cpu5/cpuidle/state3/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 107 -> /sys/devices/system/cpu/cpu5/cpuidle/state3/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 108 -> /sys/devices/system/cpu/cpu5/cpuidle/state4/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 109 -> /sys/devices/system/cpu/cpu5/cpuidle/state4/time\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 11 -> 'socket:[26093177]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 110 -> /sys/devices/system/cpu/cpu5/cpuidle/state5/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 111 -> /sys/devices/system/cpu/cpu5/cpuidle/state5/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 112 -> /sys/devices/system/cpu/cpu6/cpuidle/state0/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 113 -> /sys/devices/system/cpu/cpu6/cpuidle/state1/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 114 -> /sys/devices/system/cpu/cpu6/cpuidle/state1/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 115 -> /sys/devices/system/cpu/cpu6/cpuidle/state2/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 116 -> /sys/devices/system/cpu/cpu6/cpuidle/state2/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 117 -> /sys/devices/system/cpu/cpu6/cpuidle/state3/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 118 -> /sys/devices/system/cpu/cpu6/cpuidle/state3/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 119 -> /sys/devices/system/cpu/cpu6/cpuidle/state4/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 12 -> 'pipe:[26095369]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 120 -> /sys/devices/system/cpu/cpu6/cpuidle/state4/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 121 -> /sys/devices/system/cpu/cpu6/cpuidle/state5/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 122 -> /sys/devices/system/cpu/cpu6/cpuidle/state5/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 123 -> /sys/devices/system/cpu/cpu7/cpuidle/state0/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 124 -> /sys/devices/system/cpu/cpu7/cpuidle/state0/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 125 -> /sys/devices/system/cpu/cpu7/cpuidle/state1/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 126 -> /sys/devices/system/cpu/cpu7/cpuidle/state1/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 127 -> /sys/devices/system/cpu/cpu7/cpuidle/state4/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 128 -> /sys/devices/system/cpu/cpu7/cpuidle/state2/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 129 -> /sys/devices/system/cpu/cpu7/cpuidle/state2/time\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 13 -> 'socket:[26093178]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 130 -> /sys/devices/system/cpu/cpu7/cpuidle/state3/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 131 -> /proc/loadavg\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 132 -> /sys/devices/system/cpu/cpu7/cpuidle/state3/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 133 -> /sys/devices/system/cpu/cpu7/cpuidle/state4/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 134 -> /sys/devices/system/cpu/cpu7/cpuidle/state5/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 135 -> /sys/devices/system/cpu/cpu7/cpuidle/state5/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 136 -> /proc/sys/kernel/random/entropy_avail\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 137 -> /proc/softirqs\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 138 -> /proc/interrupts\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 139 -> /proc/vmstat\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 14 -> 'socket:[26093182]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 140 -> /proc/meminfo\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 141 -> /sys/kernel/mm/ksm/pages_shared\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 142 -> /sys/kernel/mm/ksm/pages_sharing\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 143 -> /sys/kernel/mm/ksm/pages_unshared\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 144 -> /sys/kernel/mm/ksm/pages_volatile\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 145 -> /proc/22328/net/dev\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 146 -> /proc/22328/net/sockstat\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 147 -> /proc/22328/net/sockstat6\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 148 -> /proc/22328/net/netstat\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 149 -> /proc/22328/net/snmp\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 15 -> 'socket:[26093183]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 150 -> /proc/22328/net/snmp6\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 151 -> /proc/22328/net/softnet_stat\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 152 -> /proc/22328/net/stat/nf_conntrack\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 153 -> /proc/diskstats\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 154 -> /proc/22328/net/rpc/nfs\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 155 -> /proc/sys/kernel/sem\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 156 -> 'socket:[26093340]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:32 157 -> /sys/fs/cgroup/cpu,cpuacct/system.slice/systemd-logind.service/cpuacct.stat\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:31 158 -> /sys/fs/cgroup/memory/system.slice/systemd-logind.service/memory.stat\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 16 -> /sys/fs/cgroup/blkio/system.slice/systemd-logind.service/blkio.throttle.io_serviced\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 160 -> 'socket:[26090424]'\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 161 -> 'socket:[26093429]'\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 162 -> 'socket:[26090426]'\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 163 -> 'socket:[26098655]'\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 164 -> 'socket:[26100777]'\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 17 -> 'socket:[26089318]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 18 -> 'pipe:[26093184]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 19 -> 'pipe:[26093205]'\r\nl-wx------ 1 netdata netdata 64 Nov 28 12:30 2 -> /var/log/netdata/error.log\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 20 -> 'pipe:[26095371]'\r\nl-wx------ 1 netdata netdata 64 Nov 28 12:30 21 -> 'pipe:[26093205]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 22 -> /proc/stat\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 23 -> /sys/devices/system/cpu/cpu0/thermal_throttle/core_throttle_count\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 24 -> /sys/devices/system/cpu/cpu1/thermal_throttle/core_throttle_count\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 25 -> /sys/devices/system/cpu/cpu2/thermal_throttle/core_throttle_count\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 26 -> /sys/devices/system/cpu/cpu3/thermal_throttle/core_throttle_count\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 27 -> /sys/devices/system/cpu/cpu4/thermal_throttle/core_throttle_count\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 28 -> /sys/devices/system/cpu/cpu5/thermal_throttle/core_throttle_count\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 29 -> /sys/devices/system/cpu/cpu6/thermal_throttle/core_throttle_count\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 3 -> 'socket:[26094485]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 30 -> /sys/devices/system/cpu/cpu7/thermal_throttle/core_throttle_count\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 31 -> /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 32 -> /sys/devices/system/cpu/cpufreq/policy1/scaling_cur_freq\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 33 -> /sys/devices/system/cpu/cpufreq/policy2/scaling_cur_freq\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 34 -> /sys/devices/system/cpu/cpufreq/policy3/scaling_cur_freq\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 35 -> /sys/devices/system/cpu/cpufreq/policy4/scaling_cur_freq\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 36 -> /sys/devices/system/cpu/cpufreq/policy5/scaling_cur_freq\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 37 -> /sys/devices/system/cpu/cpufreq/policy6/scaling_cur_freq\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 38 -> /sys/devices/system/cpu/cpufreq/policy7/scaling_cur_freq\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 39 -> /proc/schedstat\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 4 -> 'socket:[26094486]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 40 -> /sys/devices/system/cpu/cpu0/cpuidle/state0/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 41 -> /sys/devices/system/cpu/cpu0/cpuidle/state0/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 42 -> /sys/devices/system/cpu/cpu0/cpuidle/state1/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 43 -> /sys/devices/system/cpu/cpu0/cpuidle/state1/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 44 -> /sys/devices/system/cpu/cpu0/cpuidle/state2/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 45 -> /sys/devices/system/cpu/cpu0/cpuidle/state2/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 46 -> /sys/devices/system/cpu/cpu0/cpuidle/state3/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 47 -> /sys/devices/system/cpu/cpu0/cpuidle/state3/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 48 -> /sys/devices/system/cpu/cpu0/cpuidle/state4/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 49 -> /sys/devices/system/cpu/cpu0/cpuidle/state4/time\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 5 -> 'socket:[26094487]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 50 -> /sys/devices/system/cpu/cpu0/cpuidle/state5/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 51 -> /sys/devices/system/cpu/cpu0/cpuidle/state5/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 52 -> /sys/devices/system/cpu/cpu1/cpuidle/state0/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 53 -> /sys/devices/system/cpu/cpu1/cpuidle/state0/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 54 -> /sys/devices/system/cpu/cpu1/cpuidle/state1/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 55 -> /sys/devices/system/cpu/cpu1/cpuidle/state1/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 56 -> /sys/devices/system/cpu/cpu1/cpuidle/state2/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 57 -> /sys/devices/system/cpu/cpu1/cpuidle/state2/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 58 -> /sys/devices/system/cpu/cpu1/cpuidle/state3/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 59 -> /sys/devices/system/cpu/cpu1/cpuidle/state3/time\r\nl-wx------ 1 netdata netdata 64 Nov 28 12:30 6 -> /var/log/netdata/access.log\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 60 -> /sys/devices/system/cpu/cpu1/cpuidle/state4/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 61 -> /sys/devices/system/cpu/cpu1/cpuidle/state4/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 62 -> /sys/devices/system/cpu/cpu1/cpuidle/state5/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 63 -> /sys/devices/system/cpu/cpu1/cpuidle/state5/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 64 -> /sys/devices/system/cpu/cpu2/cpuidle/state0/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 65 -> /sys/devices/system/cpu/cpu2/cpuidle/state0/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 66 -> /sys/devices/system/cpu/cpu2/cpuidle/state1/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 67 -> /sys/devices/system/cpu/cpu2/cpuidle/state1/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 68 -> /sys/devices/system/cpu/cpu2/cpuidle/state2/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 69 -> /sys/devices/system/cpu/cpu2/cpuidle/state2/time\r\nl-wx------ 1 netdata netdata 64 Nov 28 12:30 7 -> /var/lib/netdata/health/health-log.db\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 70 -> /sys/devices/system/cpu/cpu2/cpuidle/state3/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 71 -> /sys/devices/system/cpu/cpu2/cpuidle/state3/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 72 -> /sys/devices/system/cpu/cpu2/cpuidle/state4/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 73 -> /sys/devices/system/cpu/cpu2/cpuidle/state4/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 74 -> /sys/devices/system/cpu/cpu2/cpuidle/state5/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 75 -> /sys/devices/system/cpu/cpu2/cpuidle/state5/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 76 -> /sys/devices/system/cpu/cpu3/cpuidle/state0/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 77 -> /sys/devices/system/cpu/cpu3/cpuidle/state0/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 78 -> /sys/devices/system/cpu/cpu3/cpuidle/state1/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 79 -> /sys/devices/system/cpu/cpu3/cpuidle/state1/time\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 8 -> 'socket:[26093172]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 80 -> /sys/devices/system/cpu/cpu3/cpuidle/state2/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 81 -> /sys/devices/system/cpu/cpu3/cpuidle/state2/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 82 -> /sys/devices/system/cpu/cpu3/cpuidle/state3/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 83 -> /sys/devices/system/cpu/cpu3/cpuidle/state3/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 84 -> /sys/devices/system/cpu/cpu3/cpuidle/state4/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 85 -> /sys/devices/system/cpu/cpu3/cpuidle/state4/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 86 -> /sys/devices/system/cpu/cpu3/cpuidle/state5/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 87 -> /sys/devices/system/cpu/cpu3/cpuidle/state5/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 88 -> /sys/devices/system/cpu/cpu4/cpuidle/state0/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 89 -> /sys/devices/system/cpu/cpu4/cpuidle/state0/time\r\nlrwx------ 1 netdata netdata 64 Nov 28 12:30 9 -> 'socket:[26093173]'\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 90 -> /sys/devices/system/cpu/cpu4/cpuidle/state1/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 91 -> /sys/devices/system/cpu/cpu4/cpuidle/state1/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 92 -> /sys/devices/system/cpu/cpu4/cpuidle/state2/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 93 -> /sys/devices/system/cpu/cpu4/cpuidle/state2/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 94 -> /sys/devices/system/cpu/cpu4/cpuidle/state3/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 95 -> /sys/devices/system/cpu/cpu4/cpuidle/state3/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 96 -> /sys/devices/system/cpu/cpu4/cpuidle/state4/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 97 -> /sys/devices/system/cpu/cpu4/cpuidle/state4/time\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 98 -> /sys/devices/system/cpu/cpu4/cpuidle/state5/name\r\nlr-x------ 1 netdata netdata 64 Nov 28 12:30 99 -> /sys/devices/system/cpu/cpu4/cpuidle/state5/time\r\n```\r\n\r\nI think we should not keep all those files always open. On a big system with dozens of cores, netdata will need thousands of file descriptors by default (it won't even start).\r\n\r\nWhy do we keep the `name` files open? Do we re-read them? Why? Can they change over time?\r\n\r\nI suggest to read `time` files with `read_single_number_file()` and `name` files with `read_file()`. Also, make sure `name` files are read only once.\r\n"}}
{"actor":{"display_login":"ktsaou"}}