dstat 是基於 python 開發並且提供原始碼,提供各式各樣的監視訊息,並且擁有顏色顯示不同的單位,還可以 out file 之後再查看
在 CentOS 你可以直接 yum 安裝
$ yum install dstat
文章目前都已轉入WordPress囉,請連這裡 https://shazi.info,若有連結失效請到新站台查詢!並告知站長,這裡僅提供第一次發文的同步更新,文章有編修將不再修正。
$ yum install dstat
Error Log:
upstream response is buffered to a temporary file "xxx" while reading upstream
client request body is buffered to a temporary file "xxx"
Upstream timed out (110: Connection timed out) while reading response header from upstream
$ less /var/log/nginx/error.log
PHP message: PHP Warning: require(): Unable to allocate memory for pool. in dir"
while reading response header from upstream
$ vim LocalSettings.php
$wgCapitalLinks = false;
text:ABCDEFGHIJKLMNOPQRSTUVWXYZ
encrypt:DEFGHIJKLMNOPQRSTUVWXYZABC
key:3
error: Could not load host key: /etc/ssh/ssh_host_dsa_key
$ ssh-keygen -A
ssh-keygen: generating new host keys: DSA
$ systemctl restart sshd
$ systemctl status sshd
Apr 08 16:13:15 localhost.localdomain systemd[1]: Started OpenSSH server daemon.
Apr 08 16:13:15 localhost.localdomain systemd[1]: Starting OpenSSH server daemon...
Apr 08 16:13:15 localhost.localdomain sshd[2767]: Server listening on 0.0.0.0 port 22.
Apr 08 16:13:15 localhost.localdomain sshd[2767]: Server listening on :: port 22.
curl -o /dev/null -s -w "%{time_namelookup},%{time_connect},%{time_starttransfer},%{time_total}" http://www.google.com
$ vim curl-speed.sh
#!/bin/bash
URL=$1
curl -o /dev/null -s -w \
"DNS Resolve: %{time_namelookup}\n\
Client -> Server: %{time_connect}\n\
Server Respon: %{time_starttransfer}\n\
Total time: %{time_total}\n" \
"${URL}"
$ ./curl-speed.sh www.google.com
Client -> Server: 0.040
Server Respon: 0.069
Total time: 0.069