2017-02-16 1 views
-1

のうち、今日は、誤って自分のLinuxシェルに文字列を貼り付け環境はCentOSの6.5である、と私は貼り付ける文字列が、JSONフォーマットされたリクエストのログです:非常に高いだろうシェル原因のCPU負荷の間違いペーストとそのCPUの負荷が非常に高く行き、それが制御不能に</p> <p>私を得た後、次に制御

[{"timestamp":1487240104178,"info":{"method":"GET","path":"/APIService/v1/refreshSession","headers":{"request":{"user-agent":"curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2","host":"172.22.3.12:8122","accept":"*/*"},"response":{"X-Application-Context":"application:8122","status":"404"}}}},{"timestamp":1487240077403,"info":{"method":"GET","path":"/APIService/v1/refreshSession","headers":{"request":{"user-agent":"curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2","host":"172.22.3.12:8122","accept":"*/*"},"response":{"X-Application-Context":"application:8122","status":"404"}}}},{"timestamp":1487240075185,"info":{"method":"GET","path":"/APIService/v1/refreshSession","headers":{"request":{"user-agent":"curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2","host":"172.22.3.12:8122","accept":"*/*"},"response":{"X-Application-Context":"application:8122","status":"404"}}}},{"timestamp":1487240050994,"info":{"method":"GET","path":"/APIService/v1/refreshSession","headers":{"request":{"user-agent":"curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2","host":"172.22.3.12:8122","accept":"*/*"},"response":{"X-Application-Context":"application:8122","status":"404"}}}},{"timestamp":1487240037110,"info":{"method":"GET","path":"/APIService/v1/refreshSession","headers":{"request":{"user-agent":"curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2","host":"172.22.3.12:8122","accept":"*/*"},"response":{"X-Application-Context":"application:8122","status":"404"}}}},{"timestamp":1487240025956,"info":{"method":"GET","path":"/APIService/v1/refreshSession","headers":{"request":{"user-agent":"curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2","host":"172.22.3.12:8122","accept":"*/*"},"response":{"X-Application-Context":"application:8122","status":"404"}}}},{"timestamp":1487239999461,"info":{"method":"GET","path":"/APIService/v1/refreshSession","headers":{"request":{"host":"172.22.1.15","remote_addr":"172.22.1.15","x-real-ip":"172.22.1.15","x-forwarded-for":"172.22.1.15","user-agent":"curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2","accept":"*/*"},"response":{"X-Application-Context":"application:8122","status":"404"}}}},{"timestamp":1487239998662,"info":{"method":"GET","path":"/APIService/v1/refreshSession","headers":{"request":{"host":"172.22.1.15","remote_addr":"172.22.1.15","x-real-ip":"172.22.1.15","x-forwarded-for":"172.22.1.15","user-agent":"curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2","accept":"*/*"},"response":{"X-Application-Context":"application:8122","status":"404"}}}},{"timestamp":1487239889129,"info":{"method":"GET","path":"/APIservice/v1/refreshSession","headers":{"request":{"host":"172.22.1.15","remote_addr":"172.22.1.15","x-real-ip":"172.22.1.15","x-forwarded-for":"172.22.1.15","user-agent":"curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2","accept":"*/*"},"response":{"X-Application-Context":"application:8122","status":"404"}}}}][[email protected] conf] 

は、再起動後、マシンはokです。

何が起こったのか誰に教えてもらえますか、なぜその文字列がこのような高いCPU負荷を引き起こしたのですか?

答えて

1

文字列の最後の[[email protected] conf]については、それはシェルプロンプトですか?あなたはrootとしてシェルにログインしていますか?私はあなたの手首を叩く!それをしないでください。

私は確信していませんが、シェルが文字列をコマンドに展開しようとしていて、文字列*/*の複数の出現のために壁に当たっていると思います。 bashは、{a,b,c,*/*}という形式の文字列を見ると、それを文字列a b c ...に展開しようとします。...は、glob */*の展開です。ネストされたブラケット拡張が表示されるときにも、ブラケット拡張が展開されます。あなたはコンビナトリアルな爆発が起こっていると思います。

関連する問題