I needed to establish the amount of processors available to a SQL Server. A SQL Server scheduler is mapped to a single logical processor, so using this query you can establish the amount of processors. Any scheduler_id < 255 is a scheduler.
It gets lightly more complicated if hyperthreading is enabled. . Find out from the server administrator , use a product such as the coreinfo or this Powershell script - Number of physical processors with Powershell – number of cores to establish if hyperthreading is turned on.
If hyperthreading is enabled – this equates to double the schedulers.
SELECT * FROM sys.dm_os_schedulers WHERE scheduler_id < 255;
Read More
SOS_SCHEDULER_YIELD and how to reduce it - SQL Server DBA
Affinity Mask on SQL Server 2008 R2 - SQL Server DBA
How to report a SQL Server performance problem - SQL Server DBA