注意事项:

沟通项目需求:
1.项目背景和目的
哪个团队、项目Wiki?

数据库登陆:mysql -uroot -pabc@0326 -h127.0.0.1 -P4004 -A

set names utf8;

SELECT count(*) FROM `g_map` WHERE ((status = 1 or status = 3) and name like 'zhong中%');

SELECT count(*) FROM `g_map` WHERE ((status = 1 or status = 3) and name='中');

SELECT `id`, `area`, `product_type`, `airport`, `type`, `source`, `name`, `status`, `send_status`, `online_status`, `admin_user_id`, `create_time`, `update_time`, `validate_time`, `admin_user_en`, `admin_user_cn`, `is_admin`, `is_parent`, `dead_line`, `canonical_country_code` FROM `g_map` WHERE ((status = 1 or status = 3) and name like '中%') ORDER BY id DESC LIMIT 4;

1. 登陆服务器:

ssh -p 35000 -o StrictHostKeyChecking=no -o ServerAliveInterval=60 whywanghaiyang@gzrelay.sys.dayunmotuo.com
dssh hostname
sudo -iu username

2. 下载线上文件:

> 下载文件到跳板机器
dscp whywanghaiyang@hostname:/home/log.wf.2018121916 ./
python -m SimpleHTTPServer 8100

> 在跳板机上启动HTTP服务
python -m SimpleHTTPServer 8100

3. 查询文件中关键字条数

grep key log.info | wc -l9655

4. 查看机器启动时间:

date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S"

2. 查询进程:
ps -aux | grep nginx | grep -v apache // 抓去nginx关键子,过滤掉包含apache关键字的条目
kill -9 nginx //直杀进程

5.
ifind -b hostname
ifind -t clustername
irun -c 'egrep 703687549066689 /home/log/log.error' | egrep -v Warning

irun -c 'egrep 703687549066689 /home/log/log.log' | egrep -v Warning

3. Redis 查询Geofence-updater key
hget key_601 207601
hgetall key_601
hval key_601 207601

4.
netstat -lntup |grep geofen
export GOPATH=/home//app/namespace
export GOROOT=/usr/local/go
ps -ef |grep name
pwdx 37830

netsta -atl | grep 8081

nc -l ip:port > a.txt

5. 测试工具
wrk -t8 -c200 -d30s --latency "http://www.bing.com"

6. 配置Gitlab的SSH

ssh-keygen -t rsa -C 'xxx@xxx.com'
复制内容:~/.ssh/id_rsa.pub

git更新单个文件:

git fetch

git checkout origin/master -- path/to/file

g

groupadd hadoop
useradd -d /home/hadoop -m hadoop -g hadoop
passwd hadoop

find /home -name filename

8. 查Linux版本
cat /etc/issue

7. 端口占用

Linux如何查看端口

1、lsof -i:端口号 用于查看某一端口的占用情况
2. netstat -tunlp |grep 端口号

SELECT `id`, `area`, `product_type`, `airport`, `type`, `source`, `name`, `status`, `send_status`, `online_status`, `admin_user_id`, `create_time`, `update_time`, `validate_time`, `admin_user_en`, `admin_user_cn`, `is_admin`, `is_parent`, `dead_line`, `canonical_country_code` FROM `table_name` WHERE `id`=? LIMIT 1 []interface {}{246023}

UPDATE `table_name` SET `area` = ?, `product_type` = ?, `type` = ?, `source` = ?, `name` = ?, `status` = ?, `send_status` = ?, `online_status` = ?, `admin_user_en` = ?, `admin_user_cn` = ?, `dead_line` = ?, `update_time` = ? WHERE (id = ?) []interface {}{41, 106, 116, 1, "城0719_3eebbc244be40c876afefe87da271df9", 1, 2, 1, "wangyajuanjessy", "王雅娟", "2019-06-10 18:08:06", "2018-12-11 16:36:21", 246023}

DELETE FROM `table_anme` WHERE (map_id = ?) []interface {}{246023}

BEGIN TRANSACTION

BEGIN TRANSACTION

INSERT INTO `table_name` (`map_id`, `map_item`, `name`, `center`, `radius`, `fence_type`, `administrative`, `create_time`, `update_time`, `canonical_country_code`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) []interface {}{246023, "[\"111.509439,40.784006\",\"111.515619,40.774127\",\"111.589090,40.788685\",\"111.621363,40.757485\",\"111.644708,40.746561\",\"111.687280,40.740839\",\"111.733286,40.753324\",\"111.742899,40.785565\",\"111.776544,40.803759\",\"111.794397,40.832859\",\"111.844522,40.856753\",\"111.889154,40.913857\",\"111.891901,40.935647\",\"111.871301,40.936165\",\"111.789591,40.893098\",\"111.725733,40.894655\",\"111.685221,40.888426\",\"111.626856,40.881158\",\"111.611063,40.871293\",\"111.608316,40.853637\",\"111.571237,40.835457\"]", "poly-item-1", "", 0, 1, 0, "2018-12-11 16:36:21", "2018-12-11 16:36:21", ""}

COMMIT

SELECT `id`, `map_id`, `map_item`, `name`, `center`, `radius`, `fence_type`, `administrative`, `create_time`, `update_time`, `canonical_country_code` FROM `table_name` WHERE (map_id = ?) []interface {}{246023}

ROLL BACK

### 压力测试

siege -c20 -r2 -H "Cache-Control: no-cache" -H "Postman-Token: c6eda32d-1f30-775f-6796-95383011bacc" -H "Content-Type: application/x-www-form-urlencoded" -d 'coords=39.8845,116.3256,40.8845,117.3256&token=3CF4BA9BDC761BA0&logid=1234567' "http://100.69.93.36:7081/fenceservice/infence"

Elasticsearch
集群如何启动:
ZenDiscovery 多数选主算法
lucen 倒排索引

mainconfig.GetMainConfig().UPM.Url + "/user/get/info?"
url = url + GetUpmParams() + "&userName=" + userName + "&withDefaultGrant=1"

appid=1802
appkey=eea2596baa8eb356f4db54ce990681de
url=http://100.69.238.12:8000/sec/upmapi

http://100.69.238.102:8000/sec/upmapi/user/get/info?appId=1802&appKey=eea2596baa8eb356f4db54ce990681de&time=1545196498&sign=d5cf954721e2392d392d1b56899baef7&userName=nimei&withDefaultGrant=1

egrep -o '\btoken:\S*\b' geofence-updater.log.wf | sort |uniq -c
egrep -o 'role=[0-9]+' | sort | uniq -c

Linux 常用命令笔记-2的更多相关文章

  1. Linux 常用命令笔记

    Linux 常用命令笔记 1. locate locate:用来定位文件的位置,如:locate a.txt 但是这个命令有延迟,也就是新建的文件不一定能搜索到,如果非要找到新建的文件可以使用 upd ...

  2. Linux常用命令 笔记

     Linux常用命令  笔记 一.文件处理命令 1. ls命令:显示目录文件                          -a 显示所有文件,包括隐藏文件.(all)               ...

  3. Windows&Linux常用命令笔记

    目录 linux windows Linux: 1.查找文件 find / -name filename.txt 根据名称查找/目录下的filename.txt文件. find . -name &qu ...

  4. Linux常用命令笔记一

    笔记1:查看ubuntu是32位还是64位的方法及其版本号 查看ubuntu是64还是32的命令如下: uname -m 如果是i386到i686,那就是32位系统:如果是x86_64 ,那就是64系 ...

  5. Linux常用命令笔记总结(待补充)

    问题实际场景:遇到告警磁盘利用率不足,检查根目录下各文件大小 Linux查看磁盘利用率 df –h 查找磁盘占用情况 find / -size +100M 从根目录往下找大于100M大小的文件 du ...

  6. Linux 常用命令笔记 (持续更新)

    声明:本文是转载前辈的,地址:http://www.cnblogs.com/tovep/articles/2473147.html 在tomcat的bin目录下执行 ./shutdown.sh 为了查 ...

  7. linux 常用 命令 笔记二

    wget 下载,得到网络上的内容 grep 文件搜索工具 EveryThing is a file in the linux system 安装 cowsay sudo apt-get install ...

  8. Linux常用命令笔记

    ~ 我的home目录/ 系统根目录进入home目录:cd \进入跟目录:cd /Maven编译:mvn clean deploy -U -Dmaven.test.skip=true dependenc ...

  9. 《精通Linux C编程》1.3Linux系统的常用命令-笔记

    [toc] 1.3.1了解Shell Linux常用命令的运行环境就是Shell,它是一种命令解析器,在用户和操作系统之间提供了一个交互接口. 用户在命令行输入命令,然后Shell对该命令进行解析并将 ...

随机推荐

  1. 洛谷P1439 【模板】最长公共子序列

    题目描述 给出1-n的两个排列P1和P2,求它们的最长公共子序列. 输入输出格式 输入格式: 第一行是一个数n, 接下来两行,每行为n个数,为自然数1-n的一个排列. 输出格式: 一个数,即最长公共子 ...

  2. 从零开始学Python 二

    上一章我们已经安装好了Python环境,并且写出了第一个Python程序.下面我们接着继续学习.首先,来分析下上一章我们写的代码. 我们最初的目的是为了可以输出一串有意义的文字,最终选择了英文语句“h ...

  3. Oracle单机Rman笔记[6]---记一次oracle脱机异地还原

    系统情况介绍 正式环境:windows 2008 r2-32bit/ Oracle: Release 11.2.0.1.0 目标环境:windows 2012 Standard-64bit / Ora ...

  4. Android View的滑动

    Android View的滑动 文章目录 Android View的滑动 一.实现移动 1.1 layout() 1.2 设置位置偏移量 1.3 改变布局参数 1.4 动画 1.5 ScrollTo以 ...

  5. MVP之高级MVP架构封装

    MVP之高级MVP架构封装 No MVP: 我们一般会这样写: public class MainActivity extends AppCompatActivity { private EditTe ...

  6. Python turtle安装和使用教程

    1 安装turtle Python2安装命令: pip install turtule Python3安装命令: pip3 install turtle 因为turtle库主要是在Python2中使用 ...

  7. 面向对象编程思想(OOP)

    本文我将从面向对象编程思想是如何解决软件开发中各种疑难问题的角度,来讲述我们面向对象编程思想的理解,梳理面向对象四大基本特性.七大设计原则和23种设计模式之间的关系. 软件开发中疑难问题: 软件复杂庞 ...

  8. Angular No name was provided for external module 'XXX' in output.globals 错误

    Angular 7 开发自定义库时,引用ngZorroAntd,build过程中出现 No name was provided for external module 'ng-zorro-antd' ...

  9. Django基础-01

    Django 是基于 Python,所有的 Django 代码都是用Python写成的. Django 特点 强大的数据库功能 拥有强大的数据库操作接口(QuerySet API),如需要也能执行原生 ...

  10. (一)java异常处理的几个问题

    1.java中两种异常? 答:java中存在两种异常:受检查(checked)异常和不受检查(unchecked)异常.不受检查的异常不需要在方法或者构造函数上声明,就算是方法或是构造函数会发生这样的 ...