Fujitsu BX900: How to save MMB System Event Log remotely

I know MMB SEL can be saved using Web GUI, or log in to MMB via SSH and follow the menu. These methods require several mouse clicks or keyboard interactions. It would be nice to automate this process using a script or one-liner commands, wouldn't it?

Here are some examples.

  • CIM (This method requires WS-MAN enabled in MMB)
  • $ wbemcli ei 'http://<mmb user name>:<password>@<mmb IP address>:5988/root/cimv2:Linux_MgmtBladeLog' |awk -F[,\"] '{print sprintf("%04d", $30), $27,$24}'
    Example)
    $ wbemcli ei 'http://admin:admin@192.168.10.10:5988/root/cimv2:Linux_MgmtBladeLog' | awk -F[,\"] '{print sprintf("%04d", $30), $27,$24}'
    0001 2016-07-19 10:44:44 The IPv4 NTP server 2 is recovered.
    0002 2016-07-19 10:19:09 The IPv4 NTP server 2 is inaccessible.
    0003 2016-06-09 15:07:27 The IPv4 NTP server 2 is recovered.
    0004 2016-06-09 15:01:57 The IPv4 NTP server 2 is inaccessible.
    0005 2016-06-06 15:08:17 Server Blade-10 was removed.
    0006 2016-06-06 15:06:55 Server Blade-10 power on.
    0007 2016-06-06 15:06:04 Server Blade-10 power off.
    0008 2016-06-06 15:01:49 Server Blade-10 power on.
    0009 2016-06-06 15:01:01 Server Blade-10 power on.
    0010 2016-06-06 15:00:53 Server Blade-10 was added.
    ...
    
  • SSH
    1. Create a file containing the following:
    2. 7
      2
      0
      0
      5
      
      Or just run
      $ echo -e "7\n2\n0\n0\n5" > input_file
    3. Execute SSH using the file created as input. plink can be downloaded from PuTTY download page.
    4. $ ssh -T <mmb user name>@<mmb IP address> < input_file
      or
      $ plink -ssh -T -l <mmb user name> -pw <password> <mmb IP address> < input_file
      Example)
      $ plink -ssh -T -l admin -pw admin 192.168.10.10 < input_file
      ...
      SEL entry number:511, Free space of SEL entry:0
      2016-07-19 10:44:44 Info/Normal The IPv4 NTP server 2 is recovered.
      2016-07-19 10:19:09  Minor      The IPv4 NTP server 2 is inaccessible.
      2016-06-09 15:07:27 Info/Normal The IPv4 NTP server 2 is recovered.
      2016-06-09 15:01:57  Minor      The IPv4 NTP server 2 is inaccessible.
      2016-06-06 15:08:17 Info/Normal Server Blade-10 was removed.
      2016-06-06 15:06:55 Info/Normal Server Blade-10 power on.
      2016-06-06 15:06:04 Info/Normal Server Blade-10 power off.
      ...
      
    5. If needed, you can redirect the output to a file to save the contents.

Also you can use the above SSH method to save MMB System Information Dump remotely.The difference is that the input file needs to contain the following:

7
5
0
0
5
Or just run
$ echo -e "7\n5\n0\n0\n5" > input_file

Then execute ssh or plink against MMB.

Example)
$ plink -ssh -T -l admin -pw admin 192.168.10.10 < input_file
...
+----------------------------------------------+
+             System Control Information
+----------------------------------------------+
System Name        : BX900-2
Housing Type       : BX900S1
System Location    : Data Center
System Contact     : dc-admin@example.com
Chassis Part Number: A3C40119934


+----------------------------------------------+
+             MMB
+----------------------------------------------+
Management Blade Run Mode             : master
Management Blade Status               : ok
Management Blade Manufacture          : FUJITSU
Management Blade Manufacture Date     : 04/02/2010 10:17:00
...

No comments:

Good Bye, Folks!

As you may have heard, Fujitsu has completely discontinued Data Center Products and Solutions business in North America on April 1st, 2021. ...