How to trigger BMC dumps

George Keishing gkeishin at in.ibm.com
Wed Nov 13 18:30:43 AEDT 2019


You can simply use this tool from DMTF redfish
https://github.com/DMTF/Redfishtool

and run the command as

$ redfishtool -r xx.xx.xx.xx -u root -p 0penBmc -S Always raw
POST /xyz/openbmc_project/dump/action/CreateDump --data="{\"data\": []}"
{
    "data": 2,
    "status": "ok",
    "message": "200 OK"
}


$ redfishtool -r xx.xx.xx.xx -u root -p 0penBmc -S Always raw
GET /xyz/openbmc_project/dump/list
{
    "data": [
        "/xyz/openbmc_project/dump/entry",
        "/xyz/openbmc_project/dump/entry/1",
        "/xyz/openbmc_project/dump/entry/2",
        "/xyz/openbmc_project/dump/internal",
        "/xyz/openbmc_project/dump/internal/manager"
    ],
    "status": "ok",
    "message": "200 OK"
}


$ redfishtool -r xx.xx.xx.xx -u root -p 0penBmc -S Always raw
GET /xyz/openbmc_project/dump/entry/2
{
    "status": "ok",
    "message": "200 OK",
    "data": {
        "Elapsed": 1573629994,
        "Size": 196276
    }
}


Thanks and Regards,
   George Keishing
   IBM Systems &Technology Lab, Firmware Development,
“ There isn't enough time in a day to be lazy!!! .”





From:	"George Keishing" <gkeishin at in.ibm.com>
To:	"常晓明" <xiaoqian1641 at 163.com>
Cc:	OpenBMC Development <openbmc at lists.ozlabs.org>
Date:	13-11-2019 12:48
Subject:	[EXTERNAL] Re:  How to trigger BMC dumps
Sent by:	"openbmc" <openbmc-bounces
            +gkeishin=in.ibm.com at lists.ozlabs.org>



$ export BMC_IP=xx.xx.xx.xx

$ curl -k -H "Content-Type: application/json" -X POST https://$
{BMC_IP}/login -d '{"username" : "root", "password" : "0penBmc"}'
{
"token": "hgatflkePN1rla5rpmh2"
}

$ export bmc_token=hgatflkePN1rla5rpmh2

$ curl -k -H "X-Auth-Token: $bmc_token" -d "{\"data\": []}" -X POST
https://$BMC_IP/xyz/openbmc_project/dump/action/CreateDump
{
"data": 1,
"message": "200 OK",
"status": "ok"
}

$ curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://$BMC_IP/xyz/openbmc_project/dump/list
{
"data": [
"/xyz/openbmc_project/dump/entry",
"/xyz/openbmc_project/dump/entry/1",
"/xyz/openbmc_project/dump/internal",
"/xyz/openbmc_project/dump/internal/manager"
],
"message": "200 OK",
"status": "ok"
}

$ curl -k -H "X-Auth-Token: $bmc_token" -X GET
https://$BMC_IP/xyz/openbmc_project/dump/entry/1
{
"data": {
"Elapsed": 1573629177,
"Size": 178364
},
"message": "200 OK",
"status": "ok"
}

Thanks and Regards,
George Keishing



Inactive hide details for "常晓明" ---13-11-2019 12:28:26---Hi, All, I am
tring to trigger BMC dumps, follow https://urldefe"常晓明" ---13-11-2019
12:28:26---Hi, All, I am tring to trigger BMC dumps, follow INVALID URI
REMOVED

From: "常晓明" <xiaoqian1641 at 163.com>
To: "OpenBMC Development" <openbmc at lists.ozlabs.org>
Date: 13-11-2019 12:28
Subject: [EXTERNAL] How to trigger BMC dumps
Sent by: "openbmc" <openbmc-bounces+gkeishin=in.ibm.com at lists.ozlabs.org>



Hi, All,

I am tring to trigger BMC dumps, follow
https://github.com/xcat2/xcat-core/issues/4235
1. Login BMC
curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST
https://127.0.0.1:2443/login -d "{\"data\": [ \"root\", \"0penBmc\" ] }"
2. List available dumps
curl -c cjar -b cjar -k
https://127.0.0.1:2443/xyz/openbmc_project/dump/list
3. When Manually trigger a generation of a dump
curl -c cjar -b cjar -k -H "Content-Type: application/json" -d "{\"data\":
[]}" -X POST
https://127.0.0.1:2443/xyz/openbmc_project/dump/action/CreateDump
The cosole display : Unauthorized
Does anyone know what happened?

Thanks

Johny










-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20191113/21455ca2/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1A746688.jpg
Type: image/jpeg
Size: 7547 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20191113/21455ca2/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20191113/21455ca2/attachment-0001.gif>


More information about the openbmc mailing list