Skip to content

Instantly share code, notes, and snippets.

Avatar

Larry Smith Jr. mrlesmithjr

View GitHub Profile
@mrlesmithjr
mrlesmithjr / nexentastor_vmdump.3
Created Dec 12, 2013
Nexentastor vmdump.3 12/11/2013
View nexentastor_vmdump.3
> $C
ffffff003d14fb00 arc_hdr_destroy+0xe5(ffffff12f090d930)
ffffff003d14fb80 _l2arc_evict+0x25e(ffffff091b368498, 800000, 0, 1)
ffffff003d14fbd0 l2arc_evict+0xc4(ffffff091b368498, 800000, 0)
ffffff003d14fc40 l2arc_feed_thread+0x161()
ffffff003d14fc50 thread_start+8()
>
::panicinfo
cpu 2
@mrlesmithjr
mrlesmithjr / nexentastor_vmdump.2
Last active Dec 31, 2015
Nexentastor vmdump.2 12/09/2013
View nexentastor_vmdump.2
> $C
ffffff003d14fa90 buf_hash_remove+0x4b(ffffff0a5520d970)
ffffff003d14fb00 arc_change_state+0x1cd(fffffffffbd19d60, ffffff0a5520d970, ffffff090c5cf528)
ffffff003d14fb80 _l2arc_evict+0x256(ffffff091b7b81a0, 800000, 0, 1)
ffffff003d14fbd0 l2arc_evict+0xc4(ffffff091b7b81a0, 800000, 0)
ffffff003d14fc40 l2arc_feed_thread+0x161()
ffffff003d14fc50 thread_start+8()
>
> ::panicinfo
cpu 1
@mrlesmithjr
mrlesmithjr / nexentastor_vmdump.1
Last active Dec 31, 2015
Nexentastor vmdump.1 12/4/2013
View nexentastor_vmdump.1
> $C
ffffff003e755c00 close_exec+0x54(ffffff09226564d8)
ffffff003e755e00 exec_common+0x76b(8046f10, 9222bb8, 8047cb4, 0)
ffffff003e755e30 exece+0x1f(8046f10, 9222bb8, 8047cb4)
ffffff003e755ec0 dtrace_systrace_syscall32+0x11a(8046f10, 9222bb8, 8047cb4, 1c3, 1, 0)
ffffff003e755f10 _sys_sysenter_post_swapgs+0x149()
>
> ::panicinfo
cpu 0
thread ffffff091c40b3e0
@mrlesmithjr
mrlesmithjr / nexentastor_vmdump.0
Created Dec 12, 2013
Nexentastor vmdump.0 11/25/2013
View nexentastor_vmdump.0
> $C
ffffff003db35d60 log_sysevent_free_data+0x54(fecaefa0)
ffffff003db35db0 modctl_modevents+0x6e(4, fecaefa0, 0, 0, 0)
ffffff003db35e30 modctl+0x229(f, 4, fecaefa0, 0, 0, 0)
ffffff003db35ec0 dtrace_systrace_syscall32+0x11a(f, 4, fecaefa0, 0, 0, 0)
ffffff003db35f10 _sys_sysenter_post_swapgs+0x149()
> ::panicinfo
cpu 2
thread ffffff090e7be060
message BAD TRAP: type=d (#gp General protection) rp=ffffff003db35c40 addr=0
@mrlesmithjr
mrlesmithjr / get_vmhost_net.ps1
Last active Jan 8, 2017
Gather all host network settings using PowerCli
View get_vmhost_net.ps1
#Provided by @mrlesmithjr
#EveryThingShouldBeVirtual.com
#
# Set variable for all hosts in current vCenter
$vmhosts = @(Get-VMHost)
foreach ($vmhost in $vmhosts) {
Get-NetworkAdapter $vmhost
}
@mrlesmithjr
mrlesmithjr / Get_VM_Network.ps1
Last active Dec 31, 2015
Collect VM Guest Network settings for powered on vms
View Get_VM_Network.ps1
#Provided by @mrlesmithjr
#EveryThingShouldBeVirtual.com
#
# Set variable for all VMs that are powered on
$vms = Get-vm | where { $_.PowerState -eq PoweredOn}
# Capture default info
Get-VMGuestNetworkInterface $vms
# Capture more details - Only works for Windows VMs
Get-VMGuestNetworkInterface $vms | Select VM, Name, IPPolicy, Ip, Dns, DefaultGateway, DnsPolicy
View remotecopyfiles.sh
#!/bin/bash
#Provided by @mrlesmithjr
#EveryThingShouldBeVirtual.com
#
# This script will prompt for needed info to copy a file to a remote server using scp and then move it to the final destination of choice
#
echo -n "Enter remote servername: "
read remoteservername
echo -n "Enter username to connect with: "
read remoteusername
View logstash.conf
input {
udp {
type => "syslog"
port => "514"
}
filter {
if [type] == "syslog" {
dns {
reverse => [ "host" ] action => "replace"
}
View gist:eadec9e51382d2426729
output {
syslog {
type => "syslog-relay"
facility => "%{syslog_facility}"
host => "solarwinds"
port => 514
severity => "%{syslog_severity}"
}
}
View gist:53453bfb5d418f7a2b71
input {
redis {
host => "127.0.0.1"
data_type => "list"
key => "logstash"
}
}
input {
udp {
type => "syslog"