This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/sbin/dtrace -s | |
#pragma D option quiet | |
#pragma D option strsize=8096 | |
/*Output mysql queries in slow query log format*/ | |
pid$target::*mysql_parse*:entry / strstr(copyinstr(arg1), "ledger_entries") != NULL / /* This probe is fired when the execution enters mysql_parse */ | |
{ | |
self->s_time = timestamp; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'puppet' | |
@provider ||= Puppet::Type.type(:package).new({:name => @package}.merge(@options)).provider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
. /lib/svc/share/smf_include.sh | |
# Wrapper to call svcprop to fetch instance properties | |
getproparg() { | |
val=$(svcprop -p $1 $SMF_FMRI) | |
[ -n "$val" ] && echo $val | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@web1-dev ~]# cat test_case.pp | |
$package_defaults = { | |
ensure => 'installed' | |
} | |
$package_hash = {"mcollective"=>{"ensure"=>"2.1.1", "name"=>"ruby193-mcollective", "provider"=>"pkgin"}} | |
create_resources('package', $package_hash, $package_defaults) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0'?> | |
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> | |
<service_bundle type='manifest' name='export'> | |
<service name='network/puppet' type='service' version='0'> | |
<create_default_instance enabled='false'/> | |
<single_instance/> | |
<dependency name='loopback' grouping='require_all' restart_on='error' type='service'> | |
<service_fmri value='svc:/network/loopback:default'/> | |
</dependency> | |
<dependency name='physical' grouping='require_all' restart_on='error' type='service'> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for vm in $(vmadm lookup type=KVM); do | |
socat -ly \ | |
-L /zones/${vm}/root/tmp/vm_console_socat.lock \ | |
-u /zones/${vm}/root/tmp/vm.console \ | |
OPEN:/zones/${vm}/cores/vm.console_socat.log,creat,append & | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Quick and dirty script to find binaries that link to a specific lib | |
# | |
LIB=libcrypt | |
for f in $(find / -perm /111 -type f -print); do | |
file $f | grep -E "ELF.*dynamically" > /dev/null | |
if [ $? -eq "0" ]; then |
NewerOlder