Skype – High I/O

Background

Noticed my computer running high I/O.

And, so launched Task Manager to try to determine cause.

 

Task Manager

ScreenShot

Here is a screenshot from a few minutes ago.

taskmanager_processes_20170219_0408pm

Measuring

The items we want to measure are I/O Reads and I/O Writes as they show us the number of I/Os that are occurring.

We do want to stay watching for a bit to gauge how frequently they are being updated and at what rate.

And, later consider I/O Read Bytes and I/O Write Bytes.

 

Processes Identified

Here are the processes identified:

  1. svchost.exe
  2. Skype.exe
  3. sqlservr.exe
  4. System
  5. csrss.exe
  6. jusched.exe

 

Skype.exe

Why?

I know that I am not running Skype and so what is with it running high I/O

 

System Configuration Utility ( msconfig.exe )

Launch msconfig.exe to see if skype is configured to auto-start.

Looked for it under the “Services” and “Startup” Tab.

Tab – Startup

Tab – Startup – Current

tab-system-20170218-0817pm

Explanation

  1. Found Skype

Tab – Startup – Disabled

Disabled Skype as a Startup Item

tab-system-20170218-0818pm

 

Desktop – Status Bar

Access the Skype icon from the Desktop Status Bar.

statusbar-skype

And, chose the Quit option.

 

Skype Configuration

Btw, we could have disabled Skype from auto-starting through the Skype Interface, itself.

To do so, please launch Skype and log in.

Tools – Options

Please access the Options via the menu item Tools\ Options.

Tools – Options – General Settings

Start Skype When I Start Windows – Checked

We want to stay on the General Settings Tab.

And, focus in on “Start Skype when I start Windows“.

skypeoptions-20170219-0424pm

 

Start Skype When I Start Windows – Unchecked

skypeoptions-20170219-0426pm

 

 

WinOS – Identify Large Files Using WinDirStat

Introduction

This is the second in a series of posts on identifying the largest set of files on Windows Computer.

Lineage

  1. WinOS – Identify Large Files Using SpaceSniffer
    Link

 

Download

Please download the portable version of WinDirStat from here.

 

Usage

Launch

As it is a portable app, no need to install, just launch it.

 

Results Sorted By Percentage

 

windirstat_sortedbypercentage_20170214_1002am

 

Results Sorted By Percentage ->Folder – Personal

Here we dig in deeper into the Folder \ personal\work folder and located backup files from one of our vendors

windirstat_sortedbypercentage_backupfiles_20170214_1009am

 

WinOS – Identify Large Files Using SpaceSniffer

 

Introduction

As I left the house of worship on a couple of days ago, someone asked me what is the best way to free up storage on a hard drive.

I said I will send him some notes in the days thereafter.

 

Downloaded

Downloaded SpaceSniffer from Uderzo Software.

The product folder is here.

And, the Portable version is here.

fosshub

The latest version is 1.3.0.2 and file size is 1.58 MB.

 

Usage

Again, no need to install, just run as it is a portable software.

 

Outline

  1. The first thing to do is to choose your targeted Drive
    • In our case, we only have one drive and that is our Local Disk ( C: )
  2. Scan Starts
    • The Application starts scanning our targeted disk
  3. Scan Results
    • Found Files includes
      • hiberfil.sys
      • pagefile.sys
  4. Filter
    • It is beneficial to narrow on big files or specific file types
    • Filtering is accomplished by entering tags such as
      • Size
        • >10mb
          • Files greater than 10 Megabytes
      • Size and File Types
        • >10mb; *.mp*
          • File Sizes greater than 10 Megabytes
          • File Types *.mp* – *.mp will include mp3 & mpeg
  5. Errors & Warnings
    • Access Denied
      • There are some folders that are locked down.  The list includes
        • c:\windows\system32\LogFiles
        • c:\windows\system32\spool

 

Screen Shots

Choose your Space

chooseyourspace_20170213_1215pm

Master Status : Scanning…

masterstatusscanning

 

Filtering

Filtering by File Size

Filtering by File Size > 10MB

filteringbyfilesizes_10mb_20170214_0940am

Filtering by File Size & File Types

Filtering by File Size > 10MB and file Types *.mp*

filesizesandfiletypes_20170214_0947m

 

Errors and Warnings

Access Denied

accessdenied_20170214_0930am

SQL Server – Number of CPUs Available & Usable

Background

Trying to document a set of SQL Server Instances that we are provisioning.

We have four servers, a server for each environment, Dev/Test/QA/Production.

 

Lineage

We have addressed this issue a couple of times in the past.

  1. SQL Server – Determine Number of CPU Cores
    Link

 

Measurement

OS

Task Manager

Here is see what the numbers look like via Task Manager / Performance Tab.

Image

cpu_taskmanager_20170211_1053am

 

Explanation

  1. Max Speed is 2.4 GHz
  2. Number of Sockets & Number of Processors is 8
  3. Virtual Machine is Yes
    • It is a virtualized environment running VMWare

 

SysInternals

coreinfo

Here us what the numbers look like via SysInternal’s coreinfo.

Syntax


coreinfo -c

Image

coreinfo-c_20170211_1100am

 

Explanation

  1. We are showing 8 Physical processors

 

SQL Server

Let us review the numbers via SQL Server

Dynamic Management Views ( DMV )

sys.dm_os_schedulers – VISIBLE ONLINE

Documentation

We will look in the sys.dm_os_schedulers for entries that have their STATUS equal to VISIBLE ONLINE.

Code

select
          tblOS.scheduler_id
        , tblOS.cpu_id
        , tblOS.[status]
        , tblOS.[is_online]
		, tblOS.current_workers_count
 
from   sys.dm_os_schedulers tblOS
 
where  tblOS.[status] = 'VISIBLE ONLINE'

Output

sys_dm_os_schedulers_visible_20170211_1111am

Explanation
  1. We see that we are only seeing 4 CPUs.

 

sys.dm_os_schedulers – ALL

Documentation

We will look in the sys.dm_os_schedulers for entries that have their STATUS equal to VISIBLE ONLINE.

Code

select
          tblOS.scheduler_id
        , tblOS.cpu_id
        , tblOS.[status]
        , tblOS.[is_online]
		, tblOS.current_workers_count
 
from   sys.dm_os_schedulers tblOS
 

 

Output

sys_dm_os_schedulers_all_20170211_1115am

 

Explanation
  1. Column = STATUS
    • VISIBLE ONLINE
      • Four entries have their STATUS marked VISIBLE ONLINE
      • VISIBLE schedulers are used to process user requests (MSFT )
    • VISIBLE OFFLINE
      • The next four entries have their STATUS marked VISIBLE OFFLINE
    • VISIBLE ONLINE ( DAC )
      • We have a lone bearing VISIBLE ONLINE (DAC)
      • DAC means Dedicated Administrator Connection
    • HIDDEN ONLINE
      • HIDDEN schedulers are used to process requests that are internal to the Database Engine. ( MSFT )
      • Nine entries marked as HIDDEN OFFLINE

 

SQL Engine Info

What edition of SQL Server are we using?

 

@@VERSION

Code


select @@version 

Output

version

 

Explanation

  1. Version :- SQL Server 2014 (SP2)
  2. Edition :- Standard Edition
  3. Bitness :- 64-bit

 

 

@@VERSION

Code


select [edition] = serverproperty('edition') 

Output

serverpropertyedition

Explanation

  1. Edition :- Standard Edition (64-bit)

Documentation

Features Supported by the Editions of SQL Server 2014

Link

crossboxscalelimits

ErrorLog

Reviewed the error log and made changes to the Local Security Policy.

2017-02-22 8 AM

  1. Microsoft SQL Server 2014 (SP2) (KB3171021) – 12.0.5000.0 (X64)
    Jun 17 2016 19:14:09
    Copyright (c) Microsoft Corporation
    Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)
  2. UTC adjustment: -8:00
  3. System Manufacturer: ‘VMware, Inc.’, System Model: ‘VMware Virtual Platform’.
  4. SQL Server detected 8 sockets with 1 cores per socket and 1 logical processors per socket, 8 total logical processors; using 4 logical processors based on SQL Server licensing.
  5. Detected 65535 MB of RAM.
  6. Using conventional memory in the memory manager.
  7. Database Instant File Initialization: disabled. For security and performance considerations see the topic ‘Database Instant File Initialization’ in SQL Server Books Online.
  8. CLR version v4.0.30319 loaded.
  9. Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.

2017-02-22 8:30 AM

  1. Microsoft SQL Server 2014 (SP2) (KB3171021) – 12.0.5000.0 (X64)
    Jun 17 2016 19:14:09
    Copyright (c) Microsoft Corporation
    Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)
  2. UTC adjustment: -8:00
  3. System Manufacturer: ‘VMware, Inc.’, System Model: ‘VMware Virtual Platform’.
  4. SQL Server detected 8 sockets with 1 cores per socket and 1 logical processors per socket, 8 total logical processors; using 4 logical processors based on SQL Server licensing.
  5. Detected 65535 MB of RAM.
  6. Using locked pages in the memory manager.
  7. Database Instant File Initialization: enabled. For security and performance considerations see the topic ‘Database Instant File Initialization’ in SQL Server Books Online.
  8. CLR version v4.0.30319 loaded.
  9. Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.

 

Interpretation

The OS is reporting 8 processors, but SQL is only availing 4.

The reason is that we are running Standard Edition, and that edition maxes out at 4 Processors.

BTW, the max memory is 128 GB.

 

 

NTFS Permissions – Via “Net Share”

Background

Have a need to create a few shares and grant permissions to them.

We will use NetShare to automate the Share Creation and permissioning.

 

Use NetShare To Create And Grant Permissions

Using NetShare grant permissions to Share SQLErrorLog

Code


set "_share=SQLErrorLog"
set "_folder=M:\Microsoft\SQLServer\SQLErrorLog"

set "_user_everyone=everyone"


set "_networkUserQA=LAB\DBQA$
set "_permission_read=Read"
set "_permission_full=Full"
set "_permission_change=Change"

if not exist %_folder% mkdir %_folder%

net share %_share%=%_folder% /GRANT:"%_user_everyone%",%_permission_read% /GRANT:"%_networkUserQA%",%_permission_change% 

Explanation

In the sample above, we did the following:

  1. Created a new network share by the name SQLErrorLog
  2. It is sourcing M:\Microsoft\SQLServer\SQLErrorLog
  3. We are granting the following permissions
    • Read to everyone; that is all local users
    • Change ( Read and Write) to the Network Service Account on machine DBQA.  Btw, the Domain name is LAB

Review Share Permissions

Code


net share SQLErrorLog

Output

netshare-qa

 

Use NetShare to drop Share

Code


set "_share=SQLErrorLog"
set "_folder=M:\Microsoft\SQLServer\SQLErrorLog"

if not exist %_folder% mkdir %_folder%

net share %SQLErrorLog%

if %errorlevel% EQU 0 Echo Deleting Share %_share% ... | net share %_share% /DELETE

 

Win OS – Changing Auto-play Options for Blank Media

 

Background

Whenever I place in a new DVD into my DVD Writer I get an helpful message asking what do I want to do.

 

Prompt

Image

autoplay-autoplayforblankdvds

Text

The options given are “Burn files to disc” or “Burn a DVD video disc“.

 

Response

My response is none of the options you are given me is amenable to my current need.

And, so if you are like me, and you do not want Windows Help every time you place in a new blank DVD, please read on.

 

Steps

Here are the steps:

  1. In the AutoPlay window, choose “View more AutoPlay options in Control Panel
  2. The Control Panel \ Hardware and Sound \ AutoPlay window appears
  3. For all Blank Media listed, please select the “Take no action” option

controlpanel-hardwareandsound-autoplay-default

 

controlpanel-hardwareandsound-autoplay-postchanges

SysInternals – AccessCheck – Querying Folder\File Permissions

Background

Wanted to document how to use access SysInternal’s accesschk to review NTFS permissions.

 

Premise

This effort was brought to bear by a question asked by desmando on the Windows SysInternals forum.

Question

The question is here

Image

accesschk64-desmando

Textual

I’m trying to look for files and folders and I don’t have access to. To test, I created a folder on my desktop and removed all rights to it. I then ran the following command:

accesschk64.exe -nsd "domain\username" c:\Users\username\Desktop\

It came back saying “No matching objects found.”

Is this not the right tool? Am I not using it right?

Environment Provisioning

File Security Assignment

We have three files.  And, they are in E:\BAK folder.

Our file names are File1.txt, File2.txt, and File3.txt

  1. For files 1 and 2, we are the owner
  2. On File 3
    1. Unchained it from the Folder permission set
    2. And, assigned ownerships to someone else

File List

File2.txt

File2.txt – Properties

securitysettings-security-file2

 

File2.txt – Advanced Setting Properties

advancedsecuritysettings-file2

 

File3.txt

File3.txt – Properties

securitysettings-security-file3

 

File3.txt – Advanced Security Settings

securitysettings-file3-advancedsecuritysettings

 

Script

Logged On user

Code


rem **********************************************************
rem -q Omit Banner
rem -nobanner No banner
rem -v Verbose
rem **********************************************************


set _folder=E:\BAK

set _principalSelf=%USERDOMAIN%\%USERNAME%

rem List all permissions on this folder
AccessChk -nobanner -d "%_folder%"

REM User me has access
AccessChk -nobanner "%_principalSelf%" "%_folder%"

REM User me has no access ( -n )
AccessChk -nobanner -n "%_principalSelf%" "%_folder%"



Output

 

filepermissionforself-20170126-0109pm

Explanation

  1. Used %USERDOMAIN%\%USERNAME% to get current logon’s Domain and User
  2. Retrieve permissions at folder level using -d
  3. Retrieve permission for user against all files
    • Listed 3 files
    • file1.txt and file2.txt we have permissions ( RW :- Read and Write )
    • file3.txt we do not have permission ( File name still listed but without permission set )
  4. Listed files that we do not have permission ( E:\BAK\file3.txt )

 

Another User

This other user does not have access

Script


rem **********************************************************
rem -q Omit Banner
rem -nobanner No banner
rem -v Verbose
rem **********************************************************


set _folder=E:\BAK

set _principal=AD\bpolakam

rem List all permissions on this folder
AccessChk -nobanner -d "%_folder%"

REM User me has access
AccessChk -nobanner "%_principal%" "%_folder%"

REM User me has no access ( -n )
AccessChk -nobanner -n "%_principal%" "%_folder%"



Output

filepermissionforanother-20170126-0119pm

Explanation

  1. Specified full domain name using Domain\Principal syntax
  2. Retrieve permissions at folder level using -d
  3. Retrieve permission for user against all files
    • Listed 3 files
    • file1.txt, file2.txt, and file3.txt  are all listed
      • File names still listed but without permission set
  4. Listed all 3 files as user does not have permission to any of the files

 

References

  1. By Aaron Margosis and Mark E. Russinovich – Windows Sysinternals Administrator’s Reference: Security Utilities
    Link