1. install ntp
2. check config file /etc/ntp.conf
3. enable time service - systemctl enable ntpdate.service
4. start and check ntpdate service
[root@virt tomcat]# systemctl start ntpdate.service
[root@virt tomcat]#
[root@virt tomcat]#
[root@virt tomcat]#
[root@virt tomcat]# systemctl status ntpdate.service
● ntpdate.service - Set time via NTP
Loaded: loaded (/usr/lib/systemd/system/ntpdate.service; enabled; vendor preset: disabled)
Active: active (exited) since sob 2016-03-19 22:02:08 CET; 3s ago
Process: 14231 ExecStart=/usr/libexec/ntpdate-wrapper (code=exited, status=0/SUCCESS)
Main PID: 14231 (code=exited, status=0/SUCCESS)
mar 19 21:12:41 virt systemd[1]: Starting Set time via NTP...
mar 19 22:02:08 virt ntpdate[14239]: step time server 31.216.56.5 offset 2963.680015 sec
mar 19 22:02:08 virt systemd[1]: Started Set time via NTP.
[root@virt tomcat]# date
sob, 19 mar 2016, 22:02:15 CET
sobota, 19 marca 2016
poniedziałek, 7 marca 2016
Display date on the terminal
Display Date on the Terminal
The below command is a combination of several commands, better say it a script. For a person working at shell or terminal, without GUI seeing current system date is tedious job. You have to type ‘date‘ command to check today’s date.Just execute the below command on you prompt and see the date and time on the above right corner of terminal.
root@tecmint [~]# while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-29));date;tput rc;done &
tecmint.com
piątek, 4 marca 2016
How to make fast ping
how to make fast ping
Normal:
[root@virt ~]# time ping -c 5 www.google.com
PING www.google.com (216.58.209.36) 56(84) bytes of data.
64 bytes from waw02s05-in-f36.1e100.net (216.58.209.36): icmp_seq=1 ttl=55 time=12.1 ms
64 bytes from waw02s05-in-f36.1e100.net (216.58.209.36): icmp_seq=2 ttl=55 time=10.7 ms
64 bytes from waw02s05-in-f36.1e100.net (216.58.209.36): icmp_seq=3 ttl=55 time=12.0 ms
64 bytes from waw02s05-in-f36.1e100.net (216.58.209.36): icmp_seq=4 ttl=55 time=11.5 ms
64 bytes from waw02s05-in-f36.1e100.net (216.58.209.36): icmp_seq=5 ttl=55 time=12.4 ms
--- www.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4032ms
rtt min/avg/max/mdev = 10.797/11.811/12.449/0.599 ms
real 0m4.067s
user 0m0.000s
sys 0m0.006s
Fast:
[root@virt ~]# time ping -c 5 -n -i 0.2 -W1 www.google.com
PING www.google.com (216.58.209.36) 56(84) bytes of data.
64 bytes from 216.58.209.36: icmp_seq=1 ttl=55 time=12.8 ms
64 bytes from 216.58.209.36: icmp_seq=2 ttl=55 time=10.2 ms
64 bytes from 216.58.209.36: icmp_seq=3 ttl=55 time=11.1 ms
64 bytes from 216.58.209.36: icmp_seq=4 ttl=55 time=11.4 ms
64 bytes from 216.58.209.36: icmp_seq=5 ttl=55 time=11.5 ms
--- www.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 835ms
rtt min/avg/max/mdev = 10.212/11.428/12.862/0.855 ms
real 0m0.870s
user 0m0.000s
sys 0m0.017s
Normal:
[root@virt ~]# time ping -c 5 www.google.com
PING www.google.com (216.58.209.36) 56(84) bytes of data.
64 bytes from waw02s05-in-f36.1e100.net (216.58.209.36): icmp_seq=1 ttl=55 time=12.1 ms
64 bytes from waw02s05-in-f36.1e100.net (216.58.209.36): icmp_seq=2 ttl=55 time=10.7 ms
64 bytes from waw02s05-in-f36.1e100.net (216.58.209.36): icmp_seq=3 ttl=55 time=12.0 ms
64 bytes from waw02s05-in-f36.1e100.net (216.58.209.36): icmp_seq=4 ttl=55 time=11.5 ms
64 bytes from waw02s05-in-f36.1e100.net (216.58.209.36): icmp_seq=5 ttl=55 time=12.4 ms
--- www.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4032ms
rtt min/avg/max/mdev = 10.797/11.811/12.449/0.599 ms
real 0m4.067s
user 0m0.000s
sys 0m0.006s
Fast:
[root@virt ~]# time ping -c 5 -n -i 0.2 -W1 www.google.com
PING www.google.com (216.58.209.36) 56(84) bytes of data.
64 bytes from 216.58.209.36: icmp_seq=1 ttl=55 time=12.8 ms
64 bytes from 216.58.209.36: icmp_seq=2 ttl=55 time=10.2 ms
64 bytes from 216.58.209.36: icmp_seq=3 ttl=55 time=11.1 ms
64 bytes from 216.58.209.36: icmp_seq=4 ttl=55 time=11.4 ms
64 bytes from 216.58.209.36: icmp_seq=5 ttl=55 time=11.5 ms
--- www.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 835ms
rtt min/avg/max/mdev = 10.212/11.428/12.862/0.855 ms
real 0m0.870s
user 0m0.000s
sys 0m0.017s
Subskrybuj:
Posty (Atom)