How to manage your time

by Stephen McGroarty 7/21/2011 3:57:07 PM

Windows Server 2008 R2 and time sync issues seem to be more common than one would think. After poking around for a bit I was able to come up with a few steps to assist with that.

First we want to set the time server on the domain controllers, I like pool.ntp.org but the choice is up to you
w32tm /config /manualpeerlist:Pool.ntp.org /syncfromflags:manual /reliable:yes

We have no set it to use an external source and told it that we can use this server as a time server.

Lets restart the time services
net stop w32time
net start w32time

And finally synchronize the service
w32tm /resync

Well that part is completed, now lets move to the client servers.

This can be done manually by logging into each server if there is only a few, or creating a batch script to against them all.

We want to first stop the time service
net stop w32time

Now we want to remove all configurations from the registry
w32tm /unregister

And then reregister the new settings in the registry, this will pole the settings from the domain controller
w32tm /register

Now lets restart the service.
net start w32time

This should work for most of the domain member computers and it can be used to change that one server that keeps getting out of sync.

Currently rated 2.5 by 4 people

  • Currently 2.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Administration

What about a full lab setup

by Stephen McGroarty 6/28/2011 7:11:28 AM

Wow it has been a little too long, but here we go.

I got my hands on some hardware to play with and configure so I thought I would share the design with you, loyal fans. What I have is a basic design setup, 2TB storage and 5 servers that I wanted to virtualize and in both Hyper-V and VMware. The general hardware overview:
1

With this, i am going with Boot from SAN for the Hyper-V servers and Boot from USB on the. There is no special requirements or tweaks for either of these setups, they both should just work.

The conceptual view of the environment is simple and basic, but I wanted to relay that each server type is on both host types. This design has an Active Directory and Database server on both the Hyper-V and the VMware clusters

2

 

3

Now we start getting to the meat of it, how am dividing up the storage to the servers, best answer I can give is, Evenly
4

I did two separate 500GB volumes for admin data, VMs that are require more up time in general, and then a 250GB volume for the general data. On the Admin volume i will also have machine templates and required ISOs for installing software and OSes.

And finally an overview of how it all relates to each other. The authentication services and the monitoring talk to everything, while the web servers and the file servers just talk to themselves.
5

Currently rated 3.0 by 5 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Administration

There and back again

by Stephen McGroarty 12/23/2010 8:34:20 AM

Ok first, yes I have been pretty absent on this site for a while, just been caught up doing a few things with work on a “short term” that took longer than they should of. But I am going to see about doing this once a week now. And for this weeks fun and excitement, how about a simple xcopy script?

You have data on location 1 and you want something simple and quick that can be used to copy the data and keep it synchronized. How about an xcopy? Its already installed, it doesn't have any odd requirements, and it can be set as a batch file and run as a scheduled task.

First you need to know the location you want the files copied from and to, I usually set this script up on the storage server just so I don't have that run on my desktop and surprise me.

The script should be simple 

xcopy /e /d /y \\myworkstation\mydata\need this c:\Backups\MyBackups 

Important switches:
/e – Everything including empty directories
/d – Date, if there is no date given then it will take things that just have a different date or are new
/y – Yes to overwrite

you should now test this command on from your server/storage location and verify that you have permissions and the path set correctly.

After that set it as  a new scheduled task. I think i will save the scheduled tasks for a later date. But this should help you sync those files between two locations.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Administration

Sometimes it can be handy

by Stephen McGroarty 6/8/2010 7:01:00 AM

Going to try something different here, I notice that I am not paying a lot of attention to my site lately, and there isn’t a good reason not to. So for the next 30 days, until July 8th, I am going to attempt to do a post a day. I am also going to try weekends as well. The reason for this is I have a lot of things that I want to share, and I have been meaning to share from basic tech knowledge and into cars. This will also be an exercise in brushing up on my writing skills, I seem to be lacking a little bit there.

For the first post lets do a scripts to remove all the scheduled tasks on servers. We want to list all the scheduled tasks on a server, ok not a problem if you have one server you can login and view them, or you can list them remotely with

schtasks /query /s ServerName
This will return a result such as

TaskName                             Next Run Time            Status        
============================================================
FileScript1                                        23:59:00, 1/5/2010       Running        
MyTasksForStuff2                          07:00:00, 1/6/2010       Running
       

Now, you want to check the tasks on 15 servers, this gets more cumbersome and a little time consuming. So lets say you have this neat little shell script that helps you loop items so that you can one script multiple times

@echo off
 
if x==%1x goto MyServers1
if x==%2x goto MyServers2
 
for /f %%a in (%1) do call %2 %%a
goto end
 
:MyServers1
 
echo.
echo.
echo.
echo Run.bat syntax:
echo ---------------
echo.
echo Example:  run.bat list.txt program.cmd
echo.
echo 'list.txt' should contain a list of computers/IPs 
echo (one to each line) to each execute 'program.cmd'
echo.
echo The names of files are not important as long as they 
echo are specified after the run command.
echo.
echo.
echo.
echo.
 
:end

Save this as run.bat

Next we want to take our 1 line from above and put it into its own bat file with 1 change.

echo “Server Name: %1”
schtasks /query /s %1

Save that as “ViewTasks.bat”

Next we need to setup a text file that contains all the servers we want to view the scheduled task on.

Server1
Server2
Server3

Now put it all together and you will see your results

run.bat list.txt ViewTakss.bat

 

"Server Name:" Server1
TaskName                             Next Run Time            Status        
============================================================
FileScript1                                        23:59:00, 1/5/2010       Running        
MyTasksForStuff2                          07:00:00, 1/6/2010       Running
       

ServerName: Server2
TaskName                             Next Run Time            Status        
============================================================
FileScript1                                        23:59:00, 1/5/2010       Running        
MyTasksForStuff2                          07:00:00, 1/6/2010       Running
       

And you can see your tasks running. Now lets say you want to delete them. Again test with the schtasks command

schtasks /delete  /s ServerName /TN * /f

This will remove the tasks with only a complete as the last line.

So if you save this as “DeleteTasks.bat”

schtasks /delete  /s %1 /TN * /f

You can now run it as a script on all your servers with

run.bat list.txt DeleteTasks.bat

And it will remove all the scheduled tasks from your servers that you have in your list.txt

Currently rated 3.0 by 5 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Administration | Weekly Tip

Where is my earth shattering Kaboom

by Stephen McGroarty 8/1/2009 9:17:07 PM

Well, I tried. I don’t have any RAM for my 64bit machine. Now, when i say not any RAM I actually mean very very little. It has 256MB of RAM. I think I need to get some for it before I can keep going with the VMware posts.

I do have VMware ESX 3i up and going, and right now I am installing Windows 2008 server on it. I am doing this as sort of my own personal tests. I want to see what is needed to update an Active Directory domain from 2003 to 2008.

Will update a few things after I get some RAM.

Currently rated 3.3 by 6 people

  • Currently 3.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Administration

Problems with Labs

by Stephen 1/23/2009 3:20:19 AM

So I tried to use my handy dandy MacBook to try to take the study courses for the next cert i want to take and discovered an interesting issue. Microsoft eLearning site does not support Safari or Firefox. After talking with a couple of peers i found out that I have to use IE to access the site, so to the desktop I went. And so far there is nothing fun, or memorable, about Routing and Remote access. It seems like basic network troubleshooting, and every company I have worked for/with seems to use Cisco devices for Routing and Remote access. So next is to tackle the custom subnets.

Currently rated 4.0 by 2 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Administration

Learning more and more

by Stephen 1/20/2009 4:02:09 PM

One of the fun things is that I currently posses one cert, I really need to get up on it and get atleast a second one. I have tried to study before, but all of my tools are for windows based OS and I currently have a Mac based laptop. Now if I had a Linux based laptop, would I be more motivated to study? or would I just be more inclined to goof around while playing on it?

Lets find out. I am going to try to study at least two nights a week from my laptop and if that fails, then I will use my desktop more often. I will blog about the interesting things I learn about while studying as well. One of the things I am currently finding really fun is Distributed File System (DFS) with active directory.

I will try it and keep you posted.

no tags

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Administration

Going to eat your brains and gain your knowledge

by Stephen 1/8/2009 8:25:13 PM

Well they say it takes about 21 days to form or change a habit, so let me try to get into the habit of blogging on the magic three days a week. And just cause it gets posted after midnight doesnt mean I wasnt writing/debating/thinking about it on that day, but i will try to be as regular as a fiber rich diet.

This one is something I did recently, and the the mighty Kolbold asked me for something that could help monitor network traffic.

The first thing that I thought of was Cacti because it allows you to configure an snmp community on a switch, the get the data and graph it in a nice simple to view interface that can update quickly. Check out the screen shots on the cacti home page.

The quickest way I have found to deploy this has been with CentOS and then using a guide I found online at Karl's Place. This being a CentOS install a couple of steps while you start the install should be taken into account. If you have never installed CentOS before that is ok just keep a few things in mind. When installing choose custom and server install for packages. You want to install MySQL server, HTTP Server, PHP for web and MySQL, with the firewall and security area's be aware of what you are doing there, if you are going to use IPTables and SELinux make sure you know how they work. The rest of the packages are listed in the Karl's Place link.

After you have your system booted, make sure you allow access to your web site by removing

deny from all

from the /etc/httpd/conf/httpd.conf file.

Start the apache service:
service httpd start

Make it start automaticly
chkconfig httpd start

Start MySQL service
service mysqld start

Make it start automaticly
chkconfig mysqld on

After these services are installed and running is when I installed the DAG repository then I did the snmp install:
yum install snmp

then started snmp service
service snmpd start

and set it to automaticly start
chkconfig snmpd start

after that you can follow the rest of the instructions on the cacti install to install the database and create the DB user.

Also, I never set the crontab job to run the cacti script every five minutes. I wasnt using it that intensely and it did update my graphs afterwards.

I will try to do these steps again by friday and post some screen caps with how I configured some basics in Cacti, until then.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Administration

Vista Tip

by Stephen 10/27/2008 5:59:48 PM

So here is something that I keep getting asked, "How do I enable telnet in Vista?" Now this isn't telnet server, but the client. So let me get to it.

Fist you want to go to Control Panel > Programs > Turn Windows features on or off

image

Scroll down to the lower part and select the box for Telnet Client

image 

It will take a few moments to configure, but you do not need to use the Vista DVD. It does take a few moments, but that is all it takes.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Administration

Tip of the week

by Stephen 8/21/2008 8:16:00 PM
So how about this for a weekly update. Nothing happening and nothing going on. Lets see if I can do a weekly tip. Today will be a Linux tip, specifically the Red Hat based distributions. So you want to know what is loading when you start the machine. There is the command chkconfig, that when run shows you the options you can use.

       chkconfig --list [name]
       chkconfig --add name
       chkconfig --del name
       chkconfig [--level levels] name <on|off|reset>
       chkconfig [--level levels] name

so with chkconfig –list it will show you everything that you can enable and disable on the box, I am not listing it here for space/time reasons, also I am not near a linux box at the moment.
So chkconfig shows you everything running, so next let us combine it with a pipe and a grep
chkconfig –list | grep on

This will show you on the services that are turned on, all of them, no matter what run level as long as it is on.

Lets say you are looking for mysql, so you can get specific on it and do
chkconfig –list | grep mysql
if it shows as being off just do a
chkconfig mysql on
and that will turn it on for run levels 3, 4, and 5.

That is it for tonight.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Administration

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen
Hacked by Stephen McGroarty
Content © Stephen McGroarty


About the author

Stephen Mcgroarty - Avatar Stephen McGroarty

I am a Microsoft Certified Professional with Windows 2003 Server. I have a firm understanding of Linux, Windows, and everything needed for both workstation and servers.

E-mail me Send mail

Calendar

<<  February 2012  >>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910

View posts in large calendar

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012