File: README

package info (click to toggle)
openipmi 2.0.7-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 10,200 kB
  • ctags: 14,662
  • sloc: ansic: 126,919; sh: 9,454; python: 6,885; perl: 5,838; makefile: 507
file content (1382 lines) | stat: -rw-r--r-- 38,874 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
This is the OpenIPMI command language, which allows each access to
pretty much everything about OpenIPMI.  It can be used to add an
OpenIPMI command shell into an application to give the user full
access into everything OpenIPMI can do.

The interface is very simple.  You call the command interpreter with a
string.  You pass in two functions, an output handler and a "done"
functions.  If an error occurs, the command interpreter generates some
output and returns an error code.  Otherwise, it will generate output
and call the done function when it is complete.

The command language is hierarchical.  There are several top-level
commands, each of these has sub-commands, and those may have
sub-commands, and so on.

The commands may take parameters.  Some general ones are:

* <domain> - A name of a domain.  Each registered domain in a system
  has a name.
* <entity> - Entity names are in the form: [<domain>[(entity spec)]]
  Notice that the entity spec is optional.  If it is not listed, then
  the operation is done on all entities in the domain.  The whole
  thing is optional, too, if nothing is given then the operation is
  done on every entity in every domain.
  The entity spec is either:
   <entity id>.<entity instance>
  for system-reltive entities, or:
   r<channel>.<IPMB>.<entity id>.<entity instance-0x60>
  for device-relative entities.
* <sensor> - These come in the form [<entity>[.name]] If no name is
  given, the operation is performed on all sensors in the entity.
  If the entity is just a domain, then all sensors in the domain, and
  if the whole thing is empty, then all sensors on all domains.
* <control> - These come in the form [<entity>[.name]] If no name is
  given, the operation is performed on all controls in the entity.
  If the entity is just a domain, then all controls in the domain, and
  if the whole thing is empty, then all controls on all domains.
* <mc> - A management controller.  These come in the form
  [<domain>[(<channel>.<IPMB>)]].  As usual, the optional parts will
  cause defaulting to all things.
* <connection> - A connection number, in the form: <domain>.<num>
* <pet> - A platform event trap id, in the form [<domain>][.<integer>]
* <lanparm> - A LAN parameter id, in the form [<domain>][.<integer>]
* <pef> - A PEF id, in the form [<domain>][.<integer>]
* <guid> - a 16-byte globally unique ID, all globbed together in
  one big hexidecimal thing.

Note that the domain name and sensor/control name may have spaces in
them; the names may be bracketed by quotes (' or ").  A backslash (\)
may be used to add a quote character (or a backslash) into a string.
An empty parameters should be specified as "", although if nothing
comes after the parameter it may just be left empty.



The command hierarchy is:

* help - get general help.  Type the specific command after help to
  get info for that command.

* domain

  * list - List all domains
    Response is:
    Domains
      Name: <domain1>
      Name: <domain2>
      .
      .

  * info <domain> - List information about the given domain
    Response is:
    Domain
      Name: <domain>
      **DOMAIN INFO**

  * new <domain> <options> <parms...> - Open a connection to a new domain
    Parms are either:
     lan <IP> <port> <enc> <auth> <name> <password>"
    or
     smi <smi num>
    <enc> is the authentication type, either "md5", "md2", "straight",
    or "none".  <auth> is the authentication level, either "admin",
    "operator", or "user".  The <port> is generally 623.
    The <smi num> is the driver number, generally 0.
    Options enable and disable various automitic processing and are:
      -[no]all - all automatic handling
      -[no]sdrs - sdr fetching
      -[no]frus - FRU fetching
      -[no]sel - SEL fetching,"
      -[no]ipmbscan - IPMB bus scanning
      -[no]oeminit - special OEM processing (like ATCA)
      -[no]seteventrcvr - setting event receivers
      -wait_til_up - wait until the domain is up before returning
       Note that if you specify this and the domain never comes up,
       you will never get a prompt.

    Note that setting event receivers it not affected by the -all
    option.  By default -all -seteventrcvr is true, which turns
    everything on.
    Response is:
    Domain Created: <domain>

  * fru <domain> <is_logical> <device_address> <device_id> <lun> <private_bus>
    <channel> - dump a fru given all it's insundry information.
    Response is:
    Domain
      Name: <domain>
      FRU
        **FRU INFO**

  * msg <domain> <channel> <ipmb> <LUN> <NetFN> <Cmd> [data...] - Send
    a command to the given IPMB address on the given channel and display the
    response.  Note that this does not require the existance of an
    MC in OpenIPMI.  The response is:
    Response
      Domain: <domain>
      channel: <chan>
      ipmb: <ipmb>
      LUN: <lun>
      NetFN: <netfn>
      command: <cmd>
      Data: <data bytes>

  * scan <domain> <ipmb addr> [ipmb addr] - scan an IPMB to add or remove it.
    If a range is given, then scan all IPMBs in the range.
    Response is:
    Scan done: <domain>

  * presence - Check the presence of entities.
    Response is:
    Presence check started: <domain>

  * close <domain> - close the given domain.
    Response is:
    Domain closed: <domain>

  * sel_rescan_time <domain> <time in seconds> - Set the time between
    SEL rescans for all SELs in the system.  zero disables scans.
    Response is:
    Domain SEL rescan time set: <domain>

  * ipmb_rescan_time <domain> <time in seconds> - Set the time between
    IPMB rescans for this domain.  zero disables scans.
    Response is:
    Domain IPMB rescan time set: <domain>

* entity

  * list <domain> - List all entities.
    Response is:
    Domain
      Name: <domain>
      Entities
        Name: <entity1>
        Name: <entity2>
        .
        .

  * info <entity> - List information about the given entity
    Response is:
    Entity
      Name: <entity>
      **ENTITY INFO**

  * fru <entity> - Dump the FRU information about the given entity.
    Response is:
    Entity
      Name: <entity>
      FRU
        **FRU INFO**

    "FRU" will only be present if the entity can have FRU info.  FRU
    info may be empty.

  * hs - hot-swap control

    * get_act_time <entity> - Get the hot-swap auto-activate time
      Response is:
      Entity
        Name: <entity>
        Auto-Activation Time: <integer>

    * set_act_time <entity> - Set the hot-swap auto-activate time
      Response is:
      Set act time: <entity>

    * get_deact_time <entity> - Get the hot-swap auto-deactivate time
      Response is:
      Entity
        Name: <entity>
        Auto-Deactivation Time: <integer>

    * set_deact_time <entity> - Set the hot-swap auto-deactivate time
      Response is:
      Set deact time: <entity>

    * activation_request <entity> Act like a user requested an
      activation of the entity.  This is generally equivalent to
      closing the handle latch or something like that.
      Response is:
      Activation requested: <entity>

    * activate <entity> - activate the given entity
      Response is:
      Activated: <entity>

    * deactivate <entity> - deactivate the given entity
      Response is:
      Deactivated: <entity>

    * state <entity> - Return the current hot-swap state of the given
      entity.
      Response is:
      Entity
        Name: <entity>
        State: not_present | inactive | activation_requested |
               activation_in_progress | active | deactivation_requested |
               deactivation_in_progress | out_of_con

    * check <entity> - Audit the entities hot-swap state
      Response is:
      Check started: <entity>

* sensor

  * list <entity> - List all sensors
    Response is:
    Entity
      Name: <entity>
      Sensors
        Name: <sensor1>
        Name: <sensor2>
        .
        .

  * info <sensor> 
    Response is:
    Sensor
      Name: <sensor>
      **SENSOR INFO**

  * get <sensor> - Get the sensor's current reading.
    Response is:
    Sensor
      Name: <sensor>
      Event Messages Enabled: true | false
      Sensor Scanning Enabled: true | false
      Initial Update In Progress: true | false

    For sensors of type "threshold", the following exist:
    %Value: <double>
    %Raw Value: <integer>
    Threshold
      Name: lower non critical | lower critical | lower non recoverable
            | upper non critical | upper critical | upper non recoverable
      Out Of Range: true | false
    
    For discrete sensors, the following exist:
    Event
      Offset: <integer>
      %Name: <string name of event offset>
      Set: true | false

  * rearm <sensor> global | <thresholds> | <discrete states> -
    Rearm the sensor.  If global is specified, then rearm
    all events in the sensor.  If it is a threshold sensor, then
    put in a list of thresholds of the form '[ul][ncr][hl][ad]
    where [ul] means upper or lower, [ncr] means non-critical,
    critical, or non-recoverable, [hl] means going high or going
    low, and [ad] means assertion or deassertion.  If it is a
    discrete sensor, then the form is <num>[ad] where the number
    is the offset and [ad] means assertion or deassertion
    Response is:  
    Rearm done: <sensor>

  * get_thresholds <sensor> - Get the sensor's thresholds
    Response is:
    Sensor
      Name: <sensor>
      Threshold     
        Name: lower non critical | lower critical | lower non recoverable
              | upper non critical | upper critical | upper non recoverable
        Value: <double>
     
  * set_thresholds <sensor> <threshold> <value> ... - Set the sensor's
    thresholds to the given values.  If a threshold is not specified,
    it will not be modified.  Thresholds are unc, uc, unr, lnr, lc.
    The u stands for upper, l for lower, nc for non-critical, c for
    critical, and nr for non-recoverable.  The value is floating point.
    Response is:  
    Thresholds set: <sensor>
      
  * get_hysteresis <sensor> - Get the sensor's hysteresis values
    Response is:
    Sensor
      Name: <sensor>
      Positivie Hysteresis: <integer>
      Negative Hysteresis: <integer>

  * set_hysteresis <sensor> <pos hyst> <neg hyst> - Set the sensor's
    hysteresis to the given values.  These are raw integer
    value; hystersis is specified as a raw value and it cannot be
    converted to floating point because the function may be
    non-linear.
    Response is:  
    Hysteresis set: <sensor>

  * get_event_enables <sensor> - Get the sensor's event enable values
    Response is:
    Sensor
      Name: <sensor>
      Event Messages Enabled: true | false
      Sensor Scanning Enabled: true | false
      Busy: true | false

    Threshold sensors report:
    Threshold
      Name: <threshold name>
      Enabled: true | false
     .
     .
    only supported thresholds are listed

    Discrete sensors report:
    Event
      Offset: <integer>
      Name: <event offset name for sensor>
      %Assertion Enabled: true | false
      %Deassertion Enabled: true | false
    only supported offsets are listed.  The assertion and deassertion
    enables are listed only if the offset support them.


  * set_event_enables <sensor> msg|nomsg scan|noscan [<event> [<event> ...]]
    - Set the sensor's event enable values.  This turns sensor messages and
    scanning on and off and will enable all the listed events and
    disable all over events.  The events are in the same format as
    the rearm subcommand and depend on the sensor type.  See the
    rearm command for details.
    Response is:  
    Event enables set: <sensor>

  * enable_events <sensor> msg|nomsg scan|noscan [<event> [<event> ...]]
    - Enable event enable values.  This turns sensor messages and
    scanning on and off and will enable all the listed events.  The
    events are in the same format as the rearm subcommand and depend
    on the sensor type.  See the rearm command for details.  This will
    only enable the given events, the other events will be left alone.
    Response is:  
    Event enables set: <sensor>

  * disable_events <sensor> msg|nomsg scan|noscan [<event> [<event> ...]]
    - Disable event enable values.  This turns sensor messages and
    scanning on and off and will disable all the listed events.  The
    events are in the same format as the rearm subcommand and depend
    on the sensor type.  See the rearm command for details.  This will
    only disable the given events, the other events will be left alone.
    Response is:  
    Event enables set: <sensor>

* control

  * list <entity> - List all controls
    Response is:
    Entity
      Name: <entity>
      Controls
        Name: <control1>
        Name: <control2>
      .
      .

  * info <control>
    Response is:
    Control
      Name: <control>
      **CONTROL INFO**

  * set <control> <values> - Set the value of a control.  The settings
    depend on control type, most take one or more integer values.
    An identifier type takes one or more unsigned characters.  A
    light set with settings take the form 'lc|nolc <color> <on time>
    <off time>.  lc and nolc turn on or of local control, the over
    values should be obvious.  Note all lights support local control,
    you need to see if it supports the value.

  * get <control> - Get the value of a control.  The reponse depends
    on the control type.  The main part is:
    Control
      Name: <control>

    Response for setting lights is:
    Light
      Num: 0
      Local Control: true | false
      %Color: black | white | red | green | blue | yellow | orange
      %On Time: <integer>
      %Off Time: <integer>
     .
     .
    Note that multiple lights may be present if the control supports
    multiple lights.  The options values (marked with %) will not be
    present if local control is set to true.  Local control means that
    the LED takes whatever default function it does on the device
    (like disk activity, ethernet activity, hot-swap LED, etc.).

    Response for id control:
    Data: <byte1> <byte2> ...

    Response for other controls:
    Value
      Num: <integer>
      Value: <integer>
     .
     .
    There will be one Value for each value the control supports.

* mc

  * list <domain> - List all MCs
    Response is:
    Domain
      Name: <domain>
      MCs
        Name: <mc1>
        Name: <mc2>
        .
        .

  * info <mc> 
    Response is:
    MC
      Name: <mc>
      **MC INFO**

  * reset <warm | cold> <mc> - Do a warm or cold reset on the given MC
    Response is:
    Reset done: <mc>

  * msg <mc> <LUN> <NetFN> <Cmd> [data...] - Send the given command"
    to the management controller and display the response.
    Response
      MC: <mc>
      LUN: <lun>
      NetFN: <netfn>
      command: <cmd>
      Data: <data bytes>

  * set_events_enable <mc> <enable | disable> - enables or disables
    events on the MC.
    Response is:
    Events enable done: <mc>

  * get_events_enable <mc> - Prints out if the events are enabled for
    the given MC.
    Response is:
    Events Enable: true | false

  * sdrs <mc> <main | sensor> - list the SDRs for the mc.  Either gets
    the main SDR repository or the sensor SDR repository.
    Response is:
    MC
      Name: <mc>
      SDR
        Record ID: <integer>
        Type: <integer>
        Version: <integer>.<integer>
        Data: <data bytes>
      SDR
        Record ID: <integer>
        Type: <integer>
        Version: <integer>.<integer>
        Data: <data bytes>
      .
      .
     
  * get_sel_time <mc> - Get the time in the SEL for the given MC
    MC
      Name: <mc>
      SEL Time: <integer>

  * sel_info <mc> - Dump information about the MC's SEL.
    Response is:
    SEL Count: <integer>
    SEL Slots Used: <integer>

* sel

  * list <domain> - list the local copy of the system event log
    Response is:
    Domain
      Name: <domain>
      Entries: <integer>
      Slots in use: <integer>
      Event
        **EVENT INFO**
       .
       .

  * delete <mc> <record #> - Delete the given event number from the
    SEL
    Response is:
    Event deleted
      MC: <mc>
      Record: <integer>

  * add <mc> <type> <13 bytes of data> - Add the
    event data to the SEL.
    Response is:
    MC
      Name: <mc>
      Record ID: <integer>

  * clear <domain> - clear the system event log

* con
  * list <domain> - List all the connections in the domain.
    Response is:
    Domain
      Name: <domain>
      Connections
        Name: <connection>
        Name: <connection>
        .
        .

  * info <connection> 
    Response is:
    Connection
      Name: <connection>
      Active: true | false

  * activate <connection> - Activate the given connection
    Response is:
    Connection activated: <connection>

* pet

  * list <domain> - List all the pets in the domain.
    Response is:
    Name: <pet>
    Name: <pet>
      .
      .

  * info <pet> - Dump information about a pet.
    Response is:
    PET
      MC: <mc>
      Channel: <channel>
      IP Address: <ip address>
      MAC Address: <mac address>
      EFT Selector: <eft selector>
      Policy Number: <policy number>
      APT Selector: <apt selector>
      LAN Dest Selector: <lan dest selector>

  * new <domain> <connection> <channel> <ip addr> <mac_addr> <eft selector>
    <policy num> <apt selector> <lan dest selector>
    - Set up the domain to send PET traps from the given connection
    to the given IP/MAC address over the given channel.
    Response is:
    PET Created: <pet>

  * mcnew <mc> <channel> <ip addr> <mac_addr> <eft selector>
    <policy num> <apt selector> <lan dest selector>
    - Set up the domain to send PET traps from the given connection
    to the given IP/MAC address over the given channel.  This takes
    an MC instead of a connection.
    Response is:
    PET Created: <pet>

  * close <pet> - Close the pet.
    PET destroyed: <pet>

* pef - commands dealing with platform even filters.  These are
  basically connections to the PEF configuration parameters in an MC.
  You use a pef to fetch a pef config, which you can then modify and
  write back to the MC.  Note that when you get a pef config, you
  claim a lock on the MC that must be unlocked.

  * list <domain> - List all the pefs that currently exist in the
    domain.
    Response is:
    Name: <pef>
    Name: <pef>
      .
      .

  * info <pef> - Dump info about the pef. 
    Response is:
    PEF
      Name: <pef>
      MC: <mc>

  * new <mc> - Create a pef for the given MC.
    Response is:
    PEF: <pef>

  * unlock_mc <mc> - Unlock the PEF lock on the given MC.
    Response is:
    PEF unlocked: <mc>

  * close <pef> - Free the given pef
    PEF destroyed: <pef>

  * config - commands dealing with PEF configurations.  These
    are the actual PEF data items.

    * list - list all the PEF configs
      Response is:
      PEFs
        Name: <pef config>
        Name: <pef config>
        .
        .

    * info <pef config> - Dump information about the pef config.
      Response is:
      PEF Config
        Name: <pef config>
        ** PEF CONFIG **

    * get <pef> - Fetch the pef data items from the pef
      and create a pef config.
      Response is:
      PEF Config
        Name: <pef config>
        ** PEF CONFIG **

    * update <pef config> <parm> [selector] <value> - Set the given parameter
      in the pef config to the given value.  If the parameter has
      a selector of some type, the selector must be given, otherwise
      no selector should be given.
      Response is:
      PEF config updated: <pef config>

    * set <pef> <pef config> - Write the pef data back
      to the pef.  Note that this must be the same pef used
      to create the config.
      Response is:
      PEF config set: <pef config>

    * unlock <pef> <pef config> - Unlock the lock in the
      MC and mark the pef config as unlocked.
      Response is:
      PEF config unlocked: <pef config>

    * close <pef config> - Free the pef config.
      PEF config destroyed: <pef config>

* lanparm - commands dealing with lanparms.  These are basically
  connections to the LAN configuration parameters in an MC.  You
  use a lanparm to fetch a lanparm config, which you can then
  modify and write back to the MC.  Note that when you get a
  lanparm config, you claim a lock on the MC that must be
  unlocked.

  * list <domain> - List all the lanparms that currently exist in the
    domain.
    Response is:
    Domain
      Name: <domain>
      LANPARMs
        Name: <lanparm>
        Name: <lanparm>
        .
        .

  * info <lanparm> - Dump info about the lanparm. 
    Response is:
    LANPARM
      Name: <lanparm>
      MC: <mc>
      Channel: <integer>

  * new <mc> <channel> - Create a lanparm for the given MC and
    channel.
    Response is:
    LANPARM: <lanparm>

  * unlock_mc <mc> <channel> - Unlock the lanparm lock on the given
    MC and channel.
    Response is:
    LANPARM unlocked: <mc>

  * close <lanparm> - Free the given lanparm
    Response is:
    LANPARM destroyed: <lanparm>

  * config - commands dealing with lanparm configurations.  These
    are the actual lanparm data items.

    * list - list all the lanparm configs
      Response is:
      LANPARMS
        Name: <lanparm config>
        Name: <lanparm config>
        .
        .

    * info <lanparm config> - Dump information about the lanparm config.
      Response is:
      LANPARM Config
        Name: <lanparm config>
        ** LANPARM CONFIG **

    * get <lanparm> - Fetch the lanparm data items from the lanparm
      and create a lanparm config.
      Response is:
      LANPARM Config
        Name: <lanparm config>
        ** LANPARM CONFIG **

    * set <lanparm> <lanparm config> - Write the lanparm data back
      to the lanparm.  Note that this must be the same lanparm used
      to create the config.
      Response is:
      LANPARM config set: <lanparm config>

    * unlock <lanparm> <lanparm config> - Unlock the lock in the
      MC and mark the lanparm config as unlocked.
      Response is:
      LANPARM config unlocked: <lanparm config>

    * close <lanparm config> - Free the lanparm config.
      Response is:
      LANPARM config destroyed: <lanparm config>

* general
  * evinfo true | false - Turn on or off dumping object information
    when an event comes in.  This is false by default.

  * debug <type> on|off - Turn the given debugging type on or off


EVENTS
======

The command language will output events to the console when they
happen.  Events all occur in the format:
  Event
    **EVENT INFO**

The event info varies on the type of events.  The defined events are
listed.

The following event is output when the domain is completely up and
operational and finished all it SDR, FRU, and bus scans:
  EVENT
    Object Type: Domain
    Name: <domain>
    Operation: Domain fully up
    Connection Number: <integer>
    Port Number: <integer>
    Any Connection Up: true | false
    Error: <integer>

The following comes out when domain connection infomration changes:
  EVENT
    Object Type: Domain
    Name: <domain>
    Operation: Connection Change
    
The following comes out when domains are added:
  EVENT
    Object Type: Domain
    Name: <domain>
    Operation: Add
    %**DOMAIN INFO**

The following comes out when domains are destroyed:
  EVENT
    Object Type: Domain
    Name: <domain>
    Operation: Delete

The following comes out when the domain gets an event that does not
have a handler:
  EVENT
    Object Type: Event
    **EVENT INFO**

The following comes out when an entity is added:
  EVENT
    Object Type: Entity
    Name: <entity>
    Operation: Add
    %**ENTITY INFO**

The following comes out when an entity is deleted:
  EVENT
    Object Type: Entity
    Name: <entity>
    Operation: Delete

The following comes out when an entity is changed:
  EVENT
    Object Type: Entity
    Name: <entity>
    Operation: Change
    %**ENTITY INFO**

The following comes out when an entity's FRU is added:
  EVENT
    Object Type: Entity FRU
    Name: <entity>
    Operation: Add
    %**FRU INFO**

The following comes out when an entity's FRU is deleted:
  EVENT
    Object Type: Entity FRU
    Name: <entity>
    Operation: Delete

The following comes out when an entity's FRU is changed:
  EVENT
    Object Type: Entity FRU
    Name: <entity>
    Operation: Change
    %**FRU INFO**

The following comes out when an entity's presence changes:
  EVENT
    Object Type: Entity
    Name: <entity>
    Operation: Presence Change
    Present: true | false
    %Event
      **EVENT INFO**

The following comes out when an entity's hot-swap state changes:
  EVENT
    Object Type: Entity
    Name: <entity>
    Operation: Hot-Swap Change
    Last State: not_present | inactive | activation_requested |
               activation_in_progress | active | deactivation_requested |
               deactivation_in_progress | out_of_con
    State: not_present | inactive | activation_requested |
               activation_in_progress | active | deactivation_requested |
               deactivation_in_progress | out_of_con
    %Event
      **EVENT INFO**

The following comes out when a discrete sensor gets an event:
  EVENT
    Object Type: Sensor
    Name: <sensor>
    Operation: Event
    Offset: <integer>
    Direction: assertion | deassertion
    Severity: <integer>
    Previous Severity: <integer>
    %Event
      **EVENT INFO**
    
The following comes out when a threshold sensor gets an event:
  EVENT
    Object Type: Sensor
    Name: <sensor>
    Operation: Event
    Threshold: lower non critical | lower critical | lower non recoverable
              | upper non critical | upper critical | upper non recoverable
    High/Low: going high | going low
    Direction: assertion | deassertion
    %Value: <double>
    %Raw Value: <integer>
    %Event
      **EVENT INFO**
    
The following comes out when a sensor is added:
  EVENT
    Object Type: Sensor
    Name: <sensor>
    Operation: Add
    %**SENSOR INFO**

The following comes out when a sensor is deleted:
  EVENT
    Object Type: Sensor
    Name: <sensor>
    Operation: Delete

The following comes out when a sensor is changed:
  EVENT
    Object Type: Sensor
    Name: <sensor>
    Operation: Change
    %**SENSOR INFO**

The following comes out when a control gets an event:
  EVENT
    Object Type: Control
    Name: <control>
    Operation: Event
    Value
      Number: <integer>
      Value: <integer>
    %Event
      **EVENT INFO**
    
The following comes out when a control is added:
  EVENT
    Object Type: Control
    Name: <control>
    Operation: Add
    %**CONTROL INFO**

The following comes out when a control is deleted:
  EVENT
    Object Type: Control
    Name: <control>
    Operation: Delete

The following comes out when a control is changed:
  EVENT
    Object Type: Control
    Name: <control>
    Operation: Change
    %**CONTROL INFO**


OBJECT INFO
===========

**EVENT INFO**
  MC: <mc>
  Record ID: <integer>
  Event type: <integer>
  Timestamp: <integer>
  Data: <data bytes>


**DOMAIN INFO**
  Type: <domain type>
  SEL Rescan Time: <time>
  IPMB Rescan Time: <time>


**ENTITY INFO**
  Type: unknown | mc | fru | generic
  Present: true | false
  Presence sensor always there: true | false
  Hot swappable: true | false
  Parents
    Name: <entity>
    Name: <entity>
      .
      .
  Children
    Name: <entity>
    Name: <entity>
      .
      .

Note that Parents and Children fields will not be present if the
entity has no parents or children.  Each entity type except "unknown"
will have its own output info.  These are:

mc:
  Channel: <channel>
  LUN: <lun>
  OEM: <oem field from SDR>
  Slave Address: <ipmb>
  ACPI_system_power_notify_required: true | false
  ACPI_device_power_notify_required: true | false
  controller_logs_init_agent_errors: true | false
  log_init_agent_errors_accessing: true | false
  global_init: true | false
  chassis_device: true | false
  bridge: true | false
  IPMB_event_generator: true | false
  IPMB_event_receiver: true | false
  FRU_inventory_device: true | false
  SEL_device: true | false
  SDR_repository_device: true | false
  sensor_device: true | false

fru:
  Channel: <channel>
  LUN: <lun>
  OEM: <oem field from SDR>
  Slave Address: <ipmb>
  access_address: <ipmb>
  private_bus_id: <integer>
  device_type: <integer>
  device_modifier: <integer>
  is_logical_fru: true | false
  fru_device_id: <integer>

generic:
  Channel: <channel>
  LUN: <lun>
  OEM: <oem field from SDR>
  access_address: <ipmb>
  private_bus_id: <integer>
  device_type: <integer>
  device_modifier: <integer>
  slave_address: <ipmb>
  address_span: <integer>


**MC INFO **
  provides_device_sdrs: true | false
  device_available: true | false
  chassis_support: true | false
  bridge_support: true | false
  ipmb_event_generator: true | false
  ipmb_event_receiver: true | false
  fru_inventory_support: true | false
  sel_device_support: true | false
  sdr_repository_support: true | false
  sensor_device_support: true | false
  device_id: <ipmb>
  device_revision: <integer>
  fw_revision: <integer>.<integer>
  version: <integer>.<integer>
  manufacturer_id: <integer>
  product_id: <integer>
  aux_fw_revision: <integer> <integer> <integer> <integer>


*SENSOR INFO**
  LUN: <integer>
  Number: <integer>
  Event Reading Type: <integer>
  Event Reading Type Name: one of:
           unspecified threshold discrete_usage discrete_state
           discrete_predictive_failure discrete_limit_exceeded
           discrete_performance_met discrete_severity discrete_device_presense
           discrete_device_enable discrete_availability discrete_redundancy
           discrete_acpi_power

  Type: <integer>
  Type Name: <sensor type (a generic string)>
  %Event Support: per state | entire sensor | global
  Init Scanning: true | false
  Init Events: true | false
  Init Thresholds: true | false
  Init Hysteresis: true | false
  Init Type: true | false
  Init Power Up Events: true | false
  Init Power Up Scanning: true | false
  Ignore If No Entity: true | false
  Auto Rearm: true | false
  OEM1: <integer>
  Id: <string>

For sensors of type "threshold", the following exist:
  Threshold Access: none | readable | settable | fixed
  Threshold
    Name: lower non critical | lower critical | lower non recoverable
          | upper non critical | upper critical | upper non recoverable
    Readable: true | false
    Settable: true | false
    Supports: going high assertion | going low assertion
              | going high deassertion | going low deassertion
      .
      .
    .
    .
    Hysteresis Support: none | readable | settable | fixed
    %Nominal Reading: <float>
    %Normal Max: <float>
    %Normal Min: <float>
    %Sensor Max: <float>
    %Sensor Min: <float>
    Base Unit: <integer>
    Base Unit Name: <string>
    %Rate Unit: <integer>
    %Rate Unit Name: <string>
    %Modifier Use: / | *
    %Modifier Unit: <integer>
    %Modifier Unit Name: <string>

For sensors of type not "threshold", the following exist:
  Event
    Offset: <integer>
    Supports: assertion | deassertion
      .
      .
    .
    .

Fields marked with % are optional


**CONTROL INFO**
  Type: <control type>
  Generates Events: true | false
  Settable: true | false
  Readable: true | false
  Num Values: <integer>
  Id: <string>
  
  Controls of type light that are set with settings have the
  following:
  Set with: settings
  Local Control: true | false
  Color: black | white | red | green | blue | yellow | orange
    .
    .
  One color is listed for each supported color

  Controls of type light that are set with transitions have the
  following:
  Light
    Number: <integer>
    Num Values: <integer>
    Value
      Number: <integer>
      Num Transitions: <integer>
      Transition
        Number: <integer>
        Color: black | white | red | green | blue | yellow | orange
        Time: <integer>
        .
        .
      .
      .
    .
    .

  Controls of type identifier have the following:
  Max Length: <integer>


**FRU INFO**
  %Internal area version: <integer>
  %Internal area length: <integer>
  %Internal area data: <data bytes>
  %Chassis info version: <integer>
  %Chassis info type: <integer>
  %Record
    Name: Chassis info part number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Chassis info serial number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %String Field
    Name: Chassis info
    Number: <integer>
    Type: binary | ascii | unicode
    Data: <data in the above format>
   .
   .
  %Board info version: <integer>
  %Board info lang code: <integer>
  %Board info mfg time: <integer>
  %Record
    Name: Board info board manufacturer
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Board info board product name
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Board info board serial number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Board info board part number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Board info fru file id
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %String Field
    Name: Board info
    Number: <integer>
    Type: binary | ascii | unicode
    Data: <data in the above format>
   .
   .
  %Product info version: <integer>
  %Product info lang code: <integer>
  %Record
    Name: Product info manufacturer name
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info product name
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info product part model number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info product version
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info product serial number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info asset tag
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info fru file id
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %String Field
    Name: Product info
    Number: <integer>
    Type: binary | ascii | unicode
    Data: <data in the above format>
   .
   .
  %Multi-record
    Number: <integer>
    Type: binary | ascii | unicode
    Data: <data in the above format>


** LANPARM CONFIG **
  support_auth_oem: true | false
  support_auth_straight: true | false
  support_auth_md5: true | false
  support_auth_md2: true | false
  support_auth_none: true | false
  ip_addr_source: <integer>
  num_alert_destinations: <integer>
  %ipv4_ttl: <integer>
  %ipv4_flags: <integer>
  %ipv4_precedence: <integer>
  %ipv4_tos: <integer>
  %ip_addr: <ip addr>
  %mac_addr: <mac addr>
  %subnet_mask: <ip addr>
  %primary_rmcp_port <integer>
  %secondary_rmcp_port <integer>
  %bmc_generated_arps: true | false
  %bmc_generated_garps: true | false
  %garp_interval: <integer>
  %default_gateway_ip_addr: <ip addr>
  %default_gateway_mac_addr: <mac addr>
  %backup_gateway_ip_addr: <ip addr>
  %backup_gateway_mac_addr: <mac addr>
  community_string: <string>
  User
    Name: callback
    enable_auth_oem: true | false
    enable_auth_straight: true | false
    enable_auth_md5: true | false
    enable_auth_md2: true | false
    enable_auth_none: true | false
  User
    Name: user
    enable_auth_oem: true | false
    enable_auth_straight: true | false
    enable_auth_md5: true | false
    enable_auth_md2: true | false
    enable_auth_none: true | false
  User
    Name: operator
    enable_auth_oem: true | false
    enable_auth_straight: true | false
    enable_auth_md5: true | false
    enable_auth_md2: true | false
    enable_auth_none: true | false
  User
    Name: admin
    enable_auth_oem: true | false
    enable_auth_straight: true | false
    enable_auth_md5: true | false
    enable_auth_md2: true | false
    enable_auth_none: true | false
  User
    Name: oem
    enable_auth_oem: true | false
    enable_auth_straight: true | false
    enable_auth_md5: true | false
    enable_auth_md2: true | false
    enable_auth_none: true | false
  Alert Destination
    Number: <integer>
    alert_ack: true | false
    dest_type: <integer>
    alert_retry_interval: <integer>
    max_alert_retries: <integer>
    dest_format: <integer>
    gw_to_use: <integer>
    dest_ip_addr: <ip addr>
    dest_mac_addr: <mac addr>
   .
   .
   

** PEF CONFIG **
  alert_startup_delay_enabled: true | false
  startup_delay_enabled: true | false
  event_messages_enabled: true | false
  pef_enabled: true | false
  diagnostic_interrupt_enabled: true | false
  oem_action_enabled: true | false
  power_cycle_enabled: true | false
  reset_enabled: true | false
  power_down_enabled: true | false
  alert_enabled: true | false
  %startup_delay: <integer>
  %alert_startup_delay: <integer>
  guid_enabled: true | false
  guid_val: <guid>
  num_event_filters: <integer>
  num_alert_policies: <integer>
  num_alert_strings: <integer>
  Event Filter
    Number: <integer>
    enable_filter: true | false
    filter_type: <integer>
    diagnostic_interrupt: true | false
    oem_action: true | false
    power_cycle: true | false
    reset: true | false
    power_down: true | false
    alert: true | false
    alert_policy_number: <integer>
    event_severity: <integer>
    generator_id_addr: <integer>
    generator_id_channel_lun: <integer>
    sensor_type: <integer>
    sensor_number: <integer>
    event_trigger: <integer>
    data1_offset_mask: <integer>
    data1_mask: <integer>
    data1_compare1: <integer>
    data1_compare2: <integer>
    data2_mask: <integer>
    data2_compare1: <integer>
    data2_compare2: <integer>
    data3_mask: <integer>
    data3_compare1: <integer>
    data3_compare2: <integer>
   .
   .
  Alert Policy
    Number: <integer>
    policy_num: <integer>
    enabled: true | false
    policy: <integer>
    channel: <integer>
    destination_selector: <integer>
    alert_string_event_specific: true | false
    alert_string_selector: <integer>
   .
   .
  Alert String
    event_filter: <integer>
    alert_string_set: <integer>
    alert_string: <string>
   .
   .

**CONNECTION INFO**
  Active: true | false

**PEF INFO**
  MC: <mc>

**PET INFO**
  MC: <mc>
  Channel: <channel>
  IP Address: <ip address>
  MAC Address: <mac address>
  EFT Selector: <eft selector>
  Policy Number: <policy number>
  APT Selector: <apt selector>
  LAN Dest Selector: <lan dest selector>

**LANPARM INFO**
  MC: <mc>
  Channel: <integer>