help message and man page update for getmacs -F option

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3521 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2009-06-05 09:06:07 +00:00
parent ba98a3a261
commit 94d4a16216
3 changed files with 43 additions and 18 deletions

View File

@ -414,12 +414,6 @@ sub getmacs {
}
}
#########################################
# Put all the attributes required
# together
#########################################
push @$result,"# Type MAC_Address Phys_Port_Loc Adapter Port_Group Phys_Port Logical_Port VLan VSwitch Curr_Conn_Speed\n";
foreach ( keys %$hash ) {
my $node = $_;
my $d = $hash->{$_};
@ -430,6 +424,12 @@ sub getmacs {
push @$result,"\n$node:\n";
#########################################
# Put all the attributes required
# together
#########################################
push @$result,"#Type MAC_Address Phys_Port_Loc Adapter Port_Group Phys_Port Logical_Port VLan VSwitch Curr_Conn_Speed\n";
for ( my $num = 1; $num <= $mac_count; $num++ ) {
my $mac_addr = $nodeatt{$mtms}{$id}{$num}{'mac_addr'};
my $adapter_id = $nodeatt{$mtms}{$id}{$num}{'adapter_id'};
@ -448,12 +448,12 @@ sub getmacs {
}
my %att = ();
$att{'MAC_Address'} = ($mac_addr) ? $mac_addr : "N/A";
$att{'Adapter'} = ($adapter_id) ? $adapter_id : "N/A";
$att{'MAC_Address'} = ($mac_addr) ? $mac_addr : "N/A";
$att{'Adapter'} = ($adapter_id) ? $adapter_id : "N/A";
$att{'Port_Group'} = ($port_group) ? $port_group : "N/A";
$att{'Phys_Port'} = ($phys_port_id) ? $phys_port_id : "N/A";
$att{'Logical_Port'} = ($logical_port_id) ? $logical_port_id : "N/A";
$att{'VLan'} = ($vlan_id) ? $vlan_id : "N/A";
$att{'Phys_Port'} = ($phys_port_id) ? $phys_port_id : "N/A";
$att{'Logical_Port'} = ($logical_port_id) ? $logical_port_id : "N/A";
$att{'VLan'} = ($vlan_id) ? $vlan_id : "N/A";
$att{'VSwitch'} = ($vswitch) ? $vswitch : "N/A";
$att{'Phys_Port_Loc'} = ($phys_port_loc) ? $phys_port_loc : "N/A";
$att{'Curr_Conn_Speed'} = ($curr_conn_speed) ? $curr_conn_speed : "N/A";

View File

@ -111,7 +111,8 @@ my %usage = (
getmacs <noderange> [-V|--verbose]
getmacs [-h|--help|-v|--version]
PPC specific:
getmacs <noderange> [-f][-d][-D -S server -G gateway -C client]",
getmacs <noderange> [-F filter]
getmacs <noderange> [-f][-d][-D [-S server] [-G gateway] [-C client]]",
"mkvm" =>
"Usage:
Common:

View File

@ -8,7 +8,9 @@ I<getmacs [-h| --help]>
I<getmacs [-v| --version]>
I<getmacs [-V| --verbose] noderange> [-f][-d][-D -S server -G gateway -C client]
I<getmacs noderange> [-F filter]
I<getmacs [-V| --verbose] noderange> [-f][-d][-D [-S server] [-G gateway] [-C client]]
=head1 DESCRIPTION
@ -27,6 +29,8 @@ B<-D> Perform ping test.
B<-f> Force immediate shutdown of the partition.
B<-F> Specify filters to select the correct adapter. Acceptable filters are Type,MAC_Address,Phys_Port_Loc,Adapter,Port_Group,Phys_Port,Logical_Port,VLan,VSwitch,Curr_Conn_Speed.
B<-G> Gateway IP address of the partition. The default is to read from xCAT database if no -G specified.
B<-h> Display usage message.
@ -53,11 +57,15 @@ I<getmacs lpar4>
Output is similar to:
# Type MAC_Address Phys_Port_Loc Adapter Port_Group Phys_Port Logical_Port VLan VSwitch Curr_Conn_Speed
lpar4:
#Type Location Code MAC Address Full Path Name Ping Result
#Type MAC_Address Phys_Port_Loc Adapter Port_Group Phys_Port Logical_Port VLan VSwitch Curr_Conn_Speed
ent U9133.55A.10B7D1G-V12-C4-T1 8e:e2:24:5c:f0:04 /vdevice/l-lan@30000004 virtual
hea 7607DFB07F02 N/A N/A N/A N/A N/A 1 ETHERNET0 N/A
ent U78A1.001.99203B5-P1-T6 00145eb55788 /lhea@23c00614/ethernet@23e00514 unsuccessful physical
@ -69,13 +77,29 @@ Output is similar to:
lpar4:
#Type Location Code MAC Address Full Path Name Ping Result
#Type MAC_Address Phys_Port_Loc Adapter Port_Group Phys_Port Logical_Port VLan VSwitch Curr_Conn_Speed
ent U9133.55A.10B7D1G-V12-C4-T1 8ee2245cf004 /vdevice/l-lan@30000004 virtual
hea 7607DFB07F02 N/A N/A N/A N/A N/A 1 ETHERNET0 N/A
ent U78A1.001.99203B5-P1-T6 00145eb55788 /lhea@23c00614/ethernet@23e00514 unsuccessful physical
3. To retrieve the MAC address while performing a ping test for the HMC-managed partition lpar4 and display the result only, enter:
3. To retrieve the MAC address for the HMC-managed partition lpar4 with filter Type=hea,VSwitch=ETHERNET0.
I<getmacs lpar4 -F Type=hea,VSwitch=ETHERNET0>
Output is similar to:
lpar4:
#Type MAC_Address Phys_Port_Loc Adapter Port_Group Phys_Port Logical_Port VLan VSwitch Curr_Conn_Speed
hea 7607DFB07F02 N/A N/A N/A N/A N/A 1 ETHERNET0 N/A
4. To retrieve the MAC address while performing a ping test for the HMC-managed partition lpar4 and display the result only, enter:
I<getmacs lpar4 -d -D -S 9.3.6.49 -G 9.3.6.1 -C 9.3.6.234>