Skip to content

Instantly share code, notes, and snippets.

View congto's full-sized avatar
🥁
Focusing

Tô Thành Công congto

🥁
Focusing
View GitHub Profile
@congto
congto / ghi_chep_cac_lenh_cua_CEPH.md
Last active February 6, 2020 17:42
ghi_chep_cac_lenh_cua_CEPH.md

Ghi chép các lệnh của CEPH

1. Các lệnh chung

Đây là các lệnh kiểm tra chung về cluster của CEPH

1.1. Lệnh xem phiên bản của CEPH cluster là bao nhiêu

Lệnh kiểm tra phiên bản của CEPH cluster đang được triển khai là bao nhiêu.

@congto
congto / filevidu.conf
Created September 27, 2019 14:44
filevidu.conf
[DEFAULT]
#
# From nova.conf
#
#
# Availability zone for internal services.
#
# This option determines the availability zone for the various internal nova
@congto
congto / nginx-tuning.md
Created July 22, 2019 04:34 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@congto
congto / filethuchanh.conf
Last active July 11, 2019 06:58
File mẫu thực hành sed, egrep, awk
# Configuration for sending metrics to InfluxDB
[[outputs.influxdb]]
## The full HTTP or UDP URL for your InfluxDB instance.
##
## Multiple URLs can be specified for a single cluster, only ONE of the
## urls will be written to each interval.
# urls = ["unix:///var/run/influxdb.sock"]
# urls = ["udp://127.0.0.1:8089"]
# urls = ["http://127.0.0.1:8086"]
@congto
congto / linuxcommand_thuchanh_sed.md
Last active August 1, 2019 07:33
Thực hành với sed

Tải file mẫu về

wget https://gist.githubusercontent.com/congto/735a0dce8f4adc91d5886c12303b05f3/raw/6f5130fe7a83bcb8836476f544094b675b661570/filethuchanh.conf

Hoặc tự tạo file mẫu với nội dung dưới và lưu lại với tên file là filethuchanh.conf

# Configuration for sending metrics to InfluxDB
[[outputs.influxdb]]
@congto
congto / test_tricdan.md
Created November 29, 2018 10:08
test_tricdan.md

Đây là đoạn chứa mã nguồn hoặc output lệnh

đây là lệnh
tiếp theo là lệnh nhé
lệnh nữa này

Hết rồi

@congto
congto / nh_check_mk_client.sh
Last active October 1, 2018 14:23
nh_check_mk_client.sh
#!/bin/bash -ex
## Date: 26.09.2018
## Cai dat check_mk tai nhan Hoa
##### Khai bao bien o day, sua lai neu ban thay doi
IP_CHECK_MK_SERVER=192.168.70.103
##### Bat dau thuc hien script
echo "######################################"
echo "Tai dat cac goi"
@congto
congto / packstack_create_vm.sh
Last active June 28, 2018 15:45
packstack_create_vm.sh
#!/bin/bash
## IP PROVIDER Network for VMs
PROVIDER_IP_START=192.168.20.170
PROVIDER_IP_END=192.168.20.190
PROVIDER_DNS=8.8.8.8
PROVIDER_GATEWAY=192.168.20.1
PROVIDER_SUBNET=192.168.20.0/24
## IP PRIVATE Network for VMs
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!
#!/bin/bash
MGMT_IP=$(ifconfig br-mgmt | grep 'inet addr:'| cut -d: -f2 | awk '{ print $1}')
HOST=$(hostname -s)
ADMIN_IP=$(hiera management_vip)
PUB_IP=$(hiera public_vip)
USER='masakari'
PASS='masakari'
DIR="$(dirname `readlink -f $0`)"