Skip to content

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… 

Snipping Tool – Capture Contextual Menu

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… 

Get last reboot time

systeminfo | findstr /C:”System Boot Time” $BootTime = (systeminfo | find “System Boot Time:”).Replace(“System Boot Time:”,””).Trim() $BootTime $Uptime = (Get-Date) – [datetime]$BootTime $Uptime

Display users using sp_who, sp_who2 – SQL Server

— 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,… 

Query Connection Data – SQL Server

use [master] go SELECT DB_NAME(dbid) as DBName, COUNT(dbid) as NumberOfConnections, loginame as LoginName FROM sys.sysprocesses WHERE dbid > 0 GROUP BY dbid, loginame order by 2 desc SELECT * FROM sys.dm_exec_sessions where host_name is not…