forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com> Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
50 lines
19 KiB
HTML
50 lines
19 KiB
HTML
<a name="EN-US_TOPIC_0057711189"></a><a name="EN-US_TOPIC_0057711189"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining ECS Console Logs</h1>
|
|
<div id="body1493106935063"><div class="section" id="EN-US_TOPIC_0057711189__section1826165816643"><h4 class="sectiontitle">Scenarios</h4><p id="EN-US_TOPIC_0057711189__p3668877516645">When an <span id="EN-US_TOPIC_0057711189__text178921613917">ECS</span> cannot start or run properly, you can download and view <span id="EN-US_TOPIC_0057711189__text12740133818522">ECS</span> console logs for troubleshooting, for example, checking whether the kernel and service configuration are correct.</p>
|
|
<p id="EN-US_TOPIC_0057711189__p312753164626">The <span id="EN-US_TOPIC_0057711189__text13618122493914">ECS</span> console logs record <span id="EN-US_TOPIC_0057711189__text554420590520">ECS</span> operations, such as <span id="EN-US_TOPIC_0057711189__text119896210531">ECS</span> starting, stopping, restarting, or forcibly restarting. Through the management console, you can obtain the <span id="EN-US_TOPIC_0057711189__text153906613538">ECS</span> logs within one hour.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0057711189__section2426125161724"><h4 class="sectiontitle">Notes</h4><ul id="EN-US_TOPIC_0057711189__ul26727941161912"><li id="EN-US_TOPIC_0057711189__li63980565164754">The system does not record the logs for forcible <span id="EN-US_TOPIC_0057711189__text1069526123916">ECS</span> stopping.</li><li id="EN-US_TOPIC_0057711189__li61022100162026">The system supports viewing console logs for the <span id="EN-US_TOPIC_0057711189__text14747122663914">ECS</span>s running the following OSs:<ul id="EN-US_TOPIC_0057711189__ul19880971162028"><li id="EN-US_TOPIC_0057711189__li59413050161912">Red Hat Enterprise Linux 6.x series</li><li id="EN-US_TOPIC_0057711189__li59600457102244">Red Hat Enterprise Linux 7.x series</li><li id="EN-US_TOPIC_0057711189__li40740181161912">CentOS 6.x series</li><li id="EN-US_TOPIC_0057711189__li29742706102258">CentOS 7.x series</li><li id="EN-US_TOPIC_0057711189__li1702237519370">Ubuntu 14.x series</li><li id="EN-US_TOPIC_0057711189__li48584426193911">Ubuntu 16.x series</li><li id="EN-US_TOPIC_0057711189__li41351490193740">SUSE 11.x series</li><li id="EN-US_TOPIC_0057711189__li57353929193747">SUSE 12.x series</li><li id="EN-US_TOPIC_0057711189__li64239771193754">OpenSUSE 13.x series</li><li id="EN-US_TOPIC_0057711189__li48963124193842">OpenSUSE 42.x series</li><li id="EN-US_TOPIC_0057711189__li33182148193852">Debian 16.x series</li><li id="EN-US_TOPIC_0057711189__li1220250194014">Fedora series</li><li id="EN-US_TOPIC_0057711189__li44922815194024">Freebsd series</li><li id="EN-US_TOPIC_0057711189__li26662115194034">CoreOS series</li></ul>
|
|
</li><li id="EN-US_TOPIC_0057711189__li21734266104927">The <span id="EN-US_TOPIC_0057711189__text6450182715398">ECS</span>s running Windows do not support console logs.</li><li id="EN-US_TOPIC_0057711189__li14271970162034">The system can save up to 100 KB log files.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0057711189__section24136850162414"><h4 class="sectiontitle">Procedure</h4><ol id="EN-US_TOPIC_0057711189__ol912751214117"><li id="EN-US_TOPIC_0057711189__li18794256135515"><span>Log in to the <span id="EN-US_TOPIC_0057711189__text1711148541">ECS</span>.</span></li><li id="EN-US_TOPIC_0057711189__li28042285214117"><span>Check and modify the grub file.</span><p><div class="p" id="EN-US_TOPIC_0057711189__p23745547161255">The configuration method varies depending on the OS.<div class="note" id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_note999712176384"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_p5998131714384">To prevent impact on the start of the recovery mode, you are advised to modify only the item used for the default start.</p>
|
|
</div></div>
|
|
<ul id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_ul18769785171238"><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li1325741171238">For CentOS 6 and Red Hat 6, perform the following steps:<ol type="a" id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_ol41624950171443"><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li45594548171443">Run the following command to open the configuration file:<p id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_p57885201171447"><a name="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li45594548171443"></a><a name="en-us_topic_0057450886_li45594548171443"></a><strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b7697751171443">vi /boot/grub/menu.lst</strong></p>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li19538075171443">Locate the row that contains <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b842352706115641">linux</strong>, <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b842352706115649">linux16</strong>, or <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b842352706115658">kernel</strong> (depending on the system), add <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b842352706115711">console=ttyS0</strong> to its end, and delete parameter <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b842352706115723">rhgb quiet</strong>. If <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b92835785919637">console=ttyS0</strong> already exists, you do not need to add it. Save the change and exit.</li></ol>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li6061980171248">For CentOS 7, Red Hat 7, and Ubuntu 14, perform the following steps:<ol type="a" id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_ol4344894171452"><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li58180088171452">Run the following command to open the configuration file:<p id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_p55209546171459"><a name="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li58180088171452"></a><a name="en-us_topic_0057450886_li58180088171452"></a><strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b58365653175441">vi /boot/grub2/grub.cfg</strong></p>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li482766171452">Locate the row that contains <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b1424594469">linux</strong>, <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b1505240030">linux16</strong>, or <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b239419545">kernel</strong> (depending on the system), add <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b1896366193">console=ttyS0</strong> to its end, and delete parameter <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b884990623">rhgb quiet</strong>. If <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b2027364486">console=ttyS0</strong> already exists, you do not need to add it. Save the change and exit.</li></ol>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li499662617132">For SUSE Linux 11, perform the following steps:<ol type="a" id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_ol36144979171413"><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li39085626171413">Run the following command to open the configuration file:<p id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_p2611227517147"><a name="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li39085626171413"></a><a name="en-us_topic_0057450886_li39085626171413"></a><strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b45748722171837">vi /boot/grub/menu.1st</strong></p>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li25642817171428">Locate the row that contains <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b412930220">linux</strong>, <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b754044477">linux16</strong>, or <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b1844078939">kernel</strong> (depending on the system) and add <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b810868039">console=ttyS0</strong> to its end. If <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b2136956849">console=ttyS0</strong> already exists, you do not need to add it. Save the change and exit.</li></ol>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li62848105171712">For SUSE Linux 12, openSUSE 13, and openSUSE 42, perform the following steps:<ol type="a" id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_ol28762041171712"><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li57531782171712">Run the following command to open the configuration file:<p id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_p48023993171712"><a name="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li57531782171712"></a><a name="en-us_topic_0057450886_li57531782171712"></a><strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b38870278172219">vi /boot/grub2/grub.cfg</strong></p>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li64738205171712">Locate the row that contains <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b1217398801">linux</strong>, <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b750301390">linux16</strong>, or <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b230056562">kernel</strong> (depending on the system) and add <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b847449827115924">console=ttyS0</strong> to its end. If <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b1005347527">console=ttyS0</strong> already exists, you do not need to add it. Save the change and exit.</li></ol>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li8983690171710">For Debian and Ubuntu 16, perform the following steps:<ol type="a" id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_ol13744349171710"><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li56590279171710">Run the following command to open the configuration file:<p id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_p39550465171710"><a name="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li56590279171710"></a><a name="en-us_topic_0057450886_li56590279171710"></a><strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b54593791172530">vi /boot/grub/grub.cfg</strong></p>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li49471090171710">Locate the row that contains <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b1833627145">linux</strong>, <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b958222841">linux16</strong>, or <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b1361139113">kernel</strong> (depending on the system) and add <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b1035146479">console=ttyS0</strong> to its end. If <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b374683594">console=ttyS0</strong> already exists, you do not need to add it. Save the change and exit.</li></ol>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li4553691517177">For Fedora, perform the following steps:<ol type="a" id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_ol717905417177"><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li6461149317177">Run the following command to open the configuration file:<p id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_p4463252717177"><a name="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li6461149317177"></a><a name="en-us_topic_0057450886_li6461149317177"></a><strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b40031083172624">vi /boot/grub2/grub.cfg</strong></p>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li5846497317177">Locate the row that contains <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b587044797">linux</strong>, <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b1620820042">linux16</strong>, or <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b1779444901">kernel</strong> (depending on the system) and add <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b632855697">console=ttyS0</strong> to its end. If <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b170599690">console=ttyS0</strong> already exists, you do not need to add it. Save the change and exit.</li></ol>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li106424171526">For FreeBSD, perform the following steps:<ol type="a" id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_ol957823171526"><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li8620413171526">Run the following command to open the configuration file:<p id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_p10474859171526"><a name="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li8620413171526"></a><a name="en-us_topic_0057450886_li8620413171526"></a><strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b4471428217566">vi /boot/loader.conf</strong></p>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li43157284171526">Add <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b842352706175832">console="comconsole"</strong>. If <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b195631107">console="comconsole"</strong> already exists, you do not need to add it. Save the change and exit.</li></ol>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li58358914172853">For CoreOS, perform the following steps:<ol type="a" id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_ol55468183172853"><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li45429473172941">Run the following command to check whether <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b842352706175921">ttyS0</strong> has been configured:<p id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_p3717713017324"><strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b39660533173218">cat /proc/cmdline | grep ttyS0</strong></p>
|
|
<ul id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_ul39194071173021"><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li42793695173021">If yes, <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b769578641175950">ttyS0</strong> has been configured.</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li27524297173038">If no, <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b18579132912131">ttyS0</strong> has not been configured. Go to <a href="#EN-US_TOPIC_0057711189__en-us_topic_0057450886_li29451607172853">2.b</a>.</li></ul>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li29451607172853"><a name="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li29451607172853"></a><a name="en-us_topic_0057450886_li29451607172853"></a>Run the following command to open the configuration file to be edited:<p id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_p28525433173339"><a name="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li29451607172853"></a><a name="en-us_topic_0057450886_li29451607172853"></a><strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b47034320173348">vi /usr/share/oem/grub.cfg</strong></p>
|
|
<div class="note" id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_note60054496173715"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_p58244365173455">If the <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b184294481137">/usr/share/oem/grub.cfg</strong> configuration file does not exist, manually create the file.</p>
|
|
</div></div>
|
|
</li><li id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_li7738013173419">Add <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b84235270618116">set linux_append="console=ttyS0"</strong>. If <strong id="EN-US_TOPIC_0057711189__en-us_topic_0057450886_b188260841118132">set linux_append="console=ttyS0"</strong> already exists, you do not need to add it. Save the change and exit.</li></ol>
|
|
</li></ul>
|
|
</div>
|
|
</p></li><li id="EN-US_TOPIC_0057711189__li197832175614"><span>On the <strong id="EN-US_TOPIC_0057711189__b161471675512">Elastic Cloud Server</strong> page, click <strong id="EN-US_TOPIC_0057711189__b1279615514548">Restart</strong>.</span></li><li id="EN-US_TOPIC_0057711189__li36173738214149"><span>Obtain <span id="EN-US_TOPIC_0057711189__text053983014393">ECS</span> console logs.</span><p><ol type="a" id="EN-US_TOPIC_0057711189__ol136729612253"><li id="EN-US_TOPIC_0057711189__li14469519145710">Log in to the management console.</li><li id="EN-US_TOPIC_0057711189__li464234814566">Click <span><img id="EN-US_TOPIC_0057711189__en-us_topic_0000001825604541_image9499446838" src="en-us_image_0000002188678994.png"></span> in the upper left corner and select a region and project.</li><li id="EN-US_TOPIC_0057711189__li56832593214117">Under <strong id="EN-US_TOPIC_0057711189__b17893123693217"><span id="EN-US_TOPIC_0057711189__text16887123611321">Computing</span></strong>, click <strong id="EN-US_TOPIC_0057711189__b6893183617327">Elastic Cloud Server</strong>.</li><li id="EN-US_TOPIC_0057711189__li41731292214117">On the <strong id="EN-US_TOPIC_0057711189__b1945113425510">Elastic Cloud Server</strong> page, click the name of the target <span id="EN-US_TOPIC_0057711189__text16492123212392">ECS</span>.</li><li id="EN-US_TOPIC_0057711189__li40037314214117">On the ECS details page, click the <strong id="EN-US_TOPIC_0057711189__b842352706161247">Console Logs</strong> tab.</li><li id="EN-US_TOPIC_0057711189__li24791506214117">Choose the number of lines to be displayed for a log from the <strong id="EN-US_TOPIC_0057711189__b842352706161337">Displayed Lines</strong> drop-down list.</li><li id="EN-US_TOPIC_0057711189__li61954976214117">Click <strong id="EN-US_TOPIC_0057711189__b842352706161653">Query</strong>.<p id="EN-US_TOPIC_0057711189__p21796967214117">View details of the displayed log.</p>
|
|
<div class="note" id="EN-US_TOPIC_0057711189__note39071321164844"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0057711189__p16097575164844">After you click <strong id="EN-US_TOPIC_0057711189__b1032754084195946">Query</strong>, the system will not automatically update the displayed log. To view the latest log, click <strong id="EN-US_TOPIC_0057711189__b127849426720019">Query</strong> again.</p>
|
|
</div></div>
|
|
</li><li id="EN-US_TOPIC_0057711189__li52297199214117">(Optional) Click <strong id="EN-US_TOPIC_0057711189__b84235270616188">Download</strong> to download the information of the displayed log.<p id="EN-US_TOPIC_0057711189__p20723880214117">Downloaded log files are in .txt format.</p>
|
|
</li></ol>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0057711189__section42122526164622"><h4 class="sectiontitle">Related Links</h4><p id="EN-US_TOPIC_0057711189__p39315121164629"><a href="en-us_topic_0088241338.html">Why Does the System Display a Question Mark When I Attempt to Obtain Console Logs?</a></p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0176502615.html">Managing My ECSs</a></div>
|
|
</div>
|
|
</div>
|
|
|