Linux ping 預設不會印出無回應的狀況,只要加上 -O 就可以了,就跟 Windows ping 差不多
有掉包的話比較清楚
# ping -O 192.168.1.8
PING 192.168.1.8 (192.168.1.8) 56(84) bytes of data.
64 bytes from 192.168.1.8: icmp_seq=1 ttl=64 time=0.347 ms
64 bytes from 192.168.1.8: icmp_seq=2 ttl=64 time=0.237 ms
no answer yet for icmp_seq=3
no answer yet for icmp_seq=4
64 bytes from 192.168.1.8: icmp_seq=5 ttl=64 time=0.224 ms
64 bytes from 192.168.1.8: icmp_seq=6 ttl=64 time=0.213 ms
再加 -D 參數可以在前面印出時間,可惜是 UNIX timestamp 格式,不方便直接讀取
# ping -DO 192.168.1.8
PING 192.168.1.8 (192.168.1.8) 56(84) bytes of data.
[1711724576.274247] 64 bytes from 192.168.1.8: icmp_seq=1 ttl=64 time=0.254 ms
[1711724577.288744] 64 bytes from 192.168.1.8: icmp_seq=2 ttl=64 time=0.225 ms
[1711724578.312747] 64 bytes from 192.168.1.8: icmp_seq=3 ttl=64 time=0.220 ms
若要在前面加入時間,推薦用 ts,在 moreutils 套件內,它是個 Perl 腳本,可搭配任何程式使用
# ping -O 192.168.1.8 | ts
Mar 29 23:08:25 PING 192.168.1.8 (192.168.1.8) 56(84) bytes of data.
Mar 29 23:08:25 64 bytes from 192.168.1.8: icmp_seq=1 ttl=64 time=0.257 ms
Mar 29 23:08:26 64 bytes from 192.168.1.8: icmp_seq=2 ttl=64 time=0.239 ms
Mar 29 23:08:27 64 bytes from 192.168.1.8: icmp_seq=3 ttl=64 time=0.240 ms
訂閱:
張貼留言 (Atom)
New SSH client to old SSH server
從新版 SSH 8.x 連到舊版 6.x SSH server 若出現 Unable to negotiate with x.x.x.x port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss ...
-
禁止 LINE 電腦版自動或強制更新的方法 LINE 電腦版啟動都會去連這個更新資訊檔 https://desktop.line-scdn.net/win/v1/real/update_info.json 內容大概長這樣 可以看出針對各版本的更新 type 有 force, ...
-
http://mirror01.idc.hinet.net HiNet 這個網址關了,要高速下載 Linux ISO 少了一個地方,感謝 HiNet 默默服務了多年 測了幾個 TW mirror 站,推 TWDC 台灣數位串流,常見的 Linux 都有,速度超快 https://...
-
xrdp 是 Linux 版的 RDP server (遠端桌面) 它運作時需要 Xvnc 的 libvnc.so, 所以安裝時需要連同 VNC 一起安裝(只需 minimal) dnf -y install xrdp tigervnc-server-minimal system...
-
以前都是用 rp-pppoe 套件裡的 adsl-setup 來設定 PPPoE 現在比較新的 Linux 已經沒有這個套件了,要用 NetworkManager 的 nmcli 來設定 設定也很簡單,準備帳號、密碼及網路卡就行了 以下範例帳號是 xxxx@hinet.net 密...
-
Windows不曉得何時拿掉了工作排程顯示訊息的功能,但還是能設定,後面括號(已過時) 最後會出現如下的畫面。 奇怪,不能設定為何不拿掉設定選項? 替代方式是用執行程式 msg 新增引數輸入 * 要顯示的訊息
-
RouterOS 的管理工具 winbox,因為還不支援 UTF-8, 雖然可以在 Wireless 設定中文的 SSID,但是實際上會看到亂碼, WiFi 的 SSID 是走 UTF-8 編碼,需要把 UTF-8 中文轉成 HEX 碼,再用指令設定 寫了一個小工具提供大家使用...
-
現在自架的 Mail Server 若沒有簽章,寄出的信件有很大的機會被擋或歸類在垃圾信 所以 SPF + DKIM 已經是必要的設定 環境 CentOS + Postfix,文中的域名均以 yourdomain.com 作為範例 安裝所需套件 yum -y install py...
-
需先安裝 XZ Utils for Windows 把 xz.exe 放在 PATH 有指到的地方 curl -LOs https://github.com/rocky-linux/sig-cloud-instance-images/raw/Rocky-9.2.20230513...
-
Windows 10 預設的沙箱(Sandbox)預設是 4G 記憶體 若要調大記憶體,可以建立一個副檔名為 .wsb 的檔案,內容 <Configuration> <MemoryInMB>8192</MemoryInMB> </Con...
-
RouterOS 在 7 版以後支援 WireGuard 註: WireGuard 在 Linux Kernel 5.6 版開始內建 設定滿簡單的,在選單 WireGuard New Interface,Private Key 及 Public Key 不用填,會自動產生 在 I...
沒有留言:
張貼留言