Operating systems (OSs) from time to time suffer from a variety of problems. These problems can be inconvenient if users are unaware of the troubleshooting options and system tools available to resolve these issues.
Throughout this topic, we will explore how to resolve OS problems using command-line options and system tools. More specifically, we will discuss:
- what command-line options and system tools are
- how to troubleshoot OS problems according to organisational procedures
- identifying and determining OS problem resolution strategies
- implementing OS resolution strategies according to task requirements
- testing OS problem resolution.
Command-line interface
A command-line interface (CLI) is a text-based user interface used to run programs, manage computer files and interact with the computer.
The program which handles the interface is called a 'command-line interpreter' or 'command-line processor'.
Operating systems (OSs) implement a command-line interface in a shell for interactive access to OS functions or services.
Today, many users rely on graphical user interfaces (GUI) and menu-driven interactions. However, some programming and maintenance tasks may not have a GUI and may require the use of a command line.
Command-line tools are scripts, programs and libraries that have been created with a unique purpose--typically to solve a problem that the creator of that particular tool had himself. Because of that, we have divided this roundup of the best command-line tools to include different categories52, such as:
- web development
- utilities
- productivity.
Operating system command-line interfaces
Operating system command-line interfaces are usually distinct programs supplied with the OS.
A program that implements such a text interface is often called any of:
- command-line interpreter
- command processor
- shell.
Examples of command-line interpreters include:
- DEC's DIGITAL Command Language (DCL) in OpenVMS and RSX-11
- Unix shells (sh, ksh, csh, tcsh, zsh, bash, etc.)
- CP/M's CCP, DOS' COMMAND.COM
- OS/2 and the Windows CMD.EXE programs
- DECS RSX-11 and RSTS CLIs.
Although the term 'shell' is often used to describe a command-line interpreter, a shell can also be any program that constitutes the user interface, including fully graphically oriented options.
For example, the default Windows GUI is a shell program named EXPLORER.EXE, defined in the SHELL=EXPLORER.EXE line in the WIN.INI configuration file.53
Using command-line options
'Command-line options' are commands used to pass parameters to a program. They pass along cues for changing settings or executing commands.
If the option contains arguments, enter the argument after the option. In some cases, option arguments must be enclosed in quotation marks.
Multiple command line options can be specified. In general, the syntax is as follows:
application --option --option "argument" --option "argument"
The following examples show the use of the "-ProfileManager" command, which will open the profile manager before starting Firefox or Thunderbird.
Windows
Select Run from the Windows starts menu. Enter the following command: firefox -ProfileManager54
Linux
cd Thunderbird installation directory . /thunderbird -ProfileManager
The example above invokes the "-ProfileManager" command-line option with Mozilla's Thunderbird mail client.
MacOS
The -ProfileManager command demonstrated above is specific to a Firefox installation in Windows.
MacOS uses the Zsh shell—a Unix shell that can be used as an interactive login shell. You interact with the command-line using the Terminal application. The example below will display the contents of the paths file indicating where all globally executable scripts/commands are stored. If you have a Mac, you can try this now.
Go to applications > utilities > terminal and enter the following command:
cat /etc/paths
Once you press enter on your keyboard, your terminal should look similar to this:
Operating System Tools
Some factors affect the administrative performance of the user, and you must know about them to understand the operations of a computer.
These include:
- Computer Management
- Device Manager
- Task Scheduler
- MSconfig.
Computer Management
The Computer Management option is in the Control Panel of any computer system.
Within the Control Panel, there is an Administrative tool:Computer Management.
On the Computer Management window, there are 3 panes (see below).
- The left pane will show some functions, and when the user chooses a function from the left pane, the details of the pane will be available at the pane in the centre.
- The right section will show the series of Actions that can be taken.
Note: Within Computer Management, the user can start defragmentation of the disk and disk spaces, and the performance sector shows how the system is performing (this can be observed both short- and long-term).
Device Manager
Within Computer Management is the Device Manager.
When external hardware is connected to the computer, the device will be shown in the Device Manager tray or administrative window. The hardware may be printers, USB ported devices, tablets, mobile phones, keyboards or cameras.
Most of the time, the computer detects the driver of the device and installation of the driver is done instantly and automatically. However, many devices need to be installed separately (such as modems or a networking device).
When adding a device manually, you will need to click on the Add Device option in the Device Manager tool. Once the device is shown at the Device Manager window, then the device can be configured.
Task scheduler
Windows can perform a task at a scheduled date and time and schedule tasks to perform at particular intervals (such as daily or weekly).
To launch the Task Scheduler go to:
Control Panel > System and Security > Administrative tools > Task Scheduler.
MSCONFIG
MSConfig is a troubleshooting tool used to temporarily disable or re-enable software, device drivers or Windows services that run during the startup process to help the user determine the cause of a problem.
There are different components within MSConfig:
- General
- Boot
- Services
- Task Manager.
General
The General configuration section is where configuration of the following functions takes place:
- the disk's behaviour
- the behaviour of files
- the room condition of audio formats
- the volume and speaker setting of the audio files
- the system notification sounds
- setting the function or opening modes of different file formats
- choosing of accessible file formats for different file categories.
You can go to the Configuration from the Administrative tools at the Control Panel or go directly by putting the config command at a Run.
Boot
This is an extended setting for the experts. However, the user can set the settings or configuration by default.
You can make the necessary settings for booting the computer by formatting accessible devices. This may be through the USB drive, CD or DVD or even an internal drive or disk. Making these settings enabled or configured may allow or restrict the computer's booting.
Services
The Services configurations are:
- audio settings
- printer settings
- adding a driver or device setting
- the web accessing settings.
You can set the computer's default activities by those settings, including a web browser or icon.
Task Manager
Here are some of the Task Manager's applications and the processes which are usually performed to keep the PC running smoothly.55
Applications
The logical layout of the drive can be checked to watch that everything is in order. Windows generally splits the system files and stores the fragments at different locations. When the user tries to access that file, it is again put together to make it accessible to the OS, and the spinning drive does the entire process.
Processes
The Processes tab shows you a comprehensive list of processes running on your system:
- CPU
- memory
- disk
- network
- GPU
- other resource usage information.
The list is broken into 3 categories:
- the Apps group shows the same list of running applications56 you would see in the 'Fewer details' simplified view
- the other 2 categories are background and Windows, which show processes that don't appear in the standard simplified Task Manager view.
Performance
This option allows the user to monitor how the CPU performs through the vision of live records identifying usage and memory through graphs.
The user can go to the Performance tab to find graphs detailing:
- CPU
- Memory
- Disk
- Wi-fi
- GPU.
Clicking Open Resource Monitor will provide continuously running meters showing current activity for:
- CPU
- Memory
- Disk
- Network.
These records make performance monitoring easy and accessible.
Disk management
Below are some examples of how disk management can be performed.
Driver status
The Driver Status in Windows can easily be configured and monitored. By going to the computer, you can glance at the disk space in Windows Vista and onwards.
Mounting
The device drives or external drivers can be mounted from the computer. Even the external drivers or virtual drives can be mounted to the computer by iso formats.
Extending partitions
The disk partitions can be extended when formatting Windows with the OS. 'Extending partitions' means putting a greater number of partitions to the device, and that access is given for the Windows users during the time of formatting the computer.
Splitting partitions
'Splitting partitions' is accessible for all Windows while installing the new OS. One can split the entire memory space into 9 partitions starting from C to K.57
'Troubleshooting' is the process of diagnosing the source of a problem. It is used to fix hardware, software and many other products.
The basic theory of troubleshooting is that you start with the most general (and often most obvious) possible problems and narrow them down to more specific issues.58
The problem is initially described as 'malfunction symptoms' and troubleshooting determines and remedies the causes of these symptoms.
A system can be described in its expected, desired or intended behaviour--its events or inputs are expected to generate specific results or outputs.
For a very simple example, selecting 'Print' from Microsoft Word should immediately (unless there is a queue) produce a hardcopy from the targeted printer. If that doesn't happen, then you need to consider why and start asking questions like:
- Is the networked printer connected?
- Is the printer displaying an error message?
- Was the correct (intended) printer selected to print the job?
Any unexpected or undesirable behaviour is a symptom of a problem.
Troubleshooting is isolating the specific cause or causes of the symptom. Corrective action can then be taken to prevent further failures of a similar kind.59
The 6 steps of troubleshooting
Identify the problem
When troubleshooting a problem, the first thing you need to be aware of is that the 'symptoms' are not the 'problem'. When troubleshooting, you must identify the underlying problem causing the symptoms to manifest themselves.
To do that, you should question the user.
Ask detailed questions about when the symptoms occurred and what exactly they were doing when they occurred. Ask the user if they can repeat the action that caused the symptom--if the user can re-create the issue for you, this can be extremely helpful. Determine if anything has changed that may have caused the problem.
Importantly, before you take any action, make a backup copy of the system so that you can preserve everything as it is!
Follow these steps to start to diagnose the problem and prepare to attempt solutions:
- question the user
- remember that the symptoms are not the underlying problem
- determine what has changed
- make a backup of the system before moving on.
Establish a theory of probable cause
In order to identify the underlying problem causing the symptoms, start by making a list of probable causes and then order it from most likely to least likely. Be sure to question the obvious while making your list. For instance, if the symptom is failed power to a workstation, the first item on your list might be to check that the power cord is properly plugged in (the obvious cause), with the next item to check: if the outlet is getting power.
If you get to the end of your list without a solution, you will need to escalate the problem to a higher level.
Follow these steps to diagnose and identify the problem:
- make a list of probable causes
- order the list from most to least likely
- start with the obvious
- escalate to a higher level if a probable cause cannot be determined.
Test probable cause theory to determine the actual cause
Once you have ruled out the simple or obvious underlying causes by working through the first few items on your list, you should take a moment to consider whether or not you can troubleshoot the issue on your own or if escalating it to a higher authority is required.
If it falls within your capabilities, you will need to test your theories to determine the actual cause. Go ahead and investigate the solutions you think will fix the problem. Once you have narrowed it down to a single working theory, you can move on to the next step.
Follow these steps to narrow the list and identify the problem:
- investigate your theories until you have identified one likely underlying cause of the problem
- if the theory is confirmed, move on to the next step
- if the theory is not confirmed, go back to step 2 or step 1 (if needed).
Establish and execute the action plan
Once you have determined the actual cause, you will need to establish an action plan and then execute that plan.
Simple problems will probably only need simple plans and execution tasks. However, if it is a complex problem, you may need to write out the plan to be sure to execute it correctly.
You will need to consider security concerns of data loss and continuity of service as well as communications around any impacts on productivity. This is another opportunity to escalate the problem to a more senior level if necessary.
Follow these steps to establish and execute your plan:
- simple problems probably just need simple plans
- complex problems may need to be written out of action plans
- consider security concerns
- plan communications around impacts on productivity
- escalate to a higher level if required.
Verify full system functionality
After you have executed your plan, you will need to verify that the system is fully functional. If everything works, that's great—your job is done!
You can also use this opportunity to implement preventative measures so that the problem does not occur again. If full system functionality has not occurred, you will need to go back and continue to work through the troubleshooting methodology.
Follow these steps to test your solution and ensure the original symptoms are gone:
- test the solution by trying to recreate the original symptoms or ensuring the system is fully functional
- if everything works, you solved the problem (consider if you can use your findings to implement preventative measures)
- if the problem is not resolved, you will need to go back and find a new working theory.60
Document the process
Once everything is fully functional, documenting the process becomes important. This process includes documenting your:
- findings
- actions
- outcomes.
When the problem occurs again, there will be information available to walk someone through the means of troubleshooting and how to resolve the issue.
This documentation also captures a history of equipment and users so that perpetual issues become known and recorded. This can save time during future troubleshooting and prevent others from making the same missteps you may have taken.
Follow these steps to document the actions resulting from the initial symptom:
- capture your findings, actions and outcomes
- create documentation stored in a public space and communicate the problem and response to the wider team
- consider updates to processes or protocols that prevent the same issue from recurring.61
Tools used for troubleshooting OSs
Fixboot
'Fixboot' command creates a new boot sector for the OS. When using this command, you might also require using the DISKPART command to identify the part or section of the disk you want to write the new boot sector.
Recovery console
This powerful troubleshooting tool gives you the mandate to change things on the OS without having to start Windows. It is, however, a very dangerous command to use. This is a command that gives you complete control of the OS so that you can make changes to it before it starts.
A recovery console is an effective troubleshooting tool when you find your computer has difficulties starting up on Windows. Within the console, there are many tools available to troubleshoot various system problems.
System File Checker (SFC)
The SFC OS troubleshooting tool is used for malware infection or hard drive corruption.
This is the System File Checker command which can carry out integrity scans on all the system files to check the validity of the OS files. If some malware infection is replaced or has caused some damage to one of the system files, the SFC will identify it and prompt you to recover the file to put the appropriate one in place.
Repair disks
The system Repair disks is a troubleshooting environment available for Windows where the option to create a system recovery option backup and restore options is provided (including options such as repair/startup, system restore, image recovery, among many others).
System Recovery options can also be launched in the Repair Disk option and troubleshooting commenced.
Pre-installation environments
The pre-installed Windows environment is an option generally used when going through recovery options. This is where the desktop is usually unavailable and can easily develop a Windows pre-installation environment. Some of these PE tools can be downloaded and burnt onto a DVD ROM; hence no need to come up with a new one.
MSCONFIG
The MSCONFIG troubleshooting tool is an acronym for the 'Microsoft System Configuration Utility'.
This is a troubleshooting utility used when an OS is experiencing startup problems (e.g. if the desktop is not loading or possibly malfunctioning of some applications).
Using MSCONFIG, you can carry out some diagnostic activities to break down all processes to establish where the problem is as this utility provides the ability to control all the boot process activities, such as enabling and disabling the loading of some applications.
It also allows the user to make modifications and changes to operating services if they do not want them to load when the operating system starts.
DEFRAG
The DEFRAG tool is another important operating system troubleshooting tool. This mainly stands for 'defragmentation', which means putting files and folders in order.
You can bring fragmented files into one location through defragmentation for continuous access. This is a troubleshooting tool to use when encountering problems accessing hard drive files, especially if the files are stored in different locations on the hard drive.
REGSRV32
The regsvr32 (also known as the 'Microsoft Registry Server') is a troubleshooting utility that tends to alter the contents of the registry.
With this application, you can easily make some DLL registration and deregistration from the OS. The regsvr32 performs registry updates when troubleshooting problems related to dynamic link libraries used by the Windows OS. Once it updates, it informs the OS of the DLL's location.
REGEDIT
With the computer registry being an important aspect of the OS, it is one of the most important places that should not be missed when carrying out OS troubleshooting.
This is because, within the registry, important applications are presented. These include applications, system configurations, services and running drivers, making it a very large and important database.
Event viewer
The event viewer is somewhat a special troubleshooting tool in that it enables you to see activities that are happening simultaneously in the OS. For instance, you may have a driver that is not properly functional; this allows you to easily view it at the event viewer.62
Safe mode
The safe mode boot option is usually available before starting the OS. By pressing F8, a menu of advanced options pop up from where you can choose to boot a computer in 'safe mode'. You can enable basic network drivers and services using the safe mode boot.
Emergency repair disk
Emergency repair disk should be carried out when there is an urgent need to diagnose on a drive that is not properly functional.
System recovery
System recovery can be induced by running a computer 'safely' and selecting the 'System recovery' option. System recovery allows an OS to restore to specific points in time where the OS files were preserved.
Whenever a laptop or computer acts up, you need to specify the problem as best as you can as it will help you perform effective troubleshooting on your own. If you have a good idea of what caused the problem, you'll be in a better position to decide whether you can fix the problem on your own or whether you will need to escalate the issue by contacting an IT professional.
All computer problems fall into 2 general categories:
- software problems
- hardware problems.
The first step is always to identify what you are dealing with. Computer hardware problems are usually easier to specify, but they cost more to repair. Though harder to detect, software problems usually cost less to fix or repair.
Hardware problems
Hardware issues are directly related to the physical components of the computer system.
Basic steps to identify and solve the hardware problem are to check that:
- the computer is plugged into a working outlet
- everything is turned on--if something seems to be not working, make sure the brightness is up
- the keyboard, mouse, monitor, speakers, etc., are plugged into your device. If one is available, try a different port to check if it is the port or a damaged device. Make sure wireless hardware has a fully charged battery.63
Software problems
Software problems usually appear after the startup process. If some applications no longer work properly or the OS is unresponsive, it is clear evidence of a software problem.
Basic steps to identify and solve software issues are to:
- restart the computer
- make sure all programs are updated
- check that antivirus software is running
- review software installations--if the computer is having problems after a new program was installed, remove that program and try reinstalling it.
For more tips on how to troubleshoot, watch the following video.
There are many ways to implement strategies to find a solution. The following are some examples to take into consideration.
Resolution strategies
Believe in yourself–get into 'state'
First, and most importantly, believe that you can solve this problem. Take 5 seconds to get into 'state'. Visualise another problem you solved; remember the thrill you felt when beating it. Try these methods and solve your computer's software problem.
Collect information
A well-defined problem is half the solution. Something magical happens when you write down precisely what is wrong. Just collecting the symptoms triggers your brain to start searching for causes. As a bonus, if you write down the problem, it will prepare you for other strategies.
Ask: 'Has anyone added a new program recently? Has any hardware changed?' Pattern recognition is a vital troubleshooting skill.
Narrow the search area
Your first branch in the decision tree should be: 'Is this problem software or hardware?' Investigate the scope of the problem.
If it's software: which programs are affected, and which still work? Try to uninstall or re-install the suspected problem program.
If you suspect a hardware fault: deal with the underlying cause, not a symptom. Try swapping the suspect part for a similar component on a working machine (e.g. in the case of a keyboard not working, swap it to another machine and if the keyboard is still dead you will know from the result if it's the keyboard itself or the computer system unit).
Assemble your software tools
- Event Viewer
- Google and TechNet
- Task Manager
- Network Monitor
- Event Viewer
Intermittent problems are the toughest to track down. The Event Viewer is your best friend--make it the first place to look for clues. Set a filter to show just errors (red dots).
Remember to include the application log in your search for clues.
Develop a theory
What could have gone wrong?
Make a list of all possible causes, then ask: 'Which is the most likely cause?'
- Software: Is it an OS component, such as program x? Could it be that new program added? What about those files deleted?
- Hardware: If a component is not working, is it a symptom of something else, or is it the root of the problem? Is there a log check? Is there a specialist monitoring tool that could be useful?
Believe that someone somewhere has experienced your problem before; also, have faith they have posted a solution in a blog or forum. To search for variations of your problem in Google, if you have an error number, that will improve your chances of finding a good reference.
Be methodical when you test your theories
The golden rule of troubleshooters is to test one factor at a time; and for each factor:
- write down all the changes you make
- learn from the experts
- list the causes
- list possible solutions
- draw diagrams.
Develop theories for the underlying cause but...change only one item at a time.
Phone a friend
Ask for help. Think: Who is most likely to have seen this problem before? Contact the most likely people, explain the problem and appeal to their problem-solving skills.
Consider options for assistance:
- phone an expert
- e-mail anyone who can help
- post a message in a forum (e.g. Tek-tips.com)
- contact the manufacturer's website.64
Scenarios of simple solutions to common problems
Most of the time, problems can be fixed using simple troubleshooting techniques (such as closing and reopening the program).
It's important to try simple solutions before resorting to more extreme measures. If the problem isn't fixed, you can try other troubleshooting techniques.
Below are some examples of common problems and simple solutions to help restore a program/device.
Problem 1: The power button will not start the computer
- Solution 1: If your computer does not start, check the power cord to confirm that it is plugged securely into the back of the computer case and the power outlet.
- Solution 2: If it is plugged into an outlet, make sure it is a working outlet. You can plug in another electrical device, such as a lamp, to check your outlet.65
- Solution 3: If the computer is plugged into a surge protector, verify that it is turned on. You may have to reset the surge protector by turning it off and then back on. You can also plug a lamp or other device into the surge protector to verify that it's working correctly.
- Solution 4: If you use a laptop, the battery may not be charged. Plug the AC adapter into the wall, then turn on the laptop. If it doesn't startup, you may need to wait a few minutes and try again.
Problem 2: An application is running slowly
- Solution 1: Close and reopen the application.
- Solution 2: Update the application. To do this, click the Help menu and look for an option to check for Updates. If you don't find this option, another idea is to run an online search for application updates.
Problem 3: An application is frozen
Sometimes an application may become 'stuck' or 'frozen'. You won't close the window or click any buttons within the application when this happens.
- Solution 1: 'Force quit' the application.
- On a PC, you can press (and hold) Ctrl+Alt+Delete on your keyboard to open the Task Manager. You can then select the unresponsive application and click End task to close it.
- On a Mac, press and hold Command+Option+Esc. You can then select the unresponsive application and click Force Quit to close it.66
- Solution 2: Restart the computer. If you cannot force quit an application, restarting your computer will close all open apps.
Problem 4: All programs on the computer run slowly
- Solution 1: Run a virus scanner. You may have malware running in the background that is slowing things down.
- Solution 2: Your computer may be running out of hard drive space. Try deleting any files or programs you don't need.
- Solution 3: If you're using a PC, you can run Disk Defragmenter.
Problem 5: The mouse or keyboard has stopped working
- Solution 1: If you're using a wired mouse or keyboard, make sure it's correctly plugged into the computer.
- Solution 2: If you're using a wireless mouse or keyboard, ensure it's turned on and contains charged batteries.
Problem 6: The sound isn't working
- Solution 1: Check the volume level. Click the audio button in the top-right or bottom-right corner of the screen to ensure the sound is turned on, and the volume is up.
- Solution 2: Check the audio player controls. Many audio and video players will have their separate audio controls. Make sure the sound is turned on and the player's volume is turned up.
- Solution 3: Check the cables. Make sure external speakers are plugged in, turned on, and connected to the correct audio port or a USB port. If your computer has colour-coded ports, the audio output port will usually be green.
- Solution 4: Connect headphones to the computer to find out if you can hear sound through the headphones.
Problem 7: The screen is blank
- Solution 1: The computer may be in Sleep mode. Click the mouse or press any key on the keyboard to 'wake' it.
- Solution 2: Make sure the monitor is plugged in and turned on.
- Solution 3: Make sure the computer is plugged in and turned on.
- Solution 4: If you're using a desktop, make sure the monitor cable is properly connected to the computer tower and the monitor. 67
Configuration testing
'Configuration testing' tests a system with each of the supported software and hardware configurations.
Software testing | Configuration testing
Configuration testing is the type of Software testing used to verify the system's performance against various combinations of software and hardware.
This will be used to find out the best configuration under which the system can work without flaws or issues.
Objectives of configuration testing
- Determine whether the software application fulfils the requirements.
- Identify the defects that were not efficiently found during different testing processes.
- Determine an optimal configuration of the application under test.
- Analysis of the performance of software applications by changing the hardware and software resources.
- Analysis of the system efficiency based on the prioritisation.
- Verify the degree of ease to how the bugs are reproducible irrespective of the configuration changes.
Types of configuration testing
Configuration testing is classified into 2 types:
- software configuration testing
- hardware configuration testing.
Software Configuration Testing
Software configuration testing is done over the application with various OS versions.
This type of configuration testing can be time-consuming as you have to account for the time to install and uninstall the various software used for testing.
The software configuration begins after passing through the unit and integration tests when the build is released.
Hardware Configuration Testing
Hardware configuration testing is typically performed in labs where physical machines are used with various hardware.
The software is installed in all the physical machines, with the hardware attached when a build is released. The test is then carried out on every machine to confirm that the application is working correctly.
Configuration testing can also be broken down into the following 2 levels:
- Client level testing: is associated with usability and functionality testing. This testing is done in the direct interest of the users.
- Server level testing: is carried out to determine the communication between the software and the external environment when it is planned to be integrated after the release.68
Knowledge check
Complete these three activities.
A client has launched a service ticket regarding their computer. They are working on an important presentation but have noticed their screen has frozen. They have tried to shut down the applications but have had no luck.
To complete this task, you will need to create a script that will detail your steps to help them resolve this issue.
You will need to consider:
- the troubleshooting process
- how you will work collaboratively with the client
- what questions will you ask
- how you will guide them over the phone
- how to effectively resolve their issue.
Once completed, share in the forum how you have used a collaborative approach to enhance your communication skills in resolving this issue for your client.