diff options
author | elijah <elijah@riseup.net> | 2016-01-26 12:27:51 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-01-26 12:27:51 -0800 |
commit | b95d60260ecb57fe08fca0571771a14b803c1b4e (patch) | |
tree | 30f0bbb5156ec13951e1ed32c06bdc7550c6d044 /bin/debug.sh | |
parent | 8fc9f0da2f755ad8b225d4b0557c6179236ca7f4 (diff) | |
parent | 27a059ccb3b5210f7e539326c30f20d8530cde1d (diff) |
Merge branch 'develop' of ssh://leap.se/leap_platform into develop
Diffstat (limited to 'bin/debug.sh')
-rwxr-xr-x | bin/debug.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/debug.sh b/bin/debug.sh index 2363644c..d6f37542 100755 --- a/bin/debug.sh +++ b/bin/debug.sh @@ -2,20 +2,24 @@ # debug script to be run on remote servers # called from leap_cli with the 'leap debug' cmd -regexp='(leap|pixelated|stunnel|couch|soledad|haproxy)' +apps='(leap|pixelated|stunnel|couch|soledad|haproxy)' + +facts='(apt_running |^architecture |^augeasversion |^couchdb_.* |^debian_.* |^dhcp_enabled |^domain |^facterversion |^filesystems |^fqdn |^hardwaremodel |^hostname |^interface.* |^ipaddress.* |^is_pe |^is_virtual |^kernel.* |^lib |^lsb.* |^memory.* |^mtu_.* |^netmask.* |^network_.* |^operatingsystem |^os.* |^path |^physicalprocessorcount |^processor.* |^ps |^puppetversion |^root_home |^rsyslog_version |^rubysitedir |^rubyversion |^selinux |^ssh_version |^swapfree.* |^swapsize.* |^type |^virtual)' + # query facts and filter out private stuff -echo -e '\n\n' -facter | egrep -iv '(^ssh|^uniqueid)' +export FACTERLIB="/srv/leap/puppet/modules/apache/lib/facter:/srv/leap/puppet/modules/apt/lib/facter:/srv/leap/puppet/modules/concat/lib/facter:/srv/leap/puppet/modules/couchdb/lib/facter:/srv/leap/puppet/modules/rsyslog/lib/facter:/srv/leap/puppet/modules/site_config/lib/facter:/srv/leap/puppet/modules/sshd/lib/facter:/srv/leap/puppet/modules/stdlib/lib/facter" + +facter 2>/dev/null | egrep -i "$facts" # query installed versions echo -e '\n\n' -dpkg -l | egrep "$regexp" +dpkg -l | egrep "$apps" # query running procs echo -e '\n\n' -ps aux|egrep "$regexp" +ps aux|egrep "$apps" echo -e '\n\n' echo -e "Last deploy:\n" |