Grep: show lines before and after the match in Linux
grep -B 5 -A 2 --color 'keyword' /path/to/file.log
اگر Data دارید از databaseها استفاده کنید.
اگر Cache یا State دارید از ابزارهای آن مثلا Redis استفاده کنید.
اگر Static Object دارید از Object Storage مثلا Minio استفاده کنید.
اگر Queue دارید از ابزارهای مدیریت صف مثلا از RabbitMq یا Kafka استفاده کنید.
اگر Log از جنس دیتا دارید از CLM مثلا ELK استفاده کنید.
اگر Cache یا State دارید از ابزارهای آن مثلا Redis استفاده کنید.
اگر Static Object دارید از Object Storage مثلا Minio استفاده کنید.
اگر Queue دارید از ابزارهای مدیریت صف مثلا از RabbitMq یا Kafka استفاده کنید.
اگر Log از جنس دیتا دارید از CLM مثلا ELK استفاده کنید.
👍2🔥2
Forwarded from Kamyar Inanloo
kamyar inanloo Present.pptx
4.9 MB
۱۰ درصد اینه که بدونیم ابزارها وجود دارند، ۲۰ درصد بتونیم ابزار مناسب رو انتخاب بکنید، ۷۰ درصد که بتونیم از ابزاری که انتخاب کردیم به بهترین شکل استفاده بکنیم.
👍2
مفهوم Quorum : حد نصاب یا اصطلاحا داشتن اکثریت آرا (Majority of Voters) به این معنا می باشد همیشه در کلاستر چیزی به عنوان Election یا انتخابات برای انتخاب Leader و Master وجود دارد و سیستم یا سمتی از دیتاسنتر که میخواهد به عنوان Master کار کند باید quorum داشته باشد که جلوتر در رابطه با این موضوع صحبت بیشتری خواهیم کرد.
👍1
see the contents of a tar.gz file without extracting it
-t, --list
List the contents of an archive. Arguments are optional. When given, they specify the names of the members to list.
-f, --file=ARCHIVE Use archive file or device ARCHIVE...
tar -tf filename.tar.gz
-t, --list
List the contents of an archive. Arguments are optional. When given, they specify the names of the members to list.
-f, --file=ARCHIVE Use archive file or device ARCHIVE...
❤1
echo 'docker compose --compatibility "$@"' | sudo tee -a /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
https://linuxblog.io/dstat-command-in-linux-examples/
dstat 5 4
dstat --cpu --mem
dstat --top-mem --top-cpu
LinuxBlog.io
dstat command in Linux w/ examples
This dstat command guide follows my previous 90 Linux Commands frequently used by Linux Sysadmins article. As time allows, I will continue to publish
Cron job special strings
Cron jobs also support special strings that provide shorthand for common schedules:
Cron jobs also support special strings that provide shorthand for common schedules:
@hourly: Equivalent to 0 * * * *
@daily or @midnight: Equivalent to 0 0 * * *.
@weekly: Equivalent to 0 0 * * 0.
@monthly: Equivalent to 0 0 1 * *.
@yearly or @annually: Equivalent to 0 0 1 1 *.
@reboot: Run once at startup.