- Collection of objects that are in memory (JVM)
- is useful to analyse OOM situations.
- then How to take
jmap -dump:format=b,file=cheap.bin <pid>
Thread dump
| __author__ = 'dhana013' | |
| import re | |
| LOG_REGEX = '(?P<ip>[(\d\.)]+) - - \[(?P<date>.*?) -(.*?)\] "(?P<method>\w+) (?P<request_path>.*?) HTTP/(?P<http_version>.*?)" (?P<status_code>\d+) (?P<response_size>\d+) "(?P<referrer>.*?)" "(?P<user_agent>.*?)"' | |
| line = '172.183.134.216 - - [12/Jul/2016:12:22:14 -0700] "GET /wp-content HTTP/1.0" 200 4980 "http://farmer-harris.com/category/index/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; rv:1.9.3.20) Gecko/2013-07-10 02:46:11 Firefox/9.0"' | |
| compiled = re.compile(LOG_REGEX) | |
| match = compiled.match(line) |
| How to Implement | |
| Since there is no Anaconda Support (yet) in Nexus 3 we will be using Nexus Raw repository to create a proxy to the Anaconda repository in https://repo.continuum.io | |
| Creating Proxy | |
| To create the proxy do the following. | |
| Logon to the nexus with an admin user and click the gear icon on the top menu which is next to the search bar. | |
| Select Repositories from side menu. | |
| Click Create Repository | |
| Select βraw (proxy)β from the list of recipies. |
| How to delete the tag | |
| ======================== | |
| git tag -d v0.1.1 | |
| git push origin :refs/tags/v0.1.1 | |
| How to create tag and push to remote | |
| ======================================= | |
| git commit -am "bump up package version" | |
| git tag v0.0.4 | |
| git push --tags |
| import pandas as pd | |
| def get_specific_days(year, day): | |
| return pd.date_range( | |
| start=str(year), | |
| end=str(year+1), | |
| freq='W-%s' % day | |
| ).strftime('%Y%m%d').tolist() # %m%d%y |
| Below are the steps to set up an SSH server on your windows host machine and configuring it to your Windows logon user account, using OpenSSH. (Keybased Authentication) | |
| 1. Download and install latest version of OpenSSH software from this link: http://www.mls-software.com/opensshd.html | |
| 2. During the installation process select "Local system" and "no privilege separation." | |
| 3. Uncomment the following lines in the sshd_config file. | |
| C:\Program Files\OpenSSH\etc\sshd_config | |
| - StrictModes no | |
| - PubkeyAuthentication yes | |
| - AuthorizedKeysFile .ssh/authorized_keys |
| #!/usr/bin/env bash | |
| # let's install pyenv | |
| curl https://pyenv.run | bash | |
| export PYENV_ROOT="$HOME/.pyenv" | |
| export PATH="$PYENV_ROOT/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc |
| local ret_status="%(?:%{$fg_bold[green]%}β :%{$fg_bold[red]%}β )" | |
| PROMPT='%{$fg_bold[cyan]%}%c%{$reset_color%} $(git_prompt_info) ${ret_status}%{$reset_color%}' | |
| ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
| ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}β" | |
| ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
| # we need add this content to $HOME/.zshrc | |
| # autoload -Uz compinit; compinit | |
| autoload -Uz compinit | |
| typeset -i updated_at=$(date +'%j' -r ~/.zcompdump 2>/dev/null || stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null) | |
| if [ $(date +'%j') != $updated_at ]; then | |
| compinit -i | |
| else | |
| compinit -C -i | |
| fi |
| --- | |
| # Runs an ansible role | |
| # Usage: | |
| # ansible-playbook ./run_role.yml -e "role=dv_sysctl target=localhost" | |
| # ansible-playbook ./run_role.yml -e "role=dv_inventory_update target=Hera" -i inventories/dv_inventry.py | |
| # ansible-playbook ./run_role.yml -e "role=dv_inventory_update target=all" -i inventories/dv_inventry.py -l 172.16.30.150 | |
| # | |
| - hosts: "{{ target }}" | |
| become: "{{ sudo }}" | |
| gather_facts: True |