November 12th, 2008
I don’t think servers should ever need to be rebooted. I have a cluster set up with VMotion, but I just don’t like the idea that I need to reboot the server to stop one VM. That’s why I got so frustrated when one of my VM’s got a repeating message saying the redo log was corrupt. Every time I clicked OK, I got the same message. Normally I would need to reboot the host and remove the redo logs. Here is a better way I found on a blog:
1. Log into your box and find the VM.
#cat /proc/vmware/vm/*/names
2. Your VM will have a 4 digit number. Then, find the ID to kill (replace 1111 with your number):
# less /proc/vmware/vm/1111/cpu/status
3. Under “group” find the vm.2222. Then type this command to kill the machine:
/usr/lib/vmware/bin/vmkload_app -k 9 2222
Posted in VMWare | No Comments »
October 30th, 2008
So we had this propriatary Java program that processed files targeted by an extention name. When we upgraded another piece of the software, the case of the extention changed. We could not get the source of the Java programs include files. Temporarly we had to rename all of the files with upper case extentions. Here is what we came up with:
For /F “tokens=1,2* delims=.” %%f In (’Dir /B *.pbs’) Do move “%%f.%%g” “%%f.PBS”
This is a batch file. For command line only, remeber to remove one % for each variable.
Posted in Windows | No Comments »
September 19th, 2008
We at work wanted to clearify that we don’t in fact need client access license for our 700 users if we are running 3rd party software on a Windows box. The answer is shocking.
To start with, lets look at the license agreement.
Client Access Licensing Requirements
- Every user or device that accesses or uses the Windows Server 2008 server software requires the purchase of a Windows Server 2008 Client Access License (Windows Server CAL) except under the following circumstances:
- If access to the instances of server software is only through the Internet without being authenticated or otherwise individually identified by the server software or through any other means
- If access is to Windows Web Server 2008
- If external users are accessing the instances of server software and you have acquired a Windows Server 2008 External Connector license for each server being accessed
- For up to two devices or users to access your instances of the server software only to administer those instances
My question was, “What constitutes server software?” The answer I got is if you are connecting to the server, you are using Windows sockets.
A phone call to Microsoft confirmed this.
Common practice today is that if you run a service like Lotus Notes or Apache on a Windows machine, you pay for the Server OS and Lotus Notes client access licenses. With this clarification from Microsoft, you also pay for Windows CALs.
This seems insane to me that Microsoft would take this posistion. It makes Red Hat and Suse Linux support almost free in comparison. Calls to the software business allience now will practically force companys to shell out hundreds of thousands to Microsoft, or convert to Linux.
Posted in Windows | No Comments »
August 11th, 2008
I needed to automate renaming log files because the size of the log file was slowing down the application. Here is the resulting batch file.
@echo off
set CURRDATE=%TEMP%\currdate.tmp
date /t > %CURRDATE%
set PARSEARG=”eol=; tokens=1,2,3,4* delims=/, ”
for /f %PARSEARG% %%i in (%CURRDATE%) do set YYYYMMDD=%%l%%k%%j
ren file.log file_%YYYYMMDD%.log
Posted in Scripts, Windows | No Comments »
August 9th, 2008
A few years ago I automated account creation for an organization. Here is one of the scripts I sill use today.
echo off
REM Student extract processing script
REM
REM Finds the adds and deletes from the sasi export files
REM and saves them to adds.txt and dels.txt
REM
REM Alex trusler
REM
REM Please verify the GnuWin32 bin dir including CoreUtils,
REM DiffUtils, and Grep is in your path before executing script.
REM These tools are available at
REM gnuwin32.sourceforge.net
REM ——————————————————-
REM if %2 is NULL then display usage
if exist %2 goto else
echo —
echo —
echo usage: %0 [file1 old] [file2 new]
echo —
echo This script will save the output files
echo in your WORKING directory so change your directory
echo to your target directory.
echo —
echo Also, you can drag the batch file to the command window,
echo Then type a [space], then drag the old Stufile, [space]
echo then drage the new Stufile. Saves a lot of typing.
echo —
echo Please verify the GnuWin32 bin dir including CoreUtils,
echo DiffUtils, and Grep is in your path before executing script.
echo These tools are available at
echo gnuwin32.sourceforge.net
pause
goto eof
:else
REM compair the file from the last import to the current file.
sort %1 > temps1
sort %2 > temps2
diff –ignore-case temps1 temps2 > tempdiff
REM format and save the output
grep “> ” tempdiff | cut -b 3-100 > adds.txt
REM Cut the first 16 lines to match only the site and stu ID.
cut -b 1-16 temps1 > temps3
cut -b 1-16 temps2 > temps4
diff –ignore-case temps3 temps4 > tempdiff
REM format and save the output
grep “< ” tempdiff | cut -b 3-100 > dels.txt
REM clean up our garbage
del tempdiff
del temps1
del temps2
del temps3
del temps4
REM Tell the user the script has finished
echo Files adds.txt and dels.txt saved.
:eof
Posted in Scripts, Windows | 1 Comment »
July 15th, 2008
A friend at work showed me this:
You can add additional IP addresses to your interface.
edit /etc/sysconfig/network-scripts/ifcfg-eth0:1
My origonal nic is eth0, subinterface is eth0:1
DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.2
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
HWADDR=00:15:58:73:d8:a9
Then bring up the new interface.
Posted in Linux | 1 Comment »
July 15th, 2008
A friend at work showed me this trick. It’s usefull if you change network cards and need your old MAC address.
ifconfig eth0 hw ether 00:00:00:00:00:00
Posted in Linux | No Comments »
May 15th, 2008
Great.
After updating to service pack 7 on a Dell PowerEdge 2650, the thing locks up a few times a day. I was able to get the Remote Access Card to work and found that it was halting on “Error: Critical Sectioning prevents requested FATFS operation.” It looks like a storage driver issue.
I checked back after disabling the restart on abend option. It looks like rsync was abending and the server could not write to the abend log because it was a serious lock up. I wonder if indeed the storage driver and rsync are not playing well together.
After a few days, ZLS.NSS abended.
SCSI bios is 3.10
I ran a verify. Every time it gets to a certain point, I get an abend.
-UPDATE-
The same thing happened on another Dell 2650. It has to do with the older firmware on these devices. Both servers where simply replaced.
Posted in NetWare | 1 Comment »
May 8th, 2008
A good summery from VMware:
If you change from a multi-processor system to a uni-processor system you need to manually change the HAL on the Windows server after the conversion. To do this go into Device Manager after the machine first boots and discovers it’s new hardware and then click on Computer then right-click on the processor and select Update Driver. Then select Install from specific location and then Don’t search I will choose the driver to install. Then select show All compatible hardware and select the appropriate processor. For example, if you went from a dual cpu to a single cpu then select ACPI uni-processor PC instead of ACPI multi-processor PC. You will need to reboot once you change this. To verify what HAL you are using you right-click your hal.dll in c:\windows\system32 and select the Version tab and select Internal Name and it should say halmacpi.dll for multi-processor acpi and halacpi.dll for uni-processor acpi.
Next clean up all the non-present hardware after the P2V conversion. To do this go to a CMD prompt and type SET DEVMGR_SHOW_NONPRESENT_DEVICES=1 and then DEVMGMT.MSC and then select Show Hidden Devices. Delete any old grayed out hardware.
Next remove any vendor specific applications/drivers. For example on a HP server you should go to Add/Remove programs and remove any HP management agents, survey utility, array config utility, version control agent, etc. Also check your NIC and make sure there are no vendor specific drivers there (ie. teaming). Check the Services to see if all there is anything vendor specific related there and disable any services that are.
Posted in VMWare | 4 Comments »
May 7th, 2008
I always forget the exact code to make one url frame another.
<html>
<head>
<title>insert title here</title>
</head>
<frameset rows="100%,*" border="0">
<frame src="http://www.website.com" frameborder="0">
<frame frameborder="0" noresize>
</frameset>
</html>
<!-- art -->
Posted in Scripts, Web | 1 Comment »