Skip to content

Instantly share code, notes, and snippets.

@sbuss
Created May 6, 2015 03:14
Show Gist options
  • Select an option

  • Save sbuss/869f3f2f9d734832c0d3 to your computer and use it in GitHub Desktop.

Select an option

Save sbuss/869f3f2f9d734832c0d3 to your computer and use it in GitHub Desktop.
$ cat drift.sh
nodes=(10.128.1.107 10.128.1.109 10.128.1.110 10.128.1.111 10.128.1.245)
for i in ${nodes[*]}
do
echo "## $i ##"
ssh core@$i "date; systemctl status ntpd"
echo ""
done
$ sh drift.sh
## 10.128.1.107 ##
Wed May 6 03:14:43 UTC 2015
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib64/systemd/system/ntpd.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/ntpd.service.d
└─debug.conf
Active: inactive (dead) since Mon 2015-04-20 00:49:51 UTC; 2 weeks 2 days ago
Main PID: 497 (code=exited, status=0/SUCCESS)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
## 10.128.1.109 ##
Wed May 6 03:14:28 UTC 2015
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib64/systemd/system/ntpd.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/ntpd.service.d
└─debug.conf
Active: inactive (dead) since Mon 2015-04-20 00:49:52 UTC; 2 weeks 2 days ago
Main PID: 512 (code=exited, status=0/SUCCESS)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
## 10.128.1.110 ##
Wed May 6 03:14:34 UTC 2015
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib64/systemd/system/ntpd.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/ntpd.service.d
└─debug.conf
Active: inactive (dead) since Mon 2015-04-20 00:49:53 UTC; 2 weeks 2 days ago
Main PID: 515 (code=exited, status=0/SUCCESS)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
## 10.128.1.111 ##
Wed May 6 03:14:44 UTC 2015
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib64/systemd/system/ntpd.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/ntpd.service.d
└─debug.conf
Active: inactive (dead) since Mon 2015-04-20 00:49:55 UTC; 2 weeks 2 days ago
Main PID: 513 (code=exited, status=0/SUCCESS)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
## 10.128.1.245 ##
Wed May 6 03:14:14 UTC 2015
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib64/systemd/system/ntpd.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/ntpd.service.d
└─debug.conf
Active: inactive (dead) since Mon 2015-05-04 23:44:47 UTC; 1 day 3h ago
Main PID: 504 (code=exited, status=0/SUCCESS)
May 04 23:44:17 localhost ntpd[504]: unable to create socket on eth0 (6) for fe80::419:4fff:fef4:8ed9%2#123
May 04 23:44:17 localhost ntpd[504]: failed to init interface for address fe80::419:4fff:fef4:8ed9%2
May 04 23:44:17 localhost ntpd[504]: 4 May 23:44:17 ntpd[504]: bind(24) AF_INET6 fe80::419:4fff:fef4:8ed9%2%2#123 flags 0x11 failed: Cannot assign requested address
May 04 23:44:17 localhost ntpd[504]: 4 May 23:44:17 ntpd[504]: unable to create socket on eth0 (6) for fe80::419:4fff:fef4:8ed9%2#123
May 04 23:44:17 localhost ntpd[504]: 4 May 23:44:17 ntpd[504]: failed to init interface for address fe80::419:4fff:fef4:8ed9%2
May 04 23:44:19 ip-10-128-1-245.counsyl.com ntpd[504]: Listen normally on 7 eth0 [fe80::419:4fff:fef4:8ed9%2]:123
May 04 23:44:19 ip-10-128-1-245.counsyl.com ntpd[504]: 4 May 23:44:19 ntpd[504]: Listen normally on 7 eth0 [fe80::419:4fff:fef4:8ed9%2]:123
May 04 23:44:47 ip-10-128-1-245.counsyl.com systemd[1]: Stopping Network Time Service...
May 04 23:44:47 ip-10-128-1-245.counsyl.com ntpd[504]: 4 May 23:44:47 ntpd[504]: ntpd exiting on signal 15 (Terminated)
May 04 23:44:47 ip-10-128-1-245.counsyl.com systemd[1]: Stopped Network Time Service.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment