I needed to find the sunset time, so I can turn on my path lights for a couple of hours each night. The BOM usually display the sunrise and sunset times when they provide the weather forecast. Having looked at the site I found that it provides a tool, via Geoscience Australia, to find out the sunset and sunrise times each day or for a whole year.
As I needed the sunset time I came up with a command to retrieve it [bash]LATHEMI=south #Latitude Hemisphere LONGHEMI=east #Longitude hemisphere LOCATION=SOMEWHERE #Your location LATDEG=0 #Latitude degrees LATMIN=0 #Latitude minutes LATSEC=0 # Latitude seconds LONGDEG=0 # Longitude degrees LONGMIN=0 # Longitude minutes LONGSEC=0 # Longitude seconds STATE=“NT%20-%20Darwin%20(most%20location)” #Australian state DST=No #Daylight Savings Time (Yes|No) TZ=10 #Timezone UTCOFF=10 #Offset from UTC ATZ="(EST) #Eastern Standard Time LT=“00:00:00 PM” #Time making the call AUSTZONE="+10" EVENT=1 TIMEZONE="+10" DATE=date +"%d/%m/%Y"
Read more →
In RHEL/CentOS 5 this was handled by /etc/modprobe.conf.
Now in RHEL/CentOS 6 this is now handled by udev. The file that controls everything is
/etc/udev/rules.d/70-persistent-net.rules An example of how this file looks is shown below:-
# PCI device 0x14e4:0x164c (bnx2) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:19:b9:f2:d4:f7", ATTR{type}=="1", KERNEL=="eth", NAME="eth1" # PCI device 0x8086:0x10d6 (igb) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:1b:21:0c:2a:70", ATTR{type}=="1", KERNEL=="eth", NAME="eth2" # PCI device 0x8086:0x10d6 (igb) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?
Read more →
We have a requirement at work to synchronise our servers to within a micro-second. To achieve this we used a combination of a CDMA modem (can use a GPS device), PTPD, and NTPD.
We used the CDMA modem as a stratum 0 reference to NTPD. This means that NTPD would have control of adjusting the clock on the server. PTPD was then configured to run as the master on this server as follows:-
Read more →