- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Systems Insight Manager
- >
- Re: Custom Tool Paramenters in SIM 6.x
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2011 07:43 AM
05-23-2011 07:43 AM
Custom Tool Paramenters in SIM 6.x
I want to provide the list of systems names to a script. I can see from the help that %f is how I pass a single node name to a script
For example:
script.bat %f
That works fine, but I want to pass the entire list of nodes as arguments.
For example:
script.bat node1 node2 node3 ...
Does anyone understand how to use the repetition argument %( ... %) ?
I've tried many different iterations but can't find one that works.
For example all of the below cannot be expanded by SIM (according to the error message SIM provides at run time)
script.bat %f %( %f %)
script.bat %( %f %)
script.bat %( f %)
script.bat %( %f %)
script.bat %( %%f %)
Any insight would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2011 06:32 AM
07-22-2011 06:32 AM
Re: Custom Tool Paramenters in SIM 6.x
Hi
The way I usually do it when dealing with this kind of issues is to generate a list of devices and then I ran my tool against the list using a loop...
I created a batch to delete devices from the sim database that works like this:
i generate the list using mxquery command then I parse it to delete what i want...
REM Create list of systems
mxquery -e "Not Reachable for the last 30 days" |find "DeviceName" >nodes1.txt
mxquery -e "Critical Systems" |find "DeviceName" >nodes2.txt
REM Parse them to extract the proper list of system to delete : using windows grep
"C:\Program Files (x86)\GnuWin32\bin\grep.exe" -f nodes2.txt nodes1.txt >nodestodelete.txt
REM Parse them to extract the proper list of system to delete : using cygwin grep copied in Openssh folder
“C:\Program Files\HP\OpenSSH\bin\grep.exe” " -f nodes2.txt nodes1.txt >nodestodelete.txt
REM Transform lines in columns
for /f "delims=" %%a in ('type "nodestodelete.txt"') do call :commande "%%a"
goto :eof
:commande
set ligne=%1
set ligne=%ligne:"=%
@echo %ligne% >>nodestodelete2.txt
echo off
REM Delete devices now
for /F "tokens=2" %%f in (nodestodelete2.txt) do @mxnode -r %%f -x force
The custom tool is based on this batch.
hope it help
fred