Showing posts with label GUI. Show all posts
Showing posts with label GUI. Show all posts

Tuesday, 17 November 2015

Show unused / disconnected devices in Device Manager

Normally the device manager only shows currenly loaded and in use drivers and devices.

This makes removing none connected devices and unused drivers difficult.



from windows, run cmd.exe, type: set devmgr_show_nonpresent_devices=1


Then start devmgmt.msc
From the gui select "View" -> "Show hidden devices"
now you can delete non-used drivers /devices.

Tuesday, 22 September 2015

View Currently Executing Requests in a Worker Process

When you notice that a worker process is using many resources on your Web server, or requests are taking a long time to process, you can view a list of current requests that are processing in a specific worker process. 

This information can help you determine where a problem occurs in a specific area of a site or application. 

You can view which requests are currently processing in the worker process, and then use that information to investigate why a certain request takes so much time to process.


The currently executing request information in IIS Manager returns the following information about requests in a worker process:
  • Site ID. The site identifier (ID) for the specific request.
  • Url. The requested Uniform Resource Locator (URL).
  • Verb. The Hypertext Transfer Protocol (HTTP) verb used in the request.
  • Client IP. The Internet Protocol (IP) address of the client who made the request.
  • State. The current pipeline module state that the request is in.
  • Module Name. The current module that the request is in.
  • Time Elapsed. The period of time the request has been in process.

Via the GUI



Open IIS Manager. 
In the Connections pane, select the server node in the tree.
In Features View, double-click Worker Processes.
Select a worker process from the grid.
Click View Current Requests in the Actions pane.
View the list of requests in the grid.

Via the Command Line

cd Windows\System32\inetsrv

appcmd list requests - show all current requests 
appcmd list requests /elapsed:4000 - show all current requests taking longer than 4 seconds to execute

Setting Environment Variables in Windows

Environment variables hold values related to the current environment, like the Operating System or user sessions.



Setting Environment variables via the GUI

  1. Open Control Panel » System » Advanced » Environment Variables.
  2. Type control sysdm.cpl,,3 in the Run dialog (Win+R) and click Environment Variables.
    For editing user variables you can also type
    %windir%\System32\rundll32.exe sysdm.cpl,EditEnvironmentVariables
    
    in the Run dialog.
  3. Right-click (My) Computer and click on Properties, or simply press Win+Break.
    • In XP click on Advanced » Environment Variables.
    • In Vista+ click on Advanced system settings » Environment Variables.
  4. There are many other ways of reaching the same place, such as by typing "environment variables" in the Start Menu/Screen search box and so on.
Environment variables in Windows are separated into user and machine/system specific values. You can view and edit their values there. Their current values upon launch are made available to all programs.

Setting Environment variables via the Command Line

Format

Environment Variables in Windows are denoted with percent signs (%) surrounding the name:
%name%

echo

To display an environment variable's value in cmd.exe, type echo %name%.
C:\>echo %USERPROFILE%
C:\Users\Daniel

set

To create/set a variable, use set varname=value:
C:\>set FunnyCatPictures=C:\Users\Daniel\Pictures\Funny Cat Pictures

C:\>set FunnyCatPicturesTwo=%USERPROFILE%\Pictures\Funny Cat Pictures 2
To append/add a variable, use set varname=value;%varname%:
C:\>set Penguins=C:\Linux

C:\>set Penguins=C:\Windows;%Penguins%

C:\>echo %Penguins%
C:\Windows;C:\Linux
Environment variables set in this way are available for (the rest of) the duration of the Command Prompt process in which they are set, and are available to processes that are started after the variables were set.

setx

To create/set a variable permanently, use setx varname "value":
C:\>setx FunnyCatPictures "C:\Users\Daniel\Pictures\Funny Cat Pictures"

[Restart CMD]

C:\>echo %FunnyCatPictures%
C:\Users\Daniel\Pictures\Funny Cat Pictures
Unlike set, there is no equals sign and the value should be enclosed in quotes if it contains any spaces. Note that variables may expand to a string with spaces (e.g., %PATH% becomes C:\Program Files), so it is best to include quotes around values that contain any variables.

List of Windows Environment Variables

Here is a list of default environment variables, which are built into Windows. Some examples are:%WINDIR%%SystemRoot%%USERPROFILE%, and %APPDATA%. Like most names in Windows, these are case-insensitive.