Re:Q Tech Blogをご覧いただきありがとうございます。
インフラ技術部Iです。
昨日参加したRed Hat Summit: Connect 2025 Tokyoのセッション内で紹介されていた、
RHEL10で使用可能な"Lightspeed"がとても面白く役立ちそうな機能だと感じたため、早速検証してみました!
※現在はRHEL9.6,RHEL10で使用可能
Red Hat Summit: Connect 2025 Tokyo参加レポートの記事はこちらからご覧ください!
Lightspeedとは
Lightspeedとは、RHEL OS上で使用できるRHELの管理・設定・トラブルシューティングに特化したAI駆動の対話型システム管理アシスタントです。
Lightspeedを導入することで、エラー発生時に出力されたログなどをそのままAIに情報を渡してエラー原因の一次切り分けなどをRHEL上で完結することが可能となります。
エラー発生時だけではなく、pythonなどのインストールなどもRHEL上で質問・回答・導入を行うことが可能となり、とても便利になります。
Lightspeedを使用する場合は、使用するデータの扱いにご注意ください。
詳細は、"1.2. コマンドラインアシスタントのデータ処理方法"をご確認ください。
環境
Red Hat Enterprise Linux release 10.0
※評価版ライセンスとなります。
事前準備
Lightspeedを利用するにあたり、パッケージ"command-line-assistant"のインストールを行います。
# dnf install -y command-line-assistant
インストールが完了するとコマンド"c"が利用可能となります。
# which c
/usr/bin/c# c --help
usage: c [--debug] [-h] [-v] {chat,feedback,history,shell} ...The Command Line Assistant powered by RHEL Lightspeed is an optional generative AI assistant available within the RHEL command line interface.
positional arguments:
{chat,feedback,history,shell}
chat Command to ask a question to the LLM.
feedback Submit feedback about Command Line Assistant responses and interactions.
history Manage Conversation History
shell Manage shell integrationsoptions:
--debug Enable debug logging information
-h, --help Show this help message and exit.
-v, --version Show program version
検証
RHEL Lightspeed を搭載したコマンドラインアシスタントとの対話を参考にしながら、以下について試してみます。
1.英語での質問と回答
基本的な使い方としてはc+"質問"という形で実行します。
[root@rhel10 ~]# c "what is RHEL"
??- Asking RHEL Lightspeed
This feature uses AI technology. Do not include any personal information or other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.Red Hat Enterprise Linux (RHEL) is a commercial open-source operating system distributed by Red Hat and backed by Red Hat, Inc. It's designed for businesses and offers a stable, secure, and reliable platform for deploying applications. RHEL is renowned for its long-term support, typically 10 years, which includes security updates, bug fixes, and enhancements. It's built around a stable Linux kernel and includes enterprise-grade features like advanced networking, storage management, and virtualization capabilities. RHEL is also a key component of Red Hat's hybrid cloud offerings, providing a consistent platform across on-premises, virtual, and public cloud environments.
Always review AI-generated content prior to use.
2.日本語での質問と英語での回答
日本語でも質問は可能ですが、回答はデフォルトで英語となります。
[root@rhel10 ~]# c "RHELとは何ですか?"
??+ Asking RHEL Lightspeedd
This feature uses AI technology. Do not include any personal information or other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.RHEL, or Red Hat Enterprise Linux, is a commercial and supported Linux distribution developed by Red Hat for the enterprise market. It is renowned for its stability, reliability, and security, making it a popular choice for businesses and organizations. RHEL is designed to provide a robust and consistent platform for deploying applications, integrating with infrastructure, and managing workloads. It offers a predictable lifecycle, long-term support, and a wide range of certifications, ensuring that it meets the stringent requirements of enterprise environments.
If you're new to RHEL, I recommend exploring its features through a RHEL instance. You can set up a virtual machine or use a cloud service to experience it firsthand. For detailed information and documentation, visit the official Red Hat Customer Portal.
Always review AI-generated content prior to use.
3.日本語での質問と回答
質問時に日本語で回答するように指示をすると日本語でも回答されるようになるため、
英語以外での回答を求める場合は、質問時に指定をする必要が有ります。
[root@rhel10 ~]# c "RHELとは何ですか?日本語で回答してください"
??+ Asking RHEL Lightspeedd
This feature uses AI technology. Do not include any personal information or other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.RHELとは、Red Hat Enterprise Linuxの略で、企業向けのLinuxディストリビューションです。Red Hatによって開発および管理されており、安定性、セキュリティ、サポートが強化されています。RHELは、サーバー、クラウド、コンテナ、AIなど、さまざまな環境 で使用され、信頼性の高いプラットフォームとして広く利用されています。
ユーザーが特定のRHELの機能やインストール手順についての質問がある場合は、詳細なガイダンスを提供することができます。
Always review AI-generated content prior to use.
4.質問へのファイル添付
ファイルを添付しての質問もオプション"-a <ファイル>"を使用することで可能となります。
以下では、ファイルにエラーログを記載して、原因と対処方法について質問を行っています。
[root@rhel10 ~]# c -a /tmp/error.txt "tell me the cause of the error and how to fix it."
??+ Asking RHEL Lightspeedd
This feature uses AI technology. Do not include any personal information or other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.The error you're encountering is due to an SSL handshake failure when attempting to download metadata from Red Hat's CDN for the 'rhel-10-for-x86_64-appstream-rpms' repository. This issue can occur if there are restrictions in your FIPS crypto policy that prevent the use of certain elliptic curves required for secure connections.
To resolve this issue, you can update your crypto policy to FIPS by running the following command:
[bash] Snippet
update-crypto-policies --set FIPSAfter running this command, reboot your system for the changes to take effect. This should allow dnf to successfully download the required metadata without encountering the SSL handshake error.
If you specifically need the FIPS:OSPP profile, you can edit the /usr/share/crypto-policies/policies/modules/OSPP.pmod file to remove -SECP256R1, set the policy to FIPS:OSPP, and reboot the system.
Please note that Red Hat is aware of this issue and is tracking it via JIRA RHEL-17585 (https://issues.redhat.com/browse/RHEL-17585).
Always review AI-generated content prior to use.
5.コマンド出力をリダイレクトして質問
コマンド実行による標準出力をパイプ"|"により繋げて質問することも可能となっています。
[root@rhel10 ~]# tail -20 /var/log/messages | c "tell me the cause of the error and how to fix it."
??+ Asking RHEL Lightspeedd
This feature uses AI technology. Do not include any personal information or other sensitive information in your input. Interactions may be used to improve
Red Hat's products or services.The error you're encountering is due to an SSL handshake failure when attempting to download metadata from Red Hat's CDN for the 'rhel-10-for-x86_64-appstream-rpms' repository. This issue can occur if there are restrictions in your FIPS crypto policy that prevent the use of certain elliptic curves required for secure connections.
To resolve this issue, you can update your crypto policy to FIPS by running the following command:
[bash] Snippet
update-crypto-policies --set FIPSAfter running this command, reboot your system for the changes to take effect. This should allow dnf to successfully download the required metadata without encountering the SSL handshake error.
If you specifically need the FIPS:OSPP profile, you can edit the /usr/share/crypto-policies/policies/modules/OSPP.pmod file to remove -SECP256R1, set the policy to FIPS:OSPP, and reboot the system.
Please note that Red Hat is aware of this issue and is tracking it via JIRA RHEL-17585 (https://issues.redhat.com/browse/RHEL-17585).
Always review AI-generated content prior to use.
6.対話履歴の確認および削除
これまでの質問と回答については、"c history"コマンドを使用して確認することが可能となります。
全ての対話履歴を確認する場合は"c history --all"コマンドを実行すれば良いですが、
回数や回答内容によってはかなりの量が標準出力されてしまうため、リダイレクトでファイルに出力するのをおすすめします。
# c history --all > /tmp/qa_all.txt
また、"--filter"オプションを使用することで、用語でフィルタリングすることも可能です。
[root@rhel10 ~]# c history --filter "ansible"
Filtering conversation history.? Question
---------------------------------
how to install and use Ansible.? Answer
---------------------------------
To install and use Ansible on Red Hat Enterprise Linux (RHEL), follow these steps:
....
....
Lightspeedの履歴は"--clear"オプションを付与することで削除することが可能です。
[root@rhel10 ~]# c history --clear
Cleaning the history.
7.インターネット接続不可環境での使用
インターネット環境への接続が無い状態でのLightspeedは使用できないので注意が必要となります。
プロキシ―設定が必要な場合は、"7.1. プロキシー設定のセットアップ"を参照して設定を行ってください。
以下、ネットワーク接続が無い状態で実行した際の結果となります。
[root@rhel10 ~]# c "how to install Ansible"
??+ Asking RHEL Lightspeed
? Communication error with the server:
HTTPSConnectionPool(host='cert.console.redhat.com', port=443): Max retries
exceeded with url: /api/lightspeed/v1/infer (Caused by
NewConnectionError('<urllib3.connection.HTTPSConnection object at
0x7fde118b9eb0>: Failed to establish a new connection: [Errno -2] Name or
service not known')). Please try again in a few minutes.
まとめ
"OSでログをコピー→Webブラウザ上のChat GPTなどへ貼り付けて質問"という一連の流れが、
"OSでログをファイル保存してLightspeedへ添付して質問"といった流れでRHELで全て完結させることが
出来るようになったのが大きなポイントだと考えられます。


