Time is one of those things that we don’t really think about but when you’re administering Linux systems, it is a super important. The time, more correctly, what time the system “thinks” it is, can have implications across the system or cluster of systems that you’re running. The easiest thing to see that time affects is the timestamp in the log files. The timestamp for each event will be logged with whatever time the system is using. No big deal, until you’re trying to unravel a mystery at 3.00am and need to compare logs across multiple systems … ugh. Other components like SSL / crypto, synced database hosts, time-sensitive web applications, and more all rely on the system time and it must be accurate.
*All of the following information will be using the command line as the method of interaction. Further, we’ll be using sudo to gain the privileges needed to make the modifications.
First things first, setting the time. This is easy-peezy. The simplest way to set a date on a Linux host via the CLI is to use the date command. The format is easy ” date -s ‘DD Mon YYYY HH:MM:SS’ “. So the following will set the date on the system to December 5th 2016, 13:00:00:
$>sudo date -s "5 Dec 2016 13:00:00"
Now we have the time set to whatever the nearest wall clock reads so all of our logs will be timestamped with close to the right time. However, because of the way computers keep time, there will be some sort of drift over some amount of time. If we come back in 10 days at exactly the same time of day, the system could have drifted by as much as a few minutes. The first, and easiest tool we can use is called ntpdate. You’ll need to install the ntpdate tool on your platform, as task I’ll leave up to you. Once installed, you can use one of the public time servers on the internet to set the time on your system like so:
$> sudo ntpdate 0.ubuntu.pool.ntp.org
5 Jan 15:01:43 ntpdate: step time server 10.24.54.103 offset 7962.340752 sec
This will pull a highly precise time from a server and then update your system clock to that time. For an easy solution, you can setup ntpdate to run in cron. If you’re maintaining a system where high precision isn’t strictly required, this might be an appropriate solution for you.
If, on the other hand, you are in charge of a system which needs precise time at all times, you can use a full implementation of ntp. You’ll need to install the ntp package for your platform, which is up to you. Once installed, you should have a ntp.conf file and drift.conf file. The drift.conf file usually doesn’t need to be modified, however the ntp.conf file will probably need to be edited. Below is a copy of the file that I use for my systems:
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
While this isn’t super secure, I find that this will keep my systems up to date with the correct time. Something important to note is that the ntp software will gradually take the system up to the correct time. If you’re setting this up on a non-prod system or a system that can accept a large jump in time – you can force an accurate time by using the ntpdate command referenced above, you’ll just need to stop the ntp daemon when you’re trying to use the ntpdate command. On my system it looks like:
$> sudo service ntp stop
* Stopping NTP server ntpd [ OK ]
$> sudo ntpdate time.digium.internal
5 Jan 15:20:21 ntpdate: step time server 10.24.54.103 offset 733.129578 sec
$> sudo service ntp start
* Starting NTP server ntpd
These three tools, should give you what you need to manage Linux time like a pro.
I love me some debian / ubuntu Linux, but one of the things that I’ve always been impressed about is the way that yum seeks out mirrors and pulls the packages and upgrades from presumably the closest one. It’s been one of those nice to have things and I thought apt didn’t have. Turns out I was wrong, there is a way and here it is.
In your /etc/apt/sources.list comment out the static entries and add this at the top:
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse
Run an apt-get update and you should see it use a mirror of its own choosing. I’m not sure how it selects the mirror, but at least in my instance it selected a mirror very close to me that I didn’t even know was there.
It seems that most of North Alabama has been turned into a winter wonderland. According to one of the local news stations, this is the snowiest February that we’ve ever had here since we’ve been recording. I’m guessing the last ice age might have it by a foot or a hundred, but I’m guessing whomever was around North Alabama then won’t mind if we call it a record. The real record, or at least minor miracle is that the sweatshop was closed today; I knew there had to be a reason that the snow stuck to the ground so well.
Even though mama-bear was stuck inside, the kiddies and I did our best to enjoy the day. Between last night and today, we got about 7 inches of snow and were able to squeeze in the essentials: sledding, snowmanning, and snowball fights. I’m pretty sure that some snow was eaten by those of us not traumatized with tales of acid snow from our youth. Little C was having so much fun that she even forgot about being cold, something that she rarely ever does, while Big C was giving chase and chucking snowballs.
Instead of farting around the house all dat on New Years day, we took the family out for a walk through the Beaver Creek swamp preserve, which is apart of the north Alabama birding trail. The swamp wasn’t very swampy, but the kids enjoyed themselves while we explored what they called the jungle.
New Years Day Hike
Big C started Kindergarten in August, which means we have our first of many years of school pictures. He has never been excited about having pictures taken, and we rarely get a genuine smile out of him. I didn’t have very high hopes for these pictures, either. You can imagine my surprise (probably more like shock) when we saw the finished product. (Dear LifeTouch photographer, you are a miracle worker.) If someone could please tell me how it is possible that my son is already this big, that would be great.
And now for your viewing pleasure, may I present Big C as a kindergartner.
It’s been a long time since I have posted anything here. I would love to sit and write an individual post about everything that has happened since the beginning of October 2013, but frankly I just am not that good. Instead, I’m going to be concise and efficient (probably my two favorite words) and post only a blurb about each thing that will get us up to date.
Let’s get started, shall we?
Big C turned 5. That was a rough week for me, emotionally speaking. Something about that number – 5 – really threw me. Suddenly, we have a kid who isn’t all that little. For the record, I held it together just fine during his party day once I made it through a moment while putting on mascara. (That was horrible timing on my emotions’ part.) We rented a big inflatable slide for the day and watched lots of kids play all over it. Mommy and Daddy might have taken advantage of it during naptime that day, too. Most importantly, Big C absolutely loved his day! He smiled and laughed all day, so it was definitely a success!
Little C potty trained herself. Yes, it really did happen that way. I had tried a couple of times last Fall, but after a couple of days each time it was apparent that things were going nowhere. After the long and extremely frustrating experience with Big C, I opted to relax and just not worry about it. And then we picked her up after Sunday school the weekend after Thanksgiving, and her teacher said her diaper had been dry all morning. She had even taken herself to the potty completely on her own. And that was it. She was dry at school all week and started wearing underwear that Friday. We haven’t had more than a couple of accidents.
Big C and Little C performed in the Christmas program at their preschool. This was the second one I’ve directed, and I was very excited that both kids did well both days. Big C did the motions with his head on day two because “my hands needed to rest”. And Little C wore her second backup outfit on stage on day two due to unfortunate potty accidents that morning. But the program went well, and all the kids looked adorable in their Christmas colors. As a bonus, they all learned at least one traditional Christmas carol. Is there anything better than seeing between 150 and 200 preschoolers singing about the birth of Jesus?!
We celebrated Christmas. This is nothing new, but it was pretty fun to see both Big and Little C get all excited about presents. I am a very proud Mommy since Big C definitely knows we celebrate Christmas because of Jesus’ birth. (Hopefully, Little C will get that concept by next Christmas.) But the Christmas tree and presents and good food and time with family are all really special traditions that the kiddos are getting old enough to enjoy.
Big C was Star of the Week in his PreK class. Just like each child got a week with Ginger the Gorilla during the Fall semester, each child gets to be Star of the Week during the Spring semester. Big C was one of the first kids to have a turn, and he enjoyed it. He doesn’t love being the center of attention, but he did great (I’m told) when it was his turn to talk about the pictures on his poster and go through the “All About Me” questions. He got to take a special snack on the Friday of his big week. I really thought he would pick Cheez-Its, but he surprised me and chose Skittles. I considered sending an apology email to all the parents from his class, but I decided instead to just not worry about it. They might do special snacks at the end of the school day, but hey kids need fun treats sometimes. And, honestly, it was just really nice to see Big C so excited about something. He’s quite the introvert, and he isn’t all that expressive. The effects of pure sugar were worth it.
The husband and I celebrated our 10th wedding anniversary. We spent a quiet few days in Gatlinburg at Paw Paw’s condo free of children. (Thanks, Nana and Grandaddy!) We even woke up one morning to a gorgeous blanket of snow on top of the mountain! It all melted by the afternoon when temperatures reached the low 70s, but that just meant we could enjoy the outdoors without freezing. OK, I freeze all the time, so I didn’t need a heavy coat. We wandered through Cades Cove, and the husband got to play with his camera and lenses and take pretty awesome pictures of nature. He even managed to get a couple of me that I didn’t dislike. That’s impressive. It was a good weekend. It’s just hard to believe we’ve hit the 10 year mark. We’ve been through lots of changes, but we are definitely better now than we were the day we were married. I can’t imagine doing life with anyone else.
Big C finished preschool. As I’ve mentioned, Big C was in the PreK class this year. That, of course, means he is headed to Kindergarten after summer break. He sang in the 4-year-old Follies at school, which I directed, and he did great! He even used his hands for the motions (instead of his head like at Christmas). I knew I would have an emotional moment or two that day, since it would be his last preschool program, but I managed to be perfectly fine. Until the end of the program. I happened to look at Big C, who was looking at me, and I teared up a little. What can I say? My baby boy growing up gets me every time.
(I don’t know why the previous paragraph is all bold. I can’t make it stop.)
I finished my second year of teaching. This past year went by so quickly. I’m sure it was a combination of having new kids and having a year of experience, but it really flew. And it was a really good year. I do still enjoy my job, and I still laugh at myself regularly because teaching preschool music is one job I said I would absolutely never do. Clearly, I was wrong. God knows what He’s doing, but oh how I seem to really love learning that the hard way.
We had summer break. I tried very hard to enjoy my time with both kids this summer since Big C would be off to Kindergarten at the end of it. It was difficult, but I think I did pretty well. Little C can be quite a challenge some days, but Big C really grew up during those two months. We spent time playing in the water at the Botanical Garden, checking out the butterflies (and finding out that Little C is terrified of butterflies when they get too close to her), playing with friends, watching free movies, and having indoor picnics for lunch almost everyday. (Indoor picnics mean both kids get to eat while watching a movie.) We saw family and friends. And we used our vacation money to buy a new washer and dryer and replace our HVAC. Yay. There wasn’t anything extraordinary about the summer, but it was good. We got plenty of time to relax and enjoy no real schedules before school started.
Little C turned 3. And boy did she ever find her own opinions and emotions. She was already opinionated and emotional, but turning 3 really brought out that personality. I joke that she’s basically 13, but it feels so true some days. She changed her mind around 5,498 times about what kind of party she wanted, but she eventually settled on a pink and purple princess party. Plain pink and purple. Not sparkly pink and purple. She’s very specific. So we had pink and purple everywhere in our house that Saturday. She dressed up in her blue (go figure) Cinderella dress Gran bought for her, and she paraded and prissed around all day long, rather delighted to get to do whatever she wanted. She ate way too many gummies, Hershey kisses, and cupcakes, but our little princess enjoyed herself. You only turn 3 once, right?
I think that’s where I’ll stop the ‘let’s catch up’ post. I don’t think I missed any of the highlights. I will soon (seriously, I’ll actually do it soon) post pictures of Big C’s first day of kindergarten and Little C’s first day of the 3-year-old class at preschool. For now, though, I feel like I’ve done my duty to myself and noted things I want to remember, albeit in a much too quick fashion. Such is life for us right now, though. I suppose it might slow down one day, but I am actively trying to enjoy our craziness as it is.
It finally happened, Karen and I got called out for the challenge. It took us a bit this afternoon, but we finally took a break from all was happening and took the plunge. I guess I’ll let the video speak for it self.