How to rename a Redhat system.

Thursday, September 13th, 2012

Every once in awhile there is a need to rename a Redhat box.  Normally, I would prefer to reload them but there are times where the setup must be retained or the setup is relatively clean and reusable.

Renaming a Redhat box is easy.

1) vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=computername
GATEWAY=xxx.xxx.xxx.254
NISDOMAIN=domain.com

2) change the entry for HOSTNAME= to the new hostname.

NETWORKING=yes 
HOSTNAME=newcomputername
GATEWAY=xxx.xxx.xxx.254 
NISDOMAIN=domain.com

3) change the system names in /etc/hosts

There have been times where the hosts file remains unchanged.  Edit the file for the new names.

4) reboot the system and the new name should take effect.

Don’t forget to update DNS and NIS!

 
 

How to check physical RAM size with Redhat

Tuesday, September 11th, 2012

Company acquisitions always create “fun” when it comes to incorporating their usable equipment into the network.  The question of RAM will always get asked as small companies don’t always purchase large amounts of RAM for workstations and servers.

If you have a Redhat system and need to know the amount of physical ram, you can always look at meminfo.

Simply log into the system in question and enter : cat /proc/meminfo

The first two lines will answer your memory questions.

$ cat /proc/meminfo

 MemTotal:      16407060 kB
 MemFree:       12975592 kB
 Buffers:         228412 kB
 Cached:         2772496 kB
 SwapCached:           0 kB
 Active:         1248472 kB
 Inactive:       1927324 kB
 HighTotal:            0 kB
 HighFree:             0 kB
 LowTotal:      16407060 kB
 LowFree:       12975592 kB
 SwapTotal:      8385920 kB
 SwapFree:       8385920 kB
 Dirty:              236 kB
 Writeback:            0 kB
 Mapped:          203428 kB
 Slab:            221056 kB
 CommitLimit:   16589448 kB
 Committed_AS:    343556 kB
 PageTables:        7692 kB
 VmallocTotal: 536870911 kB
 VmallocUsed:     267100 kB
 VmallocChunk: 536603263 kB
 HugePages_Total:      0 kB
 HugePages_Free:       0 kB
 Hugepagesize:      2048 kB

$

wscript.echo without a charriage return.

Saturday, August 25th, 2012

I was writing a small script to obtain and display server network information.   Part of a project to re-ip a network.

One thing I wanted to have was formatted output and found wscript.echo was adding a carriage return to the output. I looked around to see if there was a way to disable it.

wscript.echo does this by design. There is no way to disable it.

The way to get around this is to use : Wscript.StdOut.Write

For example:

Wscript.StdOut.Write (“Enter something: “)

Wscript.StdOut.Write “You entered : ” & Wscript.StdIn.ReadLine

You will have to add is a “vbCrLf” at the end to cause a CR.

What does the Dell Power lights mean?

Saturday, August 25th, 2012

Recently, I was asked what the amber 4 light meant and I had a machine which was flashing the 1 and 3 light. These could be found in a service manual, but who keeps those let alone read them these days.

A quick check of the Dell site found a document on diagnostics.

The 4 light meant a system was in recovery mode after bios pulled a checksum error.  A quick correction eliminated this condition.

The flashing 1 and 3 light was a bad PSU. A service call was made for this particular machine.

Shall I keep a service manual now?  Probably not. If I do, then this problem will probably never happen again. 😉

 

What do the color buttons mean on Microsoft Office communicator?

Monday, April 23rd, 2012

Every once in awhile I will get a question about what do the color buttons mean with MOC?

There presence buttons serve to tell you the availability status for MOC sessions. The common colors seen are red, green, yellow, green-yellow and redish-white(kind of a pink?).

Red – This means do not disturb. It is manually set or appears when a user is has a scheduled event in the outlook calendar.

Green – The user is available for chat.

Yellow – This means away or out of office. This can happen when a user sets it, the office assistant was set, or more often the computer was idle for 15 minutes.

Green-Yellow – The person might be available. This happens when the user’s system has been idle for five minutes (default).

White with Red hue – The person is not available. This can happen if the person configured it or communicator is not running.

 These are the basics and  I have found most people figure this out on their own. If a person want’s to read more about it, there is a Presence Survival Guide provided by Microsoft.

Solaris network link information

Saturday, April 21st, 2012

Though Solaris is slowly disappearing(at least at my current company), there are still legacy machines which will remain and sometimes you have to debug them especially over network speed. Solaris has a legacy of having problems with auto-negoting.  Sometimes you may think you are running full-duplex and you are not.

If you have access to the network switch, it’s easy to check. If you don’t you have to rely on solaris commands.

The NDD command will give you configuration information on the interface.

For example:
# ndd /dev/bge0 link_duplex
2
# ndd /dev/bge0 link_autoneg
1
# ndd /dev/bge0 link_status
1
# ndd /dev/bge0 link_speed
1000

Here duplex is full with auto-negotiating off and the link is down.

NDD can do much more but I only needed to check the interface settings.

Excel can’t paste formatted text.

Saturday, April 21st, 2012

I had an odd excel issue today.  My co-worker asked if I had seen a situation where you loose the ability to paste formatted text to a spreadsheet.

I had a look at his office 2010 setup and nothing obvious was missing and there were no error messages to suggest a problem.

I right-clicked a cell and selected “Paste Special..” and found the only option left was unicode text.

Even though I knew it would not solve it; I ran a repair on office.

I checked around the Net and found a few suggestions to edit the cells via vba through the alt-F11 command but they did not solve the problem.

I searched the Microsoft site and found an article  about the clipboard loosing the ability for format pasting.

The problem seems to center around the use of Skype’s Click to Call.

This seemed odd but we tried disabling it on the browser and the add-ons for Excel and Word. The problem remained.

We ended up uninstalling Click to Call and after restarting the browser and Excel; we found the ability for formatted pasting had returned.

Lesson of the day: The integrated clipboard can cause problems after installing new software.

RIP Jack Tramiel

Wednesday, April 11th, 2012

 

The great Commodore founder died.  Another legend is gone. 

I remember learning basic and playing archon on one.

Loading via cassette took forever. Ahhh the old days.

.

File \$WIN_NT$.~BT\halaacpi.dll could not be loaded. The error code is 14

Friday, April 6th, 2012

I had a request to setup Windows 2003 non R2 on an HP DL 360 G6.  I used the SmartStart CD version 8.7 for 32 bit operating systems.

The process ran through the basic setup, copied the files and on the first reboot, I found the following message:

File \$WIN_NT$.~BT\halaacpi.dll could not be loaded.

The error code is 14

An odd message since it basically means it’s out of memory and didn’t have enough storage to complete the operation.

A check on the Net; suggested using SmartStart 8.6.  But, I was rather surprised to find somebody at HP messed up as I received “file not found” messages on all the smartstart download links.  A few of the driver downloads would not work as well.  I verified this by accessing their ftp site and found files were missing.

I decided to try the R2 version of 2003.  I only used the first CD since it’s basically the original release and the second CD makes it R2.

This time the OS installed without issue.

Restart windows service from Linux

Monday, April 2nd, 2012

I had a request on how to restart the three LSF services from a script. The person worked on the farm team and did not relish the idea of using remote desktop or VNC.

I thought about a Powershell script or using a batch script to run the PsService from sysinternals. It looked simple as the command is as follows:

psservice \\<computer> -u <domain\username> -p password stop service <service name>

psservice \\<computer> -u <domain\username> -p password start service <service name>

I contacted the user and asked a couple more questions and learned she wanted to run the script from Linux. Of course this required a change in my approach as I like to keep things as simple as possible especially when a user will write their own script. I decided to abandon windows scripts and find away to see if Linux could handle this via the windows management interface.

Looking around the Net, I found a way I didn’t even consider. Simply install the Samba-Common. This offers the Net utility(or as close to it as possible) for the Linux host. The particular command in question is Net RPC service command:

To list out the services on a Windows computer:

net rpc service list -I <IP Address> -U “<domain\username>%<password>”

If you wish to use the command line; simply remove “%<password>” and you will be prompted for a password.

To start or stop a service; you would enter:

net rpc service {start|stop} <Service Name> -I <IP Address> -U “<domain\username>%<password>”

Again, if you wish to use the command line, simply remove “%<password>” and you will be prompted for a password.

The account used will have to have local admin privileges so if you decide to script it, secure the file to yourself since the password will be plain text.

Much as I would like to impress you with my great knowledge; there was a sense of urgency to the request so I went to the Net and I did get help from the following sites so credit must be given where credit is due.

LifeHacker

Commandlinefu

LyleBackenrorth