原创 python multiprocessing------PicklingError: Can't pickle
http://bbs.chinaunix.net/thread-4111379-1-1.html import multiprocessing class someClass(object): def __init__(
原创 SCSI 和 iSCSI
參考:http://11107124.blog.51cto.com/11097124/1884637 SCSI 小型計算機系統接口(Small Computer System Interface) 特點 是一種接口標準,主機與
原创 shell 判讀命令的返回值
tar_com=`rpm -qa|grep tar` if [ -n tar_com ];then echo 'tar ok' else echo 'tar no' fi -n : 來判定字符串非空 if [ -n s
原创 Shell腳本中執行sql語句操作
#!/bin/bash #等號左右不能有空格 install_path= mysql_root_user="root" mysql_root_password= mysql_host= # 創建用戶 function creat
原创 在python程序中運行shell腳本
#!/usr/bin/python # 導入各種模塊 import sys ... # 各種變量 consul_ip = sys.argv[2] install_path = ... ... # 使用os.system()在p
原创 shell
1. cat >> file << EOF https://www.cnblogs.com/chenjingchao/p/6259572.html 1. 創建file文件 2. 創建完成後,寫入後面的內容 3. EOF結束 2.
原创 進行Heroku部署時--配置數據庫出現:no app specified
在部署進行到配置數據庫,出現下圖問題 No app specified?? 解決方法: 需要添加一個遠程heroku應用程序的Git存儲庫和告訴heroku寶石爲默認使用它。答案找到了在這裏。像這樣。 git remote
原创 Fibre Channel_光纖通道技術
光纖通道技術(Fibre Channel),是一種網絡存儲交換技術,可提供遠距離和高帶寬 在存儲器,服務器和客戶端節點處,可實現大型數據文件的傳輸 網絡存儲 基本信息: Fibre Channel (FC) 是一種高速 網絡互聯
原创 Systemd 教程以及碰到的一些問題
參考: 阮一峯:命令篇 阮一峯:實戰篇 https://wiki.archlinux.org/index.php/Systemd_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87) 步驟: 1.
原创 Shell腳本安裝成服務加入系統啓動-service
#!/bin/bash # 向一個臨時文件中寫入配置的內容,兩種形式service和systemctl sudo cat >/tmp/mysql-exporter-systemctl<<EOF [Unit] Description
原创 Gerrit的使用
今天是第二次使用Gerrit。碰到了一些問題,記錄一下 1. 使用 從Gerrit中將代碼庫git clone 到本地 修改之後和github差不多 git status git add . git pull git c
原创 prometheus 警告
prometheus服務中的警告通過警告規則發送到Alertmanager管理警告,例如通過email發送 問題 prometheus中的警告怎麼產生的 什麼是警告規則,怎麼創建 #### prometheus與Alertmana
原创 rabbitmq_exporter 安裝啓動
下載: https://github.com/kbudde/rabbitmq_exporter/releases/download/v0.25.2/rabbitmq_exporter-0.25.2.linux-amd64.tar
原创 查看命令是否存在
查看某個命令是否存在 function download(){ if command -v wget > /dev/null 2>&1; then sudo wget ${package_url} -O kub
原创 shell實現交互
read -p "you are sure you wang to xxxxxx?[y/n]" input echo $input if [ $input = "y" ];then echo "ok " fi