Wednesday, 22 April 2015

Usefull mdf file - Embedded Menu Manager



Here is created file named *.mdf.
You can run this file using "emm" tool include cisco IOS.
MDF file allows you to create menu with many functions. It is very useful for administrators who using many of this same function to analyse, diagnose, or checking network parameters. MDF - using XML language. You can use ISO commands include XML, you can use TCL scripts also.
Here is simple mdf file which I created and moved to router. If you want to run this file use:
emm mdf flash:/menu_cisco.mdf   <Menu MenuName="Cisco Menu" schemaVersion="1.1">
 <MenuTitle>
  </MenuTitle>
  
   <Item ContinuePrompt="true">
    <ItemTitle>
    <Constant String="Show processor utilization chart" />
    </ItemTitle>
    <IOSExecCommand>"sh processes cpu history"</IOSExecCommand>
   </Item>
 
  <Item ContinuePrompt="true">
   <ItemTitle>
   <Constant String="Show most wanted process in CPU" />
   </ItemTitle>
   <IOSExecCommand>"sh processes cpu sorted | exclude 0.0"</IOSExecCommand>
  </Item>
 
  <Item ContinuePrompt="true">
   <ItemTitle>
   <Constant String="Show remote users" />
   </ItemTitle>
   <IOSExecCommand>"sh crypto session brief | inc remote"</IOSExecCommand>
  </Item>

 <Item ContinuePrompt="true">
  <ItemTitle>
  <Constant String="Show all crypto sessions tunnels users" />
  </ItemTitle>
  <IOSExecCommand>"sh crypto ISakmp SA"</IOSExecCommand>
 </Item>

 <Item ContinuePrompt="true">
  <ItemTitle>
  <Constant String="Show most wanted process in CPU" />
  </ItemTitle>
  <IOSExecCommand>"sh processes cpu sorted | exclude 0.0"</IOSExecCommand>
 </Item>

 <Item>
    <ItemTitle>
        <Constant String="Exit" />
    </ItemTitle>
 </Item>
</Menu>
  Result: 1. Show processor utilization chart
2. Show most wanted process in CPU
3. Show remote users
4. Show all crypto sessions tunnels users
5. Show most wanted process in CPU
6. Exit

Enter selection: 2
CPU utilization for five seconds: 1%/0%; one minute: 2%; five minutes: 2%
 PID Runtime(ms)     Invoked      uSecs   5Sec   1Min   5Min TTY Process
 377      354512  1655186684          0  0.39%  0.40%  0.40%   0 IP SLAs XOS Even
 107      244464    26615162          9  0.23%  0.19%  0.18%   0 Netclock Backgro
 136      136484   843191441          0  0.15%  0.11%  0.10%   0 Ethernet Msec Ti
  88      230716     6654995         34  0.15%  0.13%  0.15%   0 Per-Second Jobs


Press any key to continue...
  

No comments:

Post a Comment

Contact with me

Name

Email *

Message *