Solaris LDOM: Difference between revisions
From Lolly's Wiki
Jump to navigationJump to search
(Die Seite wurde neu angelegt: „Kategorie:LDOM Kategorie:Solaris <source lang=bash> #!/bin/bash link=$1 dev=$(dladm show-phys -L ${link} | \ nawk ' NR==2{ dev=$2; gsub(/[0-9]+$/,…“) |
m (Text replacement - "</source" to "</syntaxhighlight") |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[ | [[Category:LDOM]] | ||
[[ | [[Category:Solaris]] | ||
==Useful scripts== | |||
< | ===get_pf_from_link_name.sh=== | ||
<syntaxhighlight lang=bash> | |||
#!/bin/bash | #!/bin/bash | ||
link=$1 | link=$1 | ||
Line 21: | Line 22: | ||
') | ') | ||
ldm ls-io -l ${dev} | ldm ls-io -l ${dev} | ||
</ | </syntaxhighlight> |
Latest revision as of 21:28, 25 November 2021
Useful scripts
get_pf_from_link_name.sh
#!/bin/bash
link=$1
dev=$(dladm show-phys -L ${link} | \
nawk '
NR==2{
dev=$2; gsub(/[0-9]+$/,"",dev);
instance=$2; gsub(/^[^0-9]*/,"",instance);
while(getline < "/etc/path_to_inst"){
gsub(/"/,"",$NF);
if($NF == dev && $(NF-1) == instance){
gsub(/"/,"",$1);
gsub(/^\//,"",$1);
print $1;
}
}
}
')
ldm ls-io -l ${dev}