Check server response of

Server response
NS records
Whois domain
Response headers
Request headers
Raw HTML code
301 Moved Permanently - knktc.com
HTTP Status: 301
User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
Server: nginx
Date: Mon, 05 May 2025 20:37:02 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive
Location: https://knktc.com/

HTTP Code 301 Moved Permanently

301 http status code means that the requested resource has been permanently moved to a new URL. All future requests should use the new address.

When is Code 301 used?

  • When changing a website domain
  • When modifying URL structures
  • When setting up redirects for SEO

What does Code 301 mean for the user?

The browser will automatically redirect the user to the new address, and search engines will update their indexes.

200 OK - https://knktc.com/
HTTP Status: 200
User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
Server: nginx
Date: Mon, 05 May 2025 20:37:03 GMT
Content-Type: text/html
Content-Length: 37383
Last-Modified: Sun, 26 Jan 2025 13:20:01 GMT
Connection: keep-alive
ETag: "67963681-9207"
Accept-Ranges: bytes

HTTP Code 200 OK

200 http status code is a standard successful HTTP server response. It means that the client’s request (e.g., from a browser) was successfully processed, and the server is delivering the requested data.

When is Code 200 used?

  • When loading a web page
  • When successfully receiving an API response
  • When processing a form or another HTTP request

What does Code 200 mean for the user?

The user receives content without errors, and the page or application functions properly. If Code 200 is accompanied by data, the browser or program processes and displays it to the user.

GET / HTTP/1.1
Host: knktc.com
Accept: */*
User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"knktc.com","root":"/","scheme":"Pisces","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":false,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="关注linux,云计算,python,杂乱之地...">
<meta property="og:type" content="website">
<meta property="og:title" content="knktc的杂乱空间">
<meta property="og:url" content="https://knktc.com/index.html">
<meta property="og:site_name" content="knktc的杂乱空间">
<meta property="og:description" content="关注linux,云计算,python,杂乱之地...">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="knktc">
<meta property="article:tag" content="python,linux">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://knktc.com/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : true,
    isPost : false,
    lang   : 'zh-CN'
  };
</script>

  <title>knktc的杂乱空间</title>
  


  <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?a23b2d1c6159a3a6c798edbc7f9211f9";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">knktc的杂乱空间</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">python,cloud,linux...</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content index posts-expand">
            
      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://knktc.com/2025/01/26/pymemcache-ignore-exc/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/sonic_avatar.png">
      <meta itemprop="name" content="knktc">
      <meta itemprop="description" content="关注linux,云计算,python,杂乱之地...">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="knktc的杂乱空间">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2025/01/26/pymemcache-ignore-exc/" class="post-title-link" itemprop="url">使用 pymemcache 别忘了设置 ignore_exc</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间:2025-01-26 21:07:38 / 修改时间:21:19:53" itemprop="dateCreated datePublished" datetime="2025-01-26T21:07:38+08:00">2025-01-26</time>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>我们在把 Django 升级到 4.2 版本以后,开始把 python-memcached 给换成 pymemcache。结果换完之后,发现怎么默认配置情况下不能高可用了,如果配置了多个 memcached 的后端,挂了一个后,使用缓存相关的代码直接会报错。</p>
<p>查了下官方文档才发现,pymemcache 默认情况下遇到连接失败就是会抛出异常,除非是手动指定下 ignore_exc = True。</p>
<p>于是,将 Django CACHES 的配置修改成这样,在 OPTION 中加入相关配置就好了:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">CACHES &#x3D; &#123;</span><br><span class="line">    &#39;default&#39;: &#123;</span><br><span class="line">        &#39;BACKEND&#39;: &#39;django.core.cache.backends.memcached.PyMemcacheCache&#39;,</span><br><span class="line">        &#39;LOCATION&#39;: [</span><br><span class="line">            &#39;host1:11211&#39;,</span><br><span class="line">            &#39;host2&#39;:11211,</span><br><span class="line">        ],</span><br><span class="line">        &#39;OPTIONS&#39;: &#123;</span><br><span class="line">            &#39;ignore_exc&#39;: True,  # 设置成 True</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure>



      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://knktc.com/2023/05/06/install-pandas-on-kylin-v10-with-sw64-cpu/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/sonic_avatar.png">
      <meta itemprop="name" content="knktc">
      <meta itemprop="description" content="关注linux,云计算,python,杂乱之地...">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="knktc的杂乱空间">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2023/05/06/install-pandas-on-kylin-v10-with-sw64-cpu/" class="post-title-link" itemprop="url">申威架构(sw_64)的Kylin V10系统上安装pandas</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间:2023-05-06 14:08:14" itemprop="dateCreated datePublished" datetime="2023-05-06T14:08:14+08:00">2023-05-06</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间:2023-05-11 09:22:29" itemprop="dateModified" datetime="2023-05-11T09:22:29+08:00">2023-05-11</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>最近在做一些国产化适配的工作,让自己的系统能跑在申威架构的CPU上。这几年国产CPU如雨后春笋一般涌现出来,感慨一下,放我刚工作的那几年真是想都不敢想。</p>
<p>申威架构的CPU与ARM架构的CPU不同,更加小众,国内也就UOS和Kylin对其有支持。客户提供的操作系统是Kylin V10的SW_64版本,本文就记录下在这个架构CPU+Kylin V10环境下装Pandas遇到的问题。</p>
          <!--noindex-->
            <div class="post-button">
              <a class="btn" href="/2023/05/06/install-pandas-on-kylin-v10-with-sw64-cpu/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
          <!--/noindex-->
        
      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://knktc.com/2022/10/27/fix-mac-os-13-ventura-git-ssh-permission-denied/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/sonic_avatar.png">
      <meta itemprop="name" content="knktc">
      <meta itemprop="description" content="关注linux,云计算,python,杂乱之地...">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="knktc的杂乱空间">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2022/10/27/fix-mac-os-13-ventura-git-ssh-permission-denied/" class="post-title-link" itemprop="url">修复升级Macos 13 Ventura后Git报Pemission Denied的问题</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间:2022-10-27 12:41:08 / 修改时间:21:18:29" itemprop="dateCreated datePublished" datetime="2022-10-27T12:41:08+08:00">2022-10-27</time>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>最近尝鲜升级了mac os 13 ventura,结果发现git push代码的时候怎么都不行,直接报了个错误: </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">Permission denied (publickey).</span><br><span class="line">fatal: Could not read from remote repository.</span><br><span class="line"></span><br><span class="line">Please make sure you have the correct access rights</span><br></pre></td></tr></table></figure>
          <!--noindex-->
            <div class="post-button">
              <a class="btn" href="/2022/10/27/fix-mac-os-13-ventura-git-ssh-permission-denied/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
          <!--/noindex-->
        
      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://knktc.com/2022/08/10/fix-python-memcached-3-8-syntax-warning/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/sonic_avatar.png">
      <meta itemprop="name" content="knktc">
      <meta itemprop="description" content="关注linux,云计算,python,杂乱之地...">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="knktc的杂乱空间">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2022/08/10/fix-python-memcached-3-8-syntax-warning/" class="post-title-link" itemprop="url">修复python-memcached在python3.8环境中报SyntaxWarning的问题</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间:2022-08-10 21:57:45 / 修改时间:22:21:21" itemprop="dateCreated datePublished" datetime="2022-08-10T21:57:45+08:00">2022-08-10</time>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>我们一直使用python-memcached库来操作memcached,最近发现在python3.8的环境中,代码会报类似这样的警告:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">memcache.py:1303: SyntaxWarning: &quot;is&quot; with a literal. Did you mean &quot;&#x3D;&#x3D;&quot;?</span><br><span class="line">  if key is &#39;&#39;:</span><br><span class="line">memcache.py:1304: SyntaxWarning: &quot;is&quot; with a literal. Did you mean &quot;&#x3D;&#x3D;&quot;?</span><br><span class="line">  if key_extra_len is 0:</span><br></pre></td></tr></table></figure>
          <!--noindex-->
            <div class="post-button">
              <a class="btn" href="/2022/08/10/fix-python-memcached-3-8-syntax-warning/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
          <!--/noindex-->
        
      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://knktc.com/2022/08/10/nginx-not-found-log-off/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/sonic_avatar.png">
      <meta itemprop="name" content="knktc">
      <meta itemprop="description" content="关注linux,云计算,python,杂乱之地...">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="knktc的杂乱空间">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2022/08/10/nginx-not-found-log-off/" class="post-title-link" itemprop="url">Nginx忽略404错误日志</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间:2022-08-10 21:42:44 / 修改时间:21:52:07" itemprop="dateCreated datePublished" datetime="2022-08-10T21:42:44+08:00">2022-08-10</time>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>最近尝试使用nginx来提供一些静态的json文件来作为配置,最为简单的做法就是提供下面这样的配置了:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">location ~ ^&#x2F;myconf&#x2F;(?&lt;filename&gt;.*)$ &#123;</span><br><span class="line">    alias &#x2F;home&#x2F;knktc&#x2F;myconf&#x2F;$filename;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
          <!--noindex-->
            <div class="post-button">
              <a class="btn" href="/2022/08/10/nginx-not-found-log-off/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
          <!--/noindex-->
        
      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://knktc.com/2022/06/16/certbot-on-ubuntu-cheatsheet/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/sonic_avatar.png">
      <meta itemprop="name" content="knktc">
      <meta itemprop="description" content="关注linux,云计算,python,杂乱之地...">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="knktc的杂乱空间">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2022/06/16/certbot-on-ubuntu-cheatsheet/" class="post-title-link" itemprop="url">使用Certbot自动化生成https证书(ubuntu系统+cloudflare+nginx)</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间:2022-06-16 21:45:36 / 修改时间:22:21:53" itemprop="dateCreated datePublished" datetime="2022-06-16T21:45:36+08:00">2022-06-16</time>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>用Certbot来自动生成Let’s Encrypt证书这件事儿,虽然官方和网上已经有了很详实的文档了,但是我还是想自己记录下,留作以后备查吧。</p>
<p>本文用的操作系统是ubuntu 20.04,DNS的话用的是Cloudflare的服务,web服务使用nginx来提供。然后,按照以下步骤进行就可以了。</p>
          <!--noindex-->
            <div class="post-button">
              <a class="btn" href="/2022/06/16/certbot-on-ubuntu-cheatsheet/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
          <!--/noindex-->
        
      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://knktc.com/2022/04/22/set-mirror-when-installing-poerty/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/sonic_avatar.png">
      <meta itemprop="name" content="knktc">
      <meta itemprop="description" content="关注linux,云计算,python,杂乱之地...">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="knktc的杂乱空间">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2022/04/22/set-mirror-when-installing-poerty/" class="post-title-link" itemprop="url">使用镜像来加快Poetry的安装</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间:2022-04-22 13:52:52" itemprop="dateCreated datePublished" datetime="2022-04-22T13:52:52+08:00">2022-04-22</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间:2022-04-25 13:03:15" itemprop="dateModified" datetime="2022-04-25T13:03:15+08:00">2022-04-25</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>首先添加下全局的pip代理:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip config --user setglobal.index-url https:&#x2F;&#x2F;pypi.tuna.tsinghua.edu.cn&#x2F;simple</span><br></pre></td></tr></table></figure>

<p>然后下载安装脚本到本地(比如保存成install-poetry.py文件):</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl -sSL https:&#x2F;&#x2F;install.python-poetry.org -o install-poetry.py</span><br></pre></td></tr></table></figure>

<p>打开脚本进行编辑,找到如下这段代码:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">def pip(self, *args, **kwargs) -&gt; subprocess.CompletedProcess:</span><br><span class="line">        return self.python(&quot;-m&quot;, &quot;pip&quot;, &quot;--isolated&quot;, *args, **kwargs)</span><br></pre></td></tr></table></figure>

<p>把里面的”–isolated”删除掉,然后安装脚本使用pip时就会自动使用之前配置好的镜像了:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">python3 install install-poetry.py</span><br></pre></td></tr></table></figure>


      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://knktc.com/2022/03/26/use-celery-broadcast-queue/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/sonic_avatar.png">
      <meta itemprop="name" content="knktc">
      <meta itemprop="description" content="关注linux,云计算,python,杂乱之地...">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="knktc的杂乱空间">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2022/03/26/use-celery-broadcast-queue/" class="post-title-link" itemprop="url">使用Celery来广播任务</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间:2022-03-26 21:35:13 / 修改时间:23:15:15" itemprop="dateCreated datePublished" datetime="2022-03-26T21:35:13+08:00">2022-03-26</time>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>最近琢磨给自己的系统加上个Agent来实现配置变更和监控信息采集等任务,因为这个系统是多实例部署的,所以这些Agent可能需要同时运行相同的任务。因为我们正好在用celery,celery支持广播任务,所有的worker都能收到相同的任务,正好就能用这个特性来实现Agent的功能了。</p>
          <!--noindex-->
            <div class="post-button">
              <a class="btn" href="/2022/03/26/use-celery-broadcast-queue/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
          <!--/noindex-->
        
      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://knktc.com/2022/03/23/where-to-place-mib-files-in-ubuntu/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/sonic_avatar.png">
      <meta itemprop="name" content="knktc">
      <meta itemprop="description" content="关注linux,云计算,python,杂乱之地...">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="knktc的杂乱空间">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2022/03/23/where-to-place-mib-files-in-ubuntu/" class="post-title-link" itemprop="url">Ubuntu系统中如何导入SNMP MIB库文件</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间:2022-03-23 22:39:41 / 修改时间:23:10:08" itemprop="dateCreated datePublished" datetime="2022-03-23T22:39:41+08:00">2022-03-23</time>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>我这边的一个系统用了telegraf的snmp_trap插件来采集snmp trap告警,然后再转换为http格式吐出进入下一个环节。这个插件配置起来倒是简单,但是其中对于OID的翻译依赖于snmptranslate命令的结果,而如果让snmptranslate命令能正常翻译,又依赖于MIB库文件的正确放置和配置。最近在用这套东西来采集H3C交换机设备的告警,正好记录下在ubuntu环境下导入MIB库文件的方法。</p>
          <!--noindex-->
            <div class="post-button">
              <a class="btn" href="/2022/03/23/where-to-place-mib-files-in-ubuntu/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
          <!--/noindex-->
        
      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://knktc.com/2022/03/21/git-use-different-ssh-key/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/sonic_avatar.png">
      <meta itemprop="name" content="knktc">
      <meta itemprop="description" content="关注linux,云计算,python,杂乱之地...">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="knktc的杂乱空间">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2022/03/21/git-use-different-ssh-key/" class="post-title-link" itemprop="url">Git命令使用不同的SSH密钥</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间:2022-03-21 22:55:38" itemprop="dateCreated datePublished" datetime="2022-03-21T22:55:38+08:00">2022-03-21</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间:2022-03-23 22:34:28" itemprop="dateModified" datetime="2022-03-23T22:34:28+08:00">2022-03-23</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>最近要在自动构建中加入个打tag的操作,却发现可能是gitlab的bug,之前加过的默认deploy key怎么都找不到了。没办法,只好在打包服务器上再创建一个SSH密钥对,让执行git命令时使用这个新的SSH密钥。</p>
          <!--noindex-->
            <div class="post-button">
              <a class="btn" href="/2022/03/21/git-use-different-ssh-key/#more" rel="contents">
                阅读全文 &raquo;
              </a>
            </div>
          <!--/noindex-->
        
      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  


  
  <nav class="pagination">
    <span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><span class="space">&hellip;</span><a class="page-number" href="/page/7/">7</a><a class="extend next" rel="next" href="/page/2/"><i class="fa fa-angle-right" aria-label="下一页"></i></a>
  </nav>



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="knktc"
      src="/images/sonic_avatar.png">
  <p class="site-author-name" itemprop="name">knktc</p>
  <div class="site-description" itemprop="description">关注linux,云计算,python,杂乱之地...</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">70</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">214</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/knktc" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;knktc" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://twitter.com/knktc" title="Twitter → https:&#x2F;&#x2F;twitter.com&#x2F;knktc" rel="noopener" target="_blank"><i class="fab fa-twitter fa-fw"></i>Twitter</a>
      </span>
  </div>
  <div class="cc-license motion-element" itemprop="license">
    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" rel="noopener" target="_blank"><img src="/images/cc-by-nc-sa.svg" alt="Creative Commons"></a>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        
  <div class="beian"><a href="https://beian.miit.gov.cn/" rel="noopener" target="_blank">鄂ICP备2021019593号-1 </a>
      <img src="/images/beian.png" style="display: inline-block;"><a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=42018502005554" rel="noopener" target="_blank">鄂公网安备 42018502005554号 </a>
  </div>

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2025</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">knktc</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://pisces.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>

<script src="/js/utils.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  

</body>
</html>
                               

Whois info of domain

Domain Name: KNKTC.COM
Registry Domain ID: 1627945830_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.22.cn
Registrar URL: http://www.22.cn
Updated Date: 2024-06-21T04:20:10Z
Creation Date: 2010-11-30T03:36:02Z
Registry Expiry Date: 2026-11-30T03:36:02Z
Registrar: 22net, Inc.
Registrar IANA ID: 1555
Registrar Abuse Contact Email: [email protected]
Registrar Abuse Contact Phone: +86.571.88276020
Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Name Server: FLOWERS.DNSPOD.NET
Name Server: HUMID.DNSPOD.NET
DNSSEC: unsigned
URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2025-05-05T20:36:45Z <<<
For more information on Whois status codes, please visit https://icann.org/epp
NOTICE: The expiration date displayed in this record is the date the
TERMS OF USE: You are not authorized to access or query our Whois
by the following terms of use: You agree that you may use this Data only
to: (1) allow, enable, or otherwise support the transmission of mass