buy tb500

Database table disk usage in Mariadb/Mysql

June 18th, 2022 by ayad

SELECT table_name as “Table”, ROUND(((data_length +index_length) / 1024 / 1024), 2) AS “Size in (MB)” FROM information_schema.TABLES WHERE table_schema = “ayaddb” ORDER BY (data_length + index_length) DESC;

note: ayaddb is the database name that you want to check the table disk size for it

Delete all docker containers with existed status

June 1st, 2022 by ayad

docker rm $(docker ps -a -q -f status=exited)

httpd status code using curl

May 30th, 2022 by ayad
curl -o /dev/null -s -w "%{http_code}\n" http://localhost

show ip in linux

May 29th, 2022 by ayad

ip a |grep “inet 10” |awk ‘NR==1{print $2}’ |sed -r ‘s/\/24/ /g’

POD and NODES load in openshift

May 17th, 2022 by ayad

oc adm top pods

oc adm top nodes

List only ips in OKD

May 17th, 2022 by ayad

oc get nodes -o wide |awk ‘{print $6 ”  “$3}’

Cluster admin in OKD

May 15th, 2022 by ayad

oc adm policy add-cluster-role-to-user cluster-admin ayahmad

start service using ansible

May 10th, 2022 by ayad

ansible groupname -i hosts -u user -m service -a “name=httpd state=started” -b

-a stand for arguments, -m stand for module, -b stand for become a root

How to install httpd using ansible

May 10th, 2022 by ayad

ansible groupname -i hosts -u user -m yum -a “name=httpd state=latest” -b

note: -a stand for arguments, -b stand for become a root, because need to be a root in order to install service

Create namespace in kubernetes

May 3rd, 2022 by ayad
kubectl create namespace default-mem-example