Monthly Archives: February 2017

linux performance introduction

Linux Performance Intro

Posted in Uncategorized | Leave a comment

docker swarm example

docker.swarm_example

Posted in Uncategorized | Leave a comment

linux network namespaces

linux network namespaces

Posted in Uncategorized | Leave a comment

linux namespaces cpu-shares

linux_cpu_shares

Posted in Uncategorized | Leave a comment

docker networking example

docker.network 1. List the docker network. # docker network ls NETWORK ID NAME DRIVER SCOPE 82f0e82e8a52 bridge bridge local 2f29f6c3dc07 host host local 0ee77fd0eaf6 none null local 2. List the bridge’s address. # ifconfig docker0 | grep “inet ” inet … Continue reading

Posted in Uncategorized | Leave a comment

docker remove all containers and images

docker rm -f $(docker ps -a -q) docker rmi $(docker images -q)

Posted in Uncategorized | Leave a comment

selinux examples (pdf)

selinux_examples

Posted in Uncategorized | Leave a comment

docker shared storage

In the following example we create a volume in a container and share the volume with other containers. 1. Share a docker volume – create the volume in a container that you do not run docker create -v /webdata –name … Continue reading

Posted in Uncategorized | Leave a comment

linux yum groups

Create a file in the groups format used by yum Tell createrepo to include that group file in your repository. Step 1 You can either open a text editor and create the groups xml file manually or you can run … Continue reading

Posted in Uncategorized | Leave a comment

linux strace examples

strace is a systemcall tracer. It tells you what kernel functions are called as a result of your program. It monitors systemcalls and signals. strace -p strace (trace a systemcall) strace -e open (trace multiple systemcalls) strace -e trace=open,read ls … Continue reading

Posted in Uncategorized | Leave a comment

docker – remove all containers and images

#!/bin/bash # Delete all containers docker rm $(docker ps -a -q) # Delete all images docker rmi $(docker images -q)

Posted in Uncategorized | Leave a comment

linux grow rootfs

Grow xfs rootfs The root volumegroup in this example is centos, the disk in the volumegroup is sda. We add a new disk, extend the group, extend the logical volume and grow the filesystem. add new disk. (in vmware: edit … Continue reading

Posted in Uncategorized | Leave a comment

linux PS1 settings

Information you can display with PS1 link: cyberciti \a : an ASCII bell character (07) \d : the date in “Weekday Month Date” format (e.g., “Tue May 26”) \D{format} : the format is passed to strftime(3) and the result is … Continue reading

Posted in Uncategorized | Leave a comment

linux parameter expansion

from: wiki Simple usage $PARAMETER ${PARAMETER} Indirection ${!PARAMETER} Case modification ${PARAMETER^} ${PARAMETER^^} ${PARAMETER,} ${PARAMETER,,} ${PARAMETER~} ${PARAMETER~~} Variable name expansion ${!PREFIX*} ${!PREFIX@} Substring removal (also for filename manipulation!) ${PARAMETER#PATTERN} ${PARAMETER##PATTERN} ${PARAMETER%PATTERN} ${PARAMETER%%PATTERN} Search and replace ${PARAMETER/PATTERN/STRING} ${PARAMETER//PATTERN/STRING} ${PARAMETER/PATTERN} ${PARAMETER//PATTERN} String length … Continue reading

Posted in Uncategorized | Leave a comment