Thursday, September 27, 2007

10 reasons why computers crash


"Fatal error: the system has become unstable or is busy," it says. "Enter to return to Windows or press Control-Alt-Delete to restart your computer. If you do this you will lose any unsaved information in all open applications."


You have just been struck by the Blue Screen of Death. Anyone who uses Microsoft Windows will be familiar with this. What can you do? More importantly, how can you prevent it happening?

1 Hardware conflict

The number one reason why Windows crashes is hardware conflict. Each hardware device communicates to other devices through an interrupt request channel (IRQ). These are supposed to be unique for each device.

For example, a printer usually connects internally on IRQ 7. The keyboard usually uses IRQ 1 and the floppy disk drive IRQ 6. Each device will try to hog a single IRQ for itself.

If there are a lot of devices, or if they are not installed properly, two of them may end up sharing the same IRQ number. When the user tries to use both devices at the same time, a crash can happen. The way to check if your computer has a hardware conflict is through the following route:

* Start-Settings-Control Panel-System-Device Manager.

Often if a device has a problem a yellow '!' appears next to its description in the Device Manager. Highlight Computer (in the Device Manager) and press Properties to see the IRQ numbers used by your computer. If the IRQ number appears twice, two devices may be using it.

Sometimes a device might share an IRQ with something described as 'IRQ holder for PCI steering'. This can be ignored. The best way to fix this problem is to remove the problem device and reinstall it.

Sometimes you may have to find more recent drivers on the internet to make the device function properly. A good resource is www.driverguide.com. If the device is a soundcard, or a modem, it can often be fixed by moving it to a different slot on the motherboard (be careful about opening your computer, as you may void the warranty).

When working inside a computer you should switch it off, unplug the mains lead and touch an unpainted metal surface to discharge any static electricity.

To be fair to Microsoft, the problem with IRQ numbers is not of its making. It is a legacy problem going back to the first PC designs using the IBM 8086 chip. Initially there were only eight IRQs. Today there are 16 IRQs in a PC. It is easy to run out of them. There are plans to increase the number of IRQs in future designs.

2 Bad Ram

Ram (random-access memory) problems might bring on the blue screen of death with a message saying Fatal Exception Error. A fatal error indicates a serious hardware problem. Sometimes it may mean a part is damaged and will need replacing.

But a fatal error caused by Ram might be caused by a mismatch of chips. For example, mixing 70-nanosecond (70ns) Ram with 60ns Ram will usually force the computer to run all the Ram at the slower speed. This will often crash the machine if the Ram is overworked.

One way around this problem is to enter the BIOS settings and increase the wait state of the Ram. This can make it more stable. Another way to troubleshoot a suspected Ram problem is to rearrange the Ram chips on the motherboard, or take some of them out. Then try to repeat the circumstances that caused the crash. When handling Ram try not to touch the gold connections, as they can be easily damaged.

Parity error messages also refer to Ram. Modern Ram chips are either parity (ECC) or non parity (non-ECC). It is best not to mix the two types, as this can be a cause of trouble.

EMM386 error messages refer to memory problems but may not be connected to bad Ram. This may be due to free memory problems often linked to old Dos-based programmes.

3 BIOS settings

Every motherboard is supplied with a range of chipset settings that are decided in the factory. A common way to access these settings is to press the F2 or delete button during the first few seconds of a boot-up.

Once inside the BIOS, great care should be taken. It is a good idea to write down on a piece of paper all the settings that appear on the screen. That way, if you change something and the computer becomes more unstable, you will know what settings to revert to.

A common BIOS error concerns the CAS latency. This refers to the Ram. Older EDO (extended data out) Ram has a CAS latency of 3. Newer SDRam has a CAS latency of 2. Setting the wrong figure can cause the Ram to lock up and freeze the computer's display.

Microsoft Windows is better at allocating IRQ numbers than any BIOS. If possible set the IRQ numbers to Auto in the BIOS. This will allow Windows to allocate the IRQ numbers (make sure the BIOS setting for Plug and Play OS is switched to 'yes' to allow Windows to do this.).

4 Hard disk drives

After a few weeks, the information on a hard disk drive starts to become piecemeal or fragmented. It is a good idea to defragment the hard disk every week or so, to prevent the disk from causing a screen freeze. Go to

* Start-Programs-Accessories-System Tools-Disk Defragmenter

This will start the procedure. You will be unable to write data to the hard drive (to save it) while the disk is defragmenting, so it is a good idea to schedule the procedure for a period of inactivity using the Task Scheduler.

The Task Scheduler should be one of the small icons on the bottom right of the Windows opening page (the desktop).

Some lockups and screen freezes caused by hard disk problems can be solved by reducing the read-ahead optimisation. This can be adjusted by going to

* Start-Settings-Control Panel-System Icon-Performance-File System-Hard Disk.

Hard disks will slow down and crash if they are too full. Do some housekeeping on your hard drive every few months and free some space on it. Open the Windows folder on the C drive and find the Temporary Internet Files folder. Deleting the contents (not the folder) can free a lot of space.

Empty the Recycle Bin every week to free more space. Hard disk drives should be scanned every week for errors or bad sectors. Go to

* Start-Programs-Accessories-System Tools-ScanDisk

Otherwise assign the Task Scheduler to perform this operation at night when the computer is not in use.

5 Fatal OE exceptions and VXD errors

Fatal OE exception errors and VXD errors are often caused by video card problems.

These can often be resolved easily by reducing the resolution of the video display. Go to

* Start-Settings-Control Panel-Display-Settings

Here you should slide the screen area bar to the left. Take a look at the colour settings on the left of that window. For most desktops, high colour 16-bit depth is adequate.

If the screen freezes or you experience system lockups it might be due to the video card. Make sure it does not have a hardware conflict. Go to

* Start-Settings-Control Panel-System-Device Manager

Here, select the + beside Display Adapter. A line of text describing your video card should appear. Select it (make it blue) and press properties. Then select Resources and select each line in the window. Look for a message that says No Conflicts.

If you have video card hardware conflict, you will see it here. Be careful at this point and make a note of everything you do in case you make things worse.

The way to resolve a hardware conflict is to uncheck the Use Automatic Settings box and hit the Change Settings button. You are searching for a setting that will display a No Conflicts message.

Another useful way to resolve video problems is to go to

* Start-Settings-Control Panel-System-Performance-Graphics

Here you should move the Hardware Acceleration slider to the left. As ever, the most common cause of problems relating to graphics cards is old or faulty drivers (a driver is a small piece of software used by a computer to communicate with a device).

Look up your video card's manufacturer on the internet and search for the most recent drivers for it.

6 Viruses

Often the first sign of a virus infection is instability. Some viruses erase the boot sector of a hard drive, making it impossible to start. This is why it is a good idea to create a Windows start-up disk. Go to

* Start-Settings-Control Panel-Add/Remove Programs

Here, look for the Start Up Disk tab. Virus protection requires constant vigilance.

A virus scanner requires a list of virus signatures in order to be able to identify viruses. These signatures are stored in a DAT file. DAT files should be updated weekly from the website of your antivirus software manufacturer.

An excellent antivirus programme is McAfee VirusScan by Network Associates ( www.nai.com). Another is Norton AntiVirus 2000, made by Symantec ( www.symantec.com).

7 Printers

The action of sending a document to print creates a bigger file, often called a postscript file.

Printers have only a small amount of memory, called a buffer. This can be easily overloaded. Printing a document also uses a considerable amount of CPU power. This will also slow down the computer's performance.

If the printer is trying to print unusual characters, these might not be recognised, and can crash the computer. Sometimes printers will not recover from a crash because of confusion in the buffer. A good way to clear the buffer is to unplug the printer for ten seconds. Booting up from a powerless state, also called a cold boot, will restore the printer's default settings and you may be able to carry on.

8 Software

A common cause of computer crash is faulty or badly-installed software. Often the problem can be cured by uninstalling the software and then reinstalling it. Use Norton Uninstall or Uninstall Shield to remove an application from your system properly. This will also remove references to the programme in the System Registry and leaves the way clear for a completely fresh copy.

The System Registry can be corrupted by old references to obsolete software that you thought was uninstalled. Use Reg Cleaner by Jouni Vuorio to clean up the System Registry and remove obsolete entries. It works on Windows 95, Windows 98, Windows 98 SE (Second Edition), Windows Millennium Edition (ME), NT4 and Windows 2000.

Read the instructions and use it carefully so you don't do permanent damage to the Registry. If the Registry is damaged you will have to reinstall your operating system. Reg Cleaner can be obtained from www.jv16.org

Often a Windows problem can be resolved by entering Safe Mode. This can be done during start-up. When you see the message "Starting Windows" press F4. This should take you into Safe Mode.

Safe Mode loads a minimum of drivers. It allows you to find and fix problems that prevent Windows from loading properly.

Sometimes installing Windows is difficult because of unsuitable BIOS settings. If you keep getting SUWIN error messages (Windows setup) during the Windows installation, then try entering the BIOS and disabling the CPU internal cache. Try to disable the Level 2 (L2) cache if that doesn't work.

Remember to restore all the BIOS settings back to their former settings following installation.

9 Overheating

Central processing units (CPUs) are usually equipped with fans to keep them cool. If the fan fails or if the CPU gets old it may start to overheat and generate a particular kind of error called a kernel error. This is a common problem in chips that have been overclocked to operate at higher speeds than they are supposed to.

One remedy is to get a bigger better fan and install it on top of the CPU. Specialist cooling fans/heatsinks are available from www.computernerd.com or www.coolit.com

CPU problems can often be fixed by disabling the CPU internal cache in the BIOS. This will make the machine run more slowly, but it should also be more stable.

10 Power supply problems

With all the new construction going on around the country the steady supply of electricity has become disrupted. A power surge or spike can crash a computer as easily as a power cut.

If this has become a nuisance for you then consider buying a uninterrupted power supply (UPS). This will give you a clean power supply when there is electricity, and it will give you a few minutes to perform a controlled shutdown in case of a power cut.

It is a good investment if your data are critical, because a power cut will cause any unsaved data to be lost.

Some handy Solaris commands - just a reference to useful options and commands.

set path to something like
PATH=/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin:/usr/platform/`uname -i`/sbin:/usr/proc/bin:/usr/ucb/:/usr/dt/bin:/usr/openwin/bin:/usr/local/bin:$HOME/bin

df -n (or fstyp device)

show type of file system (ufs/vxfs)

fuser and pfiles

open files

prtconf -V

OBP level

pgrep, pkill, prstat -a

process info and manipulation

logins -p|-d

local users without passwords | duplicate uids

mpstat, prtdiag, psrinfo -v

processor information and more

traceroute

since Solaris 7

troff -man man.1 | dpost | lp

print old style man pages

sgml2roff lpfilter.1m | troff -man | dpost | lp

print sgml (new) man pages

fstyp -v

list superblock including minfree %

tput

nice screen output

what, ldd, strings

information about binaries

ctrl-V in vi

insert control character

ftp> get README | more

ufsdump 0f - /filesystem | (cd /mnt; ufsrestore rf -); rm /mnt/restoresymtable

dump restore pipe

echo 007

get bell to ring

comm

common (non-common) lines from two files

pkgchk -lp /usr/bin/ls

which package does ls belong to?

df -oi -F ufs

free inodes

icheck -b blockno filesystem

block to file mapping

dircmp, rsync, filesync

compare directories, sync utilities

nohup /var/tmp/myscript.ksh > /var/tmp/myscript.out &

for things which have to complete (no risk of terminal being logged out)

netstat -pn

arp like output when name services are down

pwdx, pldd, ptree

and more in /usr/proc/bin

uname -X

basic system information - one item on each line (useful for scripts)

read

read a line

listusers

another way of listing users

tcopy

copy tape

nfsstat -m (or check /etc/rmtab)

current nfs mount

clear_locks

clear nfs locks

df -h, du -h, ls -lh

since Solaris 9 - output in powers of 1024

Tuesday, June 19, 2007

DOS Commands

One of the most efficient and faster way of doing things in Windows XP is to use DOS Commands. Here is a list of most useful DOS Commands used in Windows XP operating System. To open command prompt, type cmd in Run in Start Menu and hit enter. If you want help for any command mentioned below, type command name followed by / and ? like this one assoc /? will display help information for assoc. If ? alone is typed followed by enter at command prompt, it will display list of all commands.


1. assoc – Displays which programs will open the file with .xyz extension


It can be used either to displays or modifies file extension associations. If you just type assoc then it will display the list of all files extension and associated a program which is used to open that file. For example, assoc .doc will show you the name of program which the file is associated with.


2. attrib – Displays and changes file attributes (i.e. make hidden file visible)


It displays, sets, or removes the read-only, archive, system, and hidden attributes assigned to files or directories. For example, if you want to edit boot.ini file which is a hidden file then you can use attrib command to unhide it and edit it with edit command.

Attrib tips: 1. “+” - Adds an Attribute 2. “–“ Removes an Attribute

Example: c:>attrib resume.doc +hc:>attrib rk-resume.doc +a -h

All Switches: a r h s where a = Archive, r = Read-Only, h = Hidden, s = System


3. bootcfg- Configures, queries, or changes Boot.ini file settings


For example: if you have two OS installed in your computer and you want to change the time in seconds after which default OS will be loaded, use this command bootcfg /timeout 10 where 10 stands for 10 seconds.


4. chdir or cd – Displays a list of files and subdirectories in a directory and also can change Directory or folder (i.e. Directory is called folder in windows world)

It displays the name of the current directory or can change the current folder. It will display the name of the current drive and folder if used like this c:>cd.

Some more examples:

Folder by folder method: c:>cd winnt; c:winnt>cd system32

Absolute path method: c:>cd c:winntsystem32

Move to parent folder: c:>cd..

Move to root folder: c:>cd/


5. chkdsk – Checks a disk and displays a status report


This command will check the disk for errors and corrects them if instructed so to do with the use of switches. If is used without parameters, chkdsk displays the status of the disk in the current drive. This is one of the handy tools for me. Whenever I have doubt that my HDD might have some problem I run this command chkdsk /f / r in command prompt.


6. chkntfs – Displays or modifies the checking of disk at boot time


It displays or specifies whether automatic system checking (chkdsk) is scheduled to be run on a NTFS volume when the computer is started. It is mostly used with switches. If no switch is specified, chkntfs will display if the specified drive is dirty or scheduled to be checked on next boot.

Example: chkntfs c:


7. cipher - Displays or alters the encryption of folders and files on NTFS volumes


If it is used without parameters, cipher displays the encryption state of the current folder and any files it contains.


8. cls - Clears the Command Prompt window screen


If you have been typing lot of DOS command in command prompt and your screen is full with command then try cls. It will clear the screen.


9. comp – Compare the content of two files or set of files


This utility is similar to diff in Linux Operating System


10. control – Launch Control Panel from command prompt


This is applicable in Windows XP only. This is unpublished command and only used in windows XP. This allows you to launch control panel applets from the command line.


11. Copy – copy one or more files to another location


Here is the example how it can be used to copy files from one location to another. This command is always used in this format :

Copy “path of file to be copied” “path of the location where file has to be copied”

Example:

c:>copy myresume.doc c:resumeExample

c:>copy a:resumerk-resume.doc c:tempresume


12. defrag – Defragmentation


This command is very helpful when you experience that your computer is very slow. First you delete all the windows temp files and internet temporary files and then run this command to defrag the hard disk. This will locate and consolidate fragmented boot files, data files, and folders on local volumes.


13. del - Deletes one of more specified files


Use it with cautious. This will delete specified file from hard disk. Use it only if you are comfortable with DOS and know difference between directories, folder or files.

Delete from current directory: c:>del myresume.doc

Delete From Absolute Path: c:>del c:resumerk-resume.doc


14. dir - Displays a list of a directory's files and subdirectories


If it is used without parameters, dir displays the disk's volume label and serial number, followed by a list of directories and files on the disk, including their names and the date and time each was last modified. For files, dir displays the name extension and the size in bytes. dir also displays the total number of files and directories listed, their cumulative size, and the free space (in bytes) remaining on the disk.

Some examples:

Lists the contents current directory: c:>dir

Lists Contents of absolute path: A:documentspicturesbitmaps>dir c:”program files”

Switches: /w /p /s

Sorting Switches: /oe /oen /od /on /one /x

Wildcards: * ?

Wildcard usage: c:/windows/system32>dir *.exe – will display files with .exe extension or c:/windows/system32>dir *.* - will display the file with any extensions.


15. driverquery - Displays a list of all installed device drivers and their properties.


16. fcFile Compare


Compares two files or set of files and displays the differences between them


17. find – Advanced file search with filter capability


It Searches for a specific string of text in a file or files. After searching the specified file or files, find displays any lines of text that contain the specified string.

For example, I have a file called resume.doc in c driver and I want to search word “resume”. You can do it with or without filterWithout filter:

find “resume” c:resume.doc – this will search the file resume.doc only for word “resume”

dir c: /s /b find "resume" – this will search complete hard disk to find word “resume” using filter


18. getmac - This command displays the Media Access Control (MAC) address for one or more network adaptors on system


It is very useful for IT professional.


19. gpresult -


This utility generates a summary of the user settings and computer group policy settings.


20. gpupdate


you can use this utility to manually apply computer and user policy.


21. help – This provides help information for windows command


If it is used without parameters, help lists and briefly describes every system command. If you want to get help for command dir, just type help dir in command prompt and hit enter to see the details about dir command.


22. hostname – shows what is name of your computer


It displays the host name portion of the full computer name of the computer.


23. ipconfig – Windows IP Configuration tool – very useful for IT professional


It displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. If it is used without parameters, ipconfig displays the IP address, subnet mask, and default gateway for all adapters. Type ipconfig /? in command prompt to get more help.


24. mkdir or md - Creates a directory or subdirectory


mkdir creates any intermediate directories in path, if there it is not already there.


25. mmc - Microsoft Management Console (MMC)


If you are using the mmc command-line options, you can open a specific MMC console, open MMC in author mode, or specify that the 32-bit or 64-bit version of MMC is opened.


26. mode – configure system devices like COM ports etc


If it is used without parameters, mode displays all the controllable attributes of the console and the available COM devices. This is very useful for IT Professional to know the device setting like COM settings.


27. more - Displays one screen of output at a time


This is always used with another command.

For example, dir *.* more will show the result one screen at a time.


28. move - move files and rename files and directories


It moves one or more files from one directory to the specified directory.

Example - c:>move resume.doc c:resumefolder


29. msconfig - Windows configuration tool


This is an ultimate tool to change the services and utilities that start when your Windows machine boots up. Type this command in run directly.


30. narrator – Let your computer to dictate text to you


This is turns ON the system narrator. It can also be found in accessibility options in control panel.


31. nbtstat – NetBIOS Statistics


It displays NetBIOS over TCP/IP (NetBT) protocol statistics, NetBIOS name tables for both the local computer and remote computers, and the NetBIOS name cache. This is useful for IT professional.


32. netstat – Displays protocol statistics and current TCP/IP Connections


It displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics - for the IP, ICMP, TCP, and UDP protocols, and IPv6 statistics - for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols. If it is used without parameters, netstat displays active TCP connections.


33. netsh - A network configuration tool console


when you type netsh in command prompt, netsh> prompt appears. You can use different netsh command here. Type '?' in netsh command to list all the available command and type "exit" to get back to a command prompt.


34. nslookup –It displays information that you can use to diagnose DNS (Domain Name System) infrastructure.


This command-line tool is available only if the TCP/IP protocol is installed in your computer. It is an useful tool for IT Professionals.


35. pathping – Know packet loss at any given router or link


It provides information about network latency and network loss at intermediate hops between a source and destination. As it displays packet loss at any given router or link so it is very helpful in determining which routers or subnets might be having problem in the network. This is the most useful tool for a network professional. If it is used without parameters, pathping will display help.


36. perfmon – See the performance of your windows XP


This allows you to open a Windows XP Performance console which is already configured with settings files from Windows NT 4.0 version of Performance Monitor.


37. ping – Check if your network connection is OK


This command is used to check the IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) Echo Request messages. Then the another computer sends back the Echo Reply message, along with round-trip times. Ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution. If it is used without parameters, ping displays help.


38. recover - This command can recover readable information from a damaged disk and is very easy to use.


Consult the online command reference in windows xp help before using this command.


39. reg – Console Registry tool for windows (Don’t use it if you don’t already know about it)


It can add, change, and display registry subkey information and values in registry entries.


40. regedit – Registry Editor (Don’t use it if you don’t already know about it)


41. rmdir or rd – It removes (i.e. deletes) a directory


Removes a Directory: c:resume>rd temp-resume


42. route – It displays and modifies the entries in the local IP routing table


If it is used without parameters, route will display help.


43. schtasks – Schedule Task


This schedules commands and programs to run periodically or at a specific time. It can also add or remove tasks from the schedule, starts and stops tasks on demand, and displays & changes scheduled tasks.


44. shutdown – It allows you to shut down or restart your computer

If it is used without parameters, shutdown will display help.


45. start – This starts a separate Command Prompt window to run a specified program or command


If it is used without parameters, start opens a second command prompt window.


46. sigverif - verify driver signature in Windows XP only


Microsoft has created driver signatures to maintain the integrity of your system. Critical files have been digitally signed so that any changes to these files can be quickly detected. A signed driver is Microsoft tested and approved. You can check the drivers to verify that if they are all intact by typing sigverif in command prompt.


47. sysedit - System Configuration File Editor


This is an old tool that was very handy for the Windows 9X days. But msconfig is used in place of sysedit now days.


48. systeminfo – Know your Computer configuration


It displays detailed configuration information about your computer and its operating system. It includes operating system configuration, security information, product ID, and hardware properties, such as RAM, disk space, and network cards etc.


49. sfc - System File Checker


This is also very useful command. It scans and verifies the versions of all protected system files after you restart your computer.


50. tasklist – Know what programs are running currently on your computer


It displays a list of applications and services with their PID (Process ID) for all tasks running on your computer.


51. taskkill – Close the application from command prompt


You can close any tasks or application currently running directly from command prompt. Only thing you should know is the PID of that particular task. You can find out the PID by running tasklist command which displays the corresponding PID for an applivcation.


52. telnet – Connect to your remote computer


You can connect to your remote computer or remote IP device through telnet command. You can telnet your remote computer if you the IP address of that computer.


For example, type telnet 192.168.100.244 in command prompt and then it will prompt you to enter user name and password of the remote computer to check your authenticity.


53. tracert – Trace route – very useful for network professional


You can determine the path taken to a destination by sending Internet Control Message Protocol (ICMP) Echo Request messages to the destination with incrementally increasing Time to Live (TTL) field values. If it is used without parameters, tracert displays help.

For example, you can try tracert google.com.


54. Time – you can display or change the system time from command prompt by typing time


It will then prompt you to enter the new time you want to change.


55. tree – It displays the directory structure of a path or of a disk drive graphically


Windows XP doesn’t have direct command to print directory content so you can do that by combining following commands together. Try this tree DOS command and redirect the output to a text file.


tree > directorycontent.txt

print directorycontent.txt


56. type – view txt files in command prompt without opening it with Notepad


It displays the contents of a text file. Type command is mostly used to view text file without modifying it. Lengthy text file can be splited into multiple pages with the help of switches.


57. ver - Displays the Windows XP version number


58. WMIC - Windows Management Instrumentation Command tool


You can view an amazing amount of low-level system information from a command line scripting interface with this command.


59. xcopy -Copies files and directories, including subdirectories.


Tips:

1. What is cmd.exe: you can launch command prompt by typing cmd in run prompt in the start menu.


2. What is System Root: The SystemRoot is the directory where the operating systems core files are located. Typically it is c:Windows on Windows XP.


3. Where the applications are installed: Typically c:program files is the location where most user installed applications are installed.


4. What is the location of my Desktop and My Documents: The typical location of Desktop and My Documents is c:documents and settings.

For example: The user shankar’s documents would be located in c:documents and settingsShankarmy documents (also desktop icons, documents, start menu icons and personal preferences will be stored here).


5. Shortcut to avoid typing lengthy file or folder name in command prompt: when your are working with a command and you need to type lengthy file or folder name, you can drag file or folder from Windows Explorer.


6. How to get help for DOS Command: To view help at the command-line, at the command prompt, type the command name followed by “/” and “?”.

Example: dir /? - will display all the help information for dir command


1/ 8