Pular para o conteúdo principal

Docker basics

· Leitura de um minuto

Run Docker image

Syntax: docker run  

Ex.: docker run -it jboss/wildfly

Where.: * -i = interactive mode * -t = pseudo tty redirected to current tty

List Running docker instances

docker ps

List all docker instances

docker ps -a

Access docker shell

docker exec -ti --user user_id bash

Ex.:

docker exec -ti --user root 43c bash 

Enabling debug on JBoss/Wildfly

· Leitura de um minuto

Just include the following arguments to JAVA_OPTS or command line:

 

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4060


Where 4060 is the port number you will use to debug.

Example of use:


[user@localhost ~]$ $JBOSS_HOME/bin/standalone.bat -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4060


How to check open connections in apache

· Leitura de um minuto

Checking currently established connections

    netstat -na | grep 'ESTA' | wc -l 
#or
netstat -an | grep :80 | grep -i EST | wc -l

Checking currently TIME_WAIT connections

    netstat -nat | grep TIME_WAIT | wc -l

Checking total httpd processes

    ps -aux | grep httpd | wc -l

Number of IP connections and IPs connected to port 80, use the following command.

    netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1

Installing GenyMotion on Fedora

· Leitura de um minuto
  1. Preparing our environment

    sudo -s
    dnf -y install @development-tools
    dnf -y install binutils rpm-build fedora-packager chrpath
  2. Download installer

    wget -c https://raw.githubusercontent.com/kuboosoft/spec-testing/master/SRPM/genymotion-rpm

    chmod a+x genymotion-rpm

    ./genymotion-rpm
  3. Installing

    sudo -s
    dnf install $HOME/rpmbuild/RPMS/$(uname -m)/genymotion*.rpm
  4. Enabling libgcrypt11

    sudo dnf copr enable red/libgcrypt.so.11
    sudo dnf install compat-libgcrypt
    sudo dnf upgrade qt5-* -y

Pull submodules from GIT

· Leitura de um minuto

#PULLING SUBMODULES

    git submodule sync --recursive &&   git submodule update --init --recursive

Splitting files on Linux

· Leitura de um minuto

Use the split command, like following:


split --bytes=5m catalina.out catalina.out. -d


In this example, the catalina.out file wil be split in small pieces of 5mb