全文検索:
- 51 MySQLベンチマーク(mysqlslap) @01_linux:11_データベース:01_mysql
- generated tables. --auto-generate-sql-load-type=name Specify test load type: mi... on in server/client protocol. -c, --concurrency=name Number of clients to simulate for query to run. --create=name File or string to use create tables. --create-schema=name Schema to run tests in.
- 20 Kubernetes GlusterFS Galera Wordpress @06_virtualization:05_container
- apiVersion: v1 kind: PersistentVolume metadata: name: wordpress-pv labels: name: wordpress-pv spec: accessModes: - ReadWriteMany capacity: s... labels: io.kompose.service: wordpress-pvc name: wordpress-pvc spec: accessModes: - ReadWrite... storage: 1Gi selector: matchLabels: name: wordpress-pv status: {} </code> === 作成 ===
- 2023.12.14 React-adminとDjangoの連携 @50_dialy:2023:12
- b import models class Product(models.Model): name = models.CharField(max_length=200) price = mo... ield() def __str__(self): return self.name </code> === マイグレーションファイル作成 === $ docker-comp... s = [ migrations.CreateModel( name='Product', fields=[ (... =True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField
- 16 Kubernetes + DRBD Linstor @06_virtualization:05_container
- 環境 ====== 今回はKubernetesのworkerノード3台で、Linstor ^ name ^ IP ^ Disk ^ DRBD用 ^ |node1|172.16.0.65|/dev/sda... tor-master:~# kubectl get pod alpine-test -o wide NAME READY STATUS RESTARTS AGE IP ... instor https://charts.linstor.io # helm repo list NAME URL linstor https://charts.linstor.io </code> ... 認 ==== ちゃんとpodが起動してればOK <code> # kubectl get pod NAME READY S
- MySQLコマンド @02_freebsd:04_database:01_mysql
- INSERT ON *.* TO user; データベースレベル GRANT ALL ON db_name.* TO user; GRANT SELECT, INSERT ON mydb.* TO user... BLE hoge_tbl ( id int PRIMARY KEY AUTO_INCREMENT, name text ); </code> ==== テーブルのコピー ==== <code console... code> ==== テーブル名変更 ==== <code> ALTER TABLE tbl_name RENAME [TO] new_tbl_name; </code> ==== テーブル情報を表示(DESCRIBE) ==== DESCRIBE データベース名.テーブル名 ; または DESC デ
- 18 Kubernetes GlusterFS @06_virtualization:05_container
- .yaml> apiVersion: v1 kind: Endpoints metadata: name: glusterfs labels: storage.k8s.io/name: glusterfs storage.k8s.io/part-of: kubernetes-complete... ce.yaml> kind: Service apiVersion: v1 metadata: name: glusterfs spec: ports: - port: 1 </code> ==... apiVersion: v1 kind: PersistentVolume metadata: name: k8s-volume-pv01 labels: name: k8s-volume-p
- 2021.08.03 KVM IOPS limit @50_dialy:2021:08
- <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none' io='native'/> ... <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain... ID><UNAME>oneadmin</UNAME><GNAME>oneadmin</GNAME><NAME>matsuitest</NAME><PERMISSIONS><OWNER_U>1</OWNER_U><OWNER_M>1</OWNER_M><OWNER_A>0</OWNER_A><GROUP_U>0</G
- 41 CentOS7 NIC名変更 @01_linux:01_net
- ACTION=="add",ATTR{address}=="xx:xx:xx:xx:xx:xx",NAME="eth0" SUBSYSTEM=="net", ACTION=="add",ATTR{address}=="xx:xx:xx:xx:xx:xx",NAME="eth1" SUBSYSTEM=="net", ACTION=="add",ATTR{address}=="xx:xx:xx:xx:xx:xx",NAME="eth2" SUBSYSTEM=="net", ACTION=="add",ATTR{address}=="xx:xx:xx:xx:xx:xx",NAME="eth3" </code> ==== 対応 ==== ethX以外の名前付けて、PCIパス指定
- 01 PostgreSQL streaming replica @01_linux:11_データベース:02_postgresql
- List of databases Name | Owner | Encoding | Collate | Ctype | Ac... esql.auto.conf primary_conninfo = へ追加 application_name=postgresql ## Secondaryは下記をコメントアウト # grep synchr... 51 -U postgres testdb -c "UPDATE actor set first_name='BBB' where actor_id=1" UPDATE 1 $ psql -h 172.... * FROM actor where actor_id=1" actor_id | first_name | last_name | last_update -------
- fio @01_linux:09_ベンチマーク
- size=2G -numjobs=64 -runtime=10 -group_reporting -name=fio ==== ランダムwrite ==== # fio -filename=/tmp/... size=2G -numjobs=64 -runtime=10 -group_reporting -name=fio ==== シーケンシャルread ==== # fio -filename=/tm... size=2G -numjobs=64 -runtime=10 -group_reporting -name=fio ==== ランダムwrite ==== # fio -filename=/tmp/... size=2G -numjobs=64 -runtime=10 -group_reporting -name=fio ==== 結果 ==== 下記はシーケンシャルwriteの一例 ブロックサイズ4k
- 19 HPE Insight Management Agents Trap Alarm @01_linux:12_ツール
- ead/Write Authorized Management Station IP or DNS name (Blank to skip): Enter Read Only Authorized Management Station IP or DNS name (Blank to skip): Enter default SNMP trap communi... to skip): Enter SNMP trap destination IP or DNS name (One word; Blank to skip): The system contact is... -c -f <(echo -e "${EXCLUDE}")) -le 0 ] ;then NAME=${HOST}${HOSTNAME} if [ "${TO}" = "ZABBIX" ]
- 13 Kubernetes Nginxを立ててみる @06_virtualization:05_container
- apiVersion: apps/v1 kind: Deployment metadata: name: nginx spec: replicas: 3 selector: matchL... : nginx-app spec: containers: - name: nginx image: nginx:latest po... ml <code> # kubectl get deployments.apps -o wide NAME READY UP-TO-DATE AVAILABLE AGE CONTAIN... nginx:latest app=nginx-app # kubectl get pod NAME READY STATUS RESTARTS
- 29 Ceph Dashboard @01_linux:13_storage
- {"username": "admin", "lastUpdate": 1592953680, "name": null, "roles": ["administrator"], "password": "... metheus: image: prom/prometheus container_name: prometheus environment: TZ: Asia/Tokyo... a: image: grafana/grafana:7.3.0 container_name: grafana environment: - TZ=Asia/Tokyo ... rter: image: prom/node-exporter container_name: node-exporter ports: - 9100:9100 r
- 29 screenに外からコマンド @01_linux:99_その他
- $THREAD ] do N=`printf "%02d" "${i}"` SCREEN_NAME=${ZONE}-${N} LOG="${LOGDIR}/${ZONE}_${N}.log" ... pr $i + 1` if [ -n "`screen -ls | grep ${SCREEN_NAME}`" ]; then echo "already have session_name. ${SCREEN_NAME}" continue 2 fi screen -R ${SCREEN_NAME} sleep 1 screen -d ${SCREEN_NAME}
- 24 バックアップシェル(backup.sh) @bash:script
- ackup: $LINE" DIR=${LINE%:*} FILE_NAME=${LINE#*:} dir_check $BK_DIR if ... dir_check $BK_DIR/DB if [ "${FILE_NAME}" == "all" ];then ssh $BAKHOST "m... se ssh $BAKHOST "mysqldump ${FILE_NAME} " | gzip | cat > $BK_DIR/DB/$FILE_NAME.sql.gz fi elif [ "${DIR: -1}" == '/' ];then