Legacy Knowledge Base
公開されました Jul. 2, 2025

Gogoshell の lb コマンドの結果を記録する

Written By

Alfonso Abad

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • Gogoshellで lb コマンドを実行した結果を.txtファイルに記録するにはどうすればよいでしょうか?

環境への配慮

  • DXP7.

決議

これは、Telnetでセッションを記録するスクリプトを作成することで実現します。 Gogoshell経由ではできない.

  • このようなスクリプトを作成します。
#!/usr/bin/expect

spawn telnet localhost 11311
set timeout 20

expect "g!"
send -- "lb\r"

expect "g!"
send -- "disconnect\r"

expect "Disconnect from console? (y/n; default=y)"
send -- "y\r"
  • dxplb.exp のように任意の名前で保存してください。
  • 実行権限を与える chmod a x dxplb.ext
  • この方法で実行してください。
​./dxplb.exp > results.txt

或いは

​./dxplb.exp | tee results.txt

追加情報

Did this article resolve your issue ?

Legacy Knowledge Base