Skip to content

Instantly share code, notes, and snippets.

View RaminNietzsche's full-sized avatar
🦫
Qemu or not Qemu this is problem

Ramin Najjarbashi RaminNietzsche

🦫
Qemu or not Qemu this is problem
View GitHub Profile
@RaminNietzsche
RaminNietzsche / ceph_health.py
Created October 31, 2023 10:21
Find largeomap
from ceph_health_msg import msg as health_msg
import rados
import json
def ceph_health_info(detail=True):
# Connect to the Ceph cluster
cluster = rados.Rados(conffile='/etc/ceph/ceph.conf')
cluster.connect()
# Get the health status of the cluster
@RaminNietzsche
RaminNietzsche / rgw.log
Last active May 20, 2023 11:49
Bucket Location:
2023-05-20T11:40:39.010+0000 7fc457a86700 10 req 4201805358795926877 0.004000033s delaying v4 auth
2023-05-20T11:40:39.022+0000 7fc455a82700 10 req 4201805358795926877 0.016000135s date_k = f2568c28e9be7c2befd1a3c3b1dce0673ced3b9cf8f2d136ce36a6e5c429f654
2023-05-20T11:40:39.022+0000 7fc455a82700 10 req 4201805358795926877 0.016000135s region_k = 987bf09fb87985664f4aa1d1127a7dbe1169cecdbef22d5a8830f75128538f33
2023-05-20T11:40:39.022+0000 7fc455a82700 10 req 4201805358795926877 0.016000135s service_k = 440dc8af5b8e8be8461c11e7bf8335ebb065e21d29b6d9860132caa6e95187f4
2023-05-20T11:40:39.022+0000 7fc455a82700 10 req 4201805358795926877 0.016000135s signing_k = 1e3d040be333096c0ff2af3fd24d8117e8c43109ebcc889c1af519990be86a6a
2023-05-20T11:40:39.022+0000 7fc455a82700 10 req 4201805358795926877 0.016000135s generated signature = 2f675a6cff166a9d48c405ef723bcebd7d802fc1c5d6a3b2d8583659dbe9757f
2023-05-20T11:40:39.022+0000 7fc455a82700 2 req 4201805358795926877 0.016000135s s3:create_bucket normalizing buckets a
@RaminNietzsche
RaminNietzsche / fix.sh
Created March 27, 2023 21:34
Fix orphan multipart objects in ceph
#!/bin/bash
set -e
if [ -z "$1" ]
then
echo "No bucket name provided"
exit 1
fi
@RaminNietzsche
RaminNietzsche / ceph_health.py
Created January 16, 2023 21:48
Find Large omap objects in ceph
import rados
import json
def ceph_health_info(detail=True):
# Connect to the Ceph cluster
cluster = rados.Rados(conffile='/etc/ceph/ceph.conf')
cluster.connect()
# Get the health status of the cluster
result, health_status, outbuf = cluster.mon_command('{"prefix":"status", "format":"json"}', b'')
user@server:~$ loud-localds -v --network-config=_master-net.cfg /tmp/seedmaster.iso user-data
user@server:~$ cat _master-net.cfg
version: 2
ethernets:
enp0s3:
dhcp4: false
dhcp6: false
addresses:
- 192.168.200.101/24
@RaminNietzsche
RaminNietzsche / qemu.py
Created March 10, 2022 17:42
libvirt-hook
if __name__ == "__main__" :
try:
vir_domain, action = sys.argv[1:3]
except:
exit(0)
log(sys.argv)
if action == 'release':
try:
conn = libvirt.open(None)
machine = conn.lookupByName(vir_domain)
lst = [
{"current_time":1618861512,"success":True,"data":[{"id":590,"company":{"name":"افسران جنگ نرم","name_en":"Afsaran","company_slug":"afsaran","logo":"/company/afsaran/9f7d4c70-403a-11e9-ae0e-273fe94d6d59.png"},"job":{"job_slug":"full-stack","name":"Full Stack"},"title":"شرکت افسران جنگ نرم درخواست رسمی خود را مبنی بر عدم به اشتراک گذاری این اطلاعات بر روی پلتفرم جابگای ابلاغ کرده و به این منظور جابگای مجبور به حذف این اطلاعات میباشد.","description":"شرکت افسران جنگ نرم درخواست رسمی خود را مبنی بر عدم به اشتراک گذاری این اطلاعات بر روی پلتفرم جابگای ابلاغ کرده و به این منظور جابگای مجبور به حذف این اطلاعات میباشد.","vote_count":0,"down_vote_count":2,"vote_state":"NONE","view_count":61,"over_all_rate":0,"created":"2020-06-10 18:37","my_review":False,"state":"FULL","approved":True,"has_legal_issue":True}],"message":None,"total":1,"show_type":"TOAST","index":0},
{"current_time":1618861554,"success":True,"data":[{"id":60,"company":{"name":"آپاسای داده سیستم","name_en":"Apasai Dade System","company_sl
In file included from ../../src/bp_sim.h:41,
from ../../src/bp_sim.cpp:22:
../../src/common/Network/Packet/IPv6Header.h:28:7: note: 'class IPv6Header' declared here
class IPv6Header
^~~~~~~~~~
../../src/bp_sim.cpp: In member function 'void CFlowGenListPerThread::init_from_global()':
../../src/bp_sim.cpp:3649:79: error: 'new' of type 'CFlowGeneratorRecPerThread' with extended alignment 64 [-Werror=aligned-new=]
CFlowGeneratorRecPerThread * lp_thread=new CFlowGeneratorRecPerThread();
^
../../src/bp_sim.cpp:3649:79: note: uses 'void* operator new(std::size_t)', which does not have an alignment parameter
import 'dart:convert';
import 'package:flutter/material.dart';
class FormGen extends StatefulWidget{
@override
State<StatefulWidget> createState() => _FormGen();
}
class _FormGen extends State<FormGen> {
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
" ";"
2015. év
";"
2014. év
";"
2013. év
";"
2012. év
";"
2011. év