Ubuntu增加Swap容量

  1. sudo swapoff -a关闭swap
  2. 参考此文章:https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04
  3. 或者这篇:https://askubuntu.com/questions/178712/how-to-increase-swap-space
  4. 或者官方:https://help.ubuntu.com/community/SwapFaq

七款LInux系统资源监控工具

Monitor server resources

System administrators need to monitor their server to ensure proper functioning. The practice enables administrators to detect possible issues in advance and recover the system, before it causes any trouble.

There are plenty of commands on Linux to monitor different system resources like cpu usage, memory usage, network, disk usage and so on. Popular ones are top, htop, iostat, nethogs etc.

In this post we are talking about simple command line tools that can monitor multiple system resources like cpu, memory, network, disk, processes etc all together in a real-time and interactive manner. These tools present a whole lot of statistical information on a single screen that is constantly updated.

1. Top

The Top command is the most popular tool to check the cpu and memory utilization processwise. It shows a sorted list of processes with the most resource intensive processes on the top.
Along with the process list it also shows cpu and memory usage.

Linux top command

Press ‘h’ while top is running, to display the help page.

2. Htop

This is your all time favorite tool. Similar to top, but much refined and carries a load of extra features along with a very good looking user interface. It is not installed by default, but is available in the default repositories of distros like Ubuntu and Fedora. CentOS users need to use an additional repository like epel or rpmforge to install it.

linux htop command

Here are some shortcuts to configure htop output interactively.

M: Sort processes by memory usage
P: Sort processes by processor usage
?: Access help
k: Kill current/tagged process
F2: Setup htop. You can choose display options here.
/: Search processes

Refer to the man page to learn more about htop.

3. Atop

Atop is a tool to monitor system resources and processes. It shows the current usage levels of cpu, memory, disk and network along with a list of processes sorted by cpu usage in descending order. Similar to top and htop.

linux atop command

4. Nmon

Nmon is another very easy to use tool to monitor cpu, memory, networ, disk usage and process list on a single screen. Nmon works well as a reporting only tool but does not have any other feature or option to manage processes or modify the report display. It can save the statistics to a spreadsheet file.

Check out our previous post on Nmon.

linux nmon command

5. Glances

Written in python, Glances is a reporting tool similar to Nmon that report statistics on cpu, memory, network, disk and processes. Apart from reporting the statistics, glances does not support any other feature or function.

Check our previous post on how to monitor system resources with Glances.

linux glances command

Press ‘h’ while glances is running to access the help page.

6. Saidar

Saidar is the simplest of all tools. The output includes statistics on CPU, processes, load, memory, swap, network I/O, disk I/O, and file system information. The output does not mention the running processes at all.

linux saidar command

Check our previous post on how to monitor system resources with saidar.

7.Collectl

There are a number of times in which you find yourself needing performance data. These can include benchmarking, monitoring a system’s general heath or trying to determine what your system was doing at some time in the past. Sometimes you just want to know what the system is doing right now. Depending on what you’re doing, you often end up using different tools, each designed to for that specific situation.

Unlike most monitoring tools that either focus on a small set of statistics, format their output in only one way, run either interatively or as a daemon but not both, collectl tries to do it all. You can choose to monitor any of a broad set of subsystems which currently include buddyinfo, cpu, disk, inodes, infiniband, lustre, memory, network, nfs, processes, quadrics, slabs, sockets and tcp.

http://collectl.sourceforge.net/

日志处理Splunk和ELK

ELK

Splunk

iPerf-网络测试软件

  1. 下载https://iperf.fr/iperf-download.php;
  2. 一个终端运行server模式,一个终端进行client模式测试(几乎包括全平台,Android版本是he.net包括了);
  3. 详细教程:https://ccie43413.blogspot.com/2017/11/iperf3.html

ZD423之外的下载网站

奇客小栈
http://www.geekotg.com/

殁漂遥
https://www.laomoit.com/

易破解
http://www.yipojie.cn/

吾爱经验软件
http://www.52jingyan.com/

大眼仔
http://www.dayanzai.me/

胡萝卜周
http://www.carrotchou.blog/

软件缘
https://www.appcgn.com/

懒得勤快
https://masuit.com/

漫步白月光
https://www.ccava.net/

精品绿色便携软件
https://www.portablesoft.org/

0daydown
https://www.0daydown.com/

心海e站
https://hrtsea.com/

Ubuntu下Git保存用户名和密码的方法

1、进入Git 配置文件:vim ~/.gitconfig,(或者直接使用Files进入.git文件夹,使用Text Editor打开config文件)。
2、修改配置文件,添加下面这一行:
[credential]
helper = store
然后使用的时候,输入一次用户名和密码之后,就不会出现再提交用户名和密码。

奇怪的梦-川普

梦见川普化妆成一个瘦子,腰身束起来了,脸也拉皮变瘦了。

在白宫外大吼大叫,旁边埋伏着一个拿枪的刺客,瞄着川普,另外还有两个FBI探员在暗中盯着他, 三个人都不动作,我在旁边看不过去,掏出枪来,对着一个FBI探员就开枪了,心里还想着等下吃子弹会很痛,结果没有。

吓着了川普,赶紧去了妆容,跑回了白宫。

国内DNS选择

阿里 AliDNS: (223.5.5.5; 223.6.6.6)

百度 BaiduDNS(新增ipv6地址 new): (180.76.76.76;ipv6地址:2400:da00::6666)

【首选】DNSPod DNS+(腾讯公共DNS,推荐前两个)(119.29.29.29;119.28.28.28;182.254.118.118;182.254.116.116)

 

国内常用公共DNS

114 DNS: (114.114.114.114;114.114.115.115)

114DNS安全版 (114.114.114.119;114.114.115.119)

114DNS家庭版 (114.114.114.110;114.114.115.110)

阿里 AliDNS: (223.5.5.5; 223.6.6.6)

百度 BaiduDNS(新增ipv6地址 new: (180.76.76.76;ipv6地址:2400:da00::6666)

DNSPod DNS+(腾讯公共DNS,推荐前两个)(119.29.29.29;119.28.28.28;182.254.118.118;182.254.116.116)

PandaDNS:(115.159.157.26;115.159.158.38)

CNNIC SDNS(1.2.4.8;210.2.4.8)

oneDNS 更新(目前官方DNS:117.50.11.11;117.50.22.22)(之前官方的还可使用:112.124.47.27;114.215.126.16)

DNS 派 电信/移动/铁通    (101.226.4.6;218.30.118.6)

DNS 派 联通    (123.125.81.6;140.207.198.6)

蘑菇MoguDNS    NS1 :(115.159.96.69 NS2 :122.114.245.45)

Worldlink DNS(一共三组)

DNS ONE   北方推荐:(123.207.137.88 南方推荐:115.159.220.214)

DNS TWO   北方推荐:(122.114.245.45 南方推荐:115.159.96.69)

DNS THREE    北方推荐:(115.159.157.26 南方推荐:115.159.158.38)

中科大防污染DNS(202.141.162.123(中国电信);202.141.178.13(电信线路);202.38.93.153(教育网);202.141.176.93(中国移动))

干净,自由,无劫持纯净DNS:(南方:115.159.146.99   北方:123.206.21.48)速度哪个快自己ping一下,网友反馈已经无法解析

Xsico DNS纯净快速公用DNS (公用Public Dns: 115.159.157.26   Scholar Dns: 115.159.158.38)貌似禁止ping了,随时会停止服务

BAI DNS支持EDNS智能解析,无污染dns,快速安全 : (223.113.97.99)与 HI!XNS 合并了,请使用下边的HI!XNS

PdoMo-DNS (主DNS:101.132.183.99;辅DNS:193.112.15.186)注:可过滤广告,纯净无劫持

cloudxns (124.251.124.251) 据用户反馈已不能使用!

FUN DNS(119.23.248.241)已无法解析

骆驼云安全 camelyundns 公共 dns:(63.223.94.66)

CuteDNS:

高速DNS(原汁原味,高速解析): 华北 123.206.61.167;华南 119.29.105.234

去广告DNS(可屏蔽广告及违法信息): 华北 101.236.28.23 ;华南 120.77.212.84

我国首个IPv6公共DNS:首选DNS:240c::6666,备用DNS:240c::6644。

P站DNS:DNS 1: 123.207.137.88,DNS 2: 115.159.220.214 ;备用DNS 1: 115.159.146.99,DNS 2: 123.206.21.48

清华大学TUNA DNS666:101.6.6.6;2001:da8::666

HI!XNS(推荐纯净无劫持):40.73.101.101

红鱼 DNS,上海: 115.159.154.226 杭州: 47.99.165.31。个人用户需注意该DNS只提供 DoT 和 DoH 服务,端口 853 和 443

增加几个 高校的 IPv6 DNS,最近发现很多地方的移动宽带和电信宽带都支持IPV6 了 

科技网DNS服务器:2001:cc0:2fff:2::6

CNNIC DNS服务器:2001:dc7:1000::1

清华大学DNS服务器:2001:da8:200:ffff::28

上海交大DNS服务器:2001:da8:8000:1:202:120:2:101

北京邮电大学DNS服务器:2001:da8:202:10::36或2001:da8:202:10::37

港澳台地区

台湾网络资讯中心 TWNIC Quad 101 DNS:(主DNS:101.101.101.101;备用:101.102.103.104) IPv6部分:主DNS:2001:de4::101;备用:2001:de4::102

香港宽频DNS:(203.80.96.10;203.80.96.9)

中国(香港)电信全球有限公司NS1(202.55.11.100 )测试未 ping 通

中国(香港)电信全球有限公司NS4(202.55.21.85)ping 在90左右

西门子菠菜服务器(香港)(112.121.178.187)ping 在50左右

中国台湾中华电信 HiNet DNS:(168.95.192.1;  168.95.1.1)

和记黄埔有限公司(202.45.84.58)

国外公共DNS

Cloudflare & APNIC ( IPv4: 主DNS:1.1.1.1,备用:1.0.0.1;IPv6: 主DNS:2001:2001::,备用2001:2001:2001::)

AdGuard DNS(测试版):

默认(可拦截广告,跟踪和钓鱼网址)

176.103.130.130;176.103.130.131

IPv6 地址为:2a00:5a60::ad1:0ff;2a00:5a60::ad2:0ff

家庭保护(默认 + 拦截成人网站 + 安全搜索)

176.103.130.132;176.103.130.134

IPv6 地址使用:2a00:5a60::bad1:0ff;2a00:5a60::bad2:0ff

Google DNS     (8.8.8.8;    8.8.4.4)

谷歌Google Public DNS IPv6 DNS    (2001:4860:4860::8888; 2001:4860:4860::8844)

level 3:(4.2.2.1;4.2.2.2   )

IBM Quad9 DNS(9.9.9.9)

Comodo Secure (8.26.56.26;8.20.247.20)

V2EX DNS (199.91.73.222;178.79.131.110)

OpenDNS  (208.67.222.222;208.67.220.220)

OpenDNS Family:(208.67.222.123、208.67.220.123)

UltraDNS   (156.154.70.1;156.154.71.1)

Norton ConnectSafe   (199.85.126.10;199.85.127.10)

威瑞信公共 DNS    (64.6.64.6;64.6.65.6)

Dyn DNS   (216.146.35.35;216.146.36.36)

Freenom World DNS  (80.80.80.80;80.80.81.81)

Yandex Basic  ( 77.88.8.8;77.88.8.1)

Yandex Basic  (77.88.8.8 ;77.88.8.2)

Yandex Basic  ( 77.88.8.7;77.88.8.3)

柬埔寨 CN2 DNS (103.197.104.178;103.197.106.75;203.189.136.148)ping在110-120左右

Hurricane Electric HEDNS (IPV4:74.82.42.42;IPV6:2001:470:20:2;IPV4:66.220.18.42)

UCOM日本东京(203.112.2.4)

DNS.WATCH (IPV4:84.200.69.80;84.200.70.40;IPV6:2001:1608:10:25::1c04:b12f;2001:1608:10:25::9249:d69b)

SafeDNS (195.46.39.39;195.46.39.40)

puntCAT DNS (IPV4:109.69.8.51;IPV6:2a00:1508:0:4::9)

韩国电信(不是韩国长安大学)DNS ( 168.126.63.1;168.126.63.2 )

IT粉丝网友自建分享日本DNS 含有去广告功能:(ipv4:207.148.107.4 ;ipv6:2001:19f0:7001:46b8:5400:01ff:feac:13a7)

https://www.itfensi.net/article/214.html