Saturday, 28 June 2014

Breast Cancer Awareness

Have you seen some (more) silly status on Facebook reciently. Well it is the latest Breast Cancer Awareness campaign.
You will see one of the following status reports.

  1. Dang diarrhea! 
  2. Just used my boobs to get out of a speeding ticket 
  3. Anyone have a tampon? I'm out.
  4. How do you get rid of foot fungus? 
  5. Why is nobody around when I'm horny? 
  6. No toilet paper goodbye socks! 
  7. Someone offered me a job as a prostitute but I'm hesitant.
  8. I think I'm in love with someone what should I do? 
  9. I've decided 2 stop wearing underwear. 
  10. It's confirmed.. I'm going to be a daddy/mommy. 
  11. I really don't know how 2 tell anyone and I'm sick of hiding it I'm gay.
  12. Guess it was 2 good 2 b true I'm pregnant. 
  13. Just won $1900 on a scratch card 
  14. I've just found out I've been cheated on for the past 5 months.

If you are female then they will contact you getting you to put one of the above status on Facebook.

Friday, 28 December 2012

Telecommuters Work Longer Hours than Office Goers

When someone says “telecommuting,” do you picture yourself easing into the workday in a pair of fuzzy slippers? Does your boss think the same?
The reality is, far from this. Because a new study shows that folks who work at home at least some of the time put in more hours than those who stay at the office.
Telecommuting for a portion of the work week certain has its appeal.
  • Avoiding the time and cost involved in commuting
  • Having a more flexible schedule
  • A better work-life balance
Are all potential pluses. But are employees really able to take advantage of such work-at-home perks?
Researchers took advantage of labor information from census bureau surveys and were surprised by what they found. First off, the proportion of people who work remotely remained unchanged from the mid-’90s to the mid-2000s the most recent data available. Second, those who do telecommute are more likely to work overtime, an additional 5 to 7 hours on top of the standard 40.
This means that people who work from the comfort of home are not slackers in slippers.
They’re more likely tech-savvy self-starters—who don’t know when to stop.
That’s according to work published in the journal MonthlyLabor Review. [Mary C. Noonan and Jennifer L. Glass, The hard truth about telecommuting]

Monday, 17 December 2012

Correcting Unix Clock Drift on Hyper-V

I recently had a problem where my CentOS 5 virtual machine running on Hyper-V on Server 2008 R2 was gaining time quite dramatically.

Initially, I turned off "Time synchronization" in the Integration Services section of the Hyper-V settings for the CentOS virtual machine. This did help a bit, but it was still far to inaccurate and too much for NTP to correct.

After a bit of Googling, here is what I did to correct the clock inaccuracy problem:

Modify the kernel boot options by editing [/boot/grub/grub.conf] and adding the line "divider=10 clocksource=acpi_pm" (for 32-bit) or "notsc divider=10" (for 64-bit) after the appropriate kernel line, as below.


# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/hda5
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-308.20.1.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-308.20.1.el5 ro root=LABEL=/ selinux=0 notsc divider=10
        initrd /initrd-2.6.18-308.20.1.el5.img
title CentOS (2.6.18-274.17.1.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-274.17.1.el5 ro root=LABEL=/ selinux=0
        initrd /initrd-2.6.18-274.17.1.el5.img



Now to configure NTP, you might need to install it first with yum install ntp

The following is the [/etc/ntp.conf]. Note that you should normally change 0.centos.pool.ntp.org to something specific to your country, for example, 0.uk.pool.ntp.org, and the same for the other ntp servers here, and in [/etc/ntp/step-tickers] in below. See www.pool.ntp.org/en for more information on the NTP pool and which servers you should use.


tinker panic 0
restrict 127.0.0.1
restrict default kod nomodify notrap
server 0.uk.pool.ntp.org
server 1.uk.pool.ntp.org
server 2.uk.pool.ntp.org
server 3.uk.pool.ntp.org

# Dont use local clock
#server 127.127.1.0     # local clock
#fudge  127.127.1.0 stratum 10

# Drift file.
driftfile /var/lib/ntp/drift

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

# Specify the key identifier to use with the ntpq utility.
#controlkey 8



The conf directive "tinker panic 0" instructs NTP not to give up if it sees a large jump in time. This is important for coping with large time drifts and also resuming virtual machines from their suspended state. The directive "tinker panic 0" must be at the top of the ntp.conf file.

It is also important not to use the local clock as a time source, often referred to as the Undisciplined Local Clock. NTP has a tendency to fall back to this in preference to the remote servers when there is a large amount of time drift.
An example of such a configuration is:
server 127.127.1.0
fudge 127.127.1.0 stratum 10
Comment out both lines.

Now for the step tinker file. This is to get the time to synk up at a reboot and not rely on the hardware. So add / edit the file [/etc/ntp/step-tickers]:


0.uk.pool.ntp.org
1.uk.pool.ntp.org
2.uk.pool.ntp.org
3.uk.pool.ntp.org


Now everything is ready for the CentOS to look after it's self we just need to set the time correctly.


If you want to get the time closer set the time with the date command:
e.g. for 18th December 2012 at 10:00 am use
date 1218100012
This will stop ntp getting in a flap when the time is a long way off , and makes the correction quicker.
Then set the synchronise the time manually:
ntpd -q
Set the hardware clock to the newly synchronised time:
hwclock --systohc
Set up ntpd to automatically run and synchronise the time, as below:
chkconfig ntpd on
Now reboot the server and everything should be OK.

Just to add on a windows 2008 server use
w32tm /config /syncfromflags:manual /manualpeerlist:0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org
w32tm /config /update
w32tm /resync
to get it to check the time and
w32tm /stripchart /computer:time.windows.com /samples:3 /dataonly
to check the time

Thursday, 15 November 2012

Directory Listing Order

When in DOS if you type dir you get a directory listing in the order the machine finds the entries. I preferred them ordered.
So when on a new machine I use the following.
setx dircmd "/OG /ON"
This puts all the directories first and lists everything in alphabetical order. Again like the last blog you might need to log out and log back in to see if it is working.

P.S. to see the results straight away use

set dircmd=/OG /ON

Wednesday, 14 November 2012

Setting a command prompt on Server Core

Ok so have a nice new instillation of server core, First shock there is no GUI, but it is server core so what did you expect!

This now old school server administration, but I find that the prompt that they give you is a bit lame and does not really help you very much. So the first thing I do is run the following.

setx prompt "[%computername%]$_$d$s$t$_$p$_$g"

But after doing this you see not change!

You have to log out and then back in again to see the result. Now your command prompt has changed from

C:\users\Administrator.domain>_

to

[SERVER]
14/11/2012 10:59:38.74
C:\Users\Administrator.domain
>_

Far more useful.

P.S. to see the results straight away use

set prompt=[%computername%]$_$d$s$t$_$p$_$g

Wednesday, 26 September 2012

Breast Cancer Awareness (Yet again)

Here we (yet) again, silly posts on Facebook with women putting in things like
‎7 inches - 5 minutes
Shoe size is used again. Can't they be a bit more imaginative.


Inchestheir shoe size
Minuteshow long they do their hair


Thursday, 14 June 2012

Breast Cancer awareness (again)

It is that time again. :(

Women all over Facebook are posting a fruit as a status. So here is the list.

Blueberry
I’m single
Pineapple
It’s complicated
Raspberry
I’m a touch and go woman
Apple
Engaged
Cherry
In a relationship
Banana
I’m married
Avocado
I’m the “other one”
Strawberry
Can’t find the right one
Lemon
Wish I was single
Grape
Wants to get married.