配置基于Elasticsearch的EPICS PV分析器

1# @Time : 2020-05-27 2# @Language: Markdown 3# @Software: VS Code 4# @Author : Di Wang 5# @Email : [email protected] 把EPICS PV存入ES后,为了方便搜索,需要自定义analyzer。 ES 文本分析 基于https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html完成本文。 ES默认使用standard analyzer对一段文本进行操作,如分词(根据空格拆分),单词还原(foxes还原为fox),去除停用词(移除the,a等冠词)等。除默认分析器还有一系列内置分析器(built-in analyzer),用户也可以自定义分析器。 ...

May 27, 2020 · 5 min · 2447 words · DW

ELK配置

1# @Time : 2020-05-02 2# @Language: Markdown 3# @Software: VS Code 4# @Author : Di Wang 5# @Email : [email protected] 为了方便配置,(其实是懒得研究Puppet,Chef,和Ansible这些自动化管理工具),把一些我常用的配置项在这里列一下。所有内容只针对CentOS 7。ES版本 7.6。 ...

May 2, 2020 · 4 min · 1735 words · DW

ElasticSearch 基本概念

1# @Time : 2020-04-23 2# @Language: Markdown 3# @Software: VS Code 4# @Author : Di Wang 5# @Email : [email protected] 前言:之前在LINAC安装了ES,采集了控制网络内EPICS beacon anomaly和Archive Appliance的数据,但是使用了一个非常老旧的桌面计算机,也没有修改什么参数,导致机器非常卡顿(文末会分析原因)。最近购入了一个新的服务器,准备migrate到新的机器上,再加上疫情在家隔离终于有时间去研究下ES的一些细节概念了。 ...

April 23, 2020 · 29 min · 14065 words · DW

YAML introduction

1# @Time : 2019-02-02 2# @Language: Markdown 3# @Software: VS Code 4# @Author : Di Wang 5# @Email : [email protected] A Short Report on YAML YAML means “YAML Ain’t a Markup Language”. It uses Python-style indentation to indicate nesting, and use [] for lists and {} for maps. Since the name is recursive, it is a better option to explain YAML by YAML. 1--- # Syntax 2basic syntax: 3 - whitespace indentation is used for denoteing structure and `tab` is not allowed 4 - comments begin with the `#` 5 - List members are denoted by leading hyphen (`-`) with one member per line 6 - use key:value to denote array 7 - case sensitive 8Support data structure: 9 - map (also called dictionary or hashes or key:value pair) 10 - array or list or sequence 11 - scalars 12 13# basic components 14map: 15 - map1: this is a map 16 - map2: {name: hello, id: world} 17list: 18 - cat 19 - dog 20 - cow 21 - [monkey, elephant] 22scalars: 23 null: ~ 24 boolean: 25 - TRUE # True (yaml1.1), string "Yes" (yaml1.2) 26 - FALSE 27 - yes 28 - no 29 - Yes 30 - YeS # will be recognized as a string 31 float: 32 - 3.14 33 - 2.99e+8 34 int: 35 - 65536 36 - 0b1010 # dec: 10 37 srting: 38 - apple 39 - "another string" 40 - '\n will be escaped' 41 - "\n will not be escaped" 42 - data: | 43 There once was a tall man from Ealing 44 Who got on a bus to Darjeeling 45 It said on the door 46 "Please don't sit on the floor" 47 So he carefully sat on the ceiling 48 - info: > 49 this is 50 an 51 info 52 53 \n 54 continued 55 info 56date and time: 57 # {date}t{time}+timezone 58 - iso8601: 2001-12-25t01:23:45.54+09:00 59 - date: &epoch 1970-01-01 60 - epochtime: *epoch 61explicit type: 62 str_true: !!str true # string rather than boolean 63 str_int: !!str 123 # string rather than int 64anchor and refers: 65 - anchor: &anchor001 66 Manager: Alice 67 Programer: Bob 68 Teacher: Dylan 69 Student: Ruby 70 - refer: *anchor001 71 - merger: 72 <<: *anchor001 73 Student: Python Parse this YAML file by Python3. ...

February 2, 2020 · 4 min · 662 words · DW

Elasticsearch+Kibana+Beats+Logstash安装

1# @Time : 2019-01-28 2# @Language: Markdown 3# @Software: VS Code 4# @Author : Di Wang 5# @Email : [email protected] 本博客资料来源:Elastic官网 Elasticsearch+Logstash+Kibana,合称ELK,Elasticsearch用来完成搜索,Logstash用于数据采集,Kibana用于数据可视化。 数据采集工作早期由Logstash完成,现在则使用Beats,Logstash更多用于数据汇聚处理。 ...

January 28, 2020 · 3 min · 1128 words · DW

Python版本管理与虚拟环境

1# @Time : 2019-12-07 2# @Language: Markdown 3# @Software: VS Code 4# @Author : Di Wang 5# @Email : [email protected] 对于控制领域而言,目前常用的epics Python support有CaChannel, caffi, caproto, Cothread, pvaPy和 PyEpics 3. 不同的用户有不同的偏好软件,而哪怕是同一个软件也存在版本更迭。Python环境的管理一直是个大难题,包括Python版本和库依赖管理,在尝试了几种方式后,目前选择了pyenv+pyenv-virtualenv的方式。 ...

January 22, 2020 · 3 min · 1441 words · DW

A Short Survery on IDE and VCS

A Short Introduction To VCS and IDE 1# @Time : 2019-11-19 2# @Language: Markdown 3# @Software: Typora 4# @Author : Di Wang 5# @Email : [email protected] Overview This essay will briefly introduce and compare several kinds of VCS software, IDE and popular text editors. I hope this article may help people in KEK who need to program (Using Java, C/C++, Python) and collaborate with others could select efficient and suitable tools easily. ...

November 19, 2019 · 5 min · 950 words · DW