注意事项:

沟通项目需求:

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 端口号

8. 查看动态库链接

readelf -d libleveldb.so | grep NEEDED

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

查找文件:

find ./ -name "*.h* -or -name "*.cpp"

统计代码行数:

find ./ -name "*.h* -or -name "*.cpp" | xargs cat | wc -l

linux能用airport吗_Linux 常用命令笔记-2相关推荐

  1. Linux 常用命令笔记

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

  2. linux系统中如何查看日志 (常用命令)

    linux系统中如何查看日志 (常用命令) cat  tail -f 日 志 文 件 说    明  /var/log/message 系统启动后的信息和错误日志,是Red Hat Linux中最常用 ...

  3. 你一定要知道的关于Linux文件目录操作的12个常用命令

    博客园 首页 新随笔 联系 管理 订阅 随笔- 26  文章- 1  评论- 18  你一定要知道的关于Linux文件目录操作的12个常用命令 转自:http://www.cnblogs.com/yo ...

  4. 抓取一台电脑linux,教程方法;用来获取Linux主机信息的5个常用命令电脑技巧-琪琪词资源网...

    琪琪词资源网-教程方法;用来获取Linux主机信息的5个常用命令电脑技巧,以下是给大家带来的教程方法;用来获取Linux主机信息的5个常用命令,大家可以了解一下哦! 有些时候Linux 系统管理员在接 ...

  5. Linux查看文件和日志的常用命令

    Linux查看文件和日志的常用命令 当项目部署和运行起来后,会产生很多的运行日志.日志的内容是程序里定义的重要输出信息,还有程序出错的报错信息. 查看日志文件大部分是去日志中获取一些数据,确认某些信息 ...

  6. 嵌入式Linux系统编程学习之二常用命令

    嵌入式Linux系统编程学习之二常用命令 文章目录 嵌入式Linux系统编程学习之二常用命令 前言 一.常用命令 1.su(用户切换) 2.useradd(添加用户) 3.passwd(修改密码) 4 ...

  7. 【方向盘】达到Linux第三阶段的常用命令笔记记录---Part Ⅱ

    实现自己既定的目标,必须能耐得住寂寞单干 本文已被https://yourbatman.cn收录:女娲Knife-Initializr工程可公开访问啦:程序员专用网盘https://wangpan.y ...

  8. php oracle创建临时表,Oracle常用命令笔记

    Oracle常用命令笔记 客户端用的pl/sql工具 ORACLE的重启命令 (1) 以系统管理员登录,命令:connect / as sysdba (2) 启动数据库,命令:startup (3) ...

  9. checksum linux 命令_linux常用命令总结

    一.find命令 作用:查找文件 [root@server ~]# find / -name elasticsearch /var/log/elasticsearch /var/run/elastic ...

最新文章

  1. 科大讯飞刘庆峰发表对未来10年AI三大判断
  2. VTK:相互作用之TrackballActor
  3. SAP CRM呼叫中心activity board的填充逻辑调试
  4. 转转集团二手双11大促:长沙用户“秒杀”99新iPhone12成首单
  5. [解题报告][搜索+剪枝技巧]幻方
  6. 【正点原子探索者STM32F407开发板例程连载+教学】第30章 SPI通信实验
  7. 开源好用的 Android 市场 F-Droid
  8. SPSS实现卡方检验
  9. ValueError: operands could not be broadcast together with shapes (416,416,4) (3,)
  10. PostgreSQL定时删除表数据
  11. 数据库原理期末考试题(经典题型)
  12. CTF--PWN必备技能--理解c程序从编译开始到运行结束的过程
  13. 学习笔记(01):【中国PHP教育大牛高洛峰】亲授php教程-PHP布尔类型(boolean)...
  14. 蚂蚁金服 CTO 新加坡演讲:小蚂蚁是如何“爬”上区块链的?
  15. Android app本地图片转换成Drawable对象的方法
  16. keep健身教程合集(阿里云盘)
  17. 为何全色影像分辨率高于多光谱影像分辨率
  18. 怎么把游戏隐藏到计算机,怎么将电脑游戏隐藏桌面
  19. 网上商城购物系统设计与实现(Java+Web+SSM+MySQL)
  20. 有哪些常见的游戏建模软件?游戏建模师的工作日常

热门文章

  1. Python 反编译:pyinstxtractor工具和uncompyle6库的使用
  2. Win11右键菜单退回Win10
  3. StringBuffer详解
  4. 博客更新很慢,微博更新快一些,可关注俺的微博
  5. php禁止直接访问网页,动态网页中不让直接访问PHP程序文件
  6. PartialView
  7. 7-103 查找书籍
  8. 前端:收集15个非常实用的JS代码,值得收藏
  9. 【拍摄日志一】剧本创作
  10. C语言输出领结婚证纪念日,结婚纪念日发朋友圈-领结婚证发朋友圈的句子