Here you will find my collection of cheatsheets. This is mainly because I find it hard to remember every command. So i make a note here and refer back to it when needed.
If you like it please leave a comment, or if you have a command to recommend then please let me know.
VMware Cheatsheet
These cheats sheets are to be used on VMware plaform
Operating System | Application | Type | Command | What it does | Notes |
Linux | FTP | Log Location | /etc/log/vsftpd.log | Location of FTP logs | |
Vmware | PowerCLI | Vmkernel | /etc/init.d/hostd restart /etc/init.d/vpxa restart | Restart Management services on Host | |
Vmware | PowerCLI | VM | # Check if your VM has (Change Block Tracking) enabled or not (Get-VM -Name TESTSERVER04).ExtensionData.Config.ChangeTrackingEnabled (Get-VM-Name GPNEWDMPP03).ExtensionData.Config.ChangeTrackingEnabled # Find VMs where CBT (Change Block Tracking) is Enabled Get-VM| Where-Object{$_.ExtensionData.Config.ChangeTrackingEnabled-eq $true} | Check if CBT enabled on VM | Amend server names as appriopriate |
Vmware | PowerCLI | VM-Nework | Get-VM | Get-NetworkAdapter | Select @{N=’VM’;E={$_.Parent.Name}},@{N=’AdapterName’;E={$_.Name}},@{N=’Type’;E={$_.Type}} | Where-Object{$_.Type -eq “e1000”} | Get VM NIC with E1000 | |
Vmware | PowerCLI | VM | Get-vm | Select Name, @{N=”IP Address”;E={@($_.guest.IPAddress[0])}} | Get VM IP | |
Vmware | PowerCLI | VM | Get-VM | Select Name, @{N=”Cluster”;E={Get-Cluster -VM $_}}, @{N=”ESX Host”;E={Get-VMHost -VM $_}}, @{N=”Datastore”;E={Get-Datastore -VM $_}} |sort-object Datastore | Get VM Name, cluster, ESX , Datastore – and sort by Datastore | |
Vmware | PowerCLI | VM-Nework | Get-VM | Get-NetworkAdapter | Select-Object Parent,Type | Query the nic type of all virtual machines | |
Vmware | PowerCLI | VM-Datastore | get-vm | foreach-object -process {get-harddisk $_} | select-object storageformat | format-list | Query the disk type of all virtual machines | |
Vmware | PowerCLI | VM | Get-VM | Get-Snapshot | Where {$_.Created -lt (Get-Date).AddDays(-90)} | Select-Object VM, Name, Created, SizeMB | Get snapshots older than 3 months | |
Vmware | PowerCLI | VM | Get-VM | Get-Snapshot | Where {$_.Created -lt (Get-Date).AddDays(-120)} | Remove-Snapshot -Confirm:$false | Get snapshots then remove them | |
Vmware | PowerCLI | VM | Get-VM | Format-Table Name, @{Label=”NumSnapshots”;Expression={(Get-Snapshot -VM $_ | Measure-Object).Count}} | Count number of snapshots | |
Vmware | PowerCLI | VM | get-vm |% { get-view $_.id } | select Name, @{ Name=”;ToolsVersion”;; Expression={$_.config.tools.toolsVersion}} | Get Vmware tools version | |
Vmware | PowerCLI | Host | get-vmhost | select Name,@{Name=”Time”;Expression={(get-view $_.ExtensionData.configManager.DateTimeSystem).QueryDateTime()}} | Get time off hosts | |
Vmware | PowerCLI | VM | ForEach ($VM in Get-VM ){($VM.Extensiondata.Guest.Disk | Select @{N=”Name”;E={$VM.Name}},DiskPath, @{N=”Capacity(MB)”;E={[math]::Round($_.Capacity/ 1MB)}}, @{N=”Free Space(MB)”;E={[math]::Round($_.FreeSpace / 1MB)}}, @{N=”Free Space %”;E={[math]::Round(((100* ($_.FreeSpace))/ ($_.Capacity)),0)}})} | Get Vms and free disk space | |
Vmware | PowerCLI | Host | Get-VMHost | Sort Name | Get-View | Select Name, @{N=”CPU”;E={$_.Hardware.CpuPkg[0].Description}} | Get Host CPU info | |
Vmware | PowerCLI | Host | Get-Vmhost * | Lists Vmhost | |
Vmware | PowerCLI | Host | get-vmhost -datastore ARJ-7001N-DS01 | Get Vmhosts on particular datastore | |
Vmware | PowerCLI | Host | $esxihost | Get-VMHostService | Get Vmhosts services | |
Vmware | PowerCLI | Host | $esxihost | Get-VMHostService | where {$_.key -eq “TSM-SSH”} | Find $vmhosts with SSH running | |
Vmware | PowerCLI | Host | $esxihost | Get-VMHostService | where {$_.key -eq “TSM-SSH”} | Start-VMHostService | Start SSH service on $exsihost | |
Vmware | PowerCLI | Host | $esxihost | Get-VMHostService | where {$_.key -eq “TSM-SSH”} | Stop-VMHostService | Stop SSH service on $esxihost | |
Vmware | PowerCLI | VM | Get-VM | Get-View | Select-Object Name, @{name=”toolsVersions”; Expression={$_.config.tools.toolsversion}} | Get Vmware Tools versions | |
Vmware | PowerCLI | Host | $esxihost | Get-VM | Get-Snapshot | Get list of snapshots on $esxihost | |
Vmware | PowerCLI | Host | $esxihost | Get-VM | Get-VMGuest | format-table | Get list of Guest Operating systems on $esxihost | |
Vmware | PowerCLI | Host | get-vmhost | select Name,@{Name=”Time”;Expression={(get-view $_.ExtensionData.configManager.DateTimeSystem).QueryDateTime()}} | Get time on all hosts | |
Vmware | PowerCLI | Host | $esxihost |Get-VM |Where {$_.PowerState -eq “PoweredOn“} |Sort Name |Select Name, NumCPU, @{N=“OSHAL“;E={(Get-WmiObject -ComputerName $_.Name-Query “SELECT * FROM Win32_PnPEntity where ClassGuid = ‘{4D36E966-E325-11CE-BFC1-08002BE10318}’“ |Select Name).Name}}, @{N=“OperatingSystem“;E={(Get-WmiObject -ComputerName $_ -Class Win32_OperatingSystem |Select Caption).Caption}}, @{N=“ServicePack“;E={(Get-WmiObject -ComputerName $_ -Class Win32_OperatingSystem |Select CSDVersion).CSDVersion}} | Get Detailed VM information | Must have permissions on Guest-VMs to propagate all information |
Vmware | PowerCLI | Host | Get-VMHost | Select @{N=”Cluster”;E={Get-Cluster -VMHost $_}}, Name, @{N=”NumVM”;E={($_ | Get-VM).Count}} | Sort Cluster, Name | List how many VMs are running on a Host | |
Vmware | PowerCLI | VM | ForEach ($VM in Get-VM ){($VM.Extensiondata.Guest.Disk | Select @{N=”Name”;E={$VM.Name}},DiskPath, @{N=”Capacity(MB)”;E={[math]::Round($_.Capacity/ 1MB)}}, @{N=”Free Space(MB)”;E={[math]::Round($_.FreeSpace / 1MB)}}, @{N=”Free Space %”;E={[math]::Round(((100* ($_.FreeSpace))/ ($_.Capacity)),0)}})} | List all VM’s and their disk sizes | |
Vmware | PowerCLI | Host | Get-VMHost | Sort Name | Get-View | Select Name, @{N=”CPU”;E={$_.Hardware.CpuPkg[0].Description}} | Get Host CPU details | |
Vmware | PowerCLI | Host | Get-VMHost |Sort Name |Get-View |Select Name, @{N=“Type“;E={$_.Hardware.SystemInfo.Vendor+ “ “ + $_.Hardware.SystemInfo.Model}},@{N=“CPU“;E={“PROC:“ + $_.Hardware.CpuInfo.NumCpuPackages + “ CORES:“ + $_.Hardware.CpuInfo.NumCpuCores + “ MHZ: “ + [math]::round($_.Hardware.CpuInfo.Hz / 1000000, 0)}},@{N=“MEM“;E={“†+ [math]::round($_.Hardware.MemorySize / 1GB, 0) + “ GB“}} | Get Host Hardware information | |
Vmware | PowerCLI | Host | Get-VMHost | Get-VMHostNetwork | Select Hostname, VMKernelGateway -ExpandProperty VirtualNic | Where {$_.ManagementTrafficEnabled} | Select Hostname, PortGroupName, IP, SubnetMask | This will then dump the ESXi Hostnames, IPs and Subnets – For the Management Network | |
Vmware | PowerCLI | Host | Get-VMHost | Get-VMHostNetwork | Select Hostname, VMKernelGateway -ExpandProperty VirtualNic | Where {$_.vMotionEnabled} | Select Hostname, PortGroupName, IP, SubnetMask | This will then dump the ESXi Hostnames, IPs and Subnets – For the vMotion Network | |
Vmware | PowerCLI | Host | Get-VMHost | Get-Cluster | Select Name, DrsEnabled, DrsMode, DrsAutomationLevel | Dump DRS status | |
Vmware | PowerCLI | Host | Get-VMHost | Get-Cluster | Select Name, VMSwapfilePolicy | Dump VMSwapfilePolilcy | |
Vmware | PowerCLI | Host | Get-VMHost | Get-Cluster | Select Name, HAAdmissionControlEnabled | Check status of HA Admission Control | |
Vmware | PowerCLI | Host | Get-VMHost | Get-Cluster | Select Name, HAFailoverLevel, HARestartPriority, HAIsolationResponse | Check HA Status Levels | |
Vmware | PowerCLI | VM-Nework | Get-VMHost | Get-VMHostNetwork | Select Hostname, VMKernelGateway -ExpandProperty VirtualNic | Select Hostname, PortGroupName, IP, MTU | Check for MTU Mismatches | |
Vmware | PowerCLI | VM-Nework | Get-VirtualSwitch | Select VMHost, Name, MTU | Shows what the MTU settings on the Virtual Switches are | |
Vmware | PowerCLI | VM-Nework | Get-VMGuestNetworkInterface –VM VMNAME | Select VM, IP, SubnetMask, DefaultGateway, Dns | Dumps a hosts Name, IP, Subnet, Gateway and DNS configuration | |
Vmware | PowerCLI | Host | Get-VMHost | Get-ScsiLun | Select VMHost, ConsoleDeviceName, Vendor, MultipathPolicy | This will dump the Multipath Policy of the storage on the systems to determine what the MP configuration is. | |
Vmware | PowerCLI | Host | Get-VMHost | Sort Name | Select Name, @{N=â€NTPâ€;E={Get-VMHostNtpServer $_}} | This will dump NTP Configuration settings | |
Vmware | PowerCLI | Host | Get-View -ViewType HostSystem | Sort Name | Select Name,@{N=”BIOS version”;E={$_.Hardware.BiosInfo.BiosVersion}}, @{N=”BIOS date”;E={$_.Hardware.BiosInfo.releaseDate}} | This will dump the hosts BIOS version and date(s) | |
Vmware | PowerCLI | Host | get-vmhost | Get-VMHostAdvancedConfiguration -Name Syslog.global.logHost | Dump the current SYSLOG Configuration | |
Vmware | PowerCLI | VM-Nework | $esxihost | Get-VM | Get-NetworkAdapter | Select @{N=’VM’;E={$_.Parent.Name}},@{N=’AdapterName’;E={$_.Name}},@{N=’Type’;E={$_.Type}} | Where-Object{$_.Type -eq “e1000”} | Detailed E1000 details of $esxihost | |
Vmware | PowerCLI | VM | Get-VIEvent -maxsamples 10000 |where {$_.Gettype().Name-eq “VmCreatedEvent” -or $_.Gettype().Name-eq “VmBeingClonedEvent” -or $_.Gettype().Name-eq “VmBeingDeployedEvent”} |Sort CreatedTime -Descending |Select CreatedTime, UserName,FullformattedMessage -First 10 | Find Vm’s Created last 10 days | |
Vmware | PowerCLI | VM-Snapshot | $esxihost | Get-VM | Get-Snapshot | Select VM,Name,Created,sizegb,description | Get Snapshot details of $esxihost and list name, vmname, sizegb and snapshot description | |
Vmware | PowerCLI | VM-Nework | $myvm | Get-NetworkAdapter | Select parent, name, type, networkname, connectionstate |Format-Table -AutoSize | Define $myvms – lists network adapter details | |
Windows Server | Command Prompt | Persistant Routes | route add -P 195.118.166.0 MASK 255.255.255.0 172.20.204.20 | Adds Persistant Route to SDN for Newport | |
Windows Server | Command Prompt | Persistant Routes | route add -P 194.201.103.0 MASK 255.255.255.0 172.20.204.20 | Adds Persistant Route to SDN for Telford | |
Windows Server | Command Prompt | Active Directory | Netdom computername %computername% /add:serverfqn | Add Computer to AD | |
Windows Server | Command Prompt | Active Directory | Netdom computername %computername% /remove:serverfqn | Make Primary | |
Windows Server | Command Prompt | Active Directory | Netdom computername %computername% /remove:serverfqn | Remove from AD | |
Windows Server | Command Prompt | DHCP | ipconfig /all | find /i “DHCP Server” | Find DHCP Server | |
Windows Server | Command Prompt | DHCP | netsh dhcp show server | List all authorsed DHCP servers | |
Windows Server | Command Prompt | Persistant Routes | route add -P 195.118.166.0 MASK 255.255.255.0 172.20.204.20 | Adds static Routes to the SDN | |
Windows Server | Command Prompt | Persistant Routes | route add -P 194.201.103.0 MASK 255.255.255.0 172.20.204.20 | Adds static Routes to the SDN | |
Windows Server | PowerShell | PS Core Command | $psversiontable | Which version of powershell and I running | |
Windows Server | PowerShell | PS Core Command | Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass | Allow execution of commands | Use with caution |
Windows Server | PowerShell | Printer | Get-Printer | select Name, DriverName, PortName | Export-Csv Printers.csv -NoTypeInformation | List printers on a server | |
Windows Server | PowerShell | PS Command | Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize >C:\temp\installed.txt | List installed programs on server | |
Windows Server | PowerShell | Active Directory | Get-ADDomainController -Filter * | Format-table name,domain, forest,site, ipv4address, operatingsystem | Find Domain Controllers | |
Windows Server | PowerShell | File System | Get-Childitem -Path C:\windows -Recurse -Filter *.dll | Find any *dll* on filesystem – recursive | |
Windows Server | PowerShell | File System | Get-ItemProperty .\install.xml | select * | Get Detailed File information | |
Windows Server | PowerShell | Active Directory | Search-ADAccount -LockedOut | Format-Table name,lastlogondate, lockedout, objectclass, passwordexpired, passwordneverexpires | Find locked out users | |
Windows Server | PowerShell | Active Directory | Search-ADAccount -AccountDisabled -UsersOnly | FT Name,ObjectClass -A | Find disabled users | |
Windows Server | PowerShell | Active Directory | Search-ADAccount -AccountInactive -TimeSpan 90.00:00:00 -UsersOnly | FT Name,ObjectClass -A | Find Users not logged in for 90 days | |
Windows Server | PowerShell | Active Directory | Search-ADAccount -AccountInactive -TimeSpan 90.00:00:00 -UsersOnly |Sort-Object | FT Name,ObjectClass -A | Find Users not logged in for 90 days & Sort | |
Windows Server | PowerShell | Active Directory | Search-ADAccount -AccountInactive -TimeSpan 90.00:00:00 -UsersOnly |Sort-Object -property lastlogondate | FT Name,ObjectClass,lastlogondate, lockedout, -A | Find Users not logged in for 90 days & Sort by last logon | |
Windows Server | PowerShell | Active Directory | Get-ADGroupMember -identity “Domain Admins†-recursive | select name | Export-csv -path C:\temp\Groupmembers.csv -NoTypeInformation | Find “domain admins” | Change group as required |
Windows Server | PowerShell | Active Directory | Get-ADComputer -Filter ‘Name -like “gbsyn*”‘ -Properties canonicalName,CN,created,IPv4Address,objectclass,OperatingSystem,OperatingSystemServicePack | Find Computer with GBSYN* in the name | Change as required |
Windows Server | PowerShell | Active Directory | Get-ADPrincipalGroupMembership -identity ssi_rbailey | Sort-object | FT -property name, samaccountname -AutoSize | Find which AD groups a user is member of | Change as required |
Windows Server | PowerShell | Active Directory | Get-ADGroupMember -Identity “Domain Admins” -Recursive | %{Get-ADUser -Identity $_.distinguishedName -Properties Enabled | ?{$_.Enabled -eq $false}} | Select DistinguishedName,Enabled | Export-Csv c:\temp\result.csv -NoTypeInformation | Find Disabled Domain admins | |
Windows Server | PowerShell | Active Directory | Get-ADGroupMember -Identity “Domain Admins” -Recursive | %{Get-ADUser -Identity $_.distinguishedName -Properties Enabled | ?{$_.Enabled -eq $false}} | Select Name,SamAccountName,Enabled, objectclass | sort-object -Property name | Find Disabled Domain admins & Sort | |
Windows Server | PowerShell | Active Directory | Get-ADGroupMember -Identity “Domain Admins” -Recursive | %{Get-ADUser -Identity $_.distinguishedName -Properties Enabled | ?{$_.Enabled -eq $false}} | Select Name,SamAccountName,Enabled, objectclass | sort-object -Property name | Export-CSV C:\temp\DisabledDomainAdmins.csv | Find Disabled Domain admins & Sort & Export to CSV | |
Windows Server | PowerShell | Active Directory | Get-ADGroupMember -Identity “GROUPNAME” -Recursive | %{Get-ADUser -Identity $_.distinguishedName -Properties Enabled | ?{$_.Enabled -eq $true}} | Select Name,Enabled | Find members in a group | |
Windows Server | PowerShell | Event Log | Get-Eventlog application -Newest 2000 |Â Where-Object {$_.entryType -Match “Error”} | Find Latest errors in Eventlog | Application log |
Windows Server | PowerShell | Event Log | Get-Eventlog system -Newest 2000 |Â Where-Object {$_.entryType -Match “Error”} | Find Latest errors in Eventlog | System Log |
Windows Server | PowerShell | Registry | cd hkcu: | Navigate Registry like filesystem | Admin rights needed |
Windows Server | PowerShell | Processes | ps | sort –p ws | select –last 5 | Find the five processes using the most memory | |
Windows Server | PowerShell | Services | Restart-Service DHCP | Restar DHCP service | Amend as required |
Windows Server | PowerShell | File System | Get-ChildItem – Force | List all items within a folder | |
Windows Server | PowerShell | File System | Get-ChildItem –Force c:\directory –Recurse | List all items within a folder & all subfolders | Can take a long time to complete |
Windows Server | PowerShell | Services | Get-WmiObject -Class Win32_Service -Filter “state = ‘running’ and startmode = ‘auto'” | Select-Object name, startmode, description | Format-table -AutoSize | Get list of Services that start automatically | |
Windows Server | PowerShell | SQL | [System.Reflection.Assembly]::LoadWithPartialName(‘Microsoft.SqlServer.SMO’) | Load SQL modules into memory | Must be done on server will SQL installed (2008 or greater) |
Windows Server | PowerShell | SQL | [System.Reflection.Assembly]::LoadWithPartialName(‘Microsoft.SqlServer.SMO’) | out-null $s = New-Object (‘Microsoft.SqlServer.Management.Smo.Server’) “servername” $dbs=$s.Databases $dbs | SELECT Name, Collation, CompatibilityLevel, AutoShrink, RecoveryModel | Discover SQL instances | edit “servername” accoringly |
Windows Server | PowerCLI | VM | Get-VIEvent -maxsamples 10000 | where {$_.Gettype().Name -eq”VmRemovedEvent”} | Sort CreatedTime -Descending | Select CreatedTime, UserName, FullformattedMessage -First 19 | Find Vm’s Remove last 10 days | |
Windows Server | PowerShell | Patching | $wu = new-object -com “Microsoft.Update.Searcher†$totalupdates = $wu.GetTotalHistoryCount() $all = $wu.QueryHistory(0,$totalupdates) # Define a new array to gather output $OutputCollection= @() Foreach ($update in $all) { $string = $update.title $Regex = “KB\d*†$KB = $string | Select-String -Pattern $regex | Select-Object {$_.Matches } $output = New-Object -TypeName PSobject $output | add-member NoteProperty “HotFixID†-value $KB.‘ $_.Matches ‘.Value $output | add-member NoteProperty “Title†-value $string $OutputCollection += $output } # Output the collection sorted and formatted: $OutputCollection | Sort-Object HotFixID | Format-Table -AutoSize Write-Host “$($OutputCollection.Count) Updates Found†| Command to get all Installed KB (Windows Update) from Server | Best run for Powershell ISE |
Windows Server | Command Prompt | McAffee | frminst.exe /remove=agent | Force uninstall McAffee when managed by another server (managed mode) | First, try typing the following: cd “C:\Program Files (x86)\McAfee\Common Framework” If that worked, then continue to the next step. Otherwise, if you got a message saying the system cannot find the path specified, then type the following: cd “C:\Program Files\McAfee\Common Framework” |
Windows Server | PowerShell | ||||
Windows Server | PowerShell | ||||
Windows Server | PowerShell |
Linux Cheatsheet
These cheats sheets are to be used on Linux Servers (Typically RHEL)
Networking
Command | What is does? |
---|---|
route add -net 10.98.208.40 netmask 255.255.255.255 gw 172.31.191.254 | Add a static root - substitute for your IP information |
route del -net 10.98.208.40 netmask 255.255.255.255 gw 172.31.191.254 | Remove static route |
ifconfig eth1 192.168.1.2 netmask 255.255.240.0 gw 192.168.1.1 | Configure Ethernet |
/etc/sysconfig/network-scripts | Location for Networking boot configuration |
ifup eth1 boot | enable NIC at boot |
ifdown eth1 boot | disabled NIC at boot |
ip -s link | enable overview of traffic |
dhclient eth01 dhclient ens33 | get new IP from DHCP |
/etc/sysconfig/network | basic Network config |
cat /etc/resolv.conf | DNS server details |
cat /etc/hosts | Local host file |
cat /etc/services | Ports used for Firewall |
iptable -F | Flush IPtables |
iptables -I INPUT -p tcp --dport 48000 -j ACCEPT | Open port 48000 on firewall |
Aix Cheatsheet
I’m a big fan of the verstility of of AIX. Its such a reliable OS and once you get your head around the concepts its very easy to manage and maintain. If you know Linux you can apply the majority of that knowledge to AIX.
Most of these commands will also work on Linux
Command | What it does |
find / -xdev | xargs ls -ld | sort -rnk 5 | more | Search AIX Filesystem for files |
egrep –p “ Search string “ –f filename.log | useful for grep very large dsmsched.logs |
q vol devclass=lto_tape | Queries Tape Library and Lists Scratch tapes |
q req | lists requests to reply to |
lscfg –vl fcs3 | Get details of a fibre card fcs3 |
nohup /opt/Tivoli/tsm/client/ba/bin/rc.tsmclient >/dev/null 2>&1 | Starts TSM Process |
dd if=/dev/cdrom of=line500v7.1WindowsServer.iso bs=1024 | Command how to copy ISO on AIX |
ls |sort |awk ‘{name=toupper($1);if(name==pre1) printf(“** %s %s\n”,$1,pre2); pre1=name;pre2=$1}’ | AIX command used to find the duplicate files |
find /var -xdev | xargs ls -ld | sort -rnk 5 | more | Finding large files in AIX (EG /VAR) |
startsrc -s qdaemon | restart error daemon |
Terraform Cheatsheet
Command | What it does? |
---|---|
terraform -install-autocomplete | Enables tab completion |
-help | Shows the help files |
apply | apply the changes |
console | creates and interactive console |
destroy | destroys the Terraform-managed infrastructure |
fmt | used to rewrite Terraform configuration files |
force-unlock | used to remove lock on the state for the current configuration |
get | used to download and update modules |
graph | used to generate a a graph |
import | used to import existing resources |
init | used to initilize a working directory |
output | used to extract the value of an output variable |
plan | used to create an execution plan |
providers | used to print information about providers (eg VMware, AWS, HyperV etc etc etc) |
push | used to upload your configuration |
refresh | used to update the state of a file |
show | useds to provide output from a state or plan file |
state | used for advanced state management |
taint | used to mark resources as tainted |
validate | used to validate the syntax of terraform files |
untaint | used to unmark a resourse as tainted |
workspace | used to manage workspaces |
Type or Variable | What it does |
---|---|
"var" prefix | User String Variable Interpolate |
"var.MAP["KEY"] | User Map Variable Value of Key |
"${var.LIST}" | Value of the list as a list List elements by Index |
"self.ATTRIBUTE" | Own Resource |
"TYPE.NAME.ATTRIBUTE" | Other Resource |
"data.TYPE.NAME.ATTRIBUTE" | Data Source |
MODULE.NAME.OUTPUT" | Module outputs |
"Count.FIELD" | Count |
"path.TYPE" | Path |
"terraform.FIELD" | Terraform Meta |
San Volume Controller (SVC) Cheat Sheet
Command ▾ | Common Arguments & Description | Command Description |
svcinfo lscluster | Displays cluster members id, name, location, ip-address etc | Display info about clusters |
svcinfo lscontroller | Displays controllers id, name etc | Display info about controllers visible to the system |
svcinfo lsfabric | Displays remote_wwpn, remote_nportid, id, node_name, local_wwpn, local_port etc | Display connectivity between nodes and other controllers and hosts |
svcinfo lshost | Displays controllers id, name etc | Display info about controllers visible to the system |
svcinfo lshostvdiskmap | host1 (Obtain a list of the virtual disks that are mapped (visible) to host1, including vdisk_id, vdisk_name, wwpn etc) | Obtain a list of the virtual disks that are mapped (visible) to a given host |
svcinfo lsmdisk | Displays id, name, status, mode, mdisk_grp_name etc for all MDisks | Display info about MDisks visible to the cluster |
svcinfo lsmdiskgrp | Displays id, name, status, mdisk_count, vdisk_count, capacity etc for all MDisk groups | Display info about MDisk groups visible to the cluster |
svcinfo lsrcconsistgrp | app_CG1 (Displays a detailed view of consistency group app_CG1 including state, status and sync attributes | Displays a detailed view of Metro or Global Mirror consistency groups visible to the cluster |
svcinfo lsrcrelationship | Displays id, name, master_cluster_name, master_vdisk_name, consistency_group_name etc | Display information about all the Metro Mirror relationships visible to the cluster |
svcinfo lsvdisk | Displays id, name, io_group_name, status, mdisk_grp_id, mdisk_grp_name, capacity etc for all VDisks | Display information about VDisks recognized by the cluster |
svcinfo lsvdisk | vdisk1 (Displays detailed information about vdisk1 including mdisk_grp_name and remote copy relationship RC_name) | Display detailed information about a specific VDisk recognized by the cluster |
svctask mkrcrelationship | -master master_vdisk_name -aux aux_vdisk_name -cluster cluster_name -name data_1 (Creates a new rc relationship named data_1) | Creates a new Metro or Global Mirror relationship with virtual disks (VDisks) |
svctask mkvdisk | -mdiskgrp 0 -iogrp 0 -size 50 -vtype striped -unit gb -name app1_1 (Create a vdisk named app1_1) | Create a sequential, striped of image mode Vdisk |
svctask mkvdiskhostmap | -host host1 -scsi 1 app1_1 (Create a new mapping between vdisk app1_1 and host1 assigning SCSI LUN ID 1 to app1_1 on host1) | Create a new mapping between a virtual disk and a host making the vdisk accessible for I/O to the specified host |
svctask startrcconsistgrp | -primary master -force (Start the consistency group copy process, specifying the copy direction (the master becomes the primary) even if the copy process leads to a temporary loss of consistency during synchronisation (-force)) | Start the Metro or Global Mirror consistency group copy process |
svctask startrcrelationship | rc_rel_app1 (Start the remote copy relationship for relationship name rc_rel_app1) | Starts the Metro Mirror or Global Mirror relationship copy process |
svctask stoprcconsistgrp | -access app_CG1 (Stops the copy process for consistency group app_CG1 and allows write access to consistent secondary VDisks in app_CG1 (-access)) | Stops the copy process for a Metro Mirror or Global Mirror consistency group |