TNPM/resmgr
IBM's Official commands to use
Rule Editor - Special Characters that can not be used in rules or other user configurable areas of TNPM
[, @, #, $, ^, * or -
Add dbIndex columns to the Resource Editor.
/appl/proviso/datamart/res/C/resedit.res *pageConfig''se''colIds: seDbIndex seDbIndex seName seDate seState seLabel seProfil seFamily seElement seInstance seInvariant *pageConfig''seGrp''colIds: seGrpSeDbIndex seGrpSeDbIndex seGrpSeName seGrpSeLabel seGrpFamName seGrpEltName seGrpSeInstance
Remove Empty groups - Givea a list that should go, note, you will need to run this several times to remove a empty 'tree'
resmgr -export segp -sep '|''|' -noHead -colNames "dbIndex date''DATE npath" -isMandat "" -filter "segchild.name(is null) se.name(is null)" -filterRule "(%(segp.origin) = 'inventory' OR %(segp.origin) LIKE 'res%') AND (%(segp.type) != 'rule')" -order npath | grep -v "~Sub-Element Collect~" | grep -v "\%" | sort
Check to see if a group is deployed by App pack or is created dynamicly
resmgr -export segp -sep '|''|' -noHead -colNames "dbIndex date''DATE npath" -isMandat "" -filter "npath(~NOC Reporting~Alcatel-Lucent 5620 SAM*)" -filterRule "(%(segp.type) = 'rule') AND (%(segp.dbIndex) > '70000')" -order npath
Find subelements that use a property - by property dbIndex
resmgr -export se -colNames "seprp.dbIndex seprp.name dbIndex elt.name " -filterRule "(%(seprp.dbIndex) = '100038614')" resmgr -export elt -colNames "seprp.dbIndex seprp.name dbIndex elt.name " -filterRule "(%(seprp.dbIndex) = '100038614')"
Find groups that a particular sub-element is in
resmgr -export segp -colNames "npath" -filter "segp.npath(~Sub-Element Collect*) se.dbIndex(200239991)"
Then find the requests against one of those groups
resmgr -export segpreq -colNames "fgp.nName state status" -filter "segp.npath(~PATH)"
Find the segp that a formula is being collected against
resmgr -export segpreq -colNames "segp.npath state status" -filter "frm.dbIndex(10219)"
Filter rule example
resmgr -export se -colNames "seprp.PROPERTYNAME:value name dbIndex" -filterRule "%(fam.name) = 'Juniper_CoS' AND %(seprp.PROPERTYNAME:value) IS NOT NULL AND %(seprp.PROPERTYNAME:value) LIKE '%Tasman%'"
Export Per Profile, the number of subelements
resmgr -export se -noHead -[[List Forced]] -sep "," -colNames "elt.profil fam.name" -filterRule "%(elt.profil) LIKE 'bulk_%'" | sort | uniq -c .. and remove those that are off (nicer to see total count, then remove duds. resmgr -export se -noHead -[[List Forced]] -sep "," -colNames "elt.profil fam.name" -filterRule "%(elt.profil) LIKE 'bulk_%' AND %(state) = 'off' " | sort | uniq -c and V2... echo "###count channel, profile, subelement type###" resmgr -export se -noHead -[[List Forced]] -sep "," -colNames "elt.collector elt.profil fam.name" -filterRule "%(elt.collector) LIKE '_' AND %(state) = 'on' " | sort | uniq -c
Find Missing devices - how many times have we been unable to find the device
resmgr -export elt -colNames " name eprp.ipAddress:value missing" -filterRule "%(elt.missing) != '0' "
Contents
Users
Find Report groups a user is linked to
resmgr -export rugp -colNames "rusr.name name" -filter "rusr.name('''name''')" remember to escape '\' with '\\' when importing users
Find dvnavigator group someone is in
resmgr -export rugp -colNames "name npath" -filter "rusr.name('''name''')"
Resource Manager Issues
Issues with running out of memory
Did you try yo add the -loadMemory option to the command? It is a bit unclear what command you trying to run but in the case off:
resmgr -import se -colNames "dbIndex nop seprp.name seprp.value" -file file1.txt
it becomes:
resmgr -import se -colNames "dbIndex nop seprp.name seprp.value" -loadMemory "se D 0 seprp D 0" -file file1.txt
The resmgr pre-fetches data from the database in order to speed up importing, the data exceeds 4G (32 bit process) and the process runs out of memory. The option mentioned above will turn off the pre-fetch of data for the columns I've highlighted and is possible to speed up the import process.
Resource Manager Issue on AIX
A core file is created when the column "data" is included in the export columns list Run the resmgr command that is failing in debug mode to see the sql query that is causing problem:
: bash-2.05$ resmgr -export app -colNames "dbIndex name data" -DList sql | more : DEBUG DBConnect : DBConnect::[[Is Locked]] : select str''name,int''pid,str''host from pfa''bolts where str''lock = 'resmgr' and int''mod = 1 : DEBUG DBUser : DBUser::Load : sqlQuery = SELECT idx''ind,str''name,str''fullname FROM user''desc : DEBUG DBUser : DBUser::Load : sqlQuery = SELECT idx''group,idx''user FROM user''group''user : DEBUG DBUser : DBUser::Load : sqlQuery = SELECT idx''ind,str''name,str''comment FROM user''group : DEBUG DBUser : DBUser::Load : sqlQuery = SELECT idx''group,str''module''name,str''right FROM user_permission : sqlQuery=insert into pfa''register (str''name,int''pid,str''host,str''display,int''port,str''user,str''date,int''status,str''comment) values( 'resmgr : ', 2946, 'myhostname', 'NONE', 0, 'pvuser', '1284103490', 0, 'NONE' ) : DEBUG ::DBSpace : DBInterface::[[Exec Query]] : sqlQuery = begin dbms''application''info.set_action('Export of app'); end; : # type = app : # col = dbIndex name data : # filter = : # order = : # sep = |_| : # sepRec = <E> : # rule = : # filterRule = : # : # cmdLine = -export app -colNames "dbIndex name data" : DEBUG ::DBSpace : DBInterface::''[[Fetch Export]] : sqlQuery = SELECT APDE.idx''ind ,APDE.str''name ,APDE.raw''properties FROM APP_DESC APDE : 28500|''|AP Health|''|<?xml version="1.0" encoding="UTF-8"?>
Edit the file <datamart home>/bin/resmgr and add the following text LDR_CNTRL
#!/bin/sh ARCHIVE_NAME=$PVMHOME/arc/tools.ar export ARCHIVE_NAME LDR_CNTRL="MAXDATA=0x40000000" arcget `basename $0` -noX "$@"
LDR_CNTRL sets the amount of heap memory available to 32 bit process on AIX. By setting it to 0x40000000 it gives the application more memory (1 GB). 1.4. The fix for this issue is scheduled to be delivered in TNPM 1.3.1 ; In case the solution doesn't work, please collect the following details and send them to IBM Support : 2.1. Attempt to perform the resmgr export command with '-D 10' specified and pipe the output to a log file. Send on the log file. ; 2.2. locate the core file and run the following command : dbx --C core ; At the dbx command prompt execute the following command : dbx> where : 2.3. Capture all the output of this command (including the header information ) and send it onto IBM Support.
Should only be one ROOT group 1450680 2014-02-04
Problem
Attempts to open the "Request Editor" GUI results in "Unable to retrieve the ROOT Subelement group" splash screen error. "Unable to retrieve the ROOT Subelement group" splash screen error Cause
The "ROOTROOT" Subelement Group can't be retrieved when the Request Editor initializes the Proviso metadata model and its trees
Checks
- Verify that there are no 'orphaned' Sub Element Groups by running `resmgr` command
- resmgr -export segp -colNames "dbIndex type state origin name user" -filter "segparent.dbIndex(is null)"
- it should return only one line
- 3||static||on||APinstall||||ROOTROOT||||APdev||
and column "type" should by 'static'
Fix: If the Sub Element Group contains 'orphaned' groups, contact IBM Support for further instructions.
- If the 'type' shows up as non 'static' ('rule' for example), change it to 'static' by using `resmgr` command
- resmgr -import segp -colNames "dbIndex type state origin name user" -line "3||static||on||APinstall||||ROOTROOT||||APdev||"
Release Datamart un-owned locks
Sometimes the datamart processes close down and do not release their locks from the cfgregister (pfaregister) table. This will eventually lead to datamart commands (especially resmgr) failing due to an oracle violation (could not write). Essentially the lock is pid + host, so if a process tries to run and is a pid that already has a lock in the table, it will bork. Run the following command often to clear these locks - or open the pvmstat tool - 'remove locks'. Note this is not the same command is pvmstat --unlockAll which will blast away all the locks, even for running processes (argh bad)
pvmstat -noX -D 10 -verbose