VMware Server 1.x: Windows guest clock

systems No Comments »

In case one uses the Intel SpeedStep technology with a Linux host (Ubuntu 6.10 here) the clock on a Windows XP guest could be running too fast or too slow even if enabling “Time synchronization between the virtual machine and the host operating system” in VMware Tools. In order to correct this behavior the following settings in /etc/vmware/config could help:

host.cpukHz = 1830000
host.noTSC = TRUE
ptsc.noTSC = TRUE

The host.cpukHz settings needs to be set to the actual value of your processor. If you are unsure about it try to take a look at /proc/cpuinfo:

user@host: [~] cat /proc/cpuinfo |grep "model name"
model name : Genuine Intel(R) CPU T2400 @ 1.83GHz
model name : Genuine Intel(R) CPU T2400 @ 1.83GHz

So if you multiply 1.83 by 1000000 you will end up with the value required, e.g. 1,83*1000000 (http://en.wikipedia.org/wiki/Khz).

Windows CMD:Finding Files and Counting Lines

systems No Comments »

Finding files

C:\> cd c:\windows\system32
C:\> dir /s /b wmic.exe

C:\> dir /s /b c:\windows\system32\wmic.exe

It looks like this command would only find a wmic.exe if it is system32 itself, but it actually looks through system32 and all of its subdirectories

C:\> dir /s /b c:\windows\system32 | find “wmic.exe”

Counting lines

There is no wc command built in, but here is a method I use:

C:\> dir /b c:\temp | find /c /v “~~~”

C:\> tasklist /fi “imagename eq svchost.exe” | find /c /v “~~~”

C:\> type c:\windows\win.ini | find /c /v “~~~”

Shell: Remove carriage returns from Windows file

systems No Comments »

One way would be to use the dos2unix command. If this is not available another approach would be to utilize vi as it is mostly installed on Unix machines. Start vi with the file as argument and enter the following command:

:%s/.$//

AIX: start/stop daemons

systems No Comments »

stopsrc -s sendmail
startsrc -s sendmail

Bash: Set fancy prompt

systems No Comments »
export PS1="u@h:[W] $"
export PS1="u@h:`pwd -P` >"
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in