[20230224]ssh date執行問題.txt
[20230224]ssh date執行問題.txt
--//生產系統rac,兩臺伺服器出現實際不同步問題.
--//grid使用者下經常報.
2023-02-24 10:05:41.581:
[ctssd(11799)]CRS-2409:The clock on host fyhis1 is not synchronous with the mean cluster time. No action has been taken
as the Cluster Time Synchronization Service is running in observer mode.
# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
*192.168.101.5 139.199.215.251 3 u 1002 1024 377 6.574 -2.375 2.133
$ date ; ssh 192.168.90.15 date ; date
Fri Feb 24 10:44:22 CST 2023
Fri Feb 24 10:44:22 CST 2023
Fri Feb 24 10:44:22 CST 2023
$ cluvfy comp clocksync -n all -verbose
...
Time Server: 139.199.215.251
Time Offset Limit: 1000.0 msecs
Node Name Time Offset Status
------------ ------------------------ ------------------------
fyhis2 2.891 passed
fyhis1 -2.375 passed
Time Server "139.199.215.251" has time offsets that are within permissible limits for nodes "[fyhis2, fyhis1]".
Clock time offset check passed
Result: Clock synchronization check using Network Time Protocol(NTP) passed
Oracle Cluster Time Synchronization Services check passed
Verification of Clock Synchronization across the cluster nodes was successful.
--//差距也不是很大,問了一下別人,問題不是很大,可以不用理會它.但是我想執行如下:
$ /bin/date +'%F %T.%N %s' ; ssh 192.168.90.15 /bin/date +"%F %T.%N %s" ; /bin/date +'%F %T.%N %s'
2023-02-24 10:47:11.106354400 1677206831
/bin/date: extra operand `%T.%N'
Try `/bin/date --help' for more information.
2023-02-24 10:47:11.206980548 1677206831
$ /bin/date +'%F %T.%N' ; ssh 192.168.90.15 /bin/date +"%F %T.%N" ; /bin/date +'%F %T.%N'
2023-02-24 10:47:47.060313646
/bin/date: extra operand `%T.%N'
Try `/bin/date --help' for more information.
2023-02-24 10:47:47.158338087
--//很明顯ssh IP date 模式這樣執行有問題.
$ ssh 192.168.90.15 /bin/date +"%T.%N"
10:48:56.483221063
--//可以大致猜測問題出在空格上面.把%T.%N'當作第2個引數.
$ ssh 192.168.90.15 /bin/date +"%F%T.%N"
2023-02-2410:49:32.176477106
$ ssh 192.168.90.15 /bin/date "+"%F %T.%N""
/bin/date: extra operand `%T.%N'
Try `/bin/date --help' for more information.
--//兩個引號不能相同.
$ ssh 192.168.90.15 /bin/date '+"%F %T.%N"'
2023-02-24 10:51:07.812314545
$ date +'%F %T.%N' ; ssh 192.168.90.15 /bin/date "+'%F %T.%N'" ; date +'%F %T.%N'
2023-02-24 10:51:44.133259784
2023-02-24 10:51:44.235091945
2023-02-24 10:51:44.243516036
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2936976/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20220414]toad呼叫執行指令碼問題.txt指令碼
- [20230224]bbed設定偏移技巧.txt
- [20221126]tpt pr.sql指令碼執行問題.txtSQL指令碼
- [20210114]toad檢視真實執行計劃問題.txt
- [20210518]ssh ip登入緩慢問題解決.txt
- [20230224]改動資料檔案小技巧.txt
- [20210926]並行執行計劃疑問.txt並行
- [20240313]toad gather_plan_statistics執行計劃相關問題.txt
- [20210205]toad檢視真實執行計劃問題3.txt
- 解決SSH遠端執行命令找不到環境變數的問題變數
- [20240814]oracle 21c NLS_DATE_FORMAT設定問題(整理版本1).txtOracleORM
- ssh連結問題
- [20191128]date命令別名.txt
- [20210802]cygwin文字回車換行問題.txt
- webViewDidFinishLoad 執行多次的問題WebView
- 03 執行緒安全問題執行緒
- SimpleDateFormat 執行緒安全問題ORM執行緒
- react onClick自執行問題React
- ssh問題之覆盤
- Alpine容器安裝執行ssh
- 請教個問題執行 httprunner 遇到的問題HTTP
- [20221018]本地執行與遠端執行.txt
- [20211213]完善date命令別名.txt
- Git『Everything up-to-date』問題解決Git
- 多執行緒相關問題執行緒
- ArrayList 的執行緒安全問題執行緒
- 多執行緒問題解釋執行緒
- JUC之多執行緒鎖問題執行緒
- 深入JAVA執行緒安全問題Java執行緒
- Github ssh的連線問題Github
- [20230207]ANSI DATE and TIMESTAMP SQL syntax.txtSQL
- Java多執行緒中執行緒安全與鎖問題Java執行緒
- parallelStream中的執行緒安全問題Parallel執行緒
- Aqua Data Studio 執行HiveSql的問題HiveSQL
- 執行docker run所遇到的問題Docker
- 多執行緒之8鎖問題執行緒
- 05.java多執行緒問題Java執行緒
- 子執行緒 UI 問題捉蟲執行緒UI