Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
doc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frank.chen
doc
Commits
fe8af67a
Commit
fe8af67a
authored
Nov 21, 2025
by
frank.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fffgg
parent
fd927cab
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
117 additions
and
64 deletions
+117
-64
settings.json
.vscode/settings.json
+12
-0
proxy.md
服务器功能/proxy.md
+28
-37
Linux 增加用户.md
通用/Linux 增加用户.md
+0
-0
Linux_tool.md
通用/Linux_tool.md
+12
-0
crontab.md
通用/crontab.md
+13
-8
logrotate.md
通用/logrotate.md
+2
-1
prometheus.md
通用/prometheus.md
+6
-0
我们的IP被合作伙伴加白.md
通用/我们的IP被合作伙伴加白.md
+44
-0
我们的IP被合作伙伴加白.txt
通用/我们的IP被合作伙伴加白.txt
+0
-18
No files found.
.vscode/settings.json
0 → 100644
View file @
fe8af67a
{
"workbench.colorCustomizations"
:
{
"window.activeBorder"
:
"#6dad4fad"
,
"editor.lineHighlightBorder"
:
"#95363671"
,
"editor.selectionBackground"
:
"#1a2cce65"
,
"editor.selectionHighlightBackground"
:
"#1c2ed478"
,
"activityBar.background"
:
"#08323A"
,
"titleBar.activeBackground"
:
"#0B4751"
,
"titleBar.activeForeground"
:
"#F4FCFD"
}
}
\ No newline at end of file
服务器功能/proxy.md
View file @
fe8af67a
## 基本信息
-
3台
-
代理http请求
-
预测服务超时率汇报
-
dsp超时报警
-
dsp转发winloss
## 代理http请求
-
3 台, 压力大时,扩充到 5 台
-
主任务:使用 nginx 代理 http 请求
-
副任务:预测服务超时率每日汇报
-
副任务:dsp 超时报警
-
副任务:dsp 转发 winloss,该功能计划迁移至 2 台 adx-trace
-
副任务:大数据端,拉取 nginx 日志
## 代理 http 请求
-
使用 nginx
-
配置位置
`/etc/nginx/conf.d/default.conf`
## 预测服务超时率汇报
-
proxy-1 才有
-
`/data/pycode/proxy_dmp_analyze2`
-
目前只有 三星研究院 的预测
-
但超时率不重视,所以定时任务里,将执行程序暂是注释掉了。
## dsp 超时报警
## dsp超时报警
-
`/data/pycode/proxy_status`
## dsp转发winloss
## dsp 转发 winloss
-
`/data/dsp-notify`
## 完整定时任务
-
文件 /var/spool/cron/root
```
/var/spool/cron/root
*/10 * * * * cd /data/pycode/proxy_status && python main.py mail
> /dev/null 2>&1
0 0,6,9,12,15,18,21 * * * /usr/sbin/logrotate -vf /etc/logrotate.d/nginx-dsp
0 * * * * /usr/sbin/logrotate -vf /data/logrotate.d/nginx-dsp -s /data/logrotate.d/logrotate.status
*/10 * * * * cd /data/pycode/proxy_status && python main.py mail
#5 7 * * * cd /data/pycode/proxy_dmp_analyze2 && nohup python main.py samsung-proxy >>log.log &
#0 7 * * * cd /data/pycode/proxy_dmp_analyze2 && nohup python main.py colourdata >>log.log &
5 7 * * * cd /data/pycode/proxy_dmp_analyze2 && nohup python main.py samsung-proxy >>log.log &
#10 7 * * * cd /data/pycode/proxy_dmp_analyze2 && nohup python main.py toutiao >>log.log &
#大数据使用-定时将当前小时上一小时的kuaishou*文件上传到tos
5 * * * * sh /mnt/tools/local_log_to_tos.sh >> /mnt/tools/local_log_to_tos.sh.log
```
## 日志压缩
```
nginx
/var/log/nginx/toutiao-access.log
/var/log/nginx/samsung-proxy-access.log
/var/log/nginx/colourdata-access.log
nginx-dsp
/var/log/nginx/error.log
/var/log/nginx/yyb-access.log
/var/log/nginx/toutiao_rta-access.log
/var/log/nginx/qimao_rta-access.log
/var/log/nginx/pangolin-access.log
/var/log/nginx/oppo-access.log
/var/log/nginx/kuaishou-access.log
/var/log/nginx/iflytek-access.log
/var/log/nginx/domob-access.log
/var/log/nginx/baidu-access.log
/var/log/nginx/ylh-access.log
/var/log/nginx/yybnew-access.log
/var/log/nginx/meizu-access.log
/var/log/nginx/qihu-access.log
```
\ No newline at end of file
-
使用 logrotate,进行特殊配置
-
dsp 和 rta 日志文件的压缩,配置文件
`/data/logrotate.d/nginx-dsp`
-
预测日志压缩,配置文件
`/etc/logrotate.d/nginx`
通用/增加用户.md
→
通用/
Linux
增加用户.md
View file @
fe8af67a
File moved
通用/Linux_tool.md
0 → 100644
View file @
fe8af67a
## json 美化
-
jq
```
jq . appInfo
可以打印出美化json内容
jq . appInfo > appinfo
将美化json内容导入到新文件。
注意,不要覆盖原文件。
```
通用/crontab.md
View file @
fe8af67a
## 概述
-
cron的使用,可以参考:
`https://www.runoob.com/w3cnote/linux-crontab-tasks.html`
-
cron 的使用,可以参考:
`https://www.runoob.com/w3cnote/linux-crontab-tasks.html`
-
` sudo ls -l /var/spool/cron/ /etc/cron.d `
-
查看调度任务:crontab -l //列出当前的所有调度任务
1.
crontab -e直接进入vi模式添加。此任务保存至/var/spool/cron 里面对应的用户名文件
1.
crontab -e 直接进入 vi 模式添加。此任务保存至/var/spool/cron 里面对应的用户名文件
2.
/etc/crontab 此计划任务所有人可用,格式
`* * * * * 用户名 commend (多了个用户名添加)`
-
分、时、日、月、周
3.
有如下位置存放crontab任务:
-
/etc/cron.hourly、/etc/cron.daily、/etc/cron.weekly、/etc/cron.monthly 一般 logrotate 日志压缩任务,放在 daily 中,每日执行一次。
-
/etc/crontab 一般不改这里,由root使用,需要指定用户。
`* * * * * user-name command to be executed `
-
/var/spool/cron/ 针对每个linux用户(包括root)的任务文件,crontab -e 的任务会存入这里
-
分、时、日、月、周
3.
有如下位置存放 crontab 任务:
-
/etc/cron.hourly、/etc/cron.daily、/etc/cron.weekly、/etc/cron.monthly
-
一般 logrotate 日志压缩任务,放在 daily 中,每日执行一次。
-
/etc/crontab 一般不改这里,由 root 使用,需要指定用户。
`* * * * * user-name command to be executed `
-
/var/spool/cron/ 针对每个 linux 用户(包括 root)的任务文件,crontab -e 的任务会存入这里
-
/etc/cron.d/ 系统级
-
另外:/etc/anacrontab 以一种补漏的方式来执行任务
4.
/var/log/cron 执行日志
5.
若标准输出未做重定向,则会给用户发邮件。/var/spool/mail/$user。存放邮件的文件有大小限制,超过限制后,邮件会存不进去。
6.
检查服务器已有定时任务,root 下,执行:
`
ll /var/spool/cron/ /etc/cron.d/ `
以及
` more /var/spool/cron/* /etc/cron.d/*
`
6.
检查服务器已有定时任务,root 下,执行:
`
ll /var/spool/cron/ /etc/cron.d/`
以及
`more /var/spool/cron/* /etc/cron.d/*
`
7.
`service crond reload `
编辑完后,执行命令使改变生效。
通用/logrotate.md
View file @
fe8af67a
## 概述
-
定时脚本位置:
`/etc/cron.daily/logrotate`
-
注意,这里的 logrotate,文件内容是一个 shell 脚本,同时该文件需要可执行权限。
-
注意需要压缩的日志,配置在
`/etc/logrotate.d/`
-
cat /var/lib/logrotate/logrotate.status
-
'-d' 调试模式(不切分日志文件),并输出详细处理过程日志
...
...
@@ -7,7 +8,7 @@
## 注意
-
系统可能存在多个版本,注意看定时任务调用的哪个版本。
-
被压缩文件的权限,是否
运行
其他用户改写。
-
被压缩文件的权限,是否
允许
其他用户改写。
`logrotate 配置里增加 su 配置,比如 su root root`
-
程序由 root 调用,所以执行
`logrotate -d file`
时,前面加一个 sudo
-
配置文件要执行
`chmod 644 xxx`
...
...
通用/prometheus.md
View file @
fe8af67a
...
...
@@ -8,3 +8,8 @@ nohup ./prometheus --web.enable-lifecycle &
## 重启
-
启动时,增加参数
`--web.enable-lifecycle`
-
后面通过接口热重启
`curl -XPOST http://127.0.0.1:9090/-/reload`
## 现有业务
-
log 服务器上,root 用户下。
-
监控 api v0 的投放。
-
监控 winloss 访问量。
\ No newline at end of file
通用/我们的IP被合作伙伴加白.md
0 → 100644
View file @
fe8af67a
## IP 地址
180.
184.26.71
180.
184.26.17
180.
184.26.35
180.
184.26.48
180.
184.26.184
180.
184.56.138
180.
184.56.139
180.
184.56.136
180.
184.61.244
### 代理服务器,用于 dsp 广告请求、广告预测、rta
| IP | Desc |
| -------------- | --------- |
| 180.184.26.71 | proxyEx-1 |
| 180.184.26.17 | proxyEx-2 |
| 180.184.26.35 | proxyEx-3 |
| 180.184.26.48 | proxyEx-4 |
| 180.184.26.184 | proxyEx-5 |
### 2 台 trace 通知,合作者:dsp、广告预测数据回传
```
180.184.56.138
180.184.56.139
```
### 2 台 stg 测试
```
adx-stg 180.184.56.136
ngx-stg 180.184.61.244
```
adx 的 stg 服务器,还会发给 dsp trace、广告预测结果
## 合作者
-
三星研究院,广告预测,预测数据回传。
-
得物,rta (2025-11-10 说可以去掉白名单机制)
通用/我们的IP被合作伙伴加白.txt
deleted
100644 → 0
View file @
fd927cab
180.184.56.132 180.184.56.134 180.184.61.63 180.184.56.138 180.184.56.139 180.184.56.136 180.184.61.244
3个代理服务器,用于dsp广告请求、广告预测
180.184.56.132 180.184.56.134 180.184.61.63
2台trace通知,合作者:dsp、广告预测
180.184.56.138 180.184.56.139
2台 stg 测试
adx-stg 180.184.56.136
ngx-stg 180.184.61.244
ssp、adx。其中adx的stg服务器,还会发给合作伙伴,dsp、广告预测
## 需要加白的合作者
- 三星研究院,广告预测
- 得物,rta (2025-11-10 说可以去掉白名单机制)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment