How To – Easy NTP on Solaris 10

Setting up NTP (the Network Time Protocol) on Solaris 10 is very simple but requires a few less than obvious steps that can trip up someone looking to set up a basic NTP daemon to sync their local machine.

The first step is to install the NTP packages SUNWntpr and SUNWntpu, both of which are available from the first CD of the Solaris 10 installation CDs.  These packages are located, along with the others, are located in /mnt/cdrom/Solaris_10/Product/ assuming that you mounted your Solaris 10 CD 1 or its ISO image to /mnt/cdrom, of course.  Personally, I keep an ISO copy of this CD available on the network for easy access to these packages although they could very easily be copied off into a package directory.  Depends on the number of machines which you need to maintain.

Go ahead and install the two packages.  This can be done easily by moving into the Product directory and using the “pkgadd -d .” command and selecting the two packages from the menu.  There are no options to worry about with these packages so just install and then we are ready to configure.

The “gotcha” with NTP on Solaris is that there is no default configuration to get you up and running automatically and most online information about the installation either leaves out this portion or supplies details unlikely to be used under common scenarios.

Solaris’ NTP comes with two sample configuration files, /etc/inet/ntp.client and /etc/inet/ntp.server.  Confusingly, for the most basic use we are going to want to work from the ntp.server sample file rather than from the ntp.client sample file.  NTP uses /etc/inet/ntp.conf as its actual configuration file and, as you will notice, after a default installation this file does not exist.  So we start by making a copy of ntp.server.

# cp /etc/inet/ntp.server /etc/inet/ntp.conf

Now we can make our changes to the new configuration file that we have just created.  I will ignore any of the commented lines here and only publish those lines actually being used by my configuration.  In this case I have gone with the most simple scenario which includes using an external clock source and ignoring my local clock.  In a production machine you should set up the local clock as a fallback device.

For my example here, I am syncing NTP on Solaris 10 to the same machine pool to which my CentOS Linux machines get their time, the CentOS pool at ntp.org.  You should replace the NTP server names in this sample configuration with the names of the NTP servers in the pool which you will use.

server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org
server 3.centos.pool.ntp.org
broadcast 224.0.1.1 ttl 4
enable auth monitor
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable
keys /etc/inet/ntp.keys
trustedkey 0
requestkey 0
controlkey 0

This very standard and simple setup provides you with four servers from which to obtain NTP data and also rebroadcasts this data on the local network via multicast using the NTP standard multicast address of 224.0.1.1.  Feel free to remove or comment out the broadcast line if you have no desire to have any machines locally getting their NTP data from this machine.  The ease of which you can republish NTP locally via multicast is just too simple to pass up.

Now that we have a working configuration file, we need to fire up NTP and let it sync up with our chosen servers.  The best practice here is to use the ntpdate command a few times to get the box date and time as close as reasonable to accurate before turning NTP loose to do its thing.  The NTP daemon is designed to slowly adjust the clock whereas ntpdate will set it correctly immediately so this gets the initial time correct right away.

# ntpdate pool.ntp.org; ntpdate pool.ntp.org

# svcadm enable ntp

At this point, the NTP Daemon should be running and your time should be extremely accurate.  You can verify that NTP is running by looking in the process pool for /usr/lib/inet/xntpd which is the actual name of the NTP Daemon running on Solaris 10.

February 18, 2009: Snow Again

Lots of snow coming down today.  I was starting to feel like winter was tapering off with the nice weather that we have had recently.  Late this morning it started coming down in big, soft flakes at a pretty steady pace.

I got a bit of a late start this morning.  Liesl tends to cause our days to shift very heavily towards staying up late and sleeping in.  She is willing to sleep in in the mornings but is very fussy in the evenings.

Two Buffalo & Pittsburgh N scale open top hoppers from Atlas arrived today that I got at an amazing discount on eBay.

Dominica had a very productive day.  She got a lot of paperwork done and telephone calls made.  I managed to get some bills paid today too.  Not very excited but we both felt good about the day in general.

My big project for the day, other than fixing a server at the office that was offline and being problematic, was dealing with an time synchronization problem on a Linux server running on VMWare Server on Linux.  I never came up with a really good solution and had to resort to running ntpdate via a cron job.  At least it works.

This evening I only got to do a tiny bit of model railroading.  My project for tonight was to add three new rock faces into the plasterwork that we did last night.  This is my first time uses molded plaster rocks so we will see how it turns out.  Since I have never worked with them before I only did so much preparation for them and no planning at all.

We watched two episodes of the first season (1984) of Murder She Wrote. Dominica never watched this show as a kid.  She saw it once or twice and did not really like it.  It was a classic in my home as a child. The show started when I was just eight years old as part of the big lineup of shows that all released around 1984.  That years seems to be the year that ’80s television really began.  Most of the shows running before that time were holdouts from the 1970s but in 1984 there was a large group of shows that really seem to epitomize the culture of the ’80s that all began around the same time.  Taking a snapshot of television programs running in 1983 and those from 1984 would be, if my memory serves, dramatically different from each other.

The snow did not really stick today.  It formed more of a slushing covering all over the place.  You can tell that it snowed all day but there is definitely no build up of snow.  There are some patches of ice here and there that I discovered while walking Oreo and almost falling down in the parking lot.

The event for which I was planning on traveling out to Warren tomorrow has been pushed off again so, most likely, it will be Warren next week rather than this week.  This weekend we have guests coming up from Wallington, New Jersey – Oreo’s daycare friends!  He will be very excited to see them as he has not seen them since we moved and he used to see them for nine hours every day.  They were a major part of his life for two years.  They are bringing their baby boy up to meet Liesl.  They are only several weeks apart in age.

Time Sync on VMWare Based Linux

In many cases it can be quite difficult to accuracy keep time on a virtualized operating system due to the complex interactions between the hardware, host operating system, virtualization layer and the guest operating system.  In my case I found that running Red Hat Linux 5 (CentOS 5) on VMWare Server 1.0.8 resulted in an unstoppable and rapid slowing of the guest clock.

The obvious steps to take include running NTP to control the local clock.  This, however, only works when the clock skews very slowly.  In my case, as in many, the clock drifts too rapidly for NTP to handle.  So we need another solution.  VMWare recommends installing VMWare Tools on the guest operating system and subsequently adding the following to your VMX configuration file:

tools.syncTime = true

This does not always work either.  You should also try changing you guest system clock type.  Most suggestions include adding clock=pit to the kernel options.  None of this worked for me.  I had to resort to a heavyhanded NTP trick – putting manual ntpdate updates into cron.  In my case, I set it to update every two minutes.  The clock still drifts heavily within the two minute interval but for me it is an acceptable amount.  You should adjust the update interval for your own needs.  Every five minutes may easily be enough but more frequently might be necessary.

Using crontab -e under the root user, add the following to your crontab:

*/2 * * * * /usr/sbin/ntpdate 0.centos.pool.ntp.org

For those unfamiliar with the use of */2 in the first column of this cron entry, that designates to run every two minutes.  For every five minutes you would use */5.  Remember that it takes a few minutes before cron changes take effect.  So don’t look for the time to begin syncing for a few minutes.

For me, this worked perfectly.  Ntpdate is not subject to the skew and offset issues that ntpd is.  So we don’t have to worry about the skew becoming too great and the sync process stopping.

If anyone has additional information on syncing Linux in this situation, please comment.  Keep in mind that this is for Red Hat Linux and the kernel with RHEL5 is 2.6.18 which does not include the latest kernel time updates that may be found in some distributions like Ubuntu.  Recent releases of Ubuntu likely do not suffer this issue as I expect OpenSuse 11.1 or the latest Fedora would not either.

Bones Season 3 Episode 7 Massive Amiga Blunder

So today Dominica was watching Bones, season 3 episode 7.  She came down to tell me that they had put an Amiga from 1987 into the show and that I had to take a look.  Of course, no one in Hollywood bothers to check anything at all or to even state the obvious correctly.

They claim that the Amiga is from 1987, the same year that my family bought a Commodore Amiga.  The machine that they show is obviously a Commodore Amiga 1200 (A1200) which was made from late 1992 through 1996.  Almost a full decade more modern than what they are stating.  (To put this in perspective, they say that they are showing a computer used for little more than video games that was made when I was in mid-elementary school but show a high-powered 32bit graphics workstation that was still on the market in my third year of college!!)  But this is just the beginning.

The Amiga machine that they show, the black A1200, is sitting, unplugged, atop an ancient IBM XT that is an entire generation older than the Amiga.  Both machines are so famous and amazingly recognizable at once that it is extremely confusing to watch because it looks like exactly what it is, a mid-90s Amiga 1200 unplugged and used as a dust cover for a worthless, early 80s IBM XT (I learned to program on an IBM XT when they were no longer current in 1985.)

Then, the actors, who apparently aren’t familiar with how computers work and that they need to be plugged in, talk about the specs of the Amiga (an incredibly powerful 32bit workstation worth many thousands of dollars in the mid-90s) but instead quoted the machine has being powered by the pathetic Motorola 6800 processor which was never used in any computer to my knowledge but the series included the 6809 which was used to power the Vectrex home video game system (that Dominica’s family has) and the Radio Shack sold TRS-80 computers of the late 1970s.

They, to add insult to injury, the product a floppy disk that supposedly was used on the Commodore Amiga.  Now the original Amiga came out in 1985 and one of its major selling points was that they had left the legacy world of 5.25″ floppies behind and moved ahead, along with Apple’s Mac and the Atari ST, into the world of 3.5″ floppies which were more stable and had higher storage denisty and better overall performance and capacity.  This was extremely well known at the time.  It was the first fact that anyone would know about any of these machines.  The 5.25″ world included the old IBM compatibles, when they were still called that, the Apple //e and other ancient 8bit machines.  The original Mac, Atari ST and Amiga were 16 bit (but remember that they actually showed a 32bit Amiga that was about seven generations into the series and actually had a hard drive installed.)

Since the Amiga didn’t have a 5.25″ floppy drive, they stuck the floppy into the IBM XT!  Watching the show without sound you can’t even tell that the Amiga is supposed to be being used.  It is only mentioned in the dialogue and the show actually uses the IBM.  Visually the show is completely about the IBM XT but audibly the show is a mismash of dialogue that sounds like a five year old attempting to sound like they know something by spewing gibberish with authority.

Then, they show this IBM XT (a device which normally came with a monochrome green screen) that displayed 80 character columns of text playing a modern, late 90s, 3D rendered video that had more colors in it than the IBM could display (which was like 16), higher resolution than the IBM could produce (by orders of magnitude) and all of that before having it do graphical rendering that was still out of reach of most home video game enthusiasts by 2000.  They made the implication that there has been no hardware advancements since 1984 (when the XT was popular) and that the only differences between then and now is that programmers are smarter now and know how to write 3D games!

What really amazes me is that all of the people involved in producing an expensive show like Bones from writers to producers to actors to stagehands, prop people, etc.  Not one single person figured out that the scene was so wrong as to be confusing to the most casual observer.  How can so little thought be put into a show so expensive to make?  How can so much work be involved in making a scene so inaccurate?  Just having the Amiga in front of them for ten seconds, even if they had never seen a computer before, would have filled them in on what cables to plug in and what type of floppy the would need for the scene.  And the year or manufacture is probably printed on the back.

An eight year old with Google who had never heard of Commodore, Amiga, IBM, floppies, etc. could have researched all of this for them in minutes.  Most of the people working on these shows are older than eight, I would venture to guess, and probably many of them older than me which means that they should be exceedingly aware of all this already without any need for any research at all.  They lived through these eras.  They watched the 5.25″ floppy fade away in 1984.  They should remember computers that only had green screens.  They should know that sitting one computer on top of another looks weird and that everyone would see two computers sitting there and notice that the one they mention isn’t even plugged in and that the floppy was placed into the wrong one.

Seriously people.  Hollywood is so sloppy, why do we watch this stuff?  Why not film Kindergarteners putting on shows at school?  At least then we have some guarantee that those kids at least attended half a year of Kindergarten.  I can’t be so sure about the people making these shows.

February 17, 2009: Memories of Schoolbuses

Back to work today.  Not that I don’t work on the weekend or holidays but it definitely feels quite a bit different on an official work day.  Yesterday was very slow at the office and it really was almost completely a holiday.  Good enough for me.  The last thing that I want to do is not to sign in for an entire day and wonder what disaster has befallen everyone while I wasn’t looking.

Today was a big windfall in finding old friends on FaceBook.  I am old enough now that “old” friends is starting to be a reasonable saying.  I tracked down almost everyone that lived on my street (Peoria Road) with whom I used to ride the schoolbus when we were little.  I only rode the schoolbus on that route between first grade and the middle of seventh grade, if I remember correctly.

In Kindergarten we rode a short bus that drove just five of us around – Janet, Sandra Sue, Jody, Brian and I.  We were the only five Pavilion district kids who attended Pavilion Baptist School in the class of 1994 and since only PBS had a half day Kindergarten we had to have a bus all to ourselves.  It was a painfully long busride because we lived scattered all over the place.  Janet lived in Pearl Creek.  Jody on route 246 near Perry Center.  Sandra Sue on route 63 getting close to Batavia.  Brian lived on Old State Road not all that far from me and somewhat between Jody and I but not quite and I lived on the north end of Peoria Road making me the last one off of the bus.  So every day in Kindergarten I got a full tour of the towns of Pavilion and Covington who both fall in the Pavilion school district.

Just now as I describe the route that we took it has occurred to me that four of us lived in the town of Covington in Wyoming County and only Sandra Sue lived in Pavilion in Genesee County.  She, unfortunately, lived at the far northwestern extent while I was all the way to the east and Jody was all the way to the south.  There really was hardly a patch of the two towns that we didn’t have to cross to get all of us home.  It made getting out of school early only so much of a big deal.

After Kindergarten I rode the Pavilion school district’s elementary bus home because it was the later bus.  The high school kids from the public school went home before we did, if I remember correctly, so I always rode the elementary bus which meant that when kids on the bus got to either sixth or seventh grade, depending on the year because they changed their definition of high school a few times while I was there, the kids would switch to the high school bus and I would never see them again.  When I was young it wasn’t bad but as I got older it was awkward to be the older, private school kid who rode the bus with the younger public school kids.

Due to the location where we lived I was either the last or nearly the last person off of the school bus.  My rides in the evening were very, very long.  My ride home began by getting out of school at PBS and waiting for about forty five minutes while all of the other kids got picked up by their school districts and carted off home.  Many of them reached home before I even left school.  Those of us from the Pavilion district, even though we were the local district, had to wait outside of the school all alone every day.  It was very depressing as a child to have the freedom of evening ebb away just standing around outside of the school waiting to be picked up.

Once we were picked up we were driven over to Pavilion Elementary which is across the street from the high school.  If I remember correctly, the high school would go home just too early to be able to take us because once in a while high school kids would stay late at school (sports, detention, whatever) and then would ride the elementary bus home.  Then I would have to stand at Pavilion Elementary for ten or fifteen minutes on a good day just waiting for the bus that took me home to arrive.  In bad weather we could wait inside of the school’s foyer but that always felt awkward as a kid standing inside of a school that you did not attend.  So I almost always braved the weather and just stood out waiting for my bus.

Then the bus ride home itself from Pavilion Elementary to my home on Peoria Road took just forever.  This was so much worse than a long bus ride for normal people because I was riding the bus with people with whom I did not go to school (not a single PBS student rode my bus after Brian Hendrickson left PBS after first grade) and because I was forced to wear both uncomfortable and embarrassingly unfashionable clothes so that I felt even more out of place than was necessary on this long, lonely bus ride home.

The ride home took around an hour after I was finally onto the late bus.  I don’t remember exactly how long it took but it seems like it must have been more than an hour.  In either case, the entire time from school letting out until I got home was well more than two hours.  It may have been three when you consider how long I had to stand at PBS waiting to be picked up by the first bus.

I do remember that when I got to middle school and could get detention that getting detention was actually a reward because they would have you do your homework until a few minutes after the Pavilion bus left and then would have your parents take you home.  (Read that carefully – the punishment was to make us wait the length of time that we, the Pavilion kids, had to wait everyday.  So OTHER people got punished by being treated like us.  Nice.)  Then, after detention was over and homework was complete, my mom would pick me up and have me home an hour or two sooner than normal without the awkward bus ride.  Then I would have an extra long evening without any homework.  Downside?

When I was in eighth grade, sometimes in nice weather, I would ride my bike to and from school.  This was a bit of a pain because I had to ride in full private school dress clothes which chaffed, were generally uncomfortable, were way too warm and were likely to get covered in grease from the bike.  Luckily going towards school was almost entirely downhill – the total decent being a few hundred feet – so you did not get all sweaty on the way to school.  But going home meant a steep incline to bike up the whole way home – and carrying loads of books.  But it was nice because even when I wasn’t strong enough to climb the hills and had to walk up them pushing the bike it still got me home about two hours early since I actually lived very near to the school.

I stopped riding the bus primarily in seventh grade when I was twelve years old.  On the ride home one day I was sitting, looking out the window to my left while still sitting at Pavilion Elementary waiting for the bus to fill up.  I was resting my head on my hand like “The Thinker”.  A kid from PBS who was riding the bus that day called my name and I turned to see what he wanted.  I did not move my hand.  He was holding himself above me holding on to each side of the seat backs and then then, when I looked, he dropped on me bringing his knee down directly onto the back of my hand that was braced by the elbow against my leg.  His whole weight came down on that knee pushing my hand flush down against my wrist breaking my wrist.

After that I almost never rode the schoolbus.  And, in 1990 when I was fourteen and entering ninth grade, I transferred from PBS to York Central School which was the neighbouring district to Pavilion.  Because I was officially outside of the York district I did not have to ride the school bus and mom drove me to and from school until I was old enough to get my driver’s license and drive myself to and from when I was sixteen.  I was the last student allowed to go to York without living in the district.  Two of us that had ridden my school bus at Pavilion did that – both from the class of 1994.  I being from PBS and she was from Holy Family in Batavia previously.  York was ranked the third best public school in New York State when I attended there so there was good reasons for picking it over my local district.  York tied with Avon my junior year in high school for third in state and sat one spot behind Livonia.  Three schools in the top four all in one county – and a very rural county at that.

During my days of riding the Pavilion schoolbus I did manage to make a number of friends – almost exclusively with those kids who lived on Peoria Road because we spent so much more time together than we did with everyone else since the kids who got off of the bus early tended to sit in the front and knew each other from their long morning bus rides.  My morning bus rides were short, thankfully, but they still required the bus transfer at the elementary school and did not deliver me to my school until about halfway through the first class of the day which caused obvious problems.  This was especially problematic in Kindergarten when it was a large percentage of the halfday and anything that made you obviously different from everyone else did not aid in making school a comfortable experience.

So there were a handful of friends from my school bus days that I have wanted to track down and I was able to find several of them on FaceBook today.  I now have contact again with pretty much everyone who grew up around my age on my street.  Only a few of us but we can all reach each other again.  I was by far the oldest.  Most of them are about three to four years younger than me.  Anyone whom I haven’t found yet on FaceBook is a sibling of someone who is so I have some means of reaching everyone these days.  Funny how technology has brought so many people back together after so long.  Some of these kids (ha ha, kids, they are all like thirty now) I haven’t seen in nineteen or twenty years!  Unbelievable  It is things like this that really make me feel old.

Dominica got up this morning and got Liesl ready for travel as quickly as she could.  They left Peekskill around eleven thirty to drive down to Totowa, New Jersey to spend the afternoon at her old job (she officially gave up the position on February 2nd) visiting with everyone, delivering her work laptop back to them and introducing everyone to Liesl.  This was Liesl’s second longest car ride ever and her very first time ever going out in her stroller.  The weather was perfect for a drive to New Jersey.  That really worked out well.

Dominica and Liesl had a good time.  Oreo and I stayed home as I needed to work and he did not want to spend the afternoon alone in the car.  It gave me a bit more time to get stuff done that I needed to do which ended up being pretty important today.

We got all of the information that we needed today from Toronto and were able to prep the new server, shut it down, pack it up and around five this evening dad drove over to Geneseo to get the server sent out via UPS.  We decided to just do two day shipping as it ended up saving around $240 over sending it overnight!  That is a lot of money to just throw away.

It is a massive relief to have the server out the door and onto the UPS truck.  Now there is no more fiddling or worrying and on Thursday evening it should be racked and ready and after I get home from Warren I can work on it to get it running smoothly.  Getting this server up to Toronto has been a six month long process.  This past week has really been wearing on me.  So much needing to be done.

Tonight, while watching a few episodes of Murder She Wrote‘s first season, Dominica and I managed to do the rest of the plaster work on the model railroad diorama that we have been working on.  Tonight’s effort was to plaster the outsides of the diorama for strength and protection.  We are definitely improving a lot in the way that we apply plaster.

Tomorrow we should be able to start working on more scenics aspects of the layout and less structural.  Our next step is to start adding in rock faces.