free -m
Real Memory Consumption = Total – (free + buffers + cached) # free -m total used free shared buffers cached Mem: 15943 15678 265 6 511 3706 -/+ buffers/cache: 11460 4483 Swap: 8159 0…
Real Memory Consumption = Total – (free + buffers + cached) # free -m total used free shared buffers cached Mem: 15943 15678 265 6 511 3706 -/+ buffers/cache: 11460 4483 Swap: 8159 0…
ipconfig /flushdns
$env $env:path $env:PSModulePath Full list Get-Childitem env:
When you want to capture a menu option, (that annoyingly disappears when you try to capture with snipping tool), use the following procedure: Ensure there is no current capture in the snipping tool program (open/reopen…
To get help about regular expressions in powershell, at the command prompt: help about_regular_expression
use[master] — SQL Server authentication logins select * from sys.sql_logins — all logins/users select * from sys.server_principals order by type_desc
use [msdb] select * from sysjobs select * from sysjobactivity select * from sysjobs_view select * from sysjobhistory order by job_id, step_id
systeminfo | findstr /C:”System Boot Time” $BootTime = (systeminfo | find “System Boot Time:”).Replace(“System Boot Time:”,””).Trim() $BootTime $Uptime = (Get-Date) – [datetime]$BootTime $Uptime
— see users logged – table variable example DECLARE @whotable TABLE ( SPID INT, Status VARCHAR(1000) NULL, Login SYSNAME NULL, HostName SYSNAME NULL, BlkBy SYSNAME NULL, DBName SYSNAME NULL, Command VARCHAR(1000) NULL, CPUTime INT NULL,…
SELECT * FROM ( SELECT TOP 10000 SUBSTRING(qt.TEXT, (qs.statement_start_offset/2)+1, ((CASE qs.statement_end_offset WHEN -1 THEN DATALENGTH(qt.TEXT) ELSE qs.statement_end_offset END – qs.statement_start_offset)/2)+1) AS [Text], qs.execution_count, qs.total_logical_reads, qs.last_logical_reads, qs.total_logical_writes, qs.last_logical_writes, qs.total_worker_time/1000 total_worker_time_in_ms, qs.last_worker_time/1000 last_worker_time_in_ms, qs.total_elapsed_time/1000 total_elapsed_time_in_ms, qs.last_elapsed_time/1000 last_elapsed_time_in_ms,…